diff pidgin/gtkpounce.c @ 25284:fe5179d40a51

Make dialogs that double as add and save dialogs indicate the current action in the text of the confirm button as well as in the window title. This applies to the "Add/Modify Account" dialog and the "New/Edit Buddy Pounce" dialog. Also use the "Modify..." button in the "Custom Smiley Manager" dialog instead of an "Edit" button. The other dialogs all use Modify. This should all be translation neutral as all the new strings should have already existed as these are stock buttons.
author Etan Reisner <pidgin@unreliablesource.net>
date Thu, 08 Jan 2009 04:37:42 +0000
parents b948081819a6
children 94a6eb10c691
line wrap: on
line diff
--- a/pidgin/gtkpounce.c	Wed Jan 07 15:57:08 2009 +0000
+++ b/pidgin/gtkpounce.c	Thu Jan 08 04:37:42 2009 +0000
@@ -484,7 +484,7 @@
 
 void
 pidgin_pounce_editor_show(PurpleAccount *account, const char *name,
-							PurplePounce *cur_pounce)
+                          PurplePounce *cur_pounce)
 {
 	PidginPounceDialog *dialog;
 	GtkWidget *window;
@@ -848,10 +848,12 @@
 	g_signal_connect(G_OBJECT(button), "clicked",
 					 G_CALLBACK(cancel_cb), dialog);
 
-	/* Save button */
-	dialog->save_button = button = gtk_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_SAVE, GTK_RESPONSE_OK);
+	/* Save/Add button */
+	dialog->save_button = button = gtk_dialog_add_button(GTK_DIALOG(window),
+	                                                     (cur_pounce == NULL ? GTK_STOCK_ADD : GTK_STOCK_SAVE),
+	                                                     GTK_RESPONSE_OK);
 	g_signal_connect(G_OBJECT(button), "clicked",
-					 G_CALLBACK(save_pounce_cb), dialog);
+	                 G_CALLBACK(save_pounce_cb), dialog);
 
 	if (*gtk_entry_get_text(GTK_ENTRY(dialog->buddy_entry)) == '\0')
 		gtk_widget_set_sensitive(button, FALSE);
@@ -1274,7 +1276,6 @@
 	g_signal_connect(G_OBJECT(treeview), "button_press_event",
 					 G_CALLBACK(pounce_double_click_cb), dialog);
 
-
 	gtk_container_add(GTK_CONTAINER(sw), treeview);
 	gtk_widget_show(treeview);