Top level windows shouldn't be visible by default

Causes first run of dialogs to fail with a flicker on F16 KDE at least.

Choosecd also was using 'show' instead of 'present', which combined
with the first run fail meant that the dialog couldn't be displayed on
KDE :(

Also, the progress dialog was unconditionally shown, so this should fix
random flicker for quick operations, even in gnome.
This commit is contained in:
Cole Robinson 2012-01-25 10:38:42 -05:00
parent 256c2a74e6
commit 5efe079158
11 changed files with 2 additions and 11 deletions

View File

@ -140,7 +140,7 @@ class vmmAsyncJob(vmmGObjectUI):
if self.show_progress:
self.topwin.present()
if not self.cancel_job:
if not self.cancel_job and self.topwin.window:
self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
if self.run_main:

View File

@ -58,7 +58,7 @@ class vmmChooseCD(vmmGObjectUI):
def show(self, parent):
self.reset_state()
self.topwin.set_transient_for(parent)
self.topwin.show()
self.topwin.present()
def _cleanup(self):
self.close()

View File

@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkAboutDialog" id="vmm-about">
<property name="visible">True</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
<property name="program_name">Virtual Machine Manager</property>

View File

@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="vmm-add-hardware">
<property name="visible">True</property>
<property name="title" translatable="yes">Add New Virtual Hardware</property>
<property name="type_hint">dialog</property>
<signal name="delete_event" handler="on_vmm_create_delete_event"/>

View File

@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 2.16 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkDialog" id="vmm-choose-cd">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="border_width">6</property>

View File

@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="vmm-create-net">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="title" translatable="yes">Create a new virtual network</property>
<property name="type_hint">dialog</property>

View File

@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="vmm-create-pool">
<property name="visible">True</property>
<property name="title" translatable="yes">Add a New Storage Pool</property>
<property name="default_width">525</property>
<property name="default_height">350</property>

View File

@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="vmm-create-vol">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="title" translatable="yes">Add a Storage Volume</property>
<property name="default_width">500</property>

View File

@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="vmm-host">
<property name="visible">True</property>
<property name="title" translatable="yes">Connection Details</property>
<property name="default_width">750</property>
<property name="default_height">500</property>

View File

@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkDialog" id="vmm-open-connection">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Add Connection</property>
<property name="type_hint">dialog</property>

View File

@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="vmm-progress">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="title" translatable="yes">Operation in progress</property>
<property name="window_position">center-on-parent</property>