# HG changeset patch # User Adrian Buehlmann <adr...@cadifra.com> # Date 1255194762 -7200 # Node ID 33a1a07adeceefab3a10d9737f648ab09e3a6eb2 # Parent ea119f5700cb01bcb8a5029cc3be4c0cfa671dda use gtklib.idle_add_single_call
diff --git a/tortoisehg/hgtk/archive.py b/tortoisehg/hgtk/archive.py --- a/tortoisehg/hgtk/archive.py +++ b/tortoisehg/hgtk/archive.py @@ -40,7 +40,7 @@ class ArchiveDialog(gtk.Dialog): try: repo = hg.repository(ui.ui(), path=paths.find_root()) except hglib.RepoError: - gobject.idle_add(self.destroy) + gtklib.idle_add_single_call(self.destroy) return self.repo = repo self.set_title(_('Archive - %s') % hglib.get_reponame(repo)) @@ -100,7 +100,7 @@ class ArchiveDialog(gtk.Dialog): # prepare to show self.update_path(hglib.toutf(repo.root)) self.archivebtn.grab_focus() - gobject.idle_add(self.after_init) + gtklib.idle_add_single_call(self.after_init) def after_init(self): # CmdWidget diff --git a/tortoisehg/hgtk/backout.py b/tortoisehg/hgtk/backout.py --- a/tortoisehg/hgtk/backout.py +++ b/tortoisehg/hgtk/backout.py @@ -44,7 +44,7 @@ class BackoutDialog(gtk.Dialog): try: repo = hg.repository(ui.ui(), path=paths.find_root()) except hglib.RepoError: - gobject.idle_add(self.destroy) + gtklib.idle_add_single_call(self.destroy) return # message @@ -103,7 +103,7 @@ class BackoutDialog(gtk.Dialog): # prepare to show self.load_settings() self.backoutbtn.grab_focus() - gobject.idle_add(self.after_init) + gtklib.idle_add_single_call(self.after_init) def after_init(self): # CmdWidget diff --git a/tortoisehg/hgtk/clone.py b/tortoisehg/hgtk/clone.py --- a/tortoisehg/hgtk/clone.py +++ b/tortoisehg/hgtk/clone.py @@ -152,7 +152,7 @@ class CloneDialog(gtk.Dialog): # prepare to show self.load_settings() destcombo.grab_focus() - gobject.idle_add(self.after_init) + gtklib.idle_add_single_call(self.after_init) def after_init(self): #CmdWidget diff --git a/tortoisehg/hgtk/commit.py b/tortoisehg/hgtk/commit.py --- a/tortoisehg/hgtk/commit.py +++ b/tortoisehg/hgtk/commit.py @@ -388,7 +388,7 @@ class GCommit(GStatus): self.vpaned = gtk.VPaned() self.vpaned.pack1(vbox, shrink=False) self.vpaned.pack2(vbox2, shrink=False) - gobject.idle_add(self.realize_settings) + gtklib.idle_add_single_call(self.realize_settings) return self.vpaned def get_preview_tab_name(self): diff --git a/tortoisehg/hgtk/guess.py b/tortoisehg/hgtk/guess.py --- a/tortoisehg/hgtk/guess.py +++ b/tortoisehg/hgtk/guess.py @@ -45,7 +45,7 @@ class DetectRenameDialog(gtk.Window): try: repo = hg.repository(ui.ui(), path=paths.find_root()) except hglib.RepoError: - gobject.idle_add(self.destroy) + gtklib.idle_add_single_call(self.destroy) return self.repo = repo self.notify_func = None @@ -217,7 +217,7 @@ class DetectRenameDialog(gtk.Window): self.cantree.connect('row-activated', lambda b: self.accept_match()) self.cantree.get_selection().connect('changed', self.show_diff) self.connect('delete-event', lambda *a: self.save_settings()) - gobject.idle_add(self.refresh) + gtklib.idle_add_single_call(self.refresh) def set_notify_func(self, func): self.notify_func = func diff --git a/tortoisehg/hgtk/hgcmd.py b/tortoisehg/hgtk/hgcmd.py --- a/tortoisehg/hgtk/hgcmd.py +++ b/tortoisehg/hgtk/hgcmd.py @@ -319,7 +319,7 @@ class CmdWidget(gtk.VBox): self.show_log(False) if self.is_compact: self.set_pbar(False) - gobject.idle_add(after_init) + gtklib.idle_add_single_call(after_init) ### public functions ### @@ -520,7 +520,7 @@ class CmdWidget(gtk.VBox): def call_callback(): callback(returncode, self.useraborted, *args, **kargs) self.useraborted = False - gobject.idle_add(call_callback) + gtklib.idle_add_single_call(call_callback) return False # Stop polling this function else: return True # Continue polling diff --git a/tortoisehg/hgtk/hgemail.py b/tortoisehg/hgtk/hgemail.py --- a/tortoisehg/hgtk/hgemail.py +++ b/tortoisehg/hgtk/hgemail.py @@ -209,7 +209,7 @@ class EmailDialog(gtk.Window): frame.add(eventbox) self._eventbox = eventbox mainvbox.pack_start(frame, True, True, 4) - gobject.idle_add(self._refresh, True) + gtklib.idle_add_single_call(self._refresh, True) def _toolbutton(self, stock, label, handler, tip): tbutton = gtk.ToolButton(stock) diff --git a/tortoisehg/hgtk/hgignore.py b/tortoisehg/hgtk/hgignore.py --- a/tortoisehg/hgtk/hgignore.py +++ b/tortoisehg/hgtk/hgignore.py @@ -29,7 +29,7 @@ class HgIgnoreDialog(gtk.Window): try: repo = hg.repository(ui.ui(), path=paths.find_root()) except hglib.RepoError: - gobject.idle_add(self.destroy) + gtklib.idle_add_single_call(self.destroy) return self.repo = repo self.set_title(_('Ignore filter - %s') % hglib.get_reponame(repo)) @@ -146,7 +146,7 @@ class HgIgnoreDialog(gtk.Window): # prepare to show self.glob_entry.grab_focus() - gobject.idle_add(self.refresh) + gtklib.idle_add_single_call(self.refresh) def file_selected(self, combo): 'select another ignore file' diff --git a/tortoisehg/hgtk/history.py b/tortoisehg/hgtk/history.py --- a/tortoisehg/hgtk/history.py +++ b/tortoisehg/hgtk/history.py @@ -969,7 +969,7 @@ class GLog(gdialog.GDialog): self.vpaned = gtk.VPaned() self.vpaned.pack1(midpane, True, False) self.vpaned.pack2(self.hpaned) - gobject.idle_add(self.realize_settings) + gtklib.idle_add_single_call(self.realize_settings) vbox = gtk.VBox() vbox.pack_start(self.vpaned, True, True) diff --git a/tortoisehg/hgtk/merge.py b/tortoisehg/hgtk/merge.py --- a/tortoisehg/hgtk/merge.py +++ b/tortoisehg/hgtk/merge.py @@ -39,13 +39,13 @@ class MergeDialog(gtk.Dialog): if not rev: gdialog.Prompt(_('Unable to merge'), _('Must supply a target revision'), self).run() - gobject.idle_add(self.destroy) + gtklib.idle_add_single_call(self.destroy) return try: repo = hg.repository(ui.ui(), path=paths.find_root()) except hglib.RepoError: - gobject.idle_add(self.destroy) + gtklib.idle_add_single_call(self.destroy) return self.set_title(_('Merging in %s') % hglib.get_reponame(repo)) @@ -94,7 +94,7 @@ class MergeDialog(gtk.Dialog): self.mergebtn.grab_focus() self.commitbtn.set_sensitive(False) self.undobtn.set_sensitive(False) - gobject.idle_add(self.after_init) + gtklib.idle_add_single_call(self.after_init) def after_init(self): # CmdWidget diff --git a/tortoisehg/hgtk/quickop.py b/tortoisehg/hgtk/quickop.py --- a/tortoisehg/hgtk/quickop.py +++ b/tortoisehg/hgtk/quickop.py @@ -35,7 +35,7 @@ class QuickOpDialog(gtk.Dialog): try: repo = hg.repository(ui.ui(), path=paths.find_root()) except hglib.RepoError: - gobject.idle_add(self.destroy) + gtklib.idle_add_single_call(self.destroy) return # Handle rm alias @@ -157,13 +157,13 @@ class QuickOpDialog(gtk.Dialog): if not len(fm): gdialog.Prompt(_('No appropriate files'), _('No files found for this operation'), self).run() - gobject.idle_add(self.destroy) + gtklib.idle_add_single_call(self.destroy) self.hide() return # prepare to show self.gobutton.grab_focus() - gobject.idle_add(self.after_init) + gtklib.idle_add_single_call(self.after_init) def after_init(self): # CmdWidget @@ -244,7 +244,7 @@ class QuickOpDialog(gtk.Dialog): pass if not list: - gobject.idle_add(self.response, gtk.RESPONSE_CLOSE) + gtklib.idle_add_single_call(self.response, gtk.RESPONSE_CLOSE) return cmdline = ['hg', self.command, '--verbose'] + list diff --git a/tortoisehg/hgtk/recovery.py b/tortoisehg/hgtk/recovery.py --- a/tortoisehg/hgtk/recovery.py +++ b/tortoisehg/hgtk/recovery.py @@ -33,7 +33,7 @@ class RecoveryDialog(gtk.Window): try: repo = hg.repository(ui.ui(), path=paths.find_root()) except hglib.RepoError: - gobject.idle_add(self.destroy) + gtklib.idle_add_single_call(self.destroy) return self.repo = repo self.reponame = hglib.get_reponame(repo) diff --git a/tortoisehg/hgtk/status.py b/tortoisehg/hgtk/status.py --- a/tortoisehg/hgtk/status.py +++ b/tortoisehg/hgtk/status.py @@ -467,7 +467,7 @@ class GStatus(gdialog.GDialog): def prepare_display(self): val = self.repo.ui.config('tortoisehg', 'ciexclude', '') self.excludes = [i.strip() for i in val.split(',') if i.strip()] - gobject.idle_add(self.realize_status_settings) + gtklib.idle_add_single_call(self.realize_status_settings) def refresh_complete(self): pass diff --git a/tortoisehg/hgtk/synch.py b/tortoisehg/hgtk/synch.py --- a/tortoisehg/hgtk/synch.py +++ b/tortoisehg/hgtk/synch.py @@ -261,7 +261,7 @@ class SynchDialog(gtk.Window): # prepare to show self.load_settings() self.update_pull_setting() - gobject.idle_add(self.finalize_startup) + gtklib.idle_add_single_call(self.finalize_startup) def create_bottombox(self): self.buttonhbox = gtk.HBox() @@ -313,7 +313,7 @@ class SynchDialog(gtk.Window): def _drag_receive(self, widget, context, x, y, selection, targetType, time): if time != self.last_drop_time: files = selection.get_uris() - gobject.idle_add(self._set_path, files[0]) + gtklib.idle_add_single_call(self._set_path, files[0]) self.last_drop_time = time def _set_path(self, uri): diff --git a/tortoisehg/hgtk/thgmq.py b/tortoisehg/hgtk/thgmq.py --- a/tortoisehg/hgtk/thgmq.py +++ b/tortoisehg/hgtk/thgmq.py @@ -121,7 +121,7 @@ class MQWidget(gtk.VBox): self.btn['menu'] = menubtn def after_init(): menubtn.child.get_children()[0].hide() - gobject.idle_add(after_init) + gtklib.idle_add_single_call(after_init) self.pack_start(tbar, False, False) # center pane @@ -651,7 +651,7 @@ class MQWidget(gtk.VBox): def unselect(): selection = list.get_selection() selection.unselect_all() - gobject.idle_add(unselect) + gtklib.idle_add_single_call(unselect) elif event.button == 3: if pathinfo: self.show_patch_cmenu(self.list, pathinfo[0]) diff --git a/tortoisehg/hgtk/update.py b/tortoisehg/hgtk/update.py --- a/tortoisehg/hgtk/update.py +++ b/tortoisehg/hgtk/update.py @@ -36,7 +36,7 @@ class UpdateDialog(gtk.Dialog): try: repo = hg.repository(ui.ui(), path=paths.find_root()) except hglib.RepoError: - gobject.idle_add(self.destroy) + gtklib.idle_add_single_call(self.destroy) return self.repo = repo self.set_title(_('Update - %s') % hglib.get_reponame(repo)) @@ -96,7 +96,7 @@ class UpdateDialog(gtk.Dialog): # prepare to show self.updatebtn.grab_focus() - gobject.idle_add(self.after_init) + gtklib.idle_add_single_call(self.after_init) def after_init(self): # CmdWidget diff --git a/tortoisehg/hgtk/visdiff.py b/tortoisehg/hgtk/visdiff.py --- a/tortoisehg/hgtk/visdiff.py +++ b/tortoisehg/hgtk/visdiff.py @@ -139,7 +139,7 @@ class FileSelectionDialog(gtk.Dialog): dlg.focus_field('tortoisehg.vdiff') dlg.run() dlg.hide() - gobject.idle_add(self.destroy) + gtklib.idle_add_single_call(self.destroy) def search_filelist(self, model, column, key, iter): 'case insensitive filename search' @@ -179,7 +179,7 @@ class FileSelectionDialog(gtk.Dialog): gdialog.Prompt(_('No file changes'), _('There are no file changes to view'), self).run() # GTK+ locks up if this is done immediately here - gobject.idle_add(self.destroy) + gtklib.idle_add_single_call(self.destroy) return tmproot = tempfile.mkdtemp(prefix='extdiff.') ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop