changeset 493b1afcd45d in /home/hg/repos/gajim
branches: gtk3 details:http://hg.gajim.org/gajim?cmd=changeset;node=493b1afcd45d description: GObject -> GLib
diffstat:
src/command_system/implementation/execute.py | 4 ++-- src/common/protocol/bytestream.py | 6 +++--- src/common/zeroconf/connection_zeroconf.py | 4 ++-- src/dataforms_widget.py | 3 ++- src/history_window.py | 6 +++--- src/ipython_view.py | 9 +++++---- src/message_textview.py | 3 ++- src/remote_control.py | 22 +++++++++++----------- 8 files changed, 30 insertions(+), 27 deletions(-)
diffs (263 lines):
diff -r 2aa7b24c6157 -r 493b1afcd45d src/command_system/implementation/execute.py --- a/src/command_system/implementation/execute.py Mon Jul 29 18:29:24 2013 +0200 +++ b/src/command_system/implementation/execute.py Mon Jul 29 18:35:49 2013 +0200 @@ -35,7 +35,7 @@ from subprocess import Popen, PIPE from os.path import expanduser
-from gi.repository import GObject +from gi.repository import GLib
from ..framework import CommandContainer, command, doc from .hosts import * @@ -64,7 +64,7 @@ @classmethod def monitor(cls, processor, popen): poller = cls.poller(processor, popen) - GObject.timeout_add(cls.POLL_INTERVAL, next, poller) + GLib.timeout_add(cls.POLL_INTERVAL, next, poller)
@classmethod def poller(cls, processor, popen): diff -r 2aa7b24c6157 -r 493b1afcd45d src/common/protocol/bytestream.py --- a/src/common/protocol/bytestream.py Mon Jul 29 18:29:24 2013 +0200 +++ b/src/common/protocol/bytestream.py Mon Jul 29 18:35:49 2013 +0200 @@ -30,7 +30,7 @@
import socket import base64 -from gi.repository import GObject +from gi.repository import GLib import time
import nbxmpp @@ -442,7 +442,7 @@
def cleanup_gupnp(): if self.no_gupnp_reply_id: - GObject.source_remove(self.no_gupnp_reply_id) + GLib.source_remove(self.no_gupnp_reply_id) self.no_gupnp_reply_id = 0 gajim.gupnp_igd.disconnect(self.ok_id) gajim.gupnp_igd.disconnect(self.fail_id) @@ -482,7 +482,7 @@ self.fail_id = gajim.gupnp_igd.connect('error-mapping-port', fail)
port = gajim.config.get('file_transfers_port') - self.no_gupnp_reply_id = GObject.timeout_add_seconds(10, no_upnp_reply) + self.no_gupnp_reply_id = GLib.timeout_add_seconds(10, no_upnp_reply) gajim.gupnp_igd.add_port('TCP', 0, my_ip, port, 3600, 'Gajim file transfer')
diff -r 2aa7b24c6157 -r 493b1afcd45d src/common/zeroconf/connection_zeroconf.py --- a/src/common/zeroconf/connection_zeroconf.py Mon Jul 29 18:29:24 2013 +0200 +++ b/src/common/zeroconf/connection_zeroconf.py Mon Jul 29 18:35:49 2013 +0200 @@ -39,7 +39,7 @@ if os.name != 'nt': signal.signal(signal.SIGPIPE, signal.SIG_DFL) import getpass -from gi.repository import GObject +from gi.repository import GLib
from common.connection import CommonConnection from common import gajim @@ -239,7 +239,7 @@
# refresh all contacts data every five seconds self.call_resolve_timeout = True - GObject.timeout_add_seconds(5, self._on_resolve_timeout) + GLib.timeout_add_seconds(5, self._on_resolve_timeout) return True
def disconnect(self, on_purpose=False): diff -r 2aa7b24c6157 -r 493b1afcd45d src/dataforms_widget.py --- a/src/dataforms_widget.py Mon Jul 29 18:29:24 2013 +0200 +++ b/src/dataforms_widget.py Mon Jul 29 18:35:49 2013 +0200 @@ -29,6 +29,7 @@ from gi.repository import Gdk from gi.repository import GdkPixbuf from gi.repository import GObject +from gi.repository import GLib import base64
import gtkgui_helpers @@ -640,7 +641,7 @@ dialogs.ErrorDialog( _('Jabber ID already in list'), _('The Jabber ID you entered is already in the list. Choose another one.')) - GObject.idle_add(treeview.set_cursor, path) + GLib.idle_add(treeview.set_cursor, path) return model[path][0]=newtext
diff -r 2aa7b24c6157 -r 493b1afcd45d src/history_window.py --- a/src/history_window.py Mon Jul 29 18:29:24 2013 +0200 +++ b/src/history_window.py Mon Jul 29 18:35:49 2013 +0200 @@ -27,7 +27,7 @@
from gi.repository import Gtk from gi.repository import Gdk -from gi.repository import GObject +from gi.repository import GLib import time import calendar
@@ -120,7 +120,7 @@
# This will load history too task = self._fill_completion_dict() - GObject.idle_add(next, task) + GLib.idle_add(next, task)
if jid: self.jid_entry.set_text(jid) @@ -634,7 +634,7 @@ self.jid_entry.set_text(jid) if account and account not in self.accounts_seen_online: # Update dict to not only show bare jid - GObject.idle_add(next, self._fill_completion_dict()) + GLib.idle_add(next, self._fill_completion_dict()) else: # Only in that case because it's called by self._fill_completion_dict() # otherwise diff -r 2aa7b24c6157 -r 493b1afcd45d src/ipython_view.py --- a/src/ipython_view.py Mon Jul 29 18:29:24 2013 +0200 +++ b/src/ipython_view.py Mon Jul 29 18:35:49 2013 +0200 @@ -44,6 +44,7 @@
from gi.repository import Gtk from gi.repository import GObject +from gi.repository import GLib import re import sys import os @@ -367,7 +368,7 @@ self.connect('key-press-event', self.onKeyPress)
def write(self, text, editable=False): - GObject.idle_add(self._write, text, editable) + GLib.idle_add(self._write, text, editable)
def _write(self, text, editable=False): """ @@ -401,7 +402,7 @@
def showPrompt(self, prompt): - GObject.idle_add(self._showPrompt, prompt) + GLib.idle_add(self._showPrompt, prompt)
def _showPrompt(self, prompt): """ @@ -415,7 +416,7 @@ self.text_buffer.get_end_iter())
def changeLine(self, text): - GObject.idle_add(self._changeLine, text) + GLib.idle_add(self._changeLine, text)
def _changeLine(self, text): """ @@ -442,7 +443,7 @@ return rv
def showReturned(self, text): - GObject.idle_add(self._showReturned, text) + GLib.idle_add(self._showReturned, text)
def _showReturned(self, text): """ diff -r 2aa7b24c6157 -r 493b1afcd45d src/message_textview.py --- a/src/message_textview.py Mon Jul 29 18:29:24 2013 +0200 +++ b/src/message_textview.py Mon Jul 29 18:35:49 2013 +0200 @@ -26,6 +26,7 @@ from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GObject +from gi.repository import GLib from gi.repository import Pango
import gtkgui_helpers @@ -284,7 +285,7 @@ return None
def destroy(self): - GObject.idle_add(gc.collect) + GLib.idle_add(gc.collect)
def clear(self, widget = None): """ diff -r 2aa7b24c6157 -r 493b1afcd45d src/remote_control.py --- a/src/remote_control.py Mon Jul 29 18:29:24 2013 +0200 +++ b/src/remote_control.py Mon Jul 29 18:35:49 2013 +0200 @@ -26,7 +26,7 @@ ## along with Gajim. If not, see http://www.gnu.org/licenses/. ##
-from gi.repository import GObject +from gi.repository import GLib from gi.repository import Gtk import os import base64 @@ -559,8 +559,8 @@ if account not in gajim.connections: return DBUS_BOOLEAN(False) status = gajim.SHOW_LIST[gajim.connections[account].connected] - GObject.idle_add(gajim.interface.roster.send_status, account, - status, message) + GLib.idle_add(gajim.interface.roster.send_status, account, status, + message) else: # account not specified, so change the status of all accounts for acc in gajim.contacts.get_accounts(): @@ -573,8 +573,8 @@ if acc not in gajim.connections: continue status_ = gajim.SHOW_LIST[gajim.connections[acc].connected] - GObject.idle_add(gajim.interface.roster.send_status, acc, - status_, message) + GLib.idle_add(gajim.interface.roster.send_status, acc, status_, + message) return DBUS_BOOLEAN(False)
@dbus.service.method(INTERFACE, in_signature='ss', out_signature='') @@ -587,8 +587,8 @@ gajim.config.set_per('accounts', account, 'priority', prio) show = gajim.SHOW_LIST[gajim.connections[account].connected] status = gajim.connections[account].status - GObject.idle_add(gajim.connections[account].change_status, show, - status) + GLib.idle_add(gajim.connections[account].change_status, show, + status) else: # account not specified, so change prio of all accounts for acc in gajim.contacts.get_accounts(): @@ -600,8 +600,8 @@ gajim.config.set_per('accounts', acc, 'priority', prio) show = gajim.SHOW_LIST[gajim.connections[acc].connected] status = gajim.connections[acc].status - GObject.idle_add(gajim.connections[acc].change_status, show, - status) + GLib.idle_add(gajim.connections[acc].change_status, show, + status)
@dbus.service.method(INTERFACE, in_signature='', out_signature='') def show_next_pending_event(self): @@ -693,7 +693,7 @@ """ win = gajim.interface.roster.window if win.get_property('visible'): - GObject.idle_add(win.hide) + GLib.idle_add(win.hide) else: win.present() # preserve the 'steal focus preservation' @@ -723,7 +723,7 @@ win = gajim.ipython_window if win: if win.window.is_visible(): - GObject.idle_add(win.hide) + GLib.idle_add(win.hide) else: win.show_all() win.present()