Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Günther Wagner
gnome-builder
Commits
2852c6aa
Commit
2852c6aa
authored
Jan 17, 2019
by
Christian Hergert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
terminal: fix context menu for terminals
Fixes #761
parent
91abc951
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
src/libide/gui/ide-application.c
src/libide/gui/ide-application.c
+1
-0
src/libide/terminal/gtk/menus.ui
src/libide/terminal/gtk/menus.ui
+40
-0
src/libide/terminal/ide-terminal.c
src/libide/terminal/ide-terminal.c
+1
-1
No files found.
src/libide/gui/ide-application.c
View file @
2852c6aa
...
...
@@ -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
);
...
...
src/libide/terminal/gtk/menus.ui
View file @
2852c6aa
...
...
@@ -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>
src/libide/terminal/ide-terminal.c
View file @
2852c6aa
...
...
@@ -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"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment