From: Xavier Claessens Date: Tue, 18 Mar 2008 16:32:20 +0000 (+0000) Subject: Hide unused functions with #if 0 X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=38584b7ad5ef88ce37e78e29835bc419a7083eb2 Hide unused functions with #if 0 svn path=/trunk/; revision=816 --- diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c index 4d3fe178..b6ad3855 100644 --- a/src/empathy-preferences.c +++ b/src/empathy-preferences.c @@ -85,15 +85,10 @@ static void preferences_languages_cell_toggled_cb (GtkCellRendererToggle static void preferences_themes_setup (EmpathyPreferences *preferences); static void preferences_widget_sync_bool (const gchar *key, GtkWidget *widget); -static void preferences_widget_sync_int (const gchar *key, - GtkWidget *widget); static void preferences_widget_sync_string (const gchar *key, GtkWidget *widget); static void preferences_widget_sync_string_combo (const gchar *key, GtkWidget *widget); -static void preferences_notify_int_cb (EmpathyConf *conf, - const gchar *key, - gpointer user_data); static void preferences_notify_string_cb (EmpathyConf *conf, const gchar *key, gpointer user_data); @@ -106,12 +101,6 @@ static void preferences_notify_bool_cb (EmpathyConf static void preferences_notify_sensitivity_cb (EmpathyConf *conf, const gchar *key, gpointer user_data); -static void preferences_hookup_spin_button (EmpathyPreferences *preferences, - const gchar *key, - GtkWidget *widget); -static void preferences_hookup_entry (EmpathyPreferences *preferences, - const gchar *key, - GtkWidget *widget); static void preferences_hookup_toggle_button (EmpathyPreferences *preferences, const gchar *key, GtkWidget *widget); @@ -124,10 +113,6 @@ static void preferences_hookup_string_combo (EmpathyPreferences static void preferences_hookup_sensitivity (EmpathyPreferences *preferences, const gchar *key, GtkWidget *widget); -static void preferences_spin_button_value_changed_cb (GtkWidget *button, - gpointer user_data); -static void preferences_entry_value_changed_cb (GtkWidget *entry, - gpointer user_data); static void preferences_toggle_button_toggled_cb (GtkWidget *button, gpointer user_data); static void preferences_radio_button_toggled_cb (GtkWidget *button, @@ -524,18 +509,6 @@ preferences_widget_sync_bool (const gchar *key, GtkWidget *widget) } } -static void -preferences_widget_sync_int (const gchar *key, GtkWidget *widget) -{ - gint value; - - if (empathy_conf_get_int (empathy_conf_get (), key, &value)) { - if (GTK_IS_SPIN_BUTTON (widget)) { - gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), value); - } - } -} - static void preferences_widget_sync_string (const gchar *key, GtkWidget *widget) { @@ -616,14 +589,6 @@ preferences_widget_sync_string_combo (const gchar *key, GtkWidget *widget) g_free (value); } -static void -preferences_notify_int_cb (EmpathyConf *conf, - const gchar *key, - gpointer user_data) -{ - preferences_widget_sync_int (key, user_data); -} - static void preferences_notify_string_cb (EmpathyConf *conf, const gchar *key, @@ -660,6 +625,27 @@ preferences_notify_sensitivity_cb (EmpathyConf *conf, } } +#if 0 +static void +preferences_widget_sync_int (const gchar *key, GtkWidget *widget) +{ + gint value; + + if (empathy_conf_get_int (empathy_conf_get (), key, &value)) { + if (GTK_IS_SPIN_BUTTON (widget)) { + gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), value); + } + } +} + +static void +preferences_notify_int_cb (EmpathyConf *conf, + const gchar *key, + gpointer user_data) +{ + preferences_widget_sync_int (key, user_data); +} + static void preferences_hookup_spin_button (EmpathyPreferences *preferences, const gchar *key, @@ -667,11 +653,6 @@ preferences_hookup_spin_button (EmpathyPreferences *preferences, { guint id; - /* Silence warning. */ - if (0) { - preferences_hookup_spin_button (preferences, key, widget); - } - preferences_widget_sync_int (key, widget); g_object_set_data_full (G_OBJECT (widget), "key", @@ -698,10 +679,6 @@ preferences_hookup_entry (EmpathyPreferences *preferences, { guint id; - if (0) { /* Silent warning before we use this function. */ - preferences_hookup_entry (preferences, key, widget); - } - preferences_widget_sync_string (key, widget); g_object_set_data_full (G_OBJECT (widget), "key", @@ -721,6 +698,33 @@ preferences_hookup_entry (EmpathyPreferences *preferences, } } +static void +preferences_spin_button_value_changed_cb (GtkWidget *button, + gpointer user_data) +{ + const gchar *key; + + key = g_object_get_data (G_OBJECT (button), "key"); + + empathy_conf_set_int (empathy_conf_get (), + key, + gtk_spin_button_get_value (GTK_SPIN_BUTTON (button))); +} + +static void +preferences_entry_value_changed_cb (GtkWidget *entry, + gpointer user_data) +{ + const gchar *key; + + key = g_object_get_data (G_OBJECT (entry), "key"); + + empathy_conf_set_string (empathy_conf_get (), + key, + gtk_entry_get_text (GTK_ENTRY (entry))); +} +#endif + static void preferences_hookup_toggle_button (EmpathyPreferences *preferences, const gchar *key, @@ -824,32 +828,6 @@ preferences_hookup_sensitivity (EmpathyPreferences *preferences, } } -static void -preferences_spin_button_value_changed_cb (GtkWidget *button, - gpointer user_data) -{ - const gchar *key; - - key = g_object_get_data (G_OBJECT (button), "key"); - - empathy_conf_set_int (empathy_conf_get (), - key, - gtk_spin_button_get_value (GTK_SPIN_BUTTON (button))); -} - -static void -preferences_entry_value_changed_cb (GtkWidget *entry, - gpointer user_data) -{ - const gchar *key; - - key = g_object_get_data (G_OBJECT (entry), "key"); - - empathy_conf_set_string (empathy_conf_get (), - key, - gtk_entry_get_text (GTK_ENTRY (entry))); -} - static void preferences_toggle_button_toggled_cb (GtkWidget *button, gpointer user_data)