[network-manager-applet/dcbw/dcb: 2/5] editor: re-add ce_spin_output_with_default()
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/dcbw/dcb: 2/5] editor: re-add ce_spin_output_with_default()
- Date: Mon, 21 Oct 2013 22:08:46 +0000 (UTC)
commit 6a679dcbff7ee13643fb9b4f4d5697a7ac54602d
Author: Dan Williams <dcbw redhat com>
Date: Thu Oct 10 11:28:54 2013 -0500
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.
src/connection-editor/ce-page.c | 8 ++++++++
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 7065db6..7156211 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 794d20d..9d53320 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]