changeset 6e3cb29b552b in /home/hg/repos/gajim
branches: gtk3 details:http://hg.gajim.org/gajim?cmd=changeset;node=6e3cb29b552b description: GObject.* -> GLib.*
diffstat:
src/adhoc_commands.py | 6 +- src/advanced_configuration_window.py | 6 +- src/cell_renderer_image.py | 6 +- src/chat_control.py | 37 +++++++++++---------- src/common/config.py | 4 +- src/common/connection_handlers.py | 4 +- src/common/jingle_rtp.py | 6 +- src/common/logger.py | 4 +- src/common/resolver.py | 6 +- src/config.py | 25 +++++++------- src/conversation_textview.py | 25 +++++++------- src/dialogs.py | 23 +++++++------ src/disco.py | 34 ++++++++++---------- src/filetransfers_window.py | 26 +++++++-------- src/groupchat_control.py | 17 ++++----- src/gui_interface.py | 44 ++++++++++++------------ src/htmltextview.py | 5 +- src/message_window.py | 9 ++-- src/profile_window.py | 27 ++++++++------- src/roster_window.py | 43 ++++++++++++------------ src/search_window.py | 12 +++--- src/tooltips.py | 61 ++++++++++++++++------------------- 22 files changed, 215 insertions(+), 215 deletions(-)
diffs (truncated from 1710 to 300 lines):
diff -r 07b350a36f36 -r 6e3cb29b552b src/adhoc_commands.py --- a/src/adhoc_commands.py Sun Jul 28 20:50:11 2013 +0200 +++ b/src/adhoc_commands.py Sun Jul 28 20:50:30 2013 +0200 @@ -25,7 +25,7 @@ # FIXME: think if we need caching command list. it may be wrong if there will # be entities that often change the list, it may be slow to fetch it every time
-from gi.repository import GObject +from gi.repository import GLib from gi.repository import Gtk
import nbxmpp @@ -555,14 +555,14 @@ return True # important to keep callback be called back!
# 12 times per second (80 miliseconds) - self.pulse_id = GObject.timeout_add(80, callback) + self.pulse_id = GLib.timeout_add(80, callback)
def remove_pulsing(self): """ Stop pulsing, useful when especially when removing widget """ if self.pulse_id: - GObject.source_remove(self.pulse_id) + GLib.source_remove(self.pulse_id) self.pulse_id = None
# handling xml stanzas diff -r 07b350a36f36 -r 6e3cb29b552b src/advanced_configuration_window.py --- a/src/advanced_configuration_window.py Sun Jul 28 20:50:11 2013 +0200 +++ b/src/advanced_configuration_window.py Sun Jul 28 20:50:30 2013 +0200 @@ -25,7 +25,7 @@
from gi.repository import Gtk import gtkgui_helpers -from gi.repository import GObject +from gi.repository import GLib
from common import gajim from common import helpers @@ -51,12 +51,12 @@ timeout = [None] def f(*args, **kwargs): if timeout[0] is not None: - GObject.source_remove(timeout[0]) + GLib.source_remove(timeout[0]) timeout[0] = None def timeout_func(): func(*args, **kwargs) timeout[0] = None - timeout[0] = GObject.timeout_add(int(1000.0 / rate), timeout_func) + timeout[0] = GLib.timeout_add(int(1000.0 / rate), timeout_func) return f return decorator
diff -r 07b350a36f36 -r 6e3cb29b552b src/cell_renderer_image.py --- a/src/cell_renderer_image.py Sun Jul 28 20:50:11 2013 +0200 +++ b/src/cell_renderer_image.py Sun Jul 28 20:50:30 2013 +0200 @@ -77,7 +77,7 @@ if model: model.foreach(self.func, (image, tree)) if self.redraw: - GObject.timeout_add(iter_.get_delay_time(), + GLib.timeout_add(iter_.get_delay_time(), self.animation_timeout, tree, image) elif image in self.iters: del self.iters[image] @@ -95,8 +95,8 @@ timeval.tv_sec = GLib.get_current_time() iter_ = animation.get_iter(timeval) self.iters[self.image] = iter_ - GObject.timeout_add(iter_.get_delay_time(), - self.animation_timeout, widget, self.image) + GLib.timeout_add(iter_.get_delay_time(), self.animation_timeout, + widget, self.image)
pix = self.iters[self.image].get_pixbuf() elif self.image.get_storage_type() == Gtk.ImageType.PIXBUF: diff -r 07b350a36f36 -r 6e3cb29b552b src/chat_control.py --- a/src/chat_control.py Sun Jul 28 20:50:11 2013 +0200 +++ b/src/chat_control.py Sun Jul 28 20:50:30 2013 +0200 @@ -34,6 +34,7 @@ from gi.repository import GdkPixbuf from gi.repository import Pango from gi.repository import GObject +from gi.repository import GLib import gtkgui_helpers import gui_menu_builder import message_control @@ -1286,7 +1287,7 @@ visible_rect = textview.get_visible_rect() # scroll only if expected end is not visible if end_rect.y >= (visible_rect.y + visible_rect.height + diff_y): - self.scroll_to_end_id = GObject.idle_add(self.scroll_to_end_iter, + self.scroll_to_end_id = GLib.idle_add(self.scroll_to_end_iter, textview)
def scroll_to_end_iter(self, textview): @@ -1482,7 +1483,7 @@ """ # make the last message visible, when changing to "full view" if not state: - GObject.idle_add(self.conv_textview.scroll_to_end_iter) + GLib.idle_add(self.conv_textview.scroll_to_end_iter)
widget.set_no_show_all(state) if state: @@ -2048,8 +2049,8 @@ if avatar_w > scaled_buf_w or avatar_h > scaled_buf_h: # wait for 0.5 sec in case we leave earlier if self.show_bigger_avatar_timeout_id is not None: - GObject.source_remove(self.show_bigger_avatar_timeout_id) - self.show_bigger_avatar_timeout_id = GObject.timeout_add(500, + GLib.source_remove(self.show_bigger_avatar_timeout_id) + self.show_bigger_avatar_timeout_id = GLib.timeout_add(500, self.show_bigger_avatar, widget)
def on_avatar_eventbox_leave_notify_event(self, widget, event): @@ -2058,7 +2059,7 @@ """ # did we add a timeout? if yes remove it if self.show_bigger_avatar_timeout_id is not None: - GObject.source_remove(self.show_bigger_avatar_timeout_id) + GLib.source_remove(self.show_bigger_avatar_timeout_id) self.show_bigger_avatar_timeout_id = None
def on_avatar_eventbox_button_press_event(self, widget, event): @@ -2100,9 +2101,9 @@ self.mouse_over_in_last_30_secs = True
def _schedule_activity_timers(self): - self.possible_paused_timeout_id = GObject.timeout_add_seconds(5, + self.possible_paused_timeout_id = GLib.timeout_add_seconds(5, self.check_for_possible_paused_chatstate, None) - self.possible_inactive_timeout_id = GObject.timeout_add_seconds(30, + self.possible_inactive_timeout_id = GLib.timeout_add_seconds(30, self.check_for_possible_inactive_chatstate, None)
def update_ui(self): @@ -2162,7 +2163,7 @@ name = i18n.direction_mark + _( '%(nickname)s from group chat %(room_name)s') % \ {'nickname': name, 'room_name': self.room_name} - name = i18n.direction_mark + GObject.markup_escape_text(name) + name = i18n.direction_mark + GLib.markup_escape_text(name)
# We know our contacts nick, but if another contact has the same nick # in another account we need to also display the account. @@ -2179,7 +2180,7 @@ if other_contact_.get_shown_name() == \ self.contact.get_shown_name(): acct_info = i18n.direction_mark + ' (%s)' % \ - GObject.markup_escape_text(self.account) + GLib.markup_escape_text(self.account) break
status = contact.status @@ -2189,7 +2190,7 @@ status_reduced = helpers.reduce_chars_newlines(status, max_lines=1) else: status_reduced = '' - status_escaped = GObject.markup_escape_text(status_reduced) + status_escaped = GLib.markup_escape_text(status_reduced)
font_attrs, font_attrs_small = self.get_font_attrs() st = gajim.config.get('displayed_chat_state_notifications') @@ -2407,8 +2408,8 @@ chatstate_to_send = 'active' contact.our_chatstate = 'active'
- GObject.source_remove(self.possible_paused_timeout_id) - GObject.source_remove(self.possible_inactive_timeout_id) + GLib.source_remove(self.possible_paused_timeout_id) + GLib.source_remove(self.possible_inactive_timeout_id) self._schedule_activity_timers()
def _on_sent(msg_stanza, message, encrypted, xhtml, label, old_txt): @@ -2671,7 +2672,7 @@ name = self.contact.get_shown_name() if self.resource: name += '/' + self.resource - label_str = GObject.markup_escape_text(name) + label_str = GLib.markup_escape_text(name) if num_unread: # if unread, text in the label becomes bold label_str = '<b>' + unread + label_str + '</b>' return (label_str, color) @@ -2809,8 +2810,8 @@ self.session.control = None
# Disconnect timer callbacks - GObject.source_remove(self.possible_paused_timeout_id) - GObject.source_remove(self.possible_inactive_timeout_id) + GLib.source_remove(self.possible_paused_timeout_id) + GLib.source_remove(self.possible_inactive_timeout_id) # Remove bigger avatar window if self.bigger_avatar_window: self.bigger_avatar_window.destroy() @@ -2893,8 +2894,8 @@ else: self.send_chatstate('active', self.contact) self.reset_kbd_mouse_timeout_vars() - GObject.source_remove(self.possible_paused_timeout_id) - GObject.source_remove(self.possible_inactive_timeout_id) + GLib.source_remove(self.possible_paused_timeout_id) + GLib.source_remove(self.possible_inactive_timeout_id) self._schedule_activity_timers() else: self.send_chatstate('inactive', self.contact) @@ -3479,6 +3480,6 @@ self.info_bar.set_no_show_all(True) self.info_bar.hide() # show next one? - GObject.idle_add(self._info_bar_show_message) + GLib.idle_add(self._info_bar_show_message) break i += 1 diff -r 07b350a36f36 -r 6e3cb29b552b src/common/config.py --- a/src/common/config.py Sun Jul 28 20:50:11 2013 +0200 +++ b/src/common/config.py Sun Jul 28 20:50:30 2013 +0200 @@ -36,7 +36,7 @@ import re import copy from common import defs -from gi.repository import GObject +from gi.repository import GLib
( OPT_TYPE, @@ -802,7 +802,7 @@ def _timeout_save(self): if self.save_timeout_id: return - self.save_timeout_id = GObject.timeout_add(1000, self._really_save) + self.save_timeout_id = GLib.timeout_add(1000, self._really_save)
def __init__(self): #init default values diff -r 07b350a36f36 -r 6e3cb29b552b src/common/connection_handlers.py --- a/src/common/connection_handlers.py Sun Jul 28 20:50:11 2013 +0200 +++ b/src/common/connection_handlers.py Sun Jul 28 20:50:30 2013 +0200 @@ -33,7 +33,7 @@ import sys import operator import hashlib -from gi.repository import GObject +from gi.repository import GLib
from time import (altzone, daylight, gmtime, localtime, mktime, strftime, time as time_time, timezone, tzname) @@ -560,7 +560,7 @@ self.discover_ft_proxies() gajim.nec.push_incoming_event(RosterReceivedEvent(None, conn=self)) - GObject.timeout_add_seconds(10, self.discover_servers) + GLib.timeout_add_seconds(10, self.discover_servers) elif self.awaiting_answers[id_][0] == PRIVACY_ARRIVED: if iq_obj.getType() != 'error': self.privacy_rules_supported = True diff -r 07b350a36f36 -r 6e3cb29b552b src/common/jingle_rtp.py --- a/src/common/jingle_rtp.py Sun Jul 28 20:50:11 2013 +0200 +++ b/src/common/jingle_rtp.py Sun Jul 28 20:50:30 2013 +0200 @@ -17,7 +17,7 @@
from collections import deque
-from gi.repository import GObject +from gi.repository import GLib import socket
import nbxmpp @@ -130,13 +130,13 @@ events = deque(events) self._dtmf_running = True self._start_dtmf(events.popleft()) - GObject.timeout_add(500, self._next_dtmf, events) + GLib.timeout_add(500, self._next_dtmf, events)
def _next_dtmf(self, events): self._stop_dtmf() if events: self._start_dtmf(events.popleft()) - GObject.timeout_add(500, self._next_dtmf, events) + GLib.timeout_add(500, self._next_dtmf, events) else: self._dtmf_running = False
diff -r 07b350a36f36 -r 6e3cb29b552b src/common/logger.py --- a/src/common/logger.py Sun Jul 28 20:50:11 2013 +0200 +++ b/src/common/logger.py Sun Jul 28 20:50:30 2013 +0200 @@ -34,7 +34,7 @@ import datetime from gzip import GzipFile from io import BytesIO -from gi.repository import GObject +from gi.repository import GLib
from common import exceptions from common import gajim @@ -177,7 +177,7 @@