Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
25283:06ab3599f0db | 25284:fe5179d40a51 |
---|---|
482 (account && account->gc) ? account->gc->flags : PURPLE_CONNECTION_HTML); | 482 (account && account->gc) ? account->gc->flags : PURPLE_CONNECTION_HTML); |
483 } | 483 } |
484 | 484 |
485 void | 485 void |
486 pidgin_pounce_editor_show(PurpleAccount *account, const char *name, | 486 pidgin_pounce_editor_show(PurpleAccount *account, const char *name, |
487 PurplePounce *cur_pounce) | 487 PurplePounce *cur_pounce) |
488 { | 488 { |
489 PidginPounceDialog *dialog; | 489 PidginPounceDialog *dialog; |
490 GtkWidget *window; | 490 GtkWidget *window; |
491 GtkWidget *label; | 491 GtkWidget *label; |
492 GtkWidget *vbox1, *vbox2; | 492 GtkWidget *vbox1, *vbox2; |
846 /* Cancel button */ | 846 /* Cancel button */ |
847 button = gtk_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); | 847 button = gtk_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); |
848 g_signal_connect(G_OBJECT(button), "clicked", | 848 g_signal_connect(G_OBJECT(button), "clicked", |
849 G_CALLBACK(cancel_cb), dialog); | 849 G_CALLBACK(cancel_cb), dialog); |
850 | 850 |
851 /* Save button */ | 851 /* Save/Add button */ |
852 dialog->save_button = button = gtk_dialog_add_button(GTK_DIALOG(window), GTK_STOCK_SAVE, GTK_RESPONSE_OK); | 852 dialog->save_button = button = gtk_dialog_add_button(GTK_DIALOG(window), |
853 (cur_pounce == NULL ? GTK_STOCK_ADD : GTK_STOCK_SAVE), | |
854 GTK_RESPONSE_OK); | |
853 g_signal_connect(G_OBJECT(button), "clicked", | 855 g_signal_connect(G_OBJECT(button), "clicked", |
854 G_CALLBACK(save_pounce_cb), dialog); | 856 G_CALLBACK(save_pounce_cb), dialog); |
855 | 857 |
856 if (*gtk_entry_get_text(GTK_ENTRY(dialog->buddy_entry)) == '\0') | 858 if (*gtk_entry_get_text(GTK_ENTRY(dialog->buddy_entry)) == '\0') |
857 gtk_widget_set_sensitive(button, FALSE); | 859 gtk_widget_set_sensitive(button, FALSE); |
858 | 860 |
859 /* Setup drag-and-drop */ | 861 /* Setup drag-and-drop */ |
1271 G_CALLBACK(pounce_selected_cb), dialog); | 1273 G_CALLBACK(pounce_selected_cb), dialog); |
1272 | 1274 |
1273 /* Handle double-clicking */ | 1275 /* Handle double-clicking */ |
1274 g_signal_connect(G_OBJECT(treeview), "button_press_event", | 1276 g_signal_connect(G_OBJECT(treeview), "button_press_event", |
1275 G_CALLBACK(pounce_double_click_cb), dialog); | 1277 G_CALLBACK(pounce_double_click_cb), dialog); |
1276 | |
1277 | 1278 |
1278 gtk_container_add(GTK_CONTAINER(sw), treeview); | 1279 gtk_container_add(GTK_CONTAINER(sw), treeview); |
1279 gtk_widget_show(treeview); | 1280 gtk_widget_show(treeview); |
1280 | 1281 |
1281 /* Pouncee Column */ | 1282 /* Pouncee Column */ |