Skip to content
Snippets Groups Projects
Commit 83ac3e38 authored by Alexander Schwinn's avatar Alexander Schwinn
Browse files

Use thunar-menu and launcher in shortcuts view (Issue #198)

Instead of creating a separate, foreign context menu, and to have the
same menu-items than on tree-view.

That will result in the following additional menu items for
shortcuts-view:
- UCA's on mounted devices
- Menu item "Properties" on available bookmarks and mounted devices
- Menu item "SendTo" on available bookmarks and mounted devices
- Menu item "create folder" on available bookmarks and mounted devices
- Menu item "open with" on available bookmarks and mounted devices
- Menu itema "copy/paste" on available bookmarks and mounted devices
- Show menu-items tooltip text in the statusbar
parent e717611a
No related branches found
No related tags found
No related merge requests found
......@@ -249,7 +249,7 @@ thunar_menu_add_sections (ThunarMenu *menu,
{
GtkWidget *window;
gboolean item_added;
gboolean force = menu->type == THUNAR_MENU_TYPE_WINDOW || menu->type == THUNAR_MENU_TYPE_CONTEXT_TREE_VIEW;
gboolean force = menu->type == THUNAR_MENU_TYPE_WINDOW || menu->type == THUNAR_MENU_TYPE_CONTEXT_TREE_VIEW || menu->type == THUNAR_MENU_TYPE_CONTEXT_SHORTCUTS_VIEW;
_thunar_return_val_if_fail (THUNAR_IS_MENU (menu), FALSE);
......@@ -258,8 +258,8 @@ thunar_menu_add_sections (ThunarMenu *menu,
item_added = FALSE;
item_added |= (thunar_launcher_append_menu_item (menu->launcher, GTK_MENU_SHELL (menu), THUNAR_LAUNCHER_ACTION_CREATE_FOLDER, force) != NULL);
/* No document creation for tree-view */
if (menu->type != THUNAR_MENU_TYPE_CONTEXT_TREE_VIEW)
/* No document creation for side pane views */
if (menu->type != THUNAR_MENU_TYPE_CONTEXT_TREE_VIEW && menu->type != THUNAR_MENU_TYPE_CONTEXT_SHORTCUTS_VIEW)
item_added |= (thunar_launcher_append_menu_item (menu->launcher, GTK_MENU_SHELL (menu), THUNAR_LAUNCHER_ACTION_CREATE_DOCUMENT, force) != NULL);
if (item_added)
xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
......
......@@ -42,6 +42,7 @@ typedef enum
THUNAR_MENU_TYPE_CONTEXT_LOCATION_BUTTONS,
THUNAR_MENU_TYPE_CONTEXT_RENAMER,
THUNAR_MENU_TYPE_CONTEXT_TREE_VIEW,
THUNAR_MENU_TYPE_CONTEXT_SHORTCUTS_VIEW,
N_THUNAR_MENU_TYPE,
} ThunarMenuType;
......
......@@ -167,9 +167,9 @@ thunar_shortcuts_pane_init (ThunarShortcutsPane *shortcuts_pane)
/* add widget to css class */
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (shortcuts_pane)), "shortcuts-pane");
/* connect the "shortcut-activated" signal */
g_signal_connect_swapped (G_OBJECT (shortcuts_pane->view), "shortcut-activated", G_CALLBACK (thunar_navigator_change_directory), shortcuts_pane);
g_signal_connect_swapped (G_OBJECT (shortcuts_pane->view), "shortcut-activated-tab", G_CALLBACK (thunar_navigator_open_new_tab), shortcuts_pane);
exo_binding_new (G_OBJECT (shortcuts_pane), "current-directory", G_OBJECT (shortcuts_pane->view), "current-directory");
g_signal_connect_swapped (G_OBJECT (shortcuts_pane->view), "change-directory", G_CALLBACK (thunar_navigator_change_directory), shortcuts_pane);
g_signal_connect_swapped (G_OBJECT (shortcuts_pane->view), "open_new_tab", G_CALLBACK (thunar_navigator_open_new_tab), shortcuts_pane);
}
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment