[Fedora-i18n-bugs] [Bug 796070] run ibus-setup produces IBUS-CRITICAL ** Traceback.
bugzilla at redhat.com
bugzilla at redhat.com
Fri Feb 24 01:24:34 UTC 2012
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=796070
--- Comment #13 from fujiwara <tfujiwar at redhat.com> 2012-02-23 20:24:33 EST ---
(In reply to comment #12)
> (In reply to comment #11)
> > + dlg = Gtk.MessageDialog(type = Gtk.MessageType.QUESTION,
> > buttons = Gtk.ButtonsType.YES_NO,
> > message_format = message)
> > id = dlg.run()
>
> Have you tested the change?
I think this part is ok.
>
> There is also Gtk.MESSAGE_INFO below which should be Gtk.MessageType.INFO.
> Also, it seems that self.__bus.destroy() is necessary to get
> self.__bus.is_connected() condition is True.
Yes, I noticed Gtk.MESSAGE_INFO after I updated this yesterday. But no
self.__bus.destroy() is ok in my test.
--- ibus-phuang/setup/main.py.orig
+++ ibus-phuang/setup/main.py
@@ -338,9 +338,11 @@ class Setup(object):
# self.__bus.config_add_watch("/general/hotkey")
# self.__bus.config_add_watch("/panel")
except:
- while self.__bus == None:
+ pass
+ finally:
+ while self.__bus == None or not self.__bus.is_connected():
message = _("IBus daemon is not started. Do you want to start
it now?")
- dlg = Gtk.MessageDialog(type = Gtk.MESSAGE_QUESTION,
+ dlg = Gtk.MessageDialog(type = Gtk.MessageType.QUESTION,
buttons = Gtk.ButtonsType.YES_NO,
message_format = message)
id = dlg.run()
@@ -351,6 +353,8 @@ class Setup(object):
pid = os.spawnlp(os.P_NOWAIT, "ibus-daemon", "ibus-daemon",
"--xim")
time.sleep(1)
try:
+ if self.__bus != None:
+ self.__bus.destroy()
self.__bus = IBus.Bus()
except:
continue
@@ -360,7 +364,7 @@ class Setup(object):
" export XMODIFIERS=@im=ibus\n"
" export QT_IM_MODULE=ibus"
)
- dlg = Gtk.MessageDialog(type = Gtk.MESSAGE_INFO,
+ dlg = Gtk.MessageDialog(type = Gtk.MessageType.INFO,
buttons = Gtk.ButtonsType.OK,
message_format = message)
id = dlg.run()
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the i18n-bugs
mailing list