]> git.0d.be Git - empathy.git/commitdiff
preferences: only show autoconnect when shell isn't running
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Mon, 19 Aug 2013 16:07:11 +0000 (18:07 +0200)
committerJonny Lamb <jonny.lamb@collabora.co.uk>
Tue, 20 Aug 2013 08:06:55 +0000 (10:06 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=701392

src/empathy-preferences.c
src/empathy-preferences.ui

index 6901aa9c8b88e366ed27b78d925306df0a6dbec8..b5e02b6501ff3e8f537719caeb1736bd2dbb2c85 100644 (file)
@@ -56,7 +56,9 @@ static const gchar * empathy_preferences_tabs[] =
 struct _EmpathyPreferencesPriv {
        GtkWidget *notebook;
 
 struct _EmpathyPreferencesPriv {
        GtkWidget *notebook;
 
+       GtkWidget *label_general_behavior;
        GtkWidget *checkbutton_events_notif_area;
        GtkWidget *checkbutton_events_notif_area;
+       GtkWidget *checkbutton_autoconnect;
 
        GtkWidget *treeview_sounds;
        GtkWidget *treeview_spell_checker;
 
        GtkWidget *treeview_sounds;
        GtkWidget *treeview_spell_checker;
@@ -1034,9 +1036,11 @@ empathy_preferences_init (EmpathyPreferences *preferences)
                "combobox_chat_theme_variant", &priv->combobox_chat_theme_variant,
                "hbox_chat_theme_variant", &priv->hbox_chat_theme_variant,
                "sw_chat_theme_preview", &priv->sw_chat_theme_preview,
                "combobox_chat_theme_variant", &priv->combobox_chat_theme_variant,
                "hbox_chat_theme_variant", &priv->hbox_chat_theme_variant,
                "sw_chat_theme_preview", &priv->sw_chat_theme_preview,
-               "checkbutton_events_notif_area", &priv->checkbutton_events_notif_area,
                "treeview_sounds", &priv->treeview_sounds,
                "treeview_spell_checker", &priv->treeview_spell_checker,
                "treeview_sounds", &priv->treeview_sounds,
                "treeview_spell_checker", &priv->treeview_spell_checker,
+               "label_general_behavior", &priv->label_general_behavior,
+               "checkbutton_events_notif_area", &priv->checkbutton_events_notif_area,
+               "checkbutton_autoconnect", &priv->checkbutton_autoconnect,
                NULL);
        g_free (filename);
 
                NULL);
        g_free (filename);
 
@@ -1127,12 +1131,19 @@ empathy_preferences_new (GtkWindow *parent,
 
        /* when running in Gnome Shell we must hide these options since they
         * are meaningless in that context:
 
        /* when running in Gnome Shell we must hide these options since they
         * are meaningless in that context:
+        * - General->Behavior label
         * - 'Display incoming events in the notification area' (General->Behavior)
         * - 'Display incoming events in the notification area' (General->Behavior)
+        * - 'Automatically connect at startup' (General->Behavior)
         * - 'Notifications' tab
         */
        priv = GET_PRIV (self);
        if (shell_running) {
         * - 'Notifications' tab
         */
        priv = GET_PRIV (self);
        if (shell_running) {
+               /* Behavior */
+               gtk_widget_hide (priv->label_general_behavior);
                gtk_widget_hide (priv->checkbutton_events_notif_area);
                gtk_widget_hide (priv->checkbutton_events_notif_area);
+               gtk_widget_hide (priv->checkbutton_autoconnect);
+
+               /* Notifications tab */
                notif_page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (priv->notebook),
                                                        EMPATHY_PREFERENCES_TAB_NOTIFICATIONS);
                gtk_widget_hide (notif_page);
                notif_page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (priv->notebook),
                                                        EMPATHY_PREFERENCES_TAB_NOTIFICATIONS);
                gtk_widget_hide (notif_page);
index a54dcd22dc15351bfbcb57cb7e99efd48a1d51b1..6e146d35cc6788971e5e64ae95e3fb6c6ac08f51 100644 (file)
               </object>
             </child>
             <child type="label">
               </object>
             </child>
             <child type="label">
-              <object class="GtkLabel" id="label612">
+              <object class="GtkLabel" id="label_general_behavior">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Behavior</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Behavior</property>