[PATCH 2/4] console: Extract menu toolbar hiding code to separate function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Povilas Kanapickas <povilas@xxxxxxxx>
---
 virtManager/console.py | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/virtManager/console.py b/virtManager/console.py
index 804e5ad7..34a0447a 100644
--- a/virtManager/console.py
+++ b/virtManager/console.py
@@ -552,22 +552,26 @@ class vmmConsolePages(vmmGObjectUI):
     def _leave_fullscreen(self, ignore=None):
         self._change_fullscreen(False)
 
+    def _change_menu_toolbar_hidden(self, hidden):
+        if hidden:
+            self.widget("toolbar-box").hide()
+            self.widget("details-menubar").hide()
+        else:
+            if self.widget("details-menu-view-toolbar").get_active():
+                self.widget("toolbar-box").show()
+            self.widget("details-menubar").show()
+
     def _change_fullscreen(self, do_fullscreen):
         self.widget("control-fullscreen").set_active(do_fullscreen)
 
         if do_fullscreen:
             self.topwin.fullscreen()
             self._overlay_toolbar_fullscreen.timed_revealer.force_reveal(True)
-            self.widget("toolbar-box").hide()
-            self.widget("details-menubar").hide()
         else:
             self._overlay_toolbar_fullscreen.timed_revealer.force_reveal(False)
             self.topwin.unfullscreen()
 
-            if self.widget("details-menu-view-toolbar").get_active():
-                self.widget("toolbar-box").show()
-            self.widget("details-menubar").show()
-
+        self._change_menu_toolbar_hidden(do_fullscreen)
         self._sync_scaling_with_display()
 
 
-- 
2.17.1


_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux