26 lines
996 B
Diff
26 lines
996 B
Diff
|
Subject: serialcon: Hide scrollbar until there's something to scroll
|
||
|
From: Cole Robinson crobinso@redhat.com Fri Apr 25 19:13:44 2014 -0400
|
||
|
Date: Tue Apr 29 10:28:06 2014 -0400:
|
||
|
Git: 02f49be9e2f58032a7c124ea77d7983834dc80b6
|
||
|
|
||
|
|
||
|
Index: virt-manager-1.0.1/virtManager/serialcon.py
|
||
|
===================================================================
|
||
|
--- virt-manager-1.0.1.orig/virtManager/serialcon.py
|
||
|
+++ virt-manager-1.0.1/virtManager/serialcon.py
|
||
|
@@ -378,6 +378,14 @@ class vmmSerialConsole(vmmGObject):
|
||
|
self.box.append_page(self.error_label, Gtk.Label(""))
|
||
|
self.box.show_all()
|
||
|
|
||
|
+ scrollbar.hide()
|
||
|
+ scrollbar.get_adjustment().connect(
|
||
|
+ "changed", self._scrollbar_adjustment_changed, scrollbar)
|
||
|
+
|
||
|
+ def _scrollbar_adjustment_changed(self, adjustment, scrollbar):
|
||
|
+ scrollbar.set_visible(
|
||
|
+ adjustment.get_upper() > adjustment.get_page_size())
|
||
|
+
|
||
|
def _cleanup(self):
|
||
|
self.console.cleanup()
|
||
|
self.console = None
|