6112: Cannot install addons via dialog

svn: r20870
This commit is contained in:
Benny Malengier 2012-12-28 20:33:30 +00:00
parent 9cfc5f4863
commit ffbac653e0
2 changed files with 20 additions and 16 deletions

View File

@ -13,6 +13,7 @@
<object class="GtkBox" id="dialog-vbox1"> <object class="GtkBox" id="dialog-vbox1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property> <property name="spacing">2</property>
<child internal-child="action_area"> <child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1"> <object class="GtkButtonBox" id="dialog-action_area1">
@ -22,11 +23,9 @@
<child> <child>
<object class="GtkButton" id="cancel"> <object class="GtkButton" id="cancel">
<property name="label">gtk-close</property> <property name="label">gtk-close</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
</object> </object>
<packing> <packing>
@ -39,11 +38,9 @@
<child> <child>
<object class="GtkButton" id="apply"> <object class="GtkButton" id="apply">
<property name="label" translatable="yes">Install Selected _Addons</property> <property name="label" translatable="yes">Install Selected _Addons</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
</object> </object>
<packing> <packing>
@ -88,8 +85,8 @@
<property name="wrap">True</property> <property name="wrap">True</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">False</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
@ -101,11 +98,9 @@
<child> <child>
<object class="GtkButton" id="select_all"> <object class="GtkButton" id="select_all">
<property name="label" translatable="yes">_Select All</property> <property name="label" translatable="yes">_Select All</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
</object> </object>
<packing> <packing>
@ -117,11 +112,9 @@
<child> <child>
<object class="GtkButton" id="select_none"> <object class="GtkButton" id="select_none">
<property name="label" translatable="yes">Select _None</property> <property name="label" translatable="yes">Select _None</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
</object> </object>
<packing> <packing>
@ -160,7 +153,7 @@
</child> </child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="pack_type">end</property> <property name="pack_type">end</property>
<property name="position">2</property> <property name="position">2</property>

View File

@ -432,12 +432,12 @@ class _GtkProgressBar(Gtk.VBox):
self._cancel.connect("clicked", self._cancel.connect("clicked",
lambda x: long_op_status.cancel()) lambda x: long_op_status.cancel())
self._cancel.show() self._cancel.show()
self._hbox.pack_end(self._cancel, expand=False, fill=True, padding=0) self._hbox.pack_end(self._cancel, False, True, 0)
self._hbox.pack_start(self._pbar, True, True, 0) self._hbox.pack_start(self._pbar, True, True, 0)
self.pack_start(self._lbl, expand=False, fill=False) self.pack_start(self._lbl, False, False, 0)
self.pack_start(self._hbox, expand=False, fill=False) self.pack_start(self._hbox, False, False, 0)
self._pbar_max = (long_op_status.get_total_steps()/ self._pbar_max = (long_op_status.get_total_steps()/
@ -483,7 +483,18 @@ class GtkProgressDialog(Gtk.Dialog):
""":param title: The title to display on the top of the window. """:param title: The title to display on the top of the window.
:type title: string :type title: string
""" """
GObject.GObject.__init__(self, *window_params) #GObject.GObject.__init__(self, *window_params)
GObject.GObject.__init__(self)
if len(window_params) >= 2:
self.set_transient_for(window_params[1])
if len(window_params) >= 3:
flags = window_params[2]
if Gtk.DialogFlags.MODAL & flags:
self.set_modal(True)
if Gtk.DialogFlags.DESTROY_WITH_PARENT & flags:
self.set_destroy_with_parent(True)
if len(window_params) >= 4:
self.add_buttons(window_params[3:])
self.connect('delete_event', self._warn) self.connect('delete_event', self._warn)
self.set_title(title) self.set_title(title)
#self.set_resize_mode(Gtk.RESIZE_IMMEDIATE) #self.set_resize_mode(Gtk.RESIZE_IMMEDIATE)
@ -502,7 +513,7 @@ class GtkProgressDialog(Gtk.Dialog):
""" """
pbar = _GtkProgressBar(long_op_status) pbar = _GtkProgressBar(long_op_status)
self.vbox.pack_start(pbar, expand=False, fill=False) self.vbox.pack_start(pbar, False, False, 0)
pbar.show() pbar.show()
# this seems to cause an infinite loop: # this seems to cause an infinite loop: