aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-03-19 00:32:20 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-03-19 00:32:20 +0800
commit38584b7ad5ef88ce37e78e29835bc419a7083eb2 (patch)
tree44856530189f1a7b3baca0b7928c645ad0b9ce09
parent8a4b2321006fd56b417e3c995c737dd7c0f364bd (diff)
downloadgsoc2013-empathy-38584b7ad5ef88ce37e78e29835bc419a7083eb2.tar
gsoc2013-empathy-38584b7ad5ef88ce37e78e29835bc419a7083eb2.tar.gz
gsoc2013-empathy-38584b7ad5ef88ce37e78e29835bc419a7083eb2.tar.bz2
gsoc2013-empathy-38584b7ad5ef88ce37e78e29835bc419a7083eb2.tar.lz
gsoc2013-empathy-38584b7ad5ef88ce37e78e29835bc419a7083eb2.tar.xz
gsoc2013-empathy-38584b7ad5ef88ce37e78e29835bc419a7083eb2.tar.zst
gsoc2013-empathy-38584b7ad5ef88ce37e78e29835bc419a7083eb2.zip
Hide unused functions with #if 0
svn path=/trunk/; revision=816
-rw-r--r--src/empathy-preferences.c118
1 files changed, 48 insertions, 70 deletions
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index 4d3fe1784..b6ad38554 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,
@@ -525,18 +510,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)
{
gchar *value;
@@ -617,14 +590,6 @@ preferences_widget_sync_string_combo (const gchar *key, GtkWidget *widget)
}
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,
gpointer user_data)
@@ -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",
@@ -722,6 +699,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,
GtkWidget *widget)
@@ -825,32 +829,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)
{