]> git.0d.be Git - empathy.git/commitdiff
Add help button on accounts dialog. Fixes bug #533732 (Milo Casagrande).
authorXavier Claessens <xclaesse@src.gnome.org>
Wed, 21 May 2008 09:19:39 +0000 (09:19 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Wed, 21 May 2008 09:19:39 +0000 (09:19 +0000)
svn path=/trunk/; revision=1114

libempathy-gtk/empathy-accounts-dialog.c
libempathy-gtk/empathy-accounts-dialog.glade

index e48aaab31a32a98de60923a15e0df47a0d4a5bd2..177fc6fe8624abc787414e3b870d70e3e626fc5e 100644 (file)
@@ -138,6 +138,8 @@ static void       accounts_dialog_button_back_clicked_cb    (GtkWidget
                                                             EmpathyAccountsDialog    *dialog);
 static void       accounts_dialog_button_add_clicked_cb     (GtkWidget                *button,
                                                             EmpathyAccountsDialog    *dialog);
+static void       accounts_dialog_button_help_clicked_cb    (GtkWidget                *button,
+                                                            EmpathyAccountsDialog    *dialog);
 static void       accounts_dialog_remove_response_cb        (GtkWidget                *dialog,
                                                             gint                      response,
                                                             McAccount                *account);
@@ -883,6 +885,13 @@ accounts_dialog_button_add_clicked_cb (GtkWidget             *button,
        gtk_widget_grab_focus (dialog->combobox_profile);
 }
 
+static void
+accounts_dialog_button_help_clicked_cb (GtkWidget             *button,
+                                       EmpathyAccountsDialog *dialog)
+{
+       empathy_url_show ("ghelp:empathy?empathy-create-account");
+}
+
 static void
 accounts_dialog_remove_response_cb (GtkWidget *dialog,
                                    gint       response,
@@ -944,7 +953,9 @@ accounts_dialog_response_cb (GtkWidget            *widget,
                             gint                  response,
                             EmpathyAccountsDialog *dialog)
 {
-       gtk_widget_destroy (widget);
+       if (response == GTK_RESPONSE_CLOSE) {
+               gtk_widget_destroy (widget);
+       }
 }
 
 static void
@@ -995,10 +1006,8 @@ GtkWidget *
 empathy_accounts_dialog_show (GtkWindow *parent)
 {
        static EmpathyAccountsDialog *dialog = NULL;
-       GladeXML                    *glade;
-       gchar                       *filename;
-       GtkWidget                   *bbox;
-       GtkWidget                   *button_close;
+       GladeXML                     *glade;
+       gchar                        *filename;
 
        if (dialog) {
                gtk_window_present (GTK_WINDOW (dialog->window));
@@ -1018,7 +1027,6 @@ empathy_accounts_dialog_show (GtkWindow *parent)
                                       "label_no_account", &dialog->label_no_account,
                                       "label_no_account_blurb", &dialog->label_no_account_blurb,
                                       "alignment_settings", &dialog->alignment_settings,
-                                      "dialog-action_area", &bbox,
                                       "treeview", &dialog->treeview,
                                       "frame_new_account", &dialog->frame_new_account,
                                       "hbox_type", &dialog->hbox_type,
@@ -1028,7 +1036,6 @@ empathy_accounts_dialog_show (GtkWindow *parent)
                                       "label_name", &dialog->label_name,
                                       "button_add", &dialog->button_add,
                                       "button_remove", &dialog->button_remove,
-                                      "button_close", &button_close,
                                       NULL);
        g_free (filename);
 
@@ -1040,6 +1047,7 @@ empathy_accounts_dialog_show (GtkWindow *parent)
                              "button_back", "clicked", accounts_dialog_button_back_clicked_cb,
                              "button_add", "clicked", accounts_dialog_button_add_clicked_cb,
                              "button_remove", "clicked", accounts_dialog_button_remove_clicked_cb,
+                             "button_help", "clicked", accounts_dialog_button_help_clicked_cb,
                              NULL);
 
        g_object_add_weak_pointer (G_OBJECT (dialog->window), (gpointer) &dialog);
index 9ed29b8da59cadd42f2ec00a4e1e245bf0286fca..9678092f217fde99b791d3bfacdd9dde635093f6 100644 (file)
@@ -328,6 +328,19 @@ If you do not want to add an account, simply click on the account you want to co
           <widget class="GtkHButtonBox" id="dialog-action_area">
             <property name="visible">True</property>
             <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="button_help">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-help</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-11</property>
+              </widget>
+              <packing>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
             <child>
               <widget class="GtkButton" id="button_close">
                 <property name="visible">True</property>
@@ -335,8 +348,11 @@ If you do not want to add an account, simply click on the account you want to co
                 <property name="can_default">True</property>
                 <property name="label">gtk-close</property>
                 <property name="use_stock">True</property>
-                <property name="response_id">-6</property>
+                <property name="response_id">-7</property>
               </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
             </child>
           </widget>
           <packing>