diff options
author | Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk> | 2009-05-30 01:53:38 +0800 |
---|---|---|
committer | Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk> | 2009-06-01 23:35:28 +0800 |
commit | c6d064ad5952f233d583ccd420c502b581d57a8c (patch) | |
tree | 43f66e39f2303c645138d461f60677d1ba1988ab /src/empathy-preferences.c | |
parent | c2c29925bcb51aa4b5bb5c6e07e52fa4c155ce95 (diff) | |
download | gsoc2013-empathy-c6d064ad5952f233d583ccd420c502b581d57a8c.tar gsoc2013-empathy-c6d064ad5952f233d583ccd420c502b581d57a8c.tar.gz gsoc2013-empathy-c6d064ad5952f233d583ccd420c502b581d57a8c.tar.bz2 gsoc2013-empathy-c6d064ad5952f233d583ccd420c502b581d57a8c.tar.lz gsoc2013-empathy-c6d064ad5952f233d583ccd420c502b581d57a8c.tar.xz gsoc2013-empathy-c6d064ad5952f233d583ccd420c502b581d57a8c.tar.zst gsoc2013-empathy-c6d064ad5952f233d583ccd420c502b581d57a8c.zip |
Add a Location tab in preferences
Diffstat (limited to 'src/empathy-preferences.c')
-rw-r--r-- | src/empathy-preferences.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c index 628db52da..ff74a8cdc 100644 --- a/src/empathy-preferences.c +++ b/src/empathy-preferences.c @@ -64,6 +64,12 @@ typedef struct { GtkWidget *treeview_spell_checker; + GtkWidget *checkbutton_location_publish; + GtkWidget *checkbutton_location_reduce_accuracy; + GtkWidget *checkbutton_location_resource_network; + GtkWidget *checkbutton_location_resource_cell; + GtkWidget *checkbutton_location_resource_gps; + GList *notify_ids; } EmpathyPreferences; @@ -247,6 +253,38 @@ preferences_setup_widgets (EmpathyPreferences *preferences) EMPATHY_PREFS_AUTOCONNECT, preferences->checkbutton_autoconnect); + preferences_hookup_toggle_button (preferences, + EMPATHY_PREFS_LOCATION_PUBLISH, + preferences->checkbutton_location_publish); + + preferences_hookup_toggle_button (preferences, + EMPATHY_PREFS_LOCATION_RESOURCE_NETWORK, + preferences->checkbutton_location_resource_network); + preferences_hookup_sensitivity (preferences, + EMPATHY_PREFS_LOCATION_PUBLISH, + preferences->checkbutton_location_resource_network); + + preferences_hookup_toggle_button (preferences, + EMPATHY_PREFS_LOCATION_RESOURCE_CELL, + preferences->checkbutton_location_resource_cell); + preferences_hookup_sensitivity (preferences, + EMPATHY_PREFS_LOCATION_PUBLISH, + preferences->checkbutton_location_resource_cell); + + preferences_hookup_toggle_button (preferences, + EMPATHY_PREFS_LOCATION_RESOURCE_GPS, + preferences->checkbutton_location_resource_gps); + preferences_hookup_sensitivity (preferences, + EMPATHY_PREFS_LOCATION_PUBLISH, + preferences->checkbutton_location_resource_gps); + + preferences_hookup_toggle_button (preferences, + EMPATHY_PREFS_LOCATION_REDUCE_ACCURACY, + preferences->checkbutton_location_reduce_accuracy); + preferences_hookup_sensitivity (preferences, + EMPATHY_PREFS_LOCATION_PUBLISH, + preferences->checkbutton_location_reduce_accuracy); + id = empathy_conf_notify_add (empathy_conf_get (), EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST, preferences_compact_contact_list_changed_cb, @@ -1009,6 +1047,8 @@ preferences_radio_button_toggled_cb (GtkWidget *button, } value = enum_value->value_nick; + } else if (key && strcmp (key, EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM) == 0) { + return; } empathy_conf_set_string (empathy_conf_get (), key, value); @@ -1094,6 +1134,11 @@ empathy_preferences_show (GtkWindow *parent) "checkbutton_sounds_disabled_away", &preferences->checkbutton_sounds_disabled_away, "treeview_sounds", &preferences->treeview_sounds, "treeview_spell_checker", &preferences->treeview_spell_checker, + "checkbutton_location_publish", &preferences->checkbutton_location_publish, + "checkbutton_location_reduce_accuracy", &preferences->checkbutton_location_reduce_accuracy, + "checkbutton_location_resource_network", &preferences->checkbutton_location_resource_network, + "checkbutton_location_resource_cell", &preferences->checkbutton_location_resource_cell, + "checkbutton_location_resource_gps", &preferences->checkbutton_location_resource_gps, NULL); g_free (filename); @@ -1124,6 +1169,13 @@ empathy_preferences_show (GtkWindow *parent) gtk_widget_show (page); } + if (TRUE) { /* FIXME */ + GtkWidget *page; + + page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferences->notebook), 4); + gtk_widget_show (page); + } + if (parent) { gtk_window_set_transient_for (GTK_WINDOW (preferences->dialog), GTK_WINDOW (parent)); |