From 371b25de1a7c6f0ea2d378eaefdf2a8c7abfce4f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 6 Oct 2013 16:10:53 +0100 Subject: Replace deprecated GObject.idle_add with GLib.idle_add --- mat-gui | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mat-gui b/mat-gui index 3ff9670..dded537 100755 --- a/mat-gui +++ b/mat-gui @@ -5,7 +5,7 @@ Metadata anonymisation toolkit - GUI edition ''' -from gi.repository import GObject, Gtk +from gi.repository import GObject, Gtk, GLib from gi.repository import Gdk, GdkPixbuf import gettext @@ -150,7 +150,7 @@ class GUI(object): if not chooser.run(): # Gtk.STOCK_OK filenames = chooser.get_filenames() - GObject.idle_add(self.populate(filenames).next) # asynchronous processing + GLib.idle_add(self.populate(filenames).next) # asynchronous processing chooser.destroy() def cb_popup_metadata(self, widget, row, col): @@ -271,7 +271,7 @@ non-anonymised) file to output archive')) dirty_urls = selection.get_uris() cleaned_urls = map(clean_path, dirty_urls) - GObject.idle_add(self.populate(cleaned_urls).next) # asynchronous processing + GLib.idle_add(self.populate(cleaned_urls).next) # asynchronous processing def __add_file_to_treeview(self, filename): ''' @@ -294,7 +294,7 @@ non-anonymised) file to output archive')) if not iterator: # if nothing is selected : select everything iterator = range(len(self.liststore)) task = func(iterator) # launch func() in an asynchronous way - GObject.idle_add(task.next) + GLib.idle_add(task.next) def __invert(self, button, name): ''' Invert a preference state ''' @@ -398,6 +398,6 @@ if __name__ == '__main__': infiles = [arg for arg in sys.argv[1:] if os.path.exists(arg)] if infiles: task = gui.populate(infiles) - GObject.idle_add(task.next) + Glib.idle_add(task.next) Gtk.main() -- cgit v1.3