summaryrefslogtreecommitdiff
path: root/plugins/filebrowser
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/filebrowser')
-rw-r--r--plugins/filebrowser/pluma-file-browser-plugin.c8
-rw-r--r--plugins/filebrowser/pluma-file-browser-utils.c18
-rw-r--r--plugins/filebrowser/pluma-file-browser-utils.h2
-rw-r--r--plugins/filebrowser/pluma-file-browser-widget.c34
4 files changed, 37 insertions, 25 deletions
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),