[GTK3] Fix GObject deprecation warnings
GObject.idle_add is deprecated using GLib.idle_add instead GObject.timeout_add is deprecated using GLib.timeout_add instead GObject.SIGNAL_RUN_LAST is deprecated; use GObject.SignalFlags.RUN_LAST instead GObject.GError is deprecated; use GLib.GError instead GObject.timeout_add is deprecated use GLib.timeout_add instead. ListStore(str, str) using unicode_literals get_value return utf8.
This commit is contained in:
parent
3a5ec4f5f4
commit
a8d01fd52f
|
@ -18,7 +18,7 @@ import sys
|
|||
import six.moves.cPickle as pickle
|
||||
from gi.repository.Gdk import SELECTION_CLIPBOARD
|
||||
from gi.repository.GdkPixbuf import Colorspace, Pixbuf
|
||||
from gi.repository.GObject import GError
|
||||
from gi.repository.GLib import GError
|
||||
from gi.repository.Gtk import (
|
||||
Clipboard,
|
||||
IconTheme,
|
||||
|
|
|
@ -13,7 +13,7 @@ import logging
|
|||
|
||||
from gi.repository import GObject, Gtk
|
||||
from gi.repository.Gdk import Event # pylint: disable=ungrouped-imports
|
||||
from gi.repository.GObject import SIGNAL_RUN_LAST, TYPE_NONE, signal_new
|
||||
from gi.repository.GObject import TYPE_NONE, SignalFlags, signal_new
|
||||
|
||||
from deluge.common import decode_bytes
|
||||
|
||||
|
@ -21,7 +21,7 @@ from .common import load_pickled_state_file, save_pickled_state_file
|
|||
|
||||
# FIXME: ?
|
||||
signal_new(
|
||||
'button-press-event', Gtk.TreeViewColumn, SIGNAL_RUN_LAST, TYPE_NONE, (Event,)
|
||||
'button-press-event', Gtk.TreeViewColumn, SignalFlags.RUN_LAST, TYPE_NONE, (Event,)
|
||||
)
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
|
|
@ -12,7 +12,7 @@ from __future__ import unicode_literals
|
|||
import logging
|
||||
import os.path
|
||||
|
||||
from gi.repository.GObject import timeout_add
|
||||
from gi.repository.GLib import timeout_add
|
||||
from gi.repository.Gtk import (
|
||||
STOCK_SORT_DESCENDING,
|
||||
Builder,
|
||||
|
|
|
@ -12,7 +12,7 @@ from __future__ import division, unicode_literals
|
|||
import logging
|
||||
|
||||
from gi.repository import Gtk
|
||||
from gi.repository.GObject import timeout_add
|
||||
from gi.repository.GLib import timeout_add
|
||||
|
||||
import deluge.component as component
|
||||
from deluge.common import fsize, fspeed, get_pixmap
|
||||
|
|
|
@ -14,7 +14,8 @@ import logging
|
|||
from locale import strcoll
|
||||
|
||||
from gi.repository.Gdk import ModifierType, keyval_name
|
||||
from gi.repository.GObject import TYPE_UINT64, idle_add
|
||||
from gi.repository.GLib import idle_add
|
||||
from gi.repository.GObject import TYPE_UINT64
|
||||
from gi.repository.Gtk import EntryIconPosition
|
||||
from twisted.internet import reactor
|
||||
|
||||
|
@ -30,7 +31,7 @@ log = logging.getLogger(__name__)
|
|||
try:
|
||||
CTRL_ALT_MASK = ModifierType.CONTROL_MASK | ModifierType.MOD1_MASK
|
||||
except TypeError:
|
||||
# Sphinx AutoDoc has a mock issue with gtk.gdk masks.
|
||||
# Sphinx AutoDoc has a mock issue with Gdk masks.
|
||||
pass
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue