diff --git a/src/gnome-utils/dialog-utils.c b/src/gnome-utils/dialog-utils.c index 1f7ce9aa6e..c1263b2dd4 100644 --- a/src/gnome-utils/dialog-utils.c +++ b/src/gnome-utils/dialog-utils.c @@ -484,17 +484,18 @@ gnc_builder_connect_full_func(GtkBuilder *builder, void -gnc_gtk_dialog_add_button (GtkWidget *dialog, const gchar *label, const gchar *stock_id, guint response) +gnc_gtk_dialog_add_button (GtkWidget *dialog, const gchar *label, const gchar *icon_name, guint response) { GtkWidget *button; button = gtk_button_new_with_mnemonic(label); - if (stock_id) + if (icon_name) { GtkWidget *image; - image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON); - gtk_button_set_image(GTK_BUTTON(button), image); + image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON); + gtk_button_set_image (GTK_BUTTON(button), image); + g_object_set (button, "always-show-image", TRUE, NULL); // Maybe this should be a preference } g_object_set (button, "can-default", TRUE, NULL); gtk_widget_show_all(button); diff --git a/src/gnome-utils/dialog-utils.h b/src/gnome-utils/dialog-utils.h index 4e9f77e438..a30befaa65 100644 --- a/src/gnome-utils/dialog-utils.h +++ b/src/gnome-utils/dialog-utils.h @@ -87,13 +87,13 @@ void gnc_builder_connect_full_func (GtkBuilder *builder, * * @param label The text of the button. * - * @param stock_id The name of the stock button to use. + * @param icon_name The name of the icon button to use. * * @param response The response id to return if this button is * clicked.*/ void gnc_gtk_dialog_add_button (GtkWidget *dialog, const gchar *label, - const gchar *stock_id, + const gchar *icon_name, guint response); /** Note: This dialog is modal! (It calls gtk_dialog_run() which is modal.) diff --git a/src/gnome-utils/gnc-file.c b/src/gnome-utils/gnc-file.c index 8590d0b9b9..6fa0570fb2 100644 --- a/src/gnome-utils/gnc-file.c +++ b/src/gnome-utils/gnc-file.c @@ -791,11 +791,11 @@ RESTART: gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), FALSE); gnc_gtk_dialog_add_button(dialog, _("_Open Read-Only"), - _("Revert"), RESPONSE_READONLY); + "document-revert", RESPONSE_READONLY); gnc_gtk_dialog_add_button(dialog, _("_Create New File"), - _("New"), RESPONSE_NEW); + "document-new", RESPONSE_NEW); gnc_gtk_dialog_add_button(dialog, _("Open _Anyway"), - _("Open"), RESPONSE_OPEN); + "document-open", RESPONSE_OPEN); if (shutdown_cb) gtk_dialog_add_button(GTK_DIALOG(dialog), _("Quit"), RESPONSE_QUIT); diff --git a/src/gnome-utils/gnc-main-window.c b/src/gnome-utils/gnc-main-window.c index 4304b55660..d76a25b1eb 100644 --- a/src/gnome-utils/gnc-main-window.c +++ b/src/gnome-utils/gnc-main-window.c @@ -2936,7 +2936,7 @@ gnc_main_window_open_page (GncMainWindow *window, if (icon != NULL) { - image = gtk_image_new_from_stock (icon, GTK_ICON_SIZE_MENU); + image = gtk_image_new_from_icon_name (icon, GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_box_pack_start (GTK_BOX (tab_hbox), image, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (tab_hbox), label, TRUE, TRUE, 0); diff --git a/src/gnome-utils/gnc-tree-control-split-reg.c b/src/gnome-utils/gnc-tree-control-split-reg.c index 25eda8769b..a11b4fd2f1 100644 --- a/src/gnome-utils/gnc-tree-control-split-reg.c +++ b/src/gnome-utils/gnc-tree-control-split-reg.c @@ -886,7 +886,7 @@ gnc_tree_control_split_reg_reinit (GncTreeViewSplitReg *view, gpointer data) gtk_dialog_add_button (GTK_DIALOG (dialog), _("Cancel"), GTK_RESPONSE_CANCEL); gnc_gtk_dialog_add_button(dialog, _("_Remove Splits"), - _("Delete"), GTK_RESPONSE_ACCEPT); + "edit-delete", GTK_RESPONSE_ACCEPT); response = gnc_dialog_run (GTK_DIALOG(dialog), warning); gtk_widget_destroy (dialog); if (response != GTK_RESPONSE_ACCEPT) @@ -1023,7 +1023,7 @@ gnc_tree_control_split_reg_delete (GncTreeViewSplitReg *view, gpointer data) gtk_dialog_add_button (GTK_DIALOG (dialog), _("Cancel"), GTK_RESPONSE_CANCEL); gnc_gtk_dialog_add_button (dialog, _("_Delete Split"), - _("Delete"), GTK_RESPONSE_ACCEPT); + "edit-delete", GTK_RESPONSE_ACCEPT); response = gnc_dialog_run (GTK_DIALOG (dialog), warning); gtk_widget_destroy (dialog); if (response != GTK_RESPONSE_ACCEPT) @@ -1063,7 +1063,7 @@ gnc_tree_control_split_reg_delete (GncTreeViewSplitReg *view, gpointer data) gtk_dialog_add_button (GTK_DIALOG (dialog), _("Cancel"), GTK_RESPONSE_CANCEL); gnc_gtk_dialog_add_button (dialog, _("_Delete Transaction"), - _("Delete"), GTK_RESPONSE_ACCEPT); + "edit-delete", GTK_RESPONSE_ACCEPT); response = gnc_dialog_run (GTK_DIALOG (dialog), warning); gtk_widget_destroy (dialog); if (response != GTK_RESPONSE_ACCEPT) diff --git a/src/gnome/gnc-plugin-page-register.c b/src/gnome/gnc-plugin-page-register.c index 4ba43b2558..f7eae111cc 100644 --- a/src/gnome/gnc-plugin-page-register.c +++ b/src/gnome/gnc-plugin-page-register.c @@ -1569,11 +1569,11 @@ gnc_plugin_page_register_finish_pending (GncPluginPage *page) "Would you like to save the changes to this transaction, " "discard the transaction, or cancel the operation?")); gnc_gtk_dialog_add_button(dialog, _("_Discard Transaction"), - _("Delete"), GTK_RESPONSE_REJECT); + "edit-delete", GTK_RESPONSE_REJECT); gtk_dialog_add_button(GTK_DIALOG(dialog), _("Cancel"), GTK_RESPONSE_CANCEL); gnc_gtk_dialog_add_button(dialog, _("_Save Transaction"), - _("Save"), GTK_RESPONSE_ACCEPT); + "document-save", GTK_RESPONSE_ACCEPT); response = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); diff --git a/src/gnome/gnc-plugin-page-register2.c b/src/gnome/gnc-plugin-page-register2.c index 131a64537e..d7fe4b6c69 100644 --- a/src/gnome/gnc-plugin-page-register2.c +++ b/src/gnome/gnc-plugin-page-register2.c @@ -1626,11 +1626,11 @@ gnc_plugin_page_register2_finish_pending (GncPluginPage *page) //this works "Would you like to save the changes to this transaction, " "discard the transaction, or cancel the operation?")); gnc_gtk_dialog_add_button (dialog, _("_Discard Transaction"), - _("Delete"), GTK_RESPONSE_REJECT); + "edit-delete", GTK_RESPONSE_REJECT); gtk_dialog_add_button (GTK_DIALOG (dialog), _("Cancel"), GTK_RESPONSE_CANCEL); gnc_gtk_dialog_add_button (dialog, _("_Save Transaction"), - _("Save"), GTK_RESPONSE_ACCEPT); + "document-save", GTK_RESPONSE_ACCEPT); response = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); diff --git a/src/gnome/gnc-split-reg.c b/src/gnome/gnc-split-reg.c index e94c902ca6..c76d51d575 100644 --- a/src/gnome/gnc-split-reg.c +++ b/src/gnome/gnc-split-reg.c @@ -872,7 +872,7 @@ gsr_default_reinit_handler( GNCSplitReg *gsr, gpointer data ) gtk_dialog_add_button(GTK_DIALOG(dialog), _("Cancel"), GTK_RESPONSE_CANCEL); gnc_gtk_dialog_add_button(dialog, _("_Remove Splits"), - _("Delete"), GTK_RESPONSE_ACCEPT); + "edit-delete", GTK_RESPONSE_ACCEPT); response = gnc_dialog_run(GTK_DIALOG(dialog), warning); gtk_widget_destroy (dialog); if (response != GTK_RESPONSE_ACCEPT) @@ -1253,7 +1253,7 @@ gsr_default_delete_handler( GNCSplitReg *gsr, gpointer data ) gtk_dialog_add_button(GTK_DIALOG(dialog), _("Cancel"), GTK_RESPONSE_CANCEL); gnc_gtk_dialog_add_button(dialog, _("_Delete Split"), - _("Delete"), GTK_RESPONSE_ACCEPT); + "edit-delete", GTK_RESPONSE_ACCEPT); response = gnc_dialog_run(GTK_DIALOG(dialog), warning); gtk_widget_destroy (dialog); if (response != GTK_RESPONSE_ACCEPT) @@ -1293,7 +1293,7 @@ gsr_default_delete_handler( GNCSplitReg *gsr, gpointer data ) gtk_dialog_add_button(GTK_DIALOG(dialog), _("Cancel"), GTK_RESPONSE_CANCEL); gnc_gtk_dialog_add_button(dialog, _("_Delete Transaction"), - _("Delete"), GTK_RESPONSE_ACCEPT); + "edit-delete", GTK_RESPONSE_ACCEPT); response = gnc_dialog_run(GTK_DIALOG(dialog), warning); gtk_widget_destroy (dialog); if (response != GTK_RESPONSE_ACCEPT) diff --git a/src/import-export/csv-imp/gnc-csv-gnumeric-popup.c b/src/import-export/csv-imp/gnc-csv-gnumeric-popup.c index 00c313235a..c821848d79 100644 --- a/src/import-export/csv-imp/gnc-csv-gnumeric-popup.c +++ b/src/import-export/csv-imp/gnc-csv-gnumeric-popup.c @@ -118,7 +118,7 @@ gnumeric_create_popup_menu_list (GSList *elements, gtk_widget_set_sensitive (GTK_WIDGET (item), FALSE); if (pix_name != NULL) { - GtkWidget *image = gtk_image_new_from_stock (pix_name, + GtkWidget *image = gtk_image_new_from_icon_name (pix_name, GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (