diff options
author | Dan Williams <dcbw@redhat.com> | 2013-10-10 11:28:54 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2014-02-19 20:00:24 -0600 |
commit | 649f8cdf0a905bbfa68316adcfd84250a9ae8901 (patch) | |
tree | ca89cf47ae87342fa954410e124fd992ab420666 | |
parent | 55e34f334f6400d9a03d39d52ddccc27c85d408d (diff) | |
download | network-manager-applet-649f8cdf0a905bbfa68316adcfd84250a9ae8901.tar.gz |
editor: re-add ce_spin_output_with_default()
This time, it prints "default" in the spin button instead of "automatic"
when the spin holds the default value.
-rw-r--r-- | src/connection-editor/ce-page.c | 8 | ||||
-rw-r--r-- | src/connection-editor/ce-page.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/connection-editor/ce-page.c b/src/connection-editor/ce-page.c index 0e01023e..c63a7523 100644 --- a/src/connection-editor/ce-page.c +++ b/src/connection-editor/ce-page.c @@ -84,6 +84,14 @@ ce_spin_output_with_automatic (GtkSpinButton *spin, gpointer user_data) _("automatic")); } +gboolean +ce_spin_output_with_default (GtkSpinButton *spin, gpointer user_data) +{ + return spin_output_with_default_string (spin, + GPOINTER_TO_INT (user_data), + _("default")); +} + int ce_get_property_default (NMSetting *setting, const char *property_name) { diff --git a/src/connection-editor/ce-page.h b/src/connection-editor/ce-page.h index 794d20db..9d533203 100644 --- a/src/connection-editor/ce-page.h +++ b/src/connection-editor/ce-page.h @@ -120,6 +120,8 @@ GByteArray *ce_page_entry_to_mac (GtkEntry *entry, int type, gboolean *invalid); gboolean ce_spin_output_with_automatic (GtkSpinButton *spin, gpointer user_data); +gboolean ce_spin_output_with_default (GtkSpinButton *spin, gpointer user_data); + int ce_get_property_default (NMSetting *setting, const char *property_name); void ce_page_complete_init (CEPage *self, |