# HG changeset patch # User Etan Reisner # Date 1231389462 0 # Node ID fe5179d40a510d50e6b9c6328ef914e6cae69f90 # Parent 06ab3599f0dbc334d1080b560262efccce487a7c 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. diff -r 06ab3599f0db -r fe5179d40a51 pidgin/gtkaccount.c --- a/pidgin/gtkaccount.c Wed Jan 07 15:57:08 2009 +0000 +++ b/pidgin/gtkaccount.c Thu Jan 08 04:37:42 2009 +0000 @@ -1545,7 +1545,10 @@ pidgin_dialog_add_button(GTK_DIALOG(win), GTK_STOCK_CANCEL, G_CALLBACK(cancel_account_prefs_cb), dialog); /* Save button */ - button = pidgin_dialog_add_button(GTK_DIALOG(win), GTK_STOCK_SAVE, G_CALLBACK(ok_account_prefs_cb), dialog); + button = pidgin_dialog_add_button(GTK_DIALOG(win), + (type == PIDGIN_ADD_ACCOUNT_DIALOG) ? GTK_STOCK_ADD : GTK_STOCK_SAVE, + G_CALLBACK(ok_account_prefs_cb), + dialog); if (dialog->account == NULL) gtk_widget_set_sensitive(button, FALSE); dialog->ok_button = button; diff -r 06ab3599f0db -r fe5179d40a51 pidgin/gtkpounce.c --- 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); diff -r 06ab3599f0db -r fe5179d40a51 pidgin/gtksmiley.c --- a/pidgin/gtksmiley.c Wed Jan 07 15:57:08 2009 +0000 +++ b/pidgin/gtksmiley.c Thu Jan 08 04:37:42 2009 +0000 @@ -37,7 +37,7 @@ #include "gtkutils.h" #include "pidginstock.h" -#define PIDGIN_RESPONSE_EDIT 1000 +#define PIDGIN_RESPONSE_MODIFY 1000 struct _PidginSmiley { @@ -590,7 +590,7 @@ GTK_RESPONSE_NO, selected > 0); gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog->window), - PIDGIN_RESPONSE_EDIT, selected > 0); + PIDGIN_RESPONSE_MODIFY, selected > 0); } static void @@ -682,7 +682,7 @@ g_free(smiley_manager); smiley_manager = NULL; break; - case PIDGIN_RESPONSE_EDIT: + case PIDGIN_RESPONSE_MODIFY: /* Find smiley of selection... */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dialog->treeview)); gtk_tree_selection_selected_foreach(selection, edit_selected_cb, dialog); @@ -713,7 +713,7 @@ NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_ADD, GTK_RESPONSE_YES, - PIDGIN_STOCK_EDIT, PIDGIN_RESPONSE_EDIT, + PIDGIN_STOCK_MODIFY, PIDGIN_RESPONSE_MODIFY, GTK_STOCK_DELETE, GTK_RESPONSE_NO, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); @@ -722,8 +722,8 @@ gtk_window_set_role(GTK_WINDOW(win), "custom_smiley_manager"); gtk_container_set_border_width(GTK_CONTAINER(win),PIDGIN_HIG_BORDER); gtk_dialog_set_response_sensitive(GTK_DIALOG(win), GTK_RESPONSE_NO, FALSE); - gtk_dialog_set_response_sensitive(GTK_DIALOG(win), PIDGIN_RESPONSE_EDIT, - FALSE); + gtk_dialog_set_response_sensitive(GTK_DIALOG(win), + PIDGIN_RESPONSE_MODIFY, FALSE); g_signal_connect(win, "response", G_CALLBACK(smiley_manager_select_cb), dialog);