[steelman] position dialogs centered on parent. Fixes #4936

This commit is contained in:
Yann Leboulanger 2009-04-05 18:31:22 +00:00
parent 2be80422a0
commit b7493cf580
1 changed files with 6 additions and 0 deletions

View File

@ -218,6 +218,7 @@ class PassphraseDialog:
cancelbutton.connect('clicked', self.on_cancelbutton_clicked) cancelbutton.connect('clicked', self.on_cancelbutton_clicked)
self.xml.signal_autoconnect(self) self.xml.signal_autoconnect(self)
self.window.set_position(gtk.GTK_WIN_POS_CENTER_ON_PARENT)
self.window.show_all() self.window.show_all()
self.check = bool(checkbuttontext) self.check = bool(checkbuttontext)
@ -283,6 +284,7 @@ class ChooseGPGKeyDialog:
self.keys_treeview.set_search_column(1) self.keys_treeview.set_search_column(1)
self.fill_tree(secret_keys, selected) self.fill_tree(secret_keys, selected)
self.window.connect('response', self.on_dialog_response) self.window.connect('response', self.on_dialog_response)
self.window.set_position(gtk.GTK_WIN_POS_CENTER_ON_PARENT)
self.window.show_all() self.window.show_all()
def sort_keys(self, model, iter1, iter2): def sort_keys(self, model, iter1, iter2):
@ -418,6 +420,7 @@ class ChangeActivityDialog:
self.entry.set_text(con.activity['text']) self.entry.set_text(con.activity['text'])
self.xml.signal_autoconnect(self) self.xml.signal_autoconnect(self)
self.window.set_position(gtk.GTK_WIN_POS_CENTER_ON_PARENT)
self.window.show_all() self.window.show_all()
def on_enable_checkbutton_toggled(self, widget): def on_enable_checkbutton_toggled(self, widget):
@ -509,6 +512,7 @@ class ChangeMoodDialog:
self.entry.set_text(con.mood['text']) self.entry.set_text(con.mood['text'])
self.xml.signal_autoconnect(self) self.xml.signal_autoconnect(self)
self.window.set_position(gtk.GTK_WIN_POS_CENTER_ON_PARENT)
self.window.show_all() self.window.show_all()
def on_mood_button_clicked(self, widget, data): def on_mood_button_clicked(self, widget, data):
@ -584,6 +588,7 @@ class ChangeStatusMessageDialog:
self.countdown() self.countdown()
gobject.timeout_add(1000, self.countdown) gobject.timeout_add(1000, self.countdown)
self.window.connect('response', self.on_dialog_response) self.window.connect('response', self.on_dialog_response)
self.window.set_position(gtk.GTK_WIN_POS_CENTER_ON_PARENT)
self.window.show_all() self.window.show_all()
def countdown(self): def countdown(self):
@ -2998,6 +3003,7 @@ class ProgressDialog:
self.progressbar = self.xml.get_widget('progressbar') self.progressbar = self.xml.get_widget('progressbar')
self.dialog.set_title(title_text) self.dialog.set_title(title_text)
self.dialog.set_default_size(450, 250) self.dialog.set_default_size(450, 250)
self.window.set_position(gtk.GTK_WIN_POS_CENTER_ON_PARENT)
self.dialog.show_all() self.dialog.show_all()
self.xml.signal_autoconnect(self) self.xml.signal_autoconnect(self)