Commit 2852c6aa authored by Christian Hergert's avatar Christian Hergert

terminal: fix context menu for terminals

Fixes #761
parent 91abc951
......@@ -385,6 +385,7 @@ ide_application_init (IdeApplication *self)
/* Ensure our core data is loaded early. */
dzl_application_add_resources (DZL_APPLICATION (self), "resource:///org/gnome/libide-sourceview/");
dzl_application_add_resources (DZL_APPLICATION (self), "resource:///org/gnome/libide-gui/");
dzl_application_add_resources (DZL_APPLICATION (self), "resource:///org/gnome/libide-terminal/");
/* Make sure our GAction are available */
_ide_application_init_actions (self);
......
......@@ -9,4 +9,44 @@
</item>
</section>
</menu>
<menu id="ide-terminal-page-popup-menu">
<section id="ide-terminal-page-popup-menu-link-section">
<item>
<attribute name="label" translatable="yes">_Open Link</attribute>
<attribute name="action">terminal.open-link</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Copy Link Address</attribute>
<attribute name="action">terminal.copy-link-address</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
</section>
<section id="ide-terminal-page-popup-menu-clipboard-section">
<item>
<attribute name="id">copy</attribute>
<attribute name="label" translatable="yes">_Copy</attribute>
<attribute name="action">terminal.copy-clipboard</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Paste</attribute>
<attribute name="action">terminal.paste-clipboard</attribute>
</item>
</section>
<section id="ide-terminal-page-popup-menu-selection-section">
<submenu id="ide-terminal-page-popup-menu-selection-submenu">
<attribute name="label" translatable="yes">Selection</attribute>
<item>
<attribute name="label" translatable="yes">Select _All</attribute>
<attribute name="action">terminal.select-all</attribute>
<attribute name="target" type="(b)">(true,)</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Select _None</attribute>
<attribute name="action">terminal.select-all</attribute>
<attribute name="target" type="(b)">(false,)</attribute>
</item>
</submenu>
</section>
</menu>
</interface>
......@@ -156,7 +156,7 @@ popup_targets_received (GtkClipboard *clipboard,
priv->url = vte_terminal_match_check_event (VTE_TERMINAL (self), event, NULL);
menu = dzl_application_get_menu_by_id (DZL_APPLICATION_DEFAULT, "ide-terminal-view-popup-menu");
menu = dzl_application_get_menu_by_id (DZL_APPLICATION_DEFAULT, "ide-terminal-page-popup-menu");
priv->popup_menu = gtk_menu_new_from_model (G_MENU_MODEL (menu));
group = DZL_WIDGET_ACTION_GROUP (gtk_widget_get_action_group (GTK_WIDGET (self), "terminal"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment