diff options
author | Elliott Sales de Andrade <qulogic@pidgin.im> | 2018-06-19 20:06:45 -0400 |
---|---|---|
committer | Elliott Sales de Andrade <qulogic@pidgin.im> | 2018-06-19 20:06:45 -0400 |
commit | 78983f012caa8ee6b287f63b00573776df7293bf (patch) | |
tree | 2bec61172eb2c88c48a66f5703d00364def325bb | |
parent | 8d5c3934cf3e0113a1dd96835428a972c6649fcc (diff) | |
download | pidgin-78983f012caa8ee6b287f63b00573776df7293bf.tar.gz |
prefs: Move pidgin_prefs_checkbox earlier.
-rw-r--r-- | pidgin/gtkprefs.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/pidgin/gtkprefs.c b/pidgin/gtkprefs.c index bc9ca220c0..e27a0ea9a5 100644 --- a/pidgin/gtkprefs.c +++ b/pidgin/gtkprefs.c @@ -481,6 +481,32 @@ pidgin_prefs_dropdown(GtkWidget *box, const gchar *title, PurplePrefType type, return dropdown; } +static void +set_bool_pref(GtkWidget *w, const char *key) +{ + purple_prefs_set_bool(key, + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); +} + +GtkWidget * +pidgin_prefs_checkbox(const char *text, const char *key, GtkWidget *page) +{ + GtkWidget *button; + + button = gtk_check_button_new_with_mnemonic(text); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), + purple_prefs_get_bool(key)); + + gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); + + g_signal_connect(G_OBJECT(button), "clicked", + G_CALLBACK(set_bool_pref), (char *)key); + + gtk_widget_show(button); + + return button; +} + static void keyring_page_cleanup(void); static void @@ -3959,32 +3985,6 @@ pidgin_prefs_show(void) } static void -set_bool_pref(GtkWidget *w, const char *key) -{ - purple_prefs_set_bool(key, - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); -} - -GtkWidget * -pidgin_prefs_checkbox(const char *text, const char *key, GtkWidget *page) -{ - GtkWidget *button; - - button = gtk_check_button_new_with_mnemonic(text); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), - purple_prefs_get_bool(key)); - - gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); - - g_signal_connect(G_OBJECT(button), "clicked", - G_CALLBACK(set_bool_pref), (char *)key); - - gtk_widget_show(button); - - return button; -} - -static void smiley_theme_pref_cb(const char *name, PurplePrefType type, gconstpointer value, gpointer data) { |