[gnome-boxes] display-toolbar: Add key combo menu button
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] display-toolbar: Add key combo menu button
- Date: Fri, 12 Dec 2014 18:42:15 +0000 (UTC)
commit 28fecb547865cd36bbe279b84133c33985feb4e2
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Dec 12 18:35:07 2014 +0000
display-toolbar: Add key combo menu button
Add a menu button that, when clicked pops up our new popover to allow
user to send system key combos to guest.
https://bugzilla.gnome.org/show_bug.cgi?id=725303
data/ui/display-toolbar.ui | 22 ++++++++++++++++++++++
src/display-toolbar.vala | 4 ++++
2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/data/ui/display-toolbar.ui b/data/ui/display-toolbar.ui
index d85821c..79ae7f5 100644
--- a/data/ui/display-toolbar.ui
+++ b/data/ui/display-toolbar.ui
@@ -84,6 +84,28 @@
<property name="pack-type">end</property>
</packing>
</child>
+
+ <child>
+ <object class="GtkMenuButton" id="keys_menu_button">
+ <property name="visible">True</property>
+ <property name="valign">center</property>
+ <style>
+ <class name="image-button"/>
+ </style>
+
+ <child>
+ <object class="GtkImage" id="keyboard_image">
+ <property name="visible">True</property>
+ <property name="icon-name">input-keyboard-symbolic</property>
+ <property name="icon-size">1</property>
+ </object>
+ </child>
+ </object>
+
+ <packing>
+ <property name="pack-type">end</property>
+ </packing>
+ </child>
</object>
<packing>
diff --git a/src/display-toolbar.vala b/src/display-toolbar.vala
index 48c3255..b907571 100644
--- a/src/display-toolbar.vala
+++ b/src/display-toolbar.vala
@@ -14,6 +14,8 @@ private class Boxes.DisplayToolbar: Gtk.HeaderBar {
private Gtk.Button fullscreen;
[GtkChild]
private Gtk.MenuButton menu_button;
+ [GtkChild]
+ private Gtk.MenuButton keys_menu_button;
private AppWindow window;
@@ -38,6 +40,7 @@ private class Boxes.DisplayToolbar: Gtk.HeaderBar {
back.get_style_context ().add_class (Gtk.STYLE_CLASS_RAISED);
fullscreen.get_style_context ().add_class (Gtk.STYLE_CLASS_RAISED);
menu_button.get_style_context ().add_class (Gtk.STYLE_CLASS_RAISED);
+ keys_menu_button.get_style_context ().add_class (Gtk.STYLE_CLASS_RAISED);
}
App.app.notify["fullscreened"].connect_after ( () => {
@@ -59,6 +62,7 @@ private class Boxes.DisplayToolbar: Gtk.HeaderBar {
if (window.ui_state == UIState.DISPLAY)
(menu_button.popover as ActionsPopover).update_for_item (window.current_item);
});
+ keys_menu_button.popover = new KeysInputPopover (window);
}
private bool button_down;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]