diff --git a/src/dialogs.py b/src/dialogs.py index 2ec740c0f..c56c2bfd6 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -450,7 +450,7 @@ class HigDialog(gtk.MessageDialog): def __init__(self, parent, type, buttons, primary, secondary): gtk.MessageDialog.__init__(self, parent, gtk.DIALOG_DESTROY_WITH_PARENT | gtk.DIALOG_MODAL, - type, buttons, message_format=primary) + type, buttons, message_format = primary) self.format_secondary_text(secondary) @@ -493,14 +493,13 @@ class ErrorDialog(HigDialog): class ConfirmationDialogCheck(ConfirmationDialog): '''HIG compliant confirmation dialog with checkbutton.''' def __init__(self, pritext, sectext='', checktext = ''): - HigDialog.__init__(self, None, gtk.MESSAGE_WARNING, gtk.BUTTONS_CANCEL, + HigDialog.__init__(self, None, gtk.MESSAGE_WARNING, gtk.BUTTONS_OK_CANCEL, pritext, sectext) + + self.set_default_response(gtk.RESPONSE_OK) - # add ok button manually, because we need to focus on it - ok_button = self.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) self.checkbutton = gtk.CheckButton(checktext) self.vbox.pack_start(self.checkbutton, expand = False, fill = True) - ok_button.grab_focus() def is_checked(self): ''' Get active state of the checkbutton ''' diff --git a/src/gtkexcepthook.py b/src/gtkexcepthook.py index feb4d3036..70405fb82 100644 --- a/src/gtkexcepthook.py +++ b/src/gtkexcepthook.py @@ -25,6 +25,7 @@ import traceback import gtk import pango +import dialogs from cStringIO import StringIO from common import helpers @@ -50,10 +51,9 @@ def _info(type, value, tb): #FIXME: add icon to this button RESPONSE_REPORT_BUG = 42 - dialog.add_button(_('_Report Bug'), RESPONSE_REPORT_BUG) - btn = dialog.add_button(gtk.STOCK_CLOSE, gtk.BUTTONS_CLOSE) - - btn.grab_focus() + dialog.add_buttons(_('_Report Bug'), RESPONSE_REPORT_BUG, + gtk.STOCK_CLOSE, gtk.BUTTONS_CLOSE) + dialog.set_default_response(RESPONSE_REPORT_BUG) # Details textview = gtk.TextView() diff --git a/src/gtkgui.glade b/src/gtkgui.glade index 5769e2b58..2eeb9f2c4 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -18989,4 +18989,197 @@ Maybe I'll refactor later + + 6 + True + Invitation Received + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + True + + + + True + False + 6 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + GTK_RELIEF_NORMAL + True + 0 + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-cancel + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Deny + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + + True + True + True + GTK_RELIEF_NORMAL + True + 0 + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-apply + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Accept + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + 0 + False + True + GTK_PACK_END + + + + + + + + + +