diff options
author | Pablo Barciela <[email protected]> | 2018-01-18 23:24:59 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-02-08 21:34:17 +0100 |
commit | 2217a021ca5c5ac918dd6e41c4ef29435b5a6b8e (patch) | |
tree | 136751a6809f3f9dc590c4fc8f0a588e7e86e190 | |
parent | 29d362e10ff63935fa1ecc12a0156b43fd3c11b9 (diff) | |
download | pluma-2217a021ca5c5ac918dd6e41c4ef29435b5a6b8e.tar.bz2 pluma-2217a021ca5c5ac918dd6e41c4ef29435b5a6b8e.tar.xz |
avoid deprecated GtkStock
27 files changed, 193 insertions, 174 deletions
diff --git a/docs/reference/pluma-sections.txt b/docs/reference/pluma-sections.txt index 2262969c..c9e9254a 100644 --- a/docs/reference/pluma-sections.txt +++ b/docs/reference/pluma-sections.txt @@ -222,7 +222,7 @@ PlumaPanelPrivate PlumaPanel pluma_panel_new pluma_panel_add_item -pluma_panel_add_item_with_stock_icon +pluma_panel_add_item_with_icon pluma_panel_remove_item pluma_panel_activate_item pluma_panel_item_is_active @@ -277,7 +277,7 @@ PlumaProgressMessageAreaPrivate <TITLE>PlumaProgressMessageArea</TITLE> PlumaProgressMessageArea pluma_progress_message_area_new -pluma_progress_message_area_set_stock_image +pluma_progress_message_area_set_image pluma_progress_message_area_set_markup pluma_progress_message_area_set_text pluma_progress_message_area_set_fraction @@ -699,7 +699,7 @@ pluma_utils_uri_has_writable_scheme pluma_utils_uri_has_file_scheme pluma_utils_menu_position_under_widget pluma_utils_menu_position_under_tree_view -pluma_gtk_button_new_with_stock_icon +pluma_gtk_button_new_with_icon pluma_dialog_add_button pluma_utils_escape_underscores pluma_utils_str_middle_truncate diff --git a/plugins/filebrowser/pluma-file-browser-plugin.c b/plugins/filebrowser/pluma-file-browser-plugin.c index b619309e..775d7b36 100644 --- a/plugins/filebrowser/pluma-file-browser-plugin.c +++ b/plugins/filebrowser/pluma-file-browser-plugin.c @@ -574,7 +574,7 @@ on_selection_changed_cb (GtkTreeSelection *selection, static GtkActionEntry extra_actions[] = { - {"SetActiveRoot", GTK_STOCK_JUMP_TO, N_("_Set root to active document"), + {"SetActiveRoot", "go-jump", N_("_Set root to active document"), NULL, N_("Set the root to the active document location"), G_CALLBACK (on_action_set_active_root)} @@ -717,7 +717,7 @@ pluma_file_browser_plugin_activate (PeasActivatable *activatable) image = gtk_image_new_from_pixbuf(pixbuf); g_object_unref(pixbuf); } else { - image = gtk_image_new_from_stock(GTK_STOCK_INDEX, GTK_ICON_SIZE_MENU); + image = gtk_image_new_from_icon_name("gtk-index", GTK_ICON_SIZE_MENU); } gtk_widget_show(image); @@ -1141,7 +1141,7 @@ on_confirm_no_trash_cb (PlumaFileBrowserWidget * widget, GTK_MESSAGE_QUESTION, message, secondary, - GTK_STOCK_DELETE, + "gtk-delete", NULL); g_free (secondary); @@ -1176,7 +1176,7 @@ on_confirm_delete_cb (PlumaFileBrowserWidget *widget, GTK_MESSAGE_QUESTION, message, secondary, - GTK_STOCK_DELETE, + "gtk-delete", NULL); g_free (message); diff --git a/plugins/filebrowser/pluma-file-browser-utils.c b/plugins/filebrowser/pluma-file-browser-utils.c index 3a232f8d..1443125a 100644 --- a/plugins/filebrowser/pluma-file-browser-utils.c +++ b/plugins/filebrowser/pluma-file-browser-utils.c @@ -149,7 +149,7 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window, GtkMessageType type, gchar const *message, gchar const *secondary, - gchar const * button_stock, + gchar const * button_image, gchar const * button_label) { GtkWidget *dlg; @@ -167,7 +167,12 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window, (GTK_MESSAGE_DIALOG (dlg), "%s", secondary); /* Add a cancel button */ - button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); + button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON, + "label", "gtk-cancel", + "use-stock", TRUE, + "use-underline", TRUE, + NULL)); + gtk_widget_show (button); gtk_widget_set_can_default (button, TRUE); @@ -176,10 +181,13 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window, GTK_RESPONSE_CANCEL); /* Add custom button */ - button = gtk_button_new_from_stock (button_stock); - + button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON, + "label", button_image, + "use-stock", TRUE, + "use-underline", TRUE, + NULL)); + if (button_label) { - gtk_button_set_use_stock (GTK_BUTTON (button), FALSE); gtk_button_set_label (GTK_BUTTON (button), button_label); } diff --git a/plugins/filebrowser/pluma-file-browser-utils.h b/plugins/filebrowser/pluma-file-browser-utils.h index 0ac4296a..ffe6159e 100644 --- a/plugins/filebrowser/pluma-file-browser-utils.h +++ b/plugins/filebrowser/pluma-file-browser-utils.h @@ -19,7 +19,7 @@ gboolean pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window, GtkMessageType type, gchar const *message, gchar const *secondary, - gchar const * button_stock, + gchar const * button_image, gchar const * button_label); #endif /* __PLUMA_FILE_BROWSER_UTILS_H__ */ diff --git a/plugins/filebrowser/pluma-file-browser-widget.c b/plugins/filebrowser/pluma-file-browser-widget.c index 46087bbf..6187696e 100644 --- a/plugins/filebrowser/pluma-file-browser-widget.c +++ b/plugins/filebrowser/pluma-file-browser-widget.c @@ -802,30 +802,30 @@ static const GtkActionEntry tree_actions_selection[] = {"FileMoveToTrash", "mate-stock-trash", N_("_Move to Trash"), NULL, N_("Move selected file or folder to trash"), G_CALLBACK (on_action_file_move_to_trash)}, - {"FileDelete", GTK_STOCK_DELETE, N_("_Delete"), NULL, + {"FileDelete", "edit-delete", N_("_Delete"), NULL, N_("Delete selected file or folder"), G_CALLBACK (on_action_file_delete)} }; static const GtkActionEntry tree_actions_file_selection[] = { - {"FileOpen", GTK_STOCK_OPEN, NULL, NULL, + {"FileOpen", "document-open", N_("_Open"), NULL, N_("Open selected file"), G_CALLBACK (on_action_file_open)} }; static const GtkActionEntry tree_actions[] = { - {"DirectoryUp", GTK_STOCK_GO_UP, N_("Up"), NULL, + {"DirectoryUp", "go-up", N_("Up"), NULL, N_("Open the parent folder"), G_CALLBACK (on_action_directory_up)} }; static const GtkActionEntry tree_actions_single_most_selection[] = { - {"DirectoryNew", GTK_STOCK_ADD, N_("_New Folder"), NULL, + {"DirectoryNew", "list-add", N_("_New Folder"), NULL, N_("Add new empty folder"), G_CALLBACK (on_action_directory_new)}, - {"FileNew", GTK_STOCK_NEW, N_("New F_ile"), NULL, + {"FileNew", "document-new", N_("New F_ile"), NULL, N_("Add new empty file"), G_CALLBACK (on_action_file_new)} }; @@ -838,22 +838,22 @@ static const GtkActionEntry tree_actions_single_selection[] = static const GtkActionEntry tree_actions_sensitive[] = { - {"DirectoryPrevious", GTK_STOCK_GO_BACK, N_("_Previous Location"), + {"DirectoryPrevious", "go-previous", N_("_Previous Location"), NULL, N_("Go to the previous visited location"), G_CALLBACK (on_action_directory_previous)}, - {"DirectoryNext", GTK_STOCK_GO_FORWARD, N_("_Next Location"), NULL, + {"DirectoryNext", "go-next", N_("_Next Location"), NULL, N_("Go to the next visited location"), G_CALLBACK (on_action_directory_next)}, - {"DirectoryRefresh", GTK_STOCK_REFRESH, N_("Re_fresh View"), NULL, + {"DirectoryRefresh", "view-refresh", N_("Re_fresh View"), NULL, N_("Refresh the view"), G_CALLBACK (on_action_directory_refresh)}, - {"DirectoryOpen", GTK_STOCK_OPEN, N_("_View Folder"), NULL, + {"DirectoryOpen", "document-open", N_("_View Folder"), NULL, N_("View folder in file manager"), G_CALLBACK (on_action_directory_open)} }; static const GtkToggleActionEntry tree_actions_toggle[] = { - {"FilterHidden", GTK_STOCK_DIALOG_AUTHENTICATION, + {"FilterHidden", "dialog-password", N_("Show _Hidden"), NULL, N_("Show hidden files and folders"), G_CALLBACK (on_action_filter_hidden), FALSE}, @@ -864,7 +864,7 @@ static const GtkToggleActionEntry tree_actions_toggle[] = static const GtkActionEntry bookmark_actions[] = { - {"BookmarkOpen", GTK_STOCK_OPEN, N_("_View Folder"), NULL, + {"BookmarkOpen", "document-open", N_("_View Folder"), NULL, N_("View folder in file manager"), G_CALLBACK (on_action_bookmark_open)} }; @@ -986,11 +986,13 @@ create_toolbar (PlumaFileBrowserWidget * obj, obj->priv->location_previous_menu = gtk_menu_new (); gtk_widget_show (obj->priv->location_previous_menu); - widget = GTK_WIDGET (gtk_menu_tool_button_new_from_stock (GTK_STOCK_GO_BACK)); + widget = GTK_WIDGET (gtk_menu_tool_button_new (gtk_image_new_from_icon_name ("go-previous", + GTK_ICON_SIZE_MENU), + _("Previous location"))); + gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (widget), obj->priv->location_previous_menu); - g_object_set (widget, "label", _("Previous location"), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (widget), _("Go to previous location")); gtk_menu_tool_button_set_arrow_tooltip_text (GTK_MENU_TOOL_BUTTON (widget), @@ -1007,11 +1009,13 @@ create_toolbar (PlumaFileBrowserWidget * obj, obj->priv->location_next_menu = gtk_menu_new (); gtk_widget_show (obj->priv->location_next_menu); - widget = GTK_WIDGET (gtk_menu_tool_button_new_from_stock (GTK_STOCK_GO_FORWARD)); + widget = GTK_WIDGET (gtk_menu_tool_button_new (gtk_image_new_from_icon_name ("go-next", + GTK_ICON_SIZE_MENU), + _("Next location"))); + gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (widget), obj->priv->location_next_menu); - g_object_set (widget, "label", _("Next location"), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (widget), _("Go to next location")); gtk_menu_tool_button_set_arrow_tooltip_text (GTK_MENU_TOOL_BUTTON (widget), diff --git a/plugins/sort/pluma-sort-plugin.c b/plugins/sort/pluma-sort-plugin.c index 67a3a1ce..49d804bf 100644 --- a/plugins/sort/pluma-sort-plugin.c +++ b/plugins/sort/pluma-sort-plugin.c @@ -90,7 +90,7 @@ static void sort_real (SortDialog *dialog); static const GtkActionEntry action_entries[] = { { "Sort", - GTK_STOCK_SORT_ASCENDING, + "view-sort-ascending", N_("S_ort..."), NULL, N_("Sort the current document or selection"), diff --git a/plugins/spell/pluma-automatic-spell-checker.c b/plugins/spell/pluma-automatic-spell-checker.c index 76d4be96..0bf16147 100644 --- a/plugins/spell/pluma-automatic-spell-checker.c +++ b/plugins/spell/pluma-automatic-spell-checker.c @@ -498,8 +498,8 @@ build_suggestion_menu (PlumaAutomaticSpellChecker *spell, const gchar *word) /* Ignore all */ mi = gtk_image_menu_item_new_with_mnemonic (_("_Ignore All")); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), - gtk_image_new_from_stock (GTK_STOCK_GOTO_BOTTOM, - GTK_ICON_SIZE_MENU)); + gtk_image_new_from_icon_name ("go-bottom", + GTK_ICON_SIZE_MENU)); g_signal_connect (mi, "activate", @@ -513,8 +513,8 @@ build_suggestion_menu (PlumaAutomaticSpellChecker *spell, const gchar *word) /* + Add to Dictionary */ mi = gtk_image_menu_item_new_with_mnemonic (_("_Add")); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), - gtk_image_new_from_stock (GTK_STOCK_ADD, - GTK_ICON_SIZE_MENU)); + gtk_image_new_from_icon_name ("list-add", + GTK_ICON_SIZE_MENU)); g_signal_connect (mi, "activate", @@ -549,7 +549,7 @@ populate_popup (GtkTextView *textview, GtkMenu *menu, PlumaAutomaticSpellChecker gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), mi); /* then, on top of it, the suggestions menu. */ - img = gtk_image_new_from_stock (GTK_STOCK_SPELL_CHECK, GTK_ICON_SIZE_MENU); + img = gtk_image_new_from_icon_name ("tools-check-spelling", GTK_ICON_SIZE_MENU); mi = gtk_image_menu_item_new_with_mnemonic (_("_Spelling Suggestions...")); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), img); diff --git a/plugins/spell/pluma-spell-language-dialog.c b/plugins/spell/pluma-spell-language-dialog.c index 0690e1cc..beaf9572 100644 --- a/plugins/spell/pluma-spell-language-dialog.c +++ b/plugins/spell/pluma-spell-language-dialog.c @@ -130,11 +130,11 @@ create_dialog (PlumaSpellLanguageDialog *dlg, }; gtk_dialog_add_buttons (GTK_DIALOG (dlg), - GTK_STOCK_CANCEL, + "gtk-cancel", GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, + "gtk-ok", GTK_RESPONSE_OK, - GTK_STOCK_HELP, + "gtk-help", GTK_RESPONSE_HELP, NULL); diff --git a/plugins/spell/pluma-spell-plugin.c b/plugins/spell/pluma-spell-plugin.c index b7f96eb3..ad5d3c56 100644 --- a/plugins/spell/pluma-spell-plugin.c +++ b/plugins/spell/pluma-spell-plugin.c @@ -96,7 +96,7 @@ static void auto_spell_cb (GtkAction *action, PlumaSpellPlugin *plugin); static const GtkActionEntry action_entries[] = { { "CheckSpell", - GTK_STOCK_SPELL_CHECK, + "tools-check-spelling", N_("_Check Spelling..."), "<shift>F7", N_("Check the current document for incorrect spelling"), diff --git a/plugins/taglist/pluma-taglist-plugin.c b/plugins/taglist/pluma-taglist-plugin.c index 6032d101..bbeec250 100644 --- a/plugins/taglist/pluma-taglist-plugin.c +++ b/plugins/taglist/pluma-taglist-plugin.c @@ -120,10 +120,10 @@ pluma_taglist_plugin_activate (PeasActivatable *activatable) priv->taglist_panel = pluma_taglist_plugin_panel_new (window, data_dir); g_free (data_dir); - pluma_panel_add_item_with_stock_icon (side_panel, - priv->taglist_panel, - _("Tags"), - "list-add"); + pluma_panel_add_item_with_icon (side_panel, + priv->taglist_panel, + _("Tags"), + "list-add"); } static void diff --git a/plugins/time/pluma-time-plugin.c b/plugins/time/pluma-time-plugin.c index 57026e65..561c47be 100644 --- a/plugins/time/pluma-time-plugin.c +++ b/plugins/time/pluma-time-plugin.c @@ -919,7 +919,7 @@ get_choose_format_dialog (GtkWindow *parent, err_dialog = gtk_dialog_new_with_buttons (NULL, parent, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, + "gtk-ok", GTK_RESPONSE_ACCEPT, NULL); if (wg != NULL) diff --git a/pluma/dialogs/pluma-close-confirmation-dialog.c b/pluma/dialogs/pluma-close-confirmation-dialog.c index 8cf67e63..8be49eda 100644 --- a/pluma/dialogs/pluma-close-confirmation-dialog.c +++ b/pluma/dialogs/pluma-close-confirmation-dialog.c @@ -142,7 +142,7 @@ set_logout_mode (PlumaCloseConfirmationDialog *dlg, pluma_dialog_add_button (GTK_DIALOG (dlg), _("_Cancel Logout"), - GTK_STOCK_CANCEL, + "process-stop", GTK_RESPONSE_CANCEL); } else @@ -152,7 +152,7 @@ set_logout_mode (PlumaCloseConfirmationDialog *dlg, GTK_RESPONSE_NO); gtk_dialog_add_button (GTK_DIALOG (dlg), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + "gtk-cancel", GTK_RESPONSE_CANCEL); } if (dlg->priv->disable_save_to_disk) @@ -162,7 +162,7 @@ set_logout_mode (PlumaCloseConfirmationDialog *dlg, } else { - const gchar *stock_id = GTK_STOCK_SAVE; + const gchar *icon_id = "gtk-save"; if (GET_MODE (dlg->priv) == SINGLE_DOC_MODE) { @@ -172,11 +172,11 @@ set_logout_mode (PlumaCloseConfirmationDialog *dlg, if (pluma_document_get_readonly (doc) || pluma_document_is_untitled (doc)) - stock_id = GTK_STOCK_SAVE_AS; + icon_id = "gtk-save-as"; } gtk_dialog_add_button (GTK_DIALOG (dlg), - stock_id, + icon_id, GTK_RESPONSE_YES); gtk_dialog_set_default_response (GTK_DIALOG (dlg), diff --git a/pluma/dialogs/pluma-encodings-dialog.c b/pluma/dialogs/pluma-encodings-dialog.c index 9a78ebe1..2e58e723 100644 --- a/pluma/dialogs/pluma-encodings-dialog.c +++ b/pluma/dialogs/pluma-encodings-dialog.c @@ -310,11 +310,11 @@ pluma_encodings_dialog_init (PlumaEncodingsDialog *dlg) dlg->priv = PLUMA_ENCODINGS_DIALOG_GET_PRIVATE (dlg); gtk_dialog_add_buttons (GTK_DIALOG (dlg), - GTK_STOCK_CANCEL, + "gtk-cancel", GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, + "gtk-ok", GTK_RESPONSE_OK, - GTK_STOCK_HELP, + "gtk-help", GTK_RESPONSE_HELP, NULL); diff --git a/pluma/dialogs/pluma-preferences-dialog.c b/pluma/dialogs/pluma-preferences-dialog.c index be13d59d..07380539 100644 --- a/pluma/dialogs/pluma-preferences-dialog.c +++ b/pluma/dialogs/pluma-preferences-dialog.c @@ -810,12 +810,12 @@ install_scheme_clicked (GtkButton *button, chooser = gtk_file_chooser_dialog_new (_("Add Scheme"), GTK_WINDOW (dlg), GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + "gtk-cancel", GTK_RESPONSE_CANCEL, NULL); pluma_dialog_add_button (GTK_DIALOG (chooser), _("A_dd Scheme"), - GTK_STOCK_ADD, + "list-add", GTK_RESPONSE_ACCEPT); gtk_window_set_destroy_with_parent (GTK_WINDOW (chooser), TRUE); @@ -1079,9 +1079,9 @@ pluma_preferences_dialog_init (PlumaPreferencesDialog *dlg) dlg->priv = PLUMA_PREFERENCES_DIALOG_GET_PRIVATE (dlg); gtk_dialog_add_buttons (GTK_DIALOG (dlg), - GTK_STOCK_CLOSE, + "gtk-close", GTK_RESPONSE_CLOSE, - GTK_STOCK_HELP, + "gtk-help", GTK_RESPONSE_HELP, NULL); diff --git a/pluma/dialogs/pluma-search-dialog.c b/pluma/dialogs/pluma-search-dialog.c index 7b5c1679..da2b9067 100644 --- a/pluma/dialogs/pluma-search-dialog.c +++ b/pluma/dialogs/pluma-search-dialog.c @@ -331,7 +331,7 @@ pluma_search_dialog_init (PlumaSearchDialog *dlg) gtk_window_set_destroy_with_parent (GTK_WINDOW (dlg), TRUE); gtk_dialog_add_buttons (GTK_DIALOG (dlg), - GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL, + "gtk-close", GTK_RESPONSE_CANCEL, NULL); /* HIG defaults */ @@ -416,10 +416,15 @@ pluma_search_dialog_init (PlumaSearchDialog *dlg) gtk_label_set_mnemonic_widget (GTK_LABEL (dlg->priv->replace_label), dlg->priv->replace_entry); - dlg->priv->find_button = gtk_button_new_from_stock (GTK_STOCK_FIND); + dlg->priv->find_button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON, + "label", "gtk-find", + "use-stock", TRUE, + "use-underline", TRUE, + NULL)); + dlg->priv->replace_all_button = gtk_button_new_with_mnemonic (_("Replace _All")); - dlg->priv->replace_button = pluma_gtk_button_new_with_stock_icon (_("_Replace"), - GTK_STOCK_FIND_AND_REPLACE); + dlg->priv->replace_button = pluma_gtk_button_new_with_icon (_("_Replace"), + "edit-find-replace"); gtk_dialog_add_action_widget (GTK_DIALOG (dlg), dlg->priv->replace_all_button, diff --git a/pluma/pluma-commands-file.c b/pluma/pluma-commands-file.c index c2cfb6cf..eed10f51 100644 --- a/pluma/pluma-commands-file.c +++ b/pluma/pluma-commands-file.c @@ -464,8 +464,8 @@ _pluma_cmd_file_open (GtkAction *action, GTK_WINDOW (window), GTK_FILE_CHOOSER_ACTION_OPEN, NULL, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_OK, + "gtk-cancel", GTK_RESPONSE_CANCEL, + "gtk-open", GTK_RESPONSE_OK, NULL); g_object_set_data (G_OBJECT (window), @@ -580,12 +580,12 @@ replace_read_only_file (GtkWindow *parent, GFile *file) "with the one you are saving?")); gtk_dialog_add_button (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, + "gtk-cancel", GTK_RESPONSE_CANCEL); pluma_dialog_add_button (GTK_DIALOG (dialog), _("_Replace"), - GTK_STOCK_SAVE_AS, + "document-save-as", GTK_RESPONSE_YES); gtk_dialog_set_default_response (GTK_DIALOG (dialog), @@ -757,8 +757,8 @@ file_save_as (PlumaTab *tab, GTK_WINDOW (window), GTK_FILE_CHOOSER_ACTION_SAVE, NULL, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_SAVE, GTK_RESPONSE_OK, + "gtk-cancel", GTK_RESPONSE_CANCEL, + "gtk-save", GTK_RESPONSE_OK, NULL); gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (save_dialog), @@ -1219,12 +1219,12 @@ revert_dialog (PlumaWindow *window, gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_dialog_add_button (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, + "gtk-cancel", GTK_RESPONSE_CANCEL); pluma_dialog_add_button (GTK_DIALOG (dialog), _("_Revert"), - GTK_STOCK_REVERT_TO_SAVED, + "document-revert", GTK_RESPONSE_OK); gtk_dialog_set_default_response (GTK_DIALOG (dialog), diff --git a/pluma/pluma-io-error-message-area.c b/pluma/pluma-io-error-message-area.c index 3d2451a0..06eb0d77 100644 --- a/pluma/pluma-io-error-message-area.c +++ b/pluma/pluma-io-error-message-area.c @@ -90,16 +90,16 @@ set_contents (GtkWidget *area, } static void -info_bar_add_stock_button_with_text (GtkInfoBar *infobar, - const gchar *text, - const gchar *stock_id, - gint response_id) +info_bar_add_icon_button_with_text (GtkInfoBar *infobar, + const gchar *text, + const gchar *icon_id, + gint response_id) { GtkWidget *button; GtkWidget *image; button = gtk_info_bar_add_button (infobar, text, response_id); - image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON); + image = gtk_image_new_from_icon_name (icon_id, GTK_ICON_SIZE_BUTTON); gtk_button_set_image (GTK_BUTTON (button), image); } @@ -163,7 +163,7 @@ create_io_loading_error_message_area (const gchar *primary_text, GtkWidget *message_area; message_area = gtk_info_bar_new_with_buttons ( - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + "gtk-cancel", GTK_RESPONSE_CANCEL, NULL); gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area), GTK_MESSAGE_ERROR); @@ -175,10 +175,10 @@ create_io_loading_error_message_area (const gchar *primary_text, if (recoverable_error) { - info_bar_add_stock_button_with_text (GTK_INFO_BAR (message_area), - _("_Retry"), - GTK_STOCK_REFRESH, - GTK_RESPONSE_OK); + info_bar_add_icon_button_with_text (GTK_INFO_BAR (message_area), + _("_Retry"), + "view-refresh", + GTK_RESPONSE_OK); } return message_area; @@ -477,10 +477,10 @@ create_conversion_error_message_area (const gchar *primary_text, message_area = gtk_info_bar_new (); - info_bar_add_stock_button_with_text (GTK_INFO_BAR (message_area), - _("_Retry"), - GTK_STOCK_REDO, - GTK_RESPONSE_OK); + info_bar_add_icon_button_with_text (GTK_INFO_BAR (message_area), + _("_Retry"), + "edit-redo", + GTK_RESPONSE_OK); if (edit_anyway) { @@ -500,7 +500,7 @@ create_conversion_error_message_area (const gchar *primary_text, else { gtk_info_bar_add_button (GTK_INFO_BAR (message_area), - GTK_STOCK_CANCEL, + "gtk-cancel", GTK_RESPONSE_CANCEL); gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area), GTK_MESSAGE_ERROR); @@ -854,10 +854,10 @@ pluma_externally_modified_saving_error_message_area_new ( message_area = gtk_info_bar_new (); - info_bar_add_stock_button_with_text (GTK_INFO_BAR (message_area), - _("S_ave Anyway"), - GTK_STOCK_SAVE, - GTK_RESPONSE_YES); + info_bar_add_icon_button_with_text (GTK_INFO_BAR (message_area), + _("S_ave Anyway"), + "document-save", + GTK_RESPONSE_YES); gtk_info_bar_add_button (GTK_INFO_BAR (message_area), _("D_on't Save"), GTK_RESPONSE_CANCEL); @@ -950,10 +950,10 @@ pluma_no_backup_saving_error_message_area_new (const gchar *uri, message_area = gtk_info_bar_new (); - info_bar_add_stock_button_with_text (GTK_INFO_BAR (message_area), - _("S_ave Anyway"), - GTK_STOCK_SAVE, - GTK_RESPONSE_YES); + info_bar_add_icon_button_with_text (GTK_INFO_BAR (message_area), + _("S_ave Anyway"), + "document-save", + GTK_RESPONSE_YES); gtk_info_bar_add_button (GTK_INFO_BAR (message_area), _("D_on't Save"), GTK_RESPONSE_CANCEL); @@ -1175,12 +1175,12 @@ pluma_externally_modified_message_area_new (const gchar *uri, message_area = gtk_info_bar_new (); - info_bar_add_stock_button_with_text (GTK_INFO_BAR (message_area), - _("_Reload"), - GTK_STOCK_REFRESH, - GTK_RESPONSE_OK); + info_bar_add_icon_button_with_text (GTK_INFO_BAR (message_area), + _("_Reload"), + "view-refresh", + GTK_RESPONSE_OK); gtk_info_bar_add_button (GTK_INFO_BAR (message_area), - GTK_STOCK_CANCEL, + "gtk-cancel", GTK_RESPONSE_CANCEL); gtk_info_bar_set_message_type (GTK_INFO_BAR (message_area), GTK_MESSAGE_WARNING); diff --git a/pluma/pluma-panel.c b/pluma/pluma-panel.c index 19b312d3..cb2c437c 100644 --- a/pluma/pluma-panel.c +++ b/pluma/pluma-panel.c @@ -675,19 +675,19 @@ pluma_panel_add_item (PlumaPanel *panel, } /** - * pluma_panel_add_item_with_stock_icon: + * pluma_panel_add_item_with_icon: * @panel: a #PlumaPanel * @item: the #GtkWidget to add to the @panel * @name: the name to be shown in the @panel - * @stock_id: a stock id + * @icon_name: a icon name * - * Same as pluma_panel_add_item() but using an image from stock. + * Same as pluma_panel_add_item() but using an image from icon name. */ void -pluma_panel_add_item_with_stock_icon (PlumaPanel *panel, - GtkWidget *item, - const gchar *name, - const gchar *icon_name) +pluma_panel_add_item_with_icon (PlumaPanel *panel, + GtkWidget *item, + const gchar *name, + const gchar *icon_name) { GtkWidget *icon = NULL; diff --git a/pluma/pluma-panel.h b/pluma/pluma-panel.h index ccda47de..e697c175 100644 --- a/pluma/pluma-panel.h +++ b/pluma/pluma-panel.h @@ -98,10 +98,10 @@ void pluma_panel_add_item (PlumaPanel *panel, const gchar *name, GtkWidget *image); -void pluma_panel_add_item_with_stock_icon (PlumaPanel *panel, - GtkWidget *item, - const gchar *name, - const gchar *icon_name); +void pluma_panel_add_item_with_icon (PlumaPanel *panel, + GtkWidget *item, + const gchar *name, + const gchar *icon_name); gboolean pluma_panel_remove_item (PlumaPanel *panel, GtkWidget *item); diff --git a/pluma/pluma-progress-message-area.c b/pluma/pluma-progress-message-area.c index a9c18347..e8ed12eb 100644 --- a/pluma/pluma-progress-message-area.c +++ b/pluma/pluma-progress-message-area.c @@ -63,7 +63,7 @@ pluma_progress_message_area_set_has_cancel_button (PlumaProgressMessageArea *are { if (has_button) gtk_info_bar_add_button (GTK_INFO_BAR (area), - GTK_STOCK_CANCEL, + "gtk-cancel", GTK_RESPONSE_CANCEL); g_object_notify (G_OBJECT (area), "has-cancel-button"); @@ -168,21 +168,21 @@ pluma_progress_message_area_init (PlumaProgressMessageArea *area) } GtkWidget * -pluma_progress_message_area_new (const gchar *stock_id, +pluma_progress_message_area_new (const gchar *image_id, const gchar *markup, gboolean has_cancel) { PlumaProgressMessageArea *area; - g_return_val_if_fail (stock_id != NULL, NULL); + g_return_val_if_fail (image_id != NULL, NULL); g_return_val_if_fail (markup != NULL, NULL); area = PLUMA_PROGRESS_MESSAGE_AREA (g_object_new (PLUMA_TYPE_PROGRESS_MESSAGE_AREA, "has-cancel-button", has_cancel, NULL)); - pluma_progress_message_area_set_stock_image (area, - stock_id); + pluma_progress_message_area_set_image (area, + image_id); pluma_progress_message_area_set_markup (area, markup); @@ -191,15 +191,15 @@ pluma_progress_message_area_new (const gchar *stock_id, } void -pluma_progress_message_area_set_stock_image (PlumaProgressMessageArea *area, - const gchar *stock_id) +pluma_progress_message_area_set_image (PlumaProgressMessageArea *area, + const gchar *image_id) { g_return_if_fail (PLUMA_IS_PROGRESS_MESSAGE_AREA (area)); - g_return_if_fail (stock_id != NULL); + g_return_if_fail (image_id != NULL); - gtk_image_set_from_stock (GTK_IMAGE (area->priv->image), - stock_id, - GTK_ICON_SIZE_SMALL_TOOLBAR); + gtk_image_set_from_icon_name (GTK_IMAGE (area->priv->image), + image_id, + GTK_ICON_SIZE_SMALL_TOOLBAR); } void diff --git a/pluma/pluma-progress-message-area.h b/pluma/pluma-progress-message-area.h index 964746bd..508472d1 100644 --- a/pluma/pluma-progress-message-area.h +++ b/pluma/pluma-progress-message-area.h @@ -76,12 +76,12 @@ struct _PlumaProgressMessageAreaClass */ GType pluma_progress_message_area_get_type (void) G_GNUC_CONST; -GtkWidget *pluma_progress_message_area_new (const gchar *stock_id, +GtkWidget *pluma_progress_message_area_new (const gchar *image_id, const gchar *markup, gboolean has_cancel); -void pluma_progress_message_area_set_stock_image (PlumaProgressMessageArea *area, - const gchar *stock_id); +void pluma_progress_message_area_set_image (PlumaProgressMessageArea *area, + const gchar *image_id); void pluma_progress_message_area_set_markup (PlumaProgressMessageArea *area, const gchar *markup); diff --git a/pluma/pluma-statusbar.c b/pluma/pluma-statusbar.c index e67990f9..5d3d435c 100644 --- a/pluma/pluma-statusbar.c +++ b/pluma/pluma-statusbar.c @@ -136,9 +136,9 @@ pluma_statusbar_init (PlumaStatusbar *statusbar) hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_container_add (GTK_CONTAINER (statusbar->priv->state_frame), hbox); - statusbar->priv->load_image = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU); - statusbar->priv->save_image = gtk_image_new_from_stock (GTK_STOCK_SAVE, GTK_ICON_SIZE_MENU); - statusbar->priv->print_image = gtk_image_new_from_stock (GTK_STOCK_PRINT, GTK_ICON_SIZE_MENU); + statusbar->priv->load_image = gtk_image_new_from_icon_name ("document-open", GTK_ICON_SIZE_MENU); + statusbar->priv->save_image = gtk_image_new_from_icon_name ("document-save", GTK_ICON_SIZE_MENU); + statusbar->priv->print_image = gtk_image_new_from_icon_name ("document-print", GTK_ICON_SIZE_MENU); gtk_widget_show (hbox); diff --git a/pluma/pluma-tab.c b/pluma/pluma-tab.c index 8e0d4d47..d9b8a165 100644 --- a/pluma/pluma-tab.c +++ b/pluma/pluma-tab.c @@ -680,7 +680,7 @@ show_loading_message_area (PlumaTab *tab) name_markup); } - area = pluma_progress_message_area_new (GTK_STOCK_REVERT_TO_SAVED, + area = pluma_progress_message_area_new ("document-revert", msg, TRUE); } @@ -703,7 +703,7 @@ show_loading_message_area (PlumaTab *tab) name_markup); } - area = pluma_progress_message_area_new (GTK_STOCK_OPEN, + area = pluma_progress_message_area_new ("document-open", msg, TRUE); } @@ -792,7 +792,7 @@ show_saving_message_area (PlumaTab *tab) msg = g_strdup_printf (_("Saving %s"), from_markup); } - area = pluma_progress_message_area_new (GTK_STOCK_SAVE, + area = pluma_progress_message_area_new ("document-save", msg, FALSE); @@ -2488,11 +2488,11 @@ show_printing_message_area (PlumaTab *tab, gboolean preview) GtkWidget *area; if (preview) - area = pluma_progress_message_area_new (GTK_STOCK_PRINT_PREVIEW, + area = pluma_progress_message_area_new ("document-print-preview", "", TRUE); else - area = pluma_progress_message_area_new (GTK_STOCK_PRINT, + area = pluma_progress_message_area_new ("document-print", "", TRUE); diff --git a/pluma/pluma-ui.h b/pluma/pluma-ui.h index c2c465b2..45b4d2a9 100644 --- a/pluma/pluma-ui.h +++ b/pluma/pluma-ui.h @@ -53,23 +53,23 @@ static const GtkActionEntry pluma_always_sensitive_menu_entries[] = { "Help", NULL, N_("_Help") }, /* File menu */ - { "FileNew", GTK_STOCK_NEW, NULL, "<control>N", + { "FileNew", "document-new", N_("_New"), "<control>N", N_("Create a new document"), G_CALLBACK (_pluma_cmd_file_new) }, - { "FileOpen", GTK_STOCK_OPEN, N_("_Open..."), "<control>O", + { "FileOpen", "document-open", N_("_Open..."), "<control>O", N_("Open a file"), G_CALLBACK (_pluma_cmd_file_open) }, /* Edit menu */ - { "EditPreferences", GTK_STOCK_PREFERENCES, N_("Pr_eferences"), NULL, + { "EditPreferences", "preferences-desktop", N_("Pr_eferences"), NULL, N_("Configure the application"), G_CALLBACK (_pluma_cmd_edit_preferences) }, /* Help menu */ - {"HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1", + {"HelpContents", "help-browser", N_("_Contents"), "F1", N_("Open the pluma manual"), G_CALLBACK (_pluma_cmd_help_contents) }, - { "HelpAbout", GTK_STOCK_ABOUT, NULL, NULL, + { "HelpAbout", "help-about", N_("_About"), NULL, N_("About this application"), G_CALLBACK (_pluma_cmd_help_about) }, /* Fullscreen toolbar */ - { "LeaveFullscreen", GTK_STOCK_LEAVE_FULLSCREEN, NULL, + { "LeaveFullscreen", "view-restore", N_("_Leave Fullscreen"), NULL, N_("Leave fullscreen mode"), G_CALLBACK (_pluma_cmd_view_leave_fullscreen_mode) } }; @@ -77,56 +77,56 @@ static const GtkActionEntry pluma_always_sensitive_menu_entries[] = static const GtkActionEntry pluma_menu_entries[] = { /* File menu */ - { "FileSave", GTK_STOCK_SAVE, NULL, "<control>S", + { "FileSave", "document-save", N_("_Save"), "<control>S", N_("Save the current file"), G_CALLBACK (_pluma_cmd_file_save) }, - { "FileSaveAs", GTK_STOCK_SAVE_AS, N_("Save _As..."), "<shift><control>S", + { "FileSaveAs", "document-save-as", N_("Save _As..."), "<shift><control>S", N_("Save the current file with a different name"), G_CALLBACK (_pluma_cmd_file_save_as) }, - { "FileRevert", GTK_STOCK_REVERT_TO_SAVED, NULL, NULL, + { "FileRevert", "document-revert", N_("_Revert"), NULL, N_("Revert to a saved version of the file"), G_CALLBACK (_pluma_cmd_file_revert) }, - { "FilePrintPreview", GTK_STOCK_PRINT_PREVIEW, N_("Print Previe_w"),"<control><shift>P", + { "FilePrintPreview", "document-print-preview", N_("Print Previe_w"),"<control><shift>P", N_("Print preview"), G_CALLBACK (_pluma_cmd_file_print_preview) }, - { "FilePrint", GTK_STOCK_PRINT, N_("_Print..."), "<control>P", + { "FilePrint", "document-print", N_("_Print..."), "<control>P", N_("Print the current page"), G_CALLBACK (_pluma_cmd_file_print) }, /* Edit menu */ - { "EditUndo", GTK_STOCK_UNDO, NULL, "<control>Z", + { "EditUndo", "edit-undo", N_("_Undo"), "<control>Z", N_("Undo the last action"), G_CALLBACK (_pluma_cmd_edit_undo) }, - { "EditRedo", GTK_STOCK_REDO, NULL, "<shift><control>Z", + { "EditRedo", "edit-redo", N_("_Redo"), "<shift><control>Z", N_("Redo the last undone action"), G_CALLBACK (_pluma_cmd_edit_redo) }, - { "EditCut", GTK_STOCK_CUT, NULL, "<control>X", + { "EditCut", "edit-cut", N_("Cu_t"), "<control>X", N_("Cut the selection"), G_CALLBACK (_pluma_cmd_edit_cut) }, - { "EditCopy", GTK_STOCK_COPY, NULL, "<control>C", + { "EditCopy", "edit-copy", N_("_Copy"), "<control>C", N_("Copy the selection"), G_CALLBACK (_pluma_cmd_edit_copy) }, - { "EditPaste", GTK_STOCK_PASTE, NULL, "<control>V", + { "EditPaste", "edit-paste", N_("_Paste"), "<control>V", N_("Paste the clipboard"), G_CALLBACK (_pluma_cmd_edit_paste) }, - { "EditDelete", GTK_STOCK_DELETE, NULL, NULL, + { "EditDelete", "edit-delete", N_("_Delete"), NULL, N_("Delete the selected text"), G_CALLBACK (_pluma_cmd_edit_delete) }, - { "EditSelectAll", GTK_STOCK_SELECT_ALL, N_("Select _All"), "<control>A", + { "EditSelectAll", "edit-select-all", N_("Select _All"), "<control>A", N_("Select the entire document"), G_CALLBACK (_pluma_cmd_edit_select_all) }, /* View menu */ { "ViewHighlightMode", NULL, N_("_Highlight Mode") }, /* Search menu */ - { "SearchFind", GTK_STOCK_FIND, N_("_Find..."), "<control>F", + { "SearchFind", "edit-find", N_("_Find..."), "<control>F", N_("Search for text"), G_CALLBACK (_pluma_cmd_search_find) }, { "SearchFindNext", NULL, N_("Find Ne_xt"), "<control>G", N_("Search forwards for the same text"), G_CALLBACK (_pluma_cmd_search_find_next) }, { "SearchFindPrevious", NULL, N_("Find Pre_vious"), "<shift><control>G", N_("Search backwards for the same text"), G_CALLBACK (_pluma_cmd_search_find_prev) }, - { "SearchReplace", GTK_STOCK_FIND_AND_REPLACE, N_("_Replace..."), "<control>H", + { "SearchReplace", "edit-find-replace", N_("_Replace..."), "<control>H", N_("Search for and replace text"), G_CALLBACK (_pluma_cmd_search_replace) }, { "SearchClearHighlight", NULL, N_("_Clear Highlight"), "<shift><control>K", N_("Clear highlighting of search matches"), G_CALLBACK (_pluma_cmd_search_clear_highlight) }, - { "SearchGoToLine", GTK_STOCK_JUMP_TO, N_("Go to _Line..."), "<control>I", + { "SearchGoToLine", "go-jump", N_("Go to _Line..."), "<control>I", N_("Go to a specific line"), G_CALLBACK (_pluma_cmd_search_goto_line) }, - { "SearchIncrementalSearch", GTK_STOCK_FIND, N_("_Incremental Search..."), "<control>K", + { "SearchIncrementalSearch", "edit-find", N_("_Incremental Search..."), "<control>K", N_("Incrementally search for text"), G_CALLBACK (_pluma_cmd_search_incremental_search) }, /* Documents menu */ - { "FileSaveAll", GTK_STOCK_SAVE, N_("_Save All"), "<shift><control>L", + { "FileSaveAll", "document-save", N_("_Save All"), "<shift><control>L", N_("Save all open files"), G_CALLBACK (_pluma_cmd_file_save_all) }, - { "FileCloseAll", GTK_STOCK_CLOSE, N_("_Close All"), "<shift><control>W", + { "FileCloseAll", "window-close", N_("_Close All"), "<shift><control>W", N_("Close all open files"), G_CALLBACK (_pluma_cmd_file_close_all) }, { "DocumentsPreviousDocument", NULL, N_("_Previous Document"), "<alt><control>Page_Up", N_("Activate previous document"), G_CALLBACK (_pluma_cmd_documents_previous_document) }, @@ -139,14 +139,14 @@ static const GtkActionEntry pluma_menu_entries[] = /* separate group, needs to be sensitive on OS X even when there are no tabs */ static const GtkActionEntry pluma_close_menu_entries[] = { - { "FileClose", GTK_STOCK_CLOSE, NULL, "<control>W", + { "FileClose", "window-close", N_("_Close"), "<control>W", N_("Close the current file"), G_CALLBACK (_pluma_cmd_file_close) } }; /* separate group, should be sensitive even when there are no tabs */ static const GtkActionEntry pluma_quit_menu_entries[] = { - { "FileQuit", GTK_STOCK_QUIT, NULL, "<control>Q", + { "FileQuit", "application-exit", N_("_Quit"), "<control>Q", N_("Quit the program"), G_CALLBACK (_pluma_cmd_file_quit) } }; @@ -158,7 +158,7 @@ static const GtkToggleActionEntry pluma_always_sensitive_toggle_menu_entries[] = { "ViewStatusbar", NULL, N_("_Statusbar"), NULL, N_("Show or hide the statusbar in the current window"), G_CALLBACK (_pluma_cmd_view_show_statusbar), TRUE }, - { "ViewFullscreen", GTK_STOCK_FULLSCREEN, NULL, "F11", + { "ViewFullscreen", "view-fullscreen", N_("_Fullscreen"), "F11", N_("Edit text in fullscreen"), G_CALLBACK (_pluma_cmd_view_toggle_fullscreen_mode), FALSE } }; diff --git a/pluma/pluma-utils.c b/pluma/pluma-utils.c index 771bcfce..35136c3c 100644 --- a/pluma/pluma-utils.c +++ b/pluma/pluma-utils.c @@ -203,23 +203,23 @@ pluma_utils_menu_position_under_tree_view (GtkMenu *menu, } /** - * pluma_gtk_button_new_with_stock_icon: + * pluma_gtk_button_new_with_icon: * @label: - * @stock_id: + * @icon_name: * * Returns: (transfer full): */ GtkWidget * -pluma_gtk_button_new_with_stock_icon (const gchar *label, - const gchar *stock_id) +pluma_gtk_button_new_with_icon (const gchar *label, + const gchar *icon_name) { GtkWidget *button; button = gtk_button_new_with_mnemonic (label); gtk_button_set_image (GTK_BUTTON (button), - gtk_image_new_from_stock (stock_id, - GTK_ICON_SIZE_BUTTON)); + gtk_image_new_from_icon_name (icon_name, + GTK_ICON_SIZE_BUTTON)); return button; } @@ -228,7 +228,7 @@ pluma_gtk_button_new_with_stock_icon (const gchar *label, * pluma_dialog_add_button: * @dialog: * @text: - * @stock_id: + * @icon_name: * @response_id: * * Returns: (transfer none): @@ -236,16 +236,16 @@ pluma_gtk_button_new_with_stock_icon (const gchar *label, GtkWidget * pluma_dialog_add_button (GtkDialog *dialog, const gchar *text, - const gchar *stock_id, + const gchar *icon_name, gint response_id) { GtkWidget *button; g_return_val_if_fail (GTK_IS_DIALOG (dialog), NULL); g_return_val_if_fail (text != NULL, NULL); - g_return_val_if_fail (stock_id != NULL, NULL); + g_return_val_if_fail (icon_name != NULL, NULL); - button = pluma_gtk_button_new_with_stock_icon (text, stock_id); + button = pluma_gtk_button_new_with_icon (text, icon_name); g_return_val_if_fail (button != NULL, NULL); gtk_widget_set_can_default (button, TRUE); diff --git a/pluma/pluma-utils.h b/pluma/pluma-utils.h index e3b1f387..785e6abe 100644 --- a/pluma/pluma-utils.h +++ b/pluma/pluma-utils.h @@ -64,12 +64,12 @@ void pluma_utils_menu_position_under_tree_view gboolean *push_in, gpointer user_data); -GtkWidget *pluma_gtk_button_new_with_stock_icon (const gchar *label, - const gchar *stock_id); +GtkWidget *pluma_gtk_button_new_with_icon (const gchar *label, + const gchar *icon_name); GtkWidget *pluma_dialog_add_button (GtkDialog *dialog, const gchar *text, - const gchar *stock_id, + const gchar *icon_name, gint response_id); gchar *pluma_utils_escape_underscores (const gchar *text, diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c index 52891a7c..c0eb29b4 100644 --- a/pluma/pluma-window.c +++ b/pluma/pluma-window.c @@ -1418,11 +1418,13 @@ setup_toolbar_open_button (PlumaWindow *window, window); /* add the custom Open button to the toolbar */ - open_button = gtk_menu_tool_button_new_from_stock (GTK_STOCK_OPEN); + open_button = gtk_menu_tool_button_new (gtk_image_new_from_icon_name ("document-open", + GTK_ICON_SIZE_MENU), + _("Open a file")); + gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (open_button), toolbar_recent_menu); - gtk_tool_item_set_tooltip_text (open_button, _("Open a file")); gtk_menu_tool_button_set_arrow_tooltip_text (GTK_MENU_TOOL_BUTTON (open_button), _("Open a recently used file")); @@ -3621,10 +3623,10 @@ create_side_panel (PlumaWindow *window) window); documents_panel = pluma_documents_panel_new (window); - pluma_panel_add_item_with_stock_icon (PLUMA_PANEL (window->priv->side_panel), - documents_panel, - _("Documents"), - "text-x-generic"); + pluma_panel_add_item_with_icon (PLUMA_PANEL (window->priv->side_panel), + documents_panel, + _("Documents"), + "text-x-generic"); } static void |