empathy r1114 - trunk/libempathy-gtk



Author: xclaesse
Date: Wed May 21 09:19:39 2008
New Revision: 1114
URL: http://svn.gnome.org/viewvc/empathy?rev=1114&view=rev

Log:
Add help button on accounts dialog. Fixes bug #533732 (Milo Casagrande).


Modified:
   trunk/libempathy-gtk/empathy-accounts-dialog.c
   trunk/libempathy-gtk/empathy-accounts-dialog.glade

Modified: trunk/libempathy-gtk/empathy-accounts-dialog.c
==============================================================================
--- trunk/libempathy-gtk/empathy-accounts-dialog.c	(original)
+++ trunk/libempathy-gtk/empathy-accounts-dialog.c	Wed May 21 09:19:39 2008
@@ -138,6 +138,8 @@
 							     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);
@@ -884,6 +886,13 @@
 }
 
 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,
 				    McAccount *account)
@@ -944,7 +953,9 @@
 			     gint                  response,
 			     EmpathyAccountsDialog *dialog)
 {
-	gtk_widget_destroy (widget);
+	if (response == GTK_RESPONSE_CLOSE) {
+		gtk_widget_destroy (widget);
+	}
 }
 
 static void
@@ -995,10 +1006,8 @@
 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 @@
 				       "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 @@
 				       "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 @@
 			      "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);

Modified: trunk/libempathy-gtk/empathy-accounts-dialog.glade
==============================================================================
--- trunk/libempathy-gtk/empathy-accounts-dialog.glade	(original)
+++ trunk/libempathy-gtk/empathy-accounts-dialog.glade	Wed May 21 09:19:39 2008
@@ -329,14 +329,30 @@
             <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>
                 <property name="can_focus">True</property>
                 <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>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]