Merge lp:~mvo/software-center/fix-pygobject-deprecation-warnings into lp:software-center
- fix-pygobject-deprecation-warnings
- Merge into trunk
Proposed by
Michael Vogt
on 2012-11-28
| Status: | Merged |
|---|---|
| Merged at revision: | 3250 |
| Proposed branch: | lp:~mvo/software-center/fix-pygobject-deprecation-warnings |
| Merge into: | lp:software-center |
| Diff against target: |
2208 lines (+250/-239) 68 files modified
debian/changelog (+3/-3) doc/example_plugin.py (+2/-2) software-center (+1/-1) softwarecenter/backend/channel_impl/aptchannels.py (+5/-5) softwarecenter/backend/installbackend_impl/aptd.py (+3/-3) softwarecenter/backend/oneconfhandler/core.py (+3/-3) softwarecenter/backend/reviews/__init__.py (+3/-3) softwarecenter/backend/reviews/rnr.py (+1/-1) softwarecenter/backend/spawn_helper.py (+11/-8) softwarecenter/backend/ubuntusso.py (+2/-2) softwarecenter/backend/weblive.py (+11/-8) softwarecenter/db/database.py (+3/-3) softwarecenter/db/dataprovider.py (+5/-5) softwarecenter/db/enquire.py (+2/-2) softwarecenter/db/history_impl/apthistory.py (+3/-3) softwarecenter/db/pkginfo_impl/aptcache.py (+7/-7) softwarecenter/db/update.py (+6/-6) softwarecenter/db/utils.py (+4/-3) softwarecenter/netstatus.py (+2/-2) softwarecenter/ui/gtk3/app.py (+11/-10) softwarecenter/ui/gtk3/models/appstore2.py (+6/-5) softwarecenter/ui/gtk3/models/pendingstore.py (+2/-3) softwarecenter/ui/gtk3/panes/availablepane.py (+5/-4) softwarecenter/ui/gtk3/panes/installedpane.py (+4/-5) softwarecenter/ui/gtk3/panes/viewswitcher.py (+4/-4) softwarecenter/ui/gtk3/review_gui_helper.py (+2/-2) softwarecenter/ui/gtk3/views/appdetailsview.py (+6/-6) softwarecenter/ui/gtk3/views/catview.py (+8/-8) softwarecenter/ui/gtk3/views/lobbyview.py (+2/-2) softwarecenter/ui/gtk3/views/purchaseview.py (+3/-2) softwarecenter/ui/gtk3/widgets/actionbar.py (+5/-5) softwarecenter/ui/gtk3/widgets/apptreeview.py (+2/-2) softwarecenter/ui/gtk3/widgets/buttons.py (+3/-3) softwarecenter/ui/gtk3/widgets/cellrenderers.py (+2/-2) softwarecenter/ui/gtk3/widgets/containers.py (+2/-2) softwarecenter/ui/gtk3/widgets/description.py (+2/-2) softwarecenter/ui/gtk3/widgets/exhibits.py (+7/-6) softwarecenter/ui/gtk3/widgets/navlog.py (+2/-2) softwarecenter/ui/gtk3/widgets/recommendations.py (+2/-2) softwarecenter/ui/gtk3/widgets/reviews.py (+7/-7) softwarecenter/ui/gtk3/widgets/searchaid.py (+5/-5) softwarecenter/ui/gtk3/widgets/searchentry.py (+3/-3) softwarecenter/ui/gtk3/widgets/spinner.py (+3/-3) softwarecenter/ui/gtk3/widgets/symbolic_icons.py (+2/-2) softwarecenter/ui/gtk3/widgets/thumbnail.py (+3/-3) softwarecenter/ui/qml/reviewslist.py (+2/-2) softwarecenter/utils.py (+4/-3) tests/create_transactions.py (+2/-2) tests/gtk3/test_dialogs.py (+5/-5) tests/gtk3/test_lp1048912.py (+4/-4) tests/gtk3/test_recommendations_widgets.py (+4/-4) tests/gtk3/test_spinner.py (+9/-9) tests/gtk3/test_webkit.py (+2/-2) tests/gtk3/test_widgets.py (+3/-3) tests/gtk3/windows.py (+7/-7) tests/qml/test_ui_qml_helpers.py (+2/-2) tests/test_aptd.py (+2/-2) tests/test_apthistory.py (+3/-3) tests/test_database.py (+2/-2) tests/test_dataprovider.py (+2/-2) tests/test_pkginfo.py (+3/-3) tests/test_purchase_backend.py (+2/-2) tests/test_recagent.py (+2/-2) tests/test_reinstall_purchased.py (+3/-3) tests/test_scagent.py (+2/-2) tests/utils.py (+2/-2) utils/update-software-center (+1/-1) utils/update-software-center-channels (+2/-2) |
| To merge this branch: | bzr merge lp:~mvo/software-center/fix-pygobject-deprecation-warnings |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Michał Karnicki (community) | Approve on 2012-11-30 | ||
| software-store-developers | 2012-11-28 | Pending | |
|
Review via email:
|
|||
Commit Message
Description of the Change
Mostly trivial branch that fixes deprecation warnings with the latest python-gi
To post a comment you must log in.
lp:~mvo/software-center/fix-pygobject-deprecation-warnings
updated
on 2012-11-30
- 3253. By Michael Vogt on 2012-11-30
-
softwarecenter/
backend/ channel_ impl/aptchannel s.py: remove another instance of GObject and replace with GLib, thanks to karni for finding this :)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
| 1 | === modified file 'debian/changelog' |
| 2 | --- debian/changelog 2012-11-29 07:49:30 +0000 |
| 3 | +++ debian/changelog 2012-11-30 19:08:32 +0000 |
| 4 | @@ -3835,7 +3835,7 @@ |
| 5 | - fix pyflakes warnins |
| 6 | * softwarecenter/db/reviews.py: |
| 7 | - ensure pkgname is a str (and not unicode), otherwise |
| 8 | - GObject.spawn_async crashes (LP: #761357) |
| 9 | + GLib.spawn_async crashes (LP: #761357) |
| 10 | * softwarecenter/backend/zeitgeist_simple.py: |
| 11 | - do not crash if a zeitgeist has no subjects (LP: #761905) |
| 12 | |
| 13 | @@ -3906,7 +3906,7 @@ |
| 14 | - do not crash if /var/lib/apt-xapian-index/cataloged_times.p can |
| 15 | not be read (LP: #636049) |
| 16 | * merged lp:~mvo/software-center/get-reviews-subprocess (LP: #743020): |
| 17 | - - don't use multiprocessing anymore, instead GObject.spawn_async() |
| 18 | + - don't use multiprocessing anymore, instead GLib.spawn_async() |
| 19 | a helper app, this finally fixes the crashes with accessibility |
| 20 | turned on (LP: #743020) |
| 21 | - update rnrclient_pristine.py to the latest upstream version |
| 22 | @@ -3914,7 +3914,7 @@ |
| 23 | - add support for getting all the origins of the DB, this is |
| 24 | needed for the new rnrclient_pristine.py functionatlity |
| 25 | - ship get_reviews_helper.py, get_review_stats_helper.py for |
| 26 | - the GObject.spawn_async() change |
| 27 | + the GLib.spawn_async() change |
| 28 | - this also makes the reviews fully work in the guest session again |
| 29 | |
| 30 | [ Gary Lasker ] |
| 31 | |
| 32 | === modified file 'doc/example_plugin.py' |
| 33 | --- doc/example_plugin.py 2011-09-13 21:54:04 +0000 |
| 34 | +++ doc/example_plugin.py 2012-11-30 19:08:32 +0000 |
| 35 | @@ -1,5 +1,5 @@ |
| 36 | |
| 37 | -from gi.repository import GObject |
| 38 | +from gi.repository import GLib |
| 39 | import sys |
| 40 | |
| 41 | import softwarecenter.plugin |
| 42 | @@ -18,4 +18,4 @@ |
| 43 | def init_plugin(self): |
| 44 | sys.stderr.write("init_plugin\n") |
| 45 | |
| 46 | - GObject.timeout_add(100, self._try_to_hide_banner) |
| 47 | + GLib.timeout_add(100, self._try_to_hide_banner) |
| 48 | |
| 49 | === modified file 'software-center' |
| 50 | --- software-center 2012-09-18 06:38:40 +0000 |
| 51 | +++ software-center 2012-11-30 19:08:32 +0000 |
| 52 | @@ -147,7 +147,7 @@ |
| 53 | |
| 54 | # run watcher for main window |
| 55 | main_visible = False |
| 56 | - GObject.timeout_add(100, are_we_there_yet) |
| 57 | + GLib.timeout_add(100, are_we_there_yet) |
| 58 | app.run(args) |
| 59 | |
| 60 | # keep monitoring the loop |
| 61 | |
| 62 | === modified file 'softwarecenter/backend/channel_impl/aptchannels.py' |
| 63 | --- softwarecenter/backend/channel_impl/aptchannels.py 2012-09-18 20:14:56 +0000 |
| 64 | +++ softwarecenter/backend/channel_impl/aptchannels.py 2012-11-30 19:08:32 +0000 |
| 65 | @@ -23,7 +23,7 @@ |
| 66 | |
| 67 | import softwarecenter.paths |
| 68 | |
| 69 | -from gi.repository import GObject |
| 70 | +from gi.repository import GLib |
| 71 | |
| 72 | from aptsources.sourceslist import SourceEntry, SourcesList |
| 73 | |
| 74 | @@ -50,7 +50,7 @@ |
| 75 | self._remove_no_longer_needed_extra_channels) |
| 76 | # kick off a background check for changes that may have been made |
| 77 | # in the channels list |
| 78 | - GObject.timeout_add_seconds(60, self._check_for_channel_updates_timer) |
| 79 | + GLib.timeout_add_seconds(60, self._check_for_channel_updates_timer) |
| 80 | # extra channels from e.g. external sources |
| 81 | self.extra_channels = [] |
| 82 | self._logger = LOG |
| 83 | @@ -157,10 +157,10 @@ |
| 84 | # this is expensive and does not need UI to we shove it out |
| 85 | channel_update = os.path.join( |
| 86 | softwarecenter.paths.datadir, "update-software-center-channels") |
| 87 | - (pid, stdin, stdout, stderr) = GObject.spawn_async( |
| 88 | + (pid, stdin, stdout, stderr) = GLib.spawn_async( |
| 89 | [channel_update], |
| 90 | - flags=GObject.SPAWN_DO_NOT_REAP_CHILD) |
| 91 | - GObject.child_watch_add( |
| 92 | + flags=GLib.SpawnFlags.DO_NOT_REAP_CHILD) |
| 93 | + GLib.child_watch_add(GLib.PRIORITY_DEFAULT, |
| 94 | pid, self._on_check_for_channel_updates_finished) |
| 95 | |
| 96 | def _on_check_for_channel_updates_finished(self, pid, condition): |
| 97 | |
| 98 | === modified file 'softwarecenter/backend/installbackend_impl/aptd.py' |
| 99 | --- softwarecenter/backend/installbackend_impl/aptd.py 2012-11-23 22:57:21 +0000 |
| 100 | +++ softwarecenter/backend/installbackend_impl/aptd.py 2012-11-30 19:08:32 +0000 |
| 101 | @@ -28,7 +28,7 @@ |
| 102 | PIPE, |
| 103 | ) |
| 104 | |
| 105 | -from gi.repository import GObject |
| 106 | +from gi.repository import GObject, GLib |
| 107 | |
| 108 | from softwarecenter.utils import (sources_filename_from_ppa_entry, |
| 109 | release_filename_in_lists_from_deb_line, |
| 110 | @@ -744,7 +744,7 @@ |
| 111 | trans.meta_data["sc_add_repo_and_install_try"] = str(retry + 1) |
| 112 | sourcepart = trans.meta_data[ |
| 113 | "sc_add_repo_and_install_sources_list"] |
| 114 | - GObject.timeout_add_seconds(30, self._reload_for_commercial_repo, |
| 115 | + GLib.timeout_add_seconds(30, self._reload_for_commercial_repo, |
| 116 | app, trans.meta_data, sourcepart) |
| 117 | |
| 118 | # internal helpers |
| 119 | @@ -752,7 +752,7 @@ |
| 120 | # cleanup progress signal (to be sure to not leave dbus |
| 121 | # matchers around) |
| 122 | if self._progress_signal: |
| 123 | - GObject.source_remove(self._progress_signal) |
| 124 | + GLib.source_remove(self._progress_signal) |
| 125 | self._progress_signal = None |
| 126 | # attach progress-changed signal for current transaction |
| 127 | if current: |
| 128 | |
| 129 | === modified file 'softwarecenter/backend/oneconfhandler/core.py' |
| 130 | --- softwarecenter/backend/oneconfhandler/core.py 2012-09-14 13:25:45 +0000 |
| 131 | +++ softwarecenter/backend/oneconfhandler/core.py 2012-11-30 19:08:32 +0000 |
| 132 | @@ -25,7 +25,7 @@ |
| 133 | from softwarecenter.enums import SOFTWARE_CENTER_NAME_KEYRING |
| 134 | |
| 135 | import datetime |
| 136 | -from gi.repository import GObject |
| 137 | +from gi.repository import GObject, GLib |
| 138 | import logging |
| 139 | |
| 140 | from gettext import gettext as _ |
| 141 | @@ -67,9 +67,9 @@ |
| 142 | |
| 143 | # refresh host list |
| 144 | self._refreshing_hosts = False |
| 145 | - GObject.timeout_add_seconds(MIN_TIME_WITHOUT_ACTIVITY, |
| 146 | + GLib.timeout_add_seconds(MIN_TIME_WITHOUT_ACTIVITY, |
| 147 | self.get_latest_oneconf_sync) |
| 148 | - GObject.idle_add(self.refresh_hosts) |
| 149 | + GLib.idle_add(self.refresh_hosts) |
| 150 | |
| 151 | def refresh_hosts(self): |
| 152 | """refresh hosts list in the panel view""" |
| 153 | |
| 154 | === modified file 'softwarecenter/backend/reviews/__init__.py' |
| 155 | --- softwarecenter/backend/reviews/__init__.py 2012-11-23 22:57:21 +0000 |
| 156 | +++ softwarecenter/backend/reviews/__init__.py 2012-11-30 19:08:32 +0000 |
| 157 | @@ -31,7 +31,7 @@ |
| 158 | |
| 159 | from bsddb import db as bdb |
| 160 | |
| 161 | -from gi.repository import GObject |
| 162 | +from gi.repository import GObject, GLib |
| 163 | |
| 164 | # py3 compat |
| 165 | try: |
| 166 | @@ -751,8 +751,8 @@ |
| 167 | |
| 168 | print "\n\n" |
| 169 | print "default loader, press ctrl-c for next loader" |
| 170 | - context = GObject.main_context_default() |
| 171 | - main = GObject.MainLoop(context) |
| 172 | + context = GLib.main_context_default() |
| 173 | + main = GLib.MainLoop(context) |
| 174 | main.run() |
| 175 | |
| 176 | # default loader |
| 177 | |
| 178 | === modified file 'softwarecenter/backend/reviews/rnr.py' |
| 179 | --- softwarecenter/backend/reviews/rnr.py 2012-11-23 22:57:21 +0000 |
| 180 | +++ softwarecenter/backend/reviews/rnr.py 2012-11-30 19:08:32 +0000 |
| 181 | @@ -49,7 +49,7 @@ |
| 182 | # - python threads, slow and full of latency (GIL) |
| 183 | # - python multiprocessing, crashed when accessibility was turned on, |
| 184 | # does not work in the quest session (#743020) |
| 185 | -# - GObject.spawn_async() looks good so far (using the SpawnHelper code) |
| 186 | +# - GLib.spawn_async() looks good so far (using the SpawnHelper code) |
| 187 | class ReviewLoaderSpawningRNRClient(ReviewLoader): |
| 188 | """ loader that uses multiprocessing to call rnrclient and |
| 189 | a glib timeout watcher that polls periodically for the |
| 190 | |
| 191 | === modified file 'softwarecenter/backend/spawn_helper.py' |
| 192 | --- softwarecenter/backend/spawn_helper.py 2012-11-23 22:57:21 +0000 |
| 193 | +++ softwarecenter/backend/spawn_helper.py 2012-11-30 19:08:32 +0000 |
| 194 | @@ -33,7 +33,7 @@ |
| 195 | import softwarecenter.paths |
| 196 | from softwarecenter.paths import PistonHelpers |
| 197 | |
| 198 | -from gi.repository import GObject |
| 199 | +from gi.repository import GObject, GLib |
| 200 | |
| 201 | LOG = logging.getLogger(__name__) |
| 202 | |
| 203 | @@ -93,14 +93,17 @@ |
| 204 | if "SOFTWARE_CENTER_DISABLE_SPAWN_HELPER" in os.environ: |
| 205 | return |
| 206 | self._cmd = cmd |
| 207 | - (pid, stdin, stdout, stderr) = GObject.spawn_async( |
| 208 | + (pid, stdin, stdout, stderr) = GLib.spawn_async( |
| 209 | cmd, flags=GObject.SPAWN_DO_NOT_REAP_CHILD, |
| 210 | standard_output=True, standard_error=True) |
| 211 | LOG.debug("running: '%s' as pid: '%s'" % (cmd, pid)) |
| 212 | - self._child_watch = GObject.child_watch_add( |
| 213 | - pid, self._helper_finished, data=(stdout, stderr)) |
| 214 | - self._io_watch = GObject.io_add_watch( |
| 215 | - stdout, GObject.IO_IN, self._helper_io_ready, (stdout, )) |
| 216 | + self._child_watch = GLib.child_watch_add( |
| 217 | + GLib.PRIORITY_DEFAULT, pid, self._helper_finished, |
| 218 | + data=(stdout, stderr)) |
| 219 | + channel = GLib.IOChannel.unix_new(stdout) |
| 220 | + self._io_watch = GLib.io_add_watch( |
| 221 | + channel, GLib.PRIORITY_DEFAULT, GObject.IO_IN, |
| 222 | + self._helper_io_ready, (stdout, )) |
| 223 | |
| 224 | def _helper_finished(self, pid, status, (stdout, stderr)): |
| 225 | LOG.debug("helper_finished: '%s' '%s'" % (pid, status)) |
| 226 | @@ -120,9 +123,9 @@ |
| 227 | if self._io_watch: |
| 228 | # remove with a delay timeout delay to ensure that any |
| 229 | # pending data is still flushed |
| 230 | - GObject.timeout_add(100, GObject.source_remove, self._io_watch) |
| 231 | + GLib.timeout_add(100, GLib.source_remove, self._io_watch) |
| 232 | if self._child_watch: |
| 233 | - GObject.source_remove(self._child_watch) |
| 234 | + GLib.source_remove(self._child_watch) |
| 235 | |
| 236 | def _helper_io_ready(self, source, condition, (stdout,)): |
| 237 | # read the raw data |
| 238 | |
| 239 | === modified file 'softwarecenter/backend/ubuntusso.py' |
| 240 | --- softwarecenter/backend/ubuntusso.py 2012-11-23 22:57:21 +0000 |
| 241 | +++ softwarecenter/backend/ubuntusso.py 2012-11-30 19:08:32 +0000 |
| 242 | @@ -20,7 +20,7 @@ |
| 243 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 244 | |
| 245 | |
| 246 | -from gi.repository import GObject |
| 247 | +from gi.repository import GObject, GLib |
| 248 | from gettext import gettext as _ |
| 249 | |
| 250 | import logging |
| 251 | @@ -75,7 +75,7 @@ |
| 252 | GObject.GObject.__init__(self) |
| 253 | self.oauth = None |
| 254 | self.xid = xid |
| 255 | - self.loop = GObject.MainLoop(GObject.main_context_default()) |
| 256 | + self.loop = GLib.MainLoop(GLib.main_context_default()) |
| 257 | |
| 258 | def _on_whoami_data(self, spawner, piston_whoami): |
| 259 | # once we have data, make sure to save it |
| 260 | |
| 261 | === modified file 'softwarecenter/backend/weblive.py' |
| 262 | --- softwarecenter/backend/weblive.py 2012-11-23 22:57:21 +0000 |
| 263 | +++ softwarecenter/backend/weblive.py 2012-11-30 19:08:32 +0000 |
| 264 | @@ -28,7 +28,7 @@ |
| 265 | import string |
| 266 | import imp |
| 267 | |
| 268 | -from gi.repository import GObject |
| 269 | +from gi.repository import GObject, GLib |
| 270 | |
| 271 | from threading import Thread, Event |
| 272 | from weblive_pristine import WebLive |
| 273 | @@ -261,16 +261,17 @@ |
| 274 | |
| 275 | self.helper_progress = 0 |
| 276 | qtnx_countdown() |
| 277 | - GObject.timeout_add_seconds(2, qtnx_countdown) |
| 278 | + GLib.timeout_add_seconds(2, qtnx_countdown) |
| 279 | |
| 280 | qtnx_start_timer() |
| 281 | |
| 282 | if wait is False: |
| 283 | # Start in the background and attach a watch for when it exits |
| 284 | - (self.helper_pid, stdin, stdout, stderr) = GObject.spawn_async( |
| 285 | + (self.helper_pid, stdin, stdout, stderr) = GLib.spawn_async( |
| 286 | cmd, standard_input=True, standard_output=True, |
| 287 | standard_error=True, flags=GObject.SPAWN_DO_NOT_REAP_CHILD) |
| 288 | - GObject.child_watch_add(self.helper_pid, self._on_qtnx_exit, |
| 289 | + GLib.child_watch_add( |
| 290 | + GLib.PRIORITY_DEFAULT, self.helper_pid, self._on_qtnx_exit, |
| 291 | filename) |
| 292 | else: |
| 293 | # Start it and wait until it finishes |
| 294 | @@ -308,7 +309,7 @@ |
| 295 | # Start in the background and attach a watch for when it exits |
| 296 | cmd = [os.path.join(softwarecenter.paths.datadir, |
| 297 | softwarecenter.paths.X2GO_HELPER)] |
| 298 | - (self.helper_pid, stdin, stdout, stderr) = GObject.spawn_async( |
| 299 | + (self.helper_pid, stdin, stdout, stderr) = GLib.spawn_async( |
| 300 | cmd, standard_input=True, standard_output=True, |
| 301 | standard_error=True, flags=GObject.SPAWN_DO_NOT_REAP_CHILD) |
| 302 | self.helper_stdin = os.fdopen(stdin, "w") |
| 303 | @@ -316,11 +317,13 @@ |
| 304 | self.helper_stderr = os.fdopen(stderr) |
| 305 | |
| 306 | # Add a watch for when the process exits |
| 307 | - GObject.child_watch_add(self.helper_pid, self._on_x2go_exit) |
| 308 | + GLib.child_watch_add( |
| 309 | + GLib.PRIORITY_DEFAULT, self.helper_pid, self._on_x2go_exit) |
| 310 | |
| 311 | # Add a watch on stdout |
| 312 | - GObject.io_add_watch(self.helper_stdout, GObject.IO_IN, |
| 313 | - self._on_x2go_activity) |
| 314 | + channel = GLib.IOChannel.unix_new(self.helper_stdout) |
| 315 | + GLib.io_add_watch(channel, GLib.PRIORITY_DEFAULT, |
| 316 | + GObject.IO_IN, self._on_x2go_activity) |
| 317 | |
| 318 | # Start the connection |
| 319 | self.state = "connecting" |
| 320 | |
| 321 | === modified file 'softwarecenter/db/database.py' |
| 322 | --- softwarecenter/db/database.py 2012-11-23 22:57:21 +0000 |
| 323 | +++ softwarecenter/db/database.py 2012-11-30 19:08:32 +0000 |
| 324 | @@ -27,7 +27,7 @@ |
| 325 | from softwarecenter.db.pkginfo import get_pkg_info |
| 326 | import softwarecenter.paths |
| 327 | |
| 328 | -from gi.repository import GObject, Gio |
| 329 | +from gi.repository import GObject, Gio, GLib |
| 330 | |
| 331 | from softwarecenter.utils import ExecutionTime |
| 332 | from softwarecenter.enums import ( |
| 333 | @@ -267,9 +267,9 @@ |
| 334 | return |
| 335 | LOG.info("afile '%s' changed" % afile) |
| 336 | if self._timeout_id: |
| 337 | - GObject.source_remove(self._timeout_id) |
| 338 | + GLib.source_remove(self._timeout_id) |
| 339 | self._timeout_id = None |
| 340 | - self._timeout_id = GObject.timeout_add(500, self.reopen) |
| 341 | + self._timeout_id = GLib.timeout_add(500, self.reopen) |
| 342 | |
| 343 | def add_database(self, database): |
| 344 | self._additional_databases.append(database) |
| 345 | |
| 346 | === modified file 'softwarecenter/db/dataprovider.py' |
| 347 | --- softwarecenter/db/dataprovider.py 2012-11-23 22:57:21 +0000 |
| 348 | +++ softwarecenter/db/dataprovider.py 2012-11-30 19:08:32 +0000 |
| 349 | @@ -24,7 +24,7 @@ |
| 350 | from dbus.mainloop.glib import DBusGMainLoop |
| 351 | DBusGMainLoop(set_as_default=True) |
| 352 | |
| 353 | -from gi.repository import GObject |
| 354 | +from gi.repository import GLib |
| 355 | |
| 356 | from .categories import ( |
| 357 | CategoriesParser, |
| 358 | @@ -70,7 +70,7 @@ |
| 359 | dbus.service.Object.__init__(self, bus_name, object_path) |
| 360 | self.bus_name = bus_name |
| 361 | if main_loop is None: |
| 362 | - main_loop = GObject.MainLoop(GObject.main_context_default()) |
| 363 | + main_loop = GLib.MainLoop(GLib.main_context_default()) |
| 364 | self.main_loop = main_loop |
| 365 | # the database |
| 366 | self.db = StoreDatabase() |
| 367 | @@ -85,7 +85,7 @@ |
| 368 | run_software_center_agent(self.db) |
| 369 | # setup inactivity timer |
| 370 | self._update_activity_timestamp() |
| 371 | - self._idle_timeout = GObject.timeout_add_seconds( |
| 372 | + self._idle_timeout = GLib.timeout_add_seconds( |
| 373 | self.IDLE_CHECK_INTERVAL, self._check_inactivity) |
| 374 | |
| 375 | def stop(self): |
| 376 | @@ -167,8 +167,8 @@ |
| 377 | if bus is None: |
| 378 | bus = dbus.SessionBus() |
| 379 | |
| 380 | - main_context = GObject.main_context_default() |
| 381 | - main_loop = GObject.MainLoop(main_context) |
| 382 | + main_context = GLib.main_context_default() |
| 383 | + main_loop = GLib.MainLoop(main_context) |
| 384 | |
| 385 | bus_name = dbus.service.BusName(DBUS_BUS_NAME, bus) |
| 386 | data_provider = SoftwareCenterDataProvider(bus_name, main_loop=main_loop) |
| 387 | |
| 388 | === modified file 'softwarecenter/db/enquire.py' |
| 389 | --- softwarecenter/db/enquire.py 2012-11-23 22:57:21 +0000 |
| 390 | +++ softwarecenter/db/enquire.py 2012-11-30 19:08:32 +0000 |
| 391 | @@ -22,7 +22,7 @@ |
| 392 | import threading |
| 393 | import xapian |
| 394 | |
| 395 | -from gi.repository import GObject |
| 396 | +from gi.repository import GObject, GLib |
| 397 | |
| 398 | from softwarecenter.enums import (SortMethods, |
| 399 | XapianValues, |
| 400 | @@ -96,7 +96,7 @@ |
| 401 | target=self._blocking_perform_search, name=thread_name) |
| 402 | t.start() |
| 403 | # don't block the UI while the thread is running |
| 404 | - context = GObject.main_context_default() |
| 405 | + context = GLib.main_context_default() |
| 406 | while not self._perform_search_complete: |
| 407 | time.sleep(0.02) # 50 fps |
| 408 | while context.pending(): |
| 409 | |
| 410 | === modified file 'softwarecenter/db/history_impl/apthistory.py' |
| 411 | --- softwarecenter/db/history_impl/apthistory.py 2012-11-23 22:57:21 +0000 |
| 412 | +++ softwarecenter/db/history_impl/apthistory.py 2012-11-30 19:08:32 +0000 |
| 413 | @@ -21,7 +21,7 @@ |
| 414 | import apt_pkg |
| 415 | apt_pkg.init_config() |
| 416 | |
| 417 | -from gi.repository import GObject |
| 418 | +from gi.repository import GLib |
| 419 | from gi.repository import Gio |
| 420 | |
| 421 | import glob |
| 422 | @@ -82,7 +82,7 @@ |
| 423 | |
| 424 | def __init__(self, use_cache=True): |
| 425 | LOG.debug("AptHistory.__init__()") |
| 426 | - self.main_context = GObject.main_context_default() |
| 427 | + self.main_context = GLib.main_context_default() |
| 428 | self.history_file = apt_pkg.config.find_file("Dir::Log::History") |
| 429 | #Copy monitoring of history file changes from historypane.py |
| 430 | self.logfile = Gio.File.new_for_path(self.history_file) |
| 431 | @@ -93,7 +93,7 @@ |
| 432 | # this takes a long time, run it in the idle handler |
| 433 | self._transactions = [] |
| 434 | self._history_ready = False |
| 435 | - GObject.idle_add(self._rescan, use_cache) |
| 436 | + GLib.idle_add(self._rescan, use_cache) |
| 437 | |
| 438 | @property |
| 439 | def transactions(self): |
| 440 | |
| 441 | === modified file 'softwarecenter/db/pkginfo_impl/aptcache.py' |
| 442 | --- softwarecenter/db/pkginfo_impl/aptcache.py 2012-11-23 22:57:21 +0000 |
| 443 | +++ softwarecenter/db/pkginfo_impl/aptcache.py 2012-11-30 19:08:32 +0000 |
| 444 | @@ -23,8 +23,8 @@ |
| 445 | import logging |
| 446 | import os |
| 447 | |
| 448 | -from gi.repository import GObject |
| 449 | from gi.repository import Gio |
| 450 | +from gi.repository import GLib |
| 451 | |
| 452 | # we need this to get the size calculation done asynchronously and reliable |
| 453 | from aptdaemon.client import AptClient |
| 454 | @@ -39,7 +39,7 @@ |
| 455 | class GtkMainIterationProgress(apt.progress.base.OpProgress): |
| 456 | """Progress that just runs the main loop""" |
| 457 | def update(self, percent=0): |
| 458 | - context = GObject.main_context_default() |
| 459 | + context = GLib.main_context_default() |
| 460 | while context.pending(): |
| 461 | context.iteration() |
| 462 | |
| 463 | @@ -281,9 +281,9 @@ |
| 464 | if not event == Gio.FileMonitorEvent.CHANGES_DONE_HINT: |
| 465 | return |
| 466 | if self._timeout_id: |
| 467 | - GObject.source_remove(self._timeout_id) |
| 468 | + GLib.source_remove(self._timeout_id) |
| 469 | self._timeout_id = None |
| 470 | - self._timeout_id = GObject.timeout_add_seconds(10, self.open) |
| 471 | + self._timeout_id = GLib.timeout_add_seconds(10, self.open) |
| 472 | |
| 473 | def _get_rdepends_by_type(self, pkg, type, onlyInstalled): |
| 474 | rdeps = set() |
| 475 | @@ -354,7 +354,7 @@ |
| 476 | if not pkg.candidate: |
| 477 | continue |
| 478 | for item in pkg.candidate.origins: |
| 479 | - context = GObject.main_context_default() |
| 480 | + context = GLib.main_context_default() |
| 481 | while context.pending(): |
| 482 | context.iteration() |
| 483 | if item.origin: |
| 484 | @@ -724,7 +724,7 @@ |
| 485 | virtual_aptpkg_pkg) |
| 486 | LOG.debug("renhances of %s: %s" % (provide, renhances)) |
| 487 | addons_sug += renhances |
| 488 | - context = GObject.main_context_default() |
| 489 | + context = GLib.main_context_default() |
| 490 | while context.pending(): |
| 491 | context.iteration() |
| 492 | |
| 493 | @@ -756,7 +756,7 @@ |
| 494 | pkgdep, pkgdep_enh)) |
| 495 | addons_sug += pkgdep_enh |
| 496 | |
| 497 | - context = GObject.main_context_default() |
| 498 | + context = GLib.main_context_default() |
| 499 | while context.pending(): |
| 500 | context.iteration() |
| 501 | |
| 502 | |
| 503 | === modified file 'softwarecenter/db/update.py' |
| 504 | --- softwarecenter/db/update.py 2012-11-23 22:57:21 +0000 |
| 505 | +++ softwarecenter/db/update.py 2012-11-30 19:08:32 +0000 |
| 506 | @@ -27,7 +27,7 @@ |
| 507 | import xapian |
| 508 | |
| 509 | from aptsources.sourceslist import SourceEntry |
| 510 | -from gi.repository import GObject |
| 511 | +from gi.repository import GLib |
| 512 | from piston_mini_client import PistonResponseObject |
| 513 | |
| 514 | from softwarecenter.backend.scagent import SoftwareCenterAgent |
| 515 | @@ -951,7 +951,7 @@ |
| 516 | return False |
| 517 | if not listsdir: |
| 518 | listsdir = apt_pkg.config.find_dir("Dir::State::lists") |
| 519 | - context = GObject.main_context_default() |
| 520 | + context = GLib.main_context_default() |
| 521 | for appinfo in glob("%s/*AppInfo" % listsdir): |
| 522 | LOG.debug("processing %r", appinfo) |
| 523 | # process events |
| 524 | @@ -981,7 +981,7 @@ |
| 525 | def update_from_appstream_xml(db, cache, xmldir=None): |
| 526 | if not xmldir: |
| 527 | xmldir = softwarecenter.paths.APPSTREAM_XML_PATH |
| 528 | - context = GObject.main_context_default() |
| 529 | + context = GLib.main_context_default() |
| 530 | |
| 531 | if os.path.isfile(xmldir): |
| 532 | update_from_single_appstream_file(db, cache, xmldir) |
| 533 | @@ -1000,7 +1000,7 @@ |
| 534 | """ index the desktop files in $datadir/desktop/*.desktop """ |
| 535 | if not datadir: |
| 536 | datadir = softwarecenter.paths.APP_INSTALL_DESKTOP_PATH |
| 537 | - context = GObject.main_context_default() |
| 538 | + context = GLib.main_context_default() |
| 539 | for desktopf in glob(datadir + "/*.desktop"): |
| 540 | LOG.debug("processing %r", desktopf) |
| 541 | # process events |
| 542 | @@ -1044,8 +1044,8 @@ |
| 543 | sca.good_data = False |
| 544 | loop.quit() |
| 545 | |
| 546 | - context = GObject.main_context_default() |
| 547 | - loop = GObject.MainLoop(context) |
| 548 | + context = GLib.main_context_default() |
| 549 | + loop = GLib.MainLoop(context) |
| 550 | |
| 551 | sca = SoftwareCenterAgent(ignore_cache) |
| 552 | sca.connect("available", _available_cb) |
| 553 | |
| 554 | === modified file 'softwarecenter/db/utils.py' |
| 555 | --- softwarecenter/db/utils.py 2012-09-28 10:41:46 +0000 |
| 556 | +++ softwarecenter/db/utils.py 2012-11-30 19:08:32 +0000 |
| 557 | @@ -19,7 +19,7 @@ |
| 558 | import logging |
| 559 | import os |
| 560 | |
| 561 | -from gi.repository import GObject |
| 562 | +from gi.repository import GObject, GLib |
| 563 | |
| 564 | import softwarecenter.paths |
| 565 | |
| 566 | @@ -38,10 +38,11 @@ |
| 567 | # run the update |
| 568 | sc_agent_update = os.path.join( |
| 569 | softwarecenter.paths.datadir, "update-software-center-agent") |
| 570 | - (pid, stdin, stdout, stderr) = GObject.spawn_async( |
| 571 | + (pid, stdin, stdout, stderr) = GLib.spawn_async( |
| 572 | [sc_agent_update, "--datadir", softwarecenter.paths.datadir], |
| 573 | flags=GObject.SPAWN_DO_NOT_REAP_CHILD) |
| 574 | - GObject.child_watch_add(pid, _on_update_software_center_agent_finished) |
| 575 | + GLib.child_watch_add( |
| 576 | + GLib.PRIORITY_DEFAULT, pid, _on_update_software_center_agent_finished) |
| 577 | |
| 578 | |
| 579 | def get_installed_apps_list(db): |
| 580 | |
| 581 | === modified file 'softwarecenter/netstatus.py' |
| 582 | --- softwarecenter/netstatus.py 2012-11-23 22:57:21 +0000 |
| 583 | +++ softwarecenter/netstatus.py 2012-11-30 19:08:32 +0000 |
| 584 | @@ -23,7 +23,7 @@ |
| 585 | from urlparse import urlparse |
| 586 | from dbus.mainloop.glib import DBusGMainLoop |
| 587 | |
| 588 | -from gi.repository import GObject |
| 589 | +from gi.repository import GObject, GLib |
| 590 | |
| 591 | LOG = logging.getLogger(__name__) |
| 592 | |
| 593 | @@ -194,5 +194,5 @@ |
| 594 | __init_network_state() |
| 595 | |
| 596 | if __name__ == '__main__': |
| 597 | - loop = GObject.MainLoop() |
| 598 | + loop = GLib.MainLoop() |
| 599 | loop.run() |
| 600 | |
| 601 | === modified file 'softwarecenter/ui/gtk3/app.py' |
| 602 | --- softwarecenter/ui/gtk3/app.py 2012-11-23 22:57:21 +0000 |
| 603 | +++ softwarecenter/ui/gtk3/app.py 2012-11-30 19:08:32 +0000 |
| 604 | @@ -19,6 +19,7 @@ |
| 605 | |
| 606 | # order is import here, otherwise test/gtk3/test_purchase.py is unhappy |
| 607 | from gi.repository import GObject |
| 608 | +from gi.repository import GLib |
| 609 | from gi.repository import Gtk |
| 610 | |
| 611 | import atexit |
| 612 | @@ -478,14 +479,14 @@ |
| 613 | self.menu_file.remove(self.menuitem_reinstall_purchases) |
| 614 | else: |
| 615 | # running the agent will trigger a db reload so we do it later |
| 616 | - GObject.timeout_add_seconds(3, self._run_software_center_agent) |
| 617 | + GLib.timeout_add_seconds(3, self._run_software_center_agent) |
| 618 | |
| 619 | # keep the cache clean |
| 620 | - GObject.timeout_add_seconds(15, self._run_expunge_cache_helper) |
| 621 | + GLib.timeout_add_seconds(15, self._run_expunge_cache_helper) |
| 622 | |
| 623 | # check to see if a new recommendations profile upload is |
| 624 | # needed and upload if necessary |
| 625 | - GObject.timeout_add_seconds(45, self._upload_recommendations_profile) |
| 626 | + GLib.timeout_add_seconds(45, self._upload_recommendations_profile) |
| 627 | |
| 628 | # TODO: Remove the following two lines once we have remove repository |
| 629 | # support in aptdaemon (see LP: #723911) |
| 630 | @@ -511,7 +512,7 @@ |
| 631 | """ helper that expires the piston-mini-client cache """ |
| 632 | sc_expunge_cache = os.path.join( |
| 633 | self.datadir, "expunge-cache.py") |
| 634 | - (pid, stdin, stdout, stderr) = GObject.spawn_async( |
| 635 | + (pid, stdin, stdout, stderr) = GLib.spawn_async( |
| 636 | [sc_expunge_cache, |
| 637 | "--by-unsuccessful-http-states", |
| 638 | softwarecenter.paths.SOFTWARE_CENTER_CACHE_DIR, |
| 639 | @@ -766,7 +767,7 @@ |
| 640 | |
| 641 | # wait for the cache to become ready (if needed) |
| 642 | if not self.cache.ready: |
| 643 | - GObject.timeout_add( |
| 644 | + GLib.timeout_add( |
| 645 | 100, lambda: self.on_menu_file_activate(menuitem)) |
| 646 | return False |
| 647 | |
| 648 | @@ -804,7 +805,7 @@ |
| 649 | installed = bool(pkg.installed) |
| 650 | self.menuitem_install.set_sensitive(not installed) |
| 651 | self.menuitem_remove.set_sensitive(installed) |
| 652 | - # return False to ensure that a possible GObject.timeout_add ends |
| 653 | + # return False to ensure that a possible GLib.timeout_add ends |
| 654 | return False |
| 655 | |
| 656 | def _on_reinstall_purchased_login(self, sso, oauth_result): |
| 657 | @@ -1048,7 +1049,7 @@ |
| 658 | "-n", |
| 659 | "-t", str(xid)]) |
| 660 | # Monitor the subprocess regularly |
| 661 | - GObject.timeout_add(100, self._poll_software_sources_subprocess, p) |
| 662 | + GLib.timeout_add(100, self._poll_software_sources_subprocess, p) |
| 663 | |
| 664 | def _poll_software_sources_subprocess(self, popen): |
| 665 | ret = popen.poll() |
| 666 | @@ -1160,7 +1161,7 @@ |
| 667 | |
| 668 | def on_menuitem_help_activate(self, menuitem): |
| 669 | # run browser |
| 670 | - (pid, stdin, stdout, stderr) = GObject.spawn_async( |
| 671 | + (pid, stdin, stdout, stderr) = GLib.spawn_async( |
| 672 | ["yelp", "ghelp:software-center"], flags=GObject.SPAWN_SEARCH_PATH) |
| 673 | |
| 674 | def on_menuitem_tos_activate(self, menuitem): |
| 675 | @@ -1172,7 +1173,7 @@ |
| 676 | def _ask_and_repair_broken_cache(self): |
| 677 | # wait until the window window is available |
| 678 | if self.window_main.props.visible is False: |
| 679 | - GObject.timeout_add_seconds(1, self._ask_and_repair_broken_cache) |
| 680 | + GLib.timeout_add_seconds(1, self._ask_and_repair_broken_cache) |
| 681 | return |
| 682 | if dialogs.confirm_repair_broken_cache(self.window_main, |
| 683 | self.datadir): |
| 684 | @@ -1373,7 +1374,7 @@ |
| 685 | self.window_main.show_all() |
| 686 | |
| 687 | # delay cache open |
| 688 | - GObject.timeout_add(1, self.cache.open) |
| 689 | + GLib.timeout_add(1, self.cache.open) |
| 690 | |
| 691 | # support both "pkg1 pkg" and "pkg1,pkg2" (and pkg1,pkg2 pkg3) |
| 692 | if args: |
| 693 | |
| 694 | === modified file 'softwarecenter/ui/gtk3/models/appstore2.py' |
| 695 | --- softwarecenter/ui/gtk3/models/appstore2.py 2012-11-23 22:57:21 +0000 |
| 696 | +++ softwarecenter/ui/gtk3/models/appstore2.py 2012-11-30 19:08:32 +0000 |
| 697 | @@ -18,6 +18,7 @@ |
| 698 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 699 | |
| 700 | from gi.repository import GObject |
| 701 | +from gi.repository import GLib |
| 702 | from gi.repository import Gtk, GdkPixbuf |
| 703 | import logging |
| 704 | import os |
| 705 | @@ -58,7 +59,7 @@ |
| 706 | |
| 707 | def __init__(self, untranslated_name, display_name, subcats, pkg_count): |
| 708 | self.untranslated_name = untranslated_name |
| 709 | - self.display_name = GObject.markup_escape_text(utf8(display_name)) |
| 710 | + self.display_name = GLib.markup_escape_text(utf8(display_name)) |
| 711 | #self.subcategories = subcats |
| 712 | self.pkg_count = pkg_count |
| 713 | self.vis_count = pkg_count |
| 714 | @@ -211,8 +212,8 @@ |
| 715 | summary = self.get_pkgname(doc) |
| 716 | |
| 717 | return "%s\n<small>%s</small>" % ( |
| 718 | - GObject.markup_escape_text(appname), |
| 719 | - GObject.markup_escape_text(summary)) |
| 720 | + GLib.markup_escape_text(appname), |
| 721 | + GLib.markup_escape_text(summary)) |
| 722 | |
| 723 | def get_display_price(self, doc): |
| 724 | app = self.db.get_application(doc) |
| 725 | @@ -272,7 +273,7 @@ |
| 726 | if translated_catname == catname: |
| 727 | # if no normal translation is found, try to find a escaped |
| 728 | # translation (LP: #872760) |
| 729 | - translated_catname = _(GObject.markup_escape_text(catname)) |
| 730 | + translated_catname = _(GLib.markup_escape_text(catname)) |
| 731 | # the parent expect the string unescaped |
| 732 | translated_catname = unescape(translated_catname) |
| 733 | return translated_catname |
| 734 | @@ -405,7 +406,7 @@ |
| 735 | return False # remove from sources on completion |
| 736 | |
| 737 | if self.current_matches is not None: |
| 738 | - GObject.idle_add(buffer_icons) |
| 739 | + GLib.idle_add(buffer_icons) |
| 740 | |
| 741 | def load_range(self, indices, step): |
| 742 | # stub |
| 743 | |
| 744 | === modified file 'softwarecenter/ui/gtk3/models/pendingstore.py' |
| 745 | --- softwarecenter/ui/gtk3/models/pendingstore.py 2012-09-18 20:14:56 +0000 |
| 746 | +++ softwarecenter/ui/gtk3/models/pendingstore.py 2012-11-30 19:08:32 +0000 |
| 747 | @@ -2,7 +2,6 @@ |
| 748 | from gi.repository import GLib |
| 749 | from gi.repository import Gtk |
| 750 | from gi.repository import GdkPixbuf |
| 751 | -from gi.repository import GObject |
| 752 | |
| 753 | import logging |
| 754 | |
| 755 | @@ -57,12 +56,12 @@ |
| 756 | self.backend = get_install_backend() |
| 757 | self._signals = [] |
| 758 | # let the pulse helper run |
| 759 | - GObject.timeout_add(500, self._pulse_purchase_helper) |
| 760 | + GLib.timeout_add(500, self._pulse_purchase_helper) |
| 761 | |
| 762 | def clear(self): |
| 763 | super(PendingStore, self).clear() |
| 764 | for sig in self._signals: |
| 765 | - GObject.source_remove(sig) |
| 766 | + GLib.source_remove(sig) |
| 767 | del sig |
| 768 | self._signals = [] |
| 769 | |
| 770 | |
| 771 | === modified file 'softwarecenter/ui/gtk3/panes/availablepane.py' |
| 772 | --- softwarecenter/ui/gtk3/panes/availablepane.py 2012-11-23 22:57:21 +0000 |
| 773 | +++ softwarecenter/ui/gtk3/panes/availablepane.py 2012-11-30 19:08:32 +0000 |
| 774 | @@ -19,6 +19,7 @@ |
| 775 | import gettext |
| 776 | from gi.repository import GObject |
| 777 | from gi.repository import Gtk |
| 778 | +from gi.repository import GLib |
| 779 | import logging |
| 780 | import xapian |
| 781 | import os |
| 782 | @@ -317,12 +318,12 @@ |
| 783 | line2 = None |
| 784 | if channel is not None: |
| 785 | name = channel.display_name or channel.name |
| 786 | - line1 = GObject.markup_escape_text(name) |
| 787 | + line1 = GLib.markup_escape_text(name) |
| 788 | elif subcategory is not None: |
| 789 | - line1 = GObject.markup_escape_text(category.name) |
| 790 | - line2 = GObject.markup_escape_text(subcategory.name) |
| 791 | + line1 = GLib.markup_escape_text(category.name) |
| 792 | + line2 = GLib.markup_escape_text(subcategory.name) |
| 793 | elif category is not None: |
| 794 | - line1 = GObject.markup_escape_text(category.name) |
| 795 | + line1 = GLib.markup_escape_text(category.name) |
| 796 | else: |
| 797 | line1 = _("All Software") |
| 798 | return line1, line2 |
| 799 | |
| 800 | === modified file 'softwarecenter/ui/gtk3/panes/installedpane.py' |
| 801 | --- softwarecenter/ui/gtk3/panes/installedpane.py 2012-09-17 10:33:16 +0000 |
| 802 | +++ softwarecenter/ui/gtk3/panes/installedpane.py 2012-11-30 19:08:32 +0000 |
| 803 | @@ -18,10 +18,9 @@ |
| 804 | # this program; if not, write to the Free Software Foundation, Inc., |
| 805 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 806 | |
| 807 | -from gi.repository import Gtk |
| 808 | import logging |
| 809 | import xapian |
| 810 | -from gi.repository import GObject |
| 811 | +from gi.repository import GObject, GLib, Gtk |
| 812 | |
| 813 | from gettext import gettext as _ |
| 814 | from gettext import ngettext |
| 815 | @@ -57,7 +56,7 @@ |
| 816 | if self._build_in_progress: |
| 817 | LOG.debug('Waiting for build to exit...') |
| 818 | self._halt_build = True |
| 819 | - GObject.timeout_add(200, lambda: wrapper(*args, **kwargs)) |
| 820 | + GLib.timeout_add(200, lambda: wrapper(*args, **kwargs)) |
| 821 | return False |
| 822 | # ready now |
| 823 | self._halt_build = False |
| 824 | @@ -457,7 +456,7 @@ |
| 825 | self.emit("app-list-changed", i) |
| 826 | return |
| 827 | |
| 828 | - GObject.idle_add(profiled_rebuild_categorised_view) |
| 829 | + GLib.idle_add(profiled_rebuild_categorised_view) |
| 830 | |
| 831 | def _build_oneconfview(self, keep_state=False): |
| 832 | LOG.debug('Rebuilding oneconfview for %s...' % self.current_hostid) |
| 833 | @@ -572,7 +571,7 @@ |
| 834 | self.emit("app-list-changed", i) |
| 835 | return |
| 836 | |
| 837 | - GObject.idle_add(profiled_rebuild_oneconfview) |
| 838 | + GLib.idle_add(profiled_rebuild_oneconfview) |
| 839 | |
| 840 | def _check_expand(self): |
| 841 | it = self.treefilter.get_iter_first() |
| 842 | |
| 843 | === modified file 'softwarecenter/ui/gtk3/panes/viewswitcher.py' |
| 844 | --- softwarecenter/ui/gtk3/panes/viewswitcher.py 2012-09-20 01:26:42 +0000 |
| 845 | +++ softwarecenter/ui/gtk3/panes/viewswitcher.py 2012-11-30 19:08:32 +0000 |
| 846 | @@ -17,7 +17,7 @@ |
| 847 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 848 | |
| 849 | |
| 850 | -from gi.repository import Gtk, GObject |
| 851 | +from gi.repository import Gtk, GLib |
| 852 | import logging |
| 853 | |
| 854 | from gettext import gettext as _ |
| 855 | @@ -163,7 +163,7 @@ |
| 856 | return False |
| 857 | |
| 858 | self._prev_view = view_id |
| 859 | - GObject.idle_add(config_view) |
| 860 | + GLib.idle_add(config_view) |
| 861 | |
| 862 | def on_get_available_channels(self, popup): |
| 863 | return self.build_channel_list(popup, ViewPages.AVAILABLE) |
| 864 | @@ -213,7 +213,7 @@ |
| 865 | def build_channel_list(self, popup, view_id): |
| 866 | # clean up old signal handlers |
| 867 | for sig in self._handlers: |
| 868 | - GObject.source_remove(sig) |
| 869 | + GLib.source_remove(sig) |
| 870 | |
| 871 | if view_id == ViewPages.AVAILABLE: |
| 872 | channels = self.channel_manager.channels |
| 873 | @@ -276,4 +276,4 @@ |
| 874 | vm.display_page(pane, page, state) |
| 875 | return False |
| 876 | |
| 877 | - GObject.idle_add(config_view) |
| 878 | + GLib.idle_add(config_view) |
| 879 | |
| 880 | === modified file 'softwarecenter/ui/gtk3/review_gui_helper.py' |
| 881 | --- softwarecenter/ui/gtk3/review_gui_helper.py 2012-11-23 22:57:21 +0000 |
| 882 | +++ softwarecenter/ui/gtk3/review_gui_helper.py 2012-11-30 19:08:32 +0000 |
| 883 | @@ -18,7 +18,7 @@ |
| 884 | # this program; if not, write to the Free Software Foundation, Inc., |
| 885 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 886 | |
| 887 | -from gi.repository import GObject, Gtk, Gdk |
| 888 | +from gi.repository import GObject, Gtk, Gdk, GLib |
| 889 | |
| 890 | import datetime |
| 891 | import gettext |
| 892 | @@ -109,7 +109,7 @@ |
| 893 | # piston worker thread |
| 894 | self.worker_thread = Worker(token) |
| 895 | self.worker_thread.start() |
| 896 | - GObject.timeout_add(500, |
| 897 | + GLib.timeout_add(500, |
| 898 | self._check_thread_status, |
| 899 | None) |
| 900 | |
| 901 | |
| 902 | === modified file 'softwarecenter/ui/gtk3/views/appdetailsview.py' |
| 903 | --- softwarecenter/ui/gtk3/views/appdetailsview.py 2012-11-23 22:57:21 +0000 |
| 904 | +++ softwarecenter/ui/gtk3/views/appdetailsview.py 2012-11-30 19:08:32 +0000 |
| 905 | @@ -185,7 +185,7 @@ |
| 906 | self.app_manager = get_appmanager() |
| 907 | |
| 908 | self.button.connect('clicked', self._on_button_clicked) |
| 909 | - GObject.timeout_add(500, self._pulse_helper) |
| 910 | + GLib.timeout_add(500, self._pulse_helper) |
| 911 | |
| 912 | def _pulse_helper(self): |
| 913 | if (self.pkg_state == PkgStates.INSTALLING_PURCHASED and |
| 914 | @@ -908,7 +908,7 @@ |
| 915 | if state in NetState.NM_STATE_DISCONNECTED_LIST: |
| 916 | self._check_for_reviews() |
| 917 | elif state in NetState.NM_STATE_CONNECTED_LIST: |
| 918 | - GObject.timeout_add(500, self._check_for_reviews) |
| 919 | + GLib.timeout_add(500, self._check_for_reviews) |
| 920 | |
| 921 | # set addon table and action button states based on sensitivity |
| 922 | sensitive = state in NetState.NM_STATE_CONNECTED_LIST |
| 923 | @@ -1476,11 +1476,11 @@ |
| 924 | version = utf8(_("%s (unknown version)")) % utf8( |
| 925 | app_details.pkgname) |
| 926 | if app_details.license: |
| 927 | - license = GObject.markup_escape_text(app_details.license) |
| 928 | + license = GLib.markup_escape_text(app_details.license) |
| 929 | else: |
| 930 | license = _("Unknown") |
| 931 | if app_details.maintenance_status: |
| 932 | - support = GObject.markup_escape_text( |
| 933 | + support = GLib.markup_escape_text( |
| 934 | app_details.maintenance_status) |
| 935 | else: |
| 936 | support = _("Unknown") |
| 937 | @@ -1526,12 +1526,12 @@ |
| 938 | pkg_ambiguous_error = app_details.pkg_state in (PkgStates.NOT_FOUND, |
| 939 | PkgStates.NEEDS_SOURCE) |
| 940 | |
| 941 | - appname = GObject.markup_escape_text(app_details.display_name) |
| 942 | + appname = GLib.markup_escape_text(app_details.display_name) |
| 943 | |
| 944 | if app_details.pkg_state == PkgStates.NOT_FOUND: |
| 945 | summary = app_details._error_not_found |
| 946 | else: |
| 947 | - summary = GObject.markup_escape_text(app_details.display_summary) |
| 948 | + summary = GLib.markup_escape_text(app_details.display_summary) |
| 949 | if not summary: |
| 950 | summary = "" |
| 951 | |
| 952 | |
| 953 | === modified file 'softwarecenter/ui/gtk3/views/catview.py' |
| 954 | --- softwarecenter/ui/gtk3/views/catview.py 2012-11-23 22:57:21 +0000 |
| 955 | +++ softwarecenter/ui/gtk3/views/catview.py 2012-11-30 19:08:32 +0000 |
| 956 | @@ -19,7 +19,7 @@ |
| 957 | |
| 958 | import cairo |
| 959 | import gettext |
| 960 | -from gi.repository import Gtk, GObject |
| 961 | +from gi.repository import Gtk, GObject, GLib |
| 962 | import logging |
| 963 | import os |
| 964 | import xapian |
| 965 | @@ -161,7 +161,7 @@ |
| 966 | self.emit("application-activated", app) |
| 967 | return False |
| 968 | |
| 969 | - GObject.timeout_add(50, timeout_emit) |
| 970 | + GLib.timeout_add(50, timeout_emit) |
| 971 | |
| 972 | def on_category_clicked(self, btn, cat): |
| 973 | """emit the category-selected signal when a category was clicked""" |
| 974 | @@ -169,7 +169,7 @@ |
| 975 | self.emit("category-selected", cat) |
| 976 | return False |
| 977 | |
| 978 | - GObject.timeout_add(50, timeout_emit) |
| 979 | + GLib.timeout_add(50, timeout_emit) |
| 980 | |
| 981 | def do_draw(self, cr): |
| 982 | cr.save() |
| 983 | @@ -230,7 +230,7 @@ |
| 984 | # TRANSLATORS: %s is a category name, like Internet or Development |
| 985 | # Tools |
| 986 | m = _('Top Rated %(category)s') % { |
| 987 | - 'category': GObject.markup_escape_text(self.header)} |
| 988 | + 'category': GLib.markup_escape_text(self.header)} |
| 989 | self.top_rated_frame.set_header_label(m) |
| 990 | docs = self._get_sub_top_rated_content(category) |
| 991 | self.top_rated.add_tiles(self.properties_helper, |
| 992 | @@ -277,7 +277,7 @@ |
| 993 | |
| 994 | # set the subcat header |
| 995 | m = "<b><big>%s</big></b>" |
| 996 | - self.subcat_label.set_markup(m % GObject.markup_escape_text( |
| 997 | + self.subcat_label.set_markup(m % GLib.markup_escape_text( |
| 998 | self.header)) |
| 999 | |
| 1000 | # sort Category.name's alphabetically |
| 1001 | @@ -311,7 +311,7 @@ |
| 1002 | # append an additional button to show all of the items in the category |
| 1003 | all_cat = Category("All", _("All"), "category-show-all", |
| 1004 | category.query) |
| 1005 | - name = GObject.markup_escape_text('%s %s' % (_("All"), num_items)) |
| 1006 | + name = GLib.markup_escape_text('%s %s' % (_("All"), num_items)) |
| 1007 | tile = CategoryTile(name, "category-show-all") |
| 1008 | tile.connect('clicked', self.on_category_clicked, all_cat) |
| 1009 | self.departments.add_child(tile) |
| 1010 | @@ -385,7 +385,7 @@ |
| 1011 | self._build_subcat_view() |
| 1012 | self._update_subcat_view(root_category, num_items) |
| 1013 | |
| 1014 | - GObject.idle_add(self.queue_draw) |
| 1015 | + GLib.idle_add(self.queue_draw) |
| 1016 | return |
| 1017 | |
| 1018 | def refresh_apps(self): |
| 1019 | @@ -398,5 +398,5 @@ |
| 1020 | if not self._built: |
| 1021 | self._build_subcat_view() |
| 1022 | self._update_subcat_view(self.current_category) |
| 1023 | - GObject.idle_add(self.queue_draw) |
| 1024 | + GLib.idle_add(self.queue_draw) |
| 1025 | return |
| 1026 | |
| 1027 | === modified file 'softwarecenter/ui/gtk3/views/lobbyview.py' |
| 1028 | --- softwarecenter/ui/gtk3/views/lobbyview.py 2012-09-28 10:34:55 +0000 |
| 1029 | +++ softwarecenter/ui/gtk3/views/lobbyview.py 2012-11-30 19:08:32 +0000 |
| 1030 | @@ -18,7 +18,7 @@ |
| 1031 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 1032 | |
| 1033 | import gettext |
| 1034 | -from gi.repository import Gtk, GObject |
| 1035 | +from gi.repository import Gtk, GLib |
| 1036 | import logging |
| 1037 | import webbrowser |
| 1038 | import xapian |
| 1039 | @@ -186,7 +186,7 @@ |
| 1040 | for cat in sorted_cats: |
| 1041 | if 'carousel-only' in cat.flags: |
| 1042 | continue |
| 1043 | - category_name = mrkup % GObject.markup_escape_text(cat.name) |
| 1044 | + category_name = mrkup % GLib.markup_escape_text(cat.name) |
| 1045 | label = LabelTile(category_name, None) |
| 1046 | label.label.set_margin_left(StockEms.SMALL) |
| 1047 | label.label.set_margin_right(StockEms.SMALL) |
| 1048 | |
| 1049 | === modified file 'softwarecenter/ui/gtk3/views/purchaseview.py' |
| 1050 | --- softwarecenter/ui/gtk3/views/purchaseview.py 2012-09-18 20:14:56 +0000 |
| 1051 | +++ softwarecenter/ui/gtk3/views/purchaseview.py 2012-11-30 19:08:32 +0000 |
| 1052 | @@ -18,6 +18,7 @@ |
| 1053 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 1054 | |
| 1055 | from gi.repository import GObject |
| 1056 | +from gi.repository import GLib |
| 1057 | from gi.repository import Gtk |
| 1058 | from gi.repository import Gdk |
| 1059 | |
| 1060 | @@ -163,7 +164,7 @@ |
| 1061 | self.iconname = iconname |
| 1062 | self.wk.webkit.load_html_string(self.LOADING_HTML, "file:///") |
| 1063 | self.wk.show() |
| 1064 | - context = GObject.main_context_default() |
| 1065 | + context = GLib.main_context_default() |
| 1066 | while context.pending(): |
| 1067 | context.iteration() |
| 1068 | if url: |
| 1069 | @@ -174,7 +175,7 @@ |
| 1070 | self.wk.webkit.load_html_string(DUMMY_HTML, "file:///") |
| 1071 | # only for debugging |
| 1072 | if os.environ.get("SOFTWARE_CENTER_DEBUG_BUY"): |
| 1073 | - GObject.timeout_add_seconds(1, _generate_events, self) |
| 1074 | + GLib.timeout_add_seconds(1, _generate_events, self) |
| 1075 | return True |
| 1076 | |
| 1077 | def _on_new_window(self, view, frame, request, action, policy): |
| 1078 | |
| 1079 | === modified file 'softwarecenter/ui/gtk3/widgets/actionbar.py' |
| 1080 | --- softwarecenter/ui/gtk3/widgets/actionbar.py 2012-11-23 22:57:21 +0000 |
| 1081 | +++ softwarecenter/ui/gtk3/widgets/actionbar.py 2012-11-30 19:08:32 +0000 |
| 1082 | @@ -18,7 +18,7 @@ |
| 1083 | |
| 1084 | import logging |
| 1085 | |
| 1086 | -from gi.repository import Gtk, Gdk, GObject |
| 1087 | +from gi.repository import Gtk, Gdk, GLib |
| 1088 | |
| 1089 | LOG = logging.getLogger(__name__) |
| 1090 | |
| 1091 | @@ -242,14 +242,14 @@ |
| 1092 | self._current_height = 0 |
| 1093 | self.set_size_request(-1, self._current_height) |
| 1094 | super(ActionBar, self).show() |
| 1095 | - GObject.timeout_add(self.ANIMATE_START_DELAY, |
| 1096 | + GLib.timeout_add(self.ANIMATE_START_DELAY, |
| 1097 | self._slide_in_cb) |
| 1098 | |
| 1099 | def _slide_out(self): |
| 1100 | self._is_sliding_out = True |
| 1101 | self._target_height = 0 |
| 1102 | self._current_height = self.get_size_request()[1] |
| 1103 | - GObject.timeout_add(self.ANIMATE_START_DELAY, |
| 1104 | + GLib.timeout_add(self.ANIMATE_START_DELAY, |
| 1105 | self._slide_out_cb) |
| 1106 | |
| 1107 | def _slide_in_cb(self): |
| 1108 | @@ -282,12 +282,12 @@ |
| 1109 | height = widget.get_allocation().height |
| 1110 | if self._is_sliding_in: |
| 1111 | self._current_height = height |
| 1112 | - GObject.timeout_add(self.ANIMATE_STEP_INTERVAL, |
| 1113 | + GLib.timeout_add(self.ANIMATE_STEP_INTERVAL, |
| 1114 | self._slide_in_cb, |
| 1115 | priority=100) |
| 1116 | elif self._is_sliding_out: |
| 1117 | self._current_height = height |
| 1118 | - GObject.timeout_add(self.ANIMATE_STEP_INTERVAL, |
| 1119 | + GLib.timeout_add(self.ANIMATE_STEP_INTERVAL, |
| 1120 | self._slide_out_cb, |
| 1121 | priority=100) |
| 1122 | else: |
| 1123 | |
| 1124 | === modified file 'softwarecenter/ui/gtk3/widgets/apptreeview.py' |
| 1125 | --- softwarecenter/ui/gtk3/widgets/apptreeview.py 2012-11-23 22:57:21 +0000 |
| 1126 | +++ softwarecenter/ui/gtk3/widgets/apptreeview.py 2012-11-30 19:08:32 +0000 |
| 1127 | @@ -1,4 +1,4 @@ |
| 1128 | -from gi.repository import Gtk, Gdk, GObject |
| 1129 | +from gi.repository import Gtk, Gdk, GLib |
| 1130 | import logging |
| 1131 | |
| 1132 | from gettext import gettext as _ |
| 1133 | @@ -520,7 +520,7 @@ |
| 1134 | def _init_activated(self, btn, model, path): |
| 1135 | app = model[path][AppGenericStore.COL_ROW_DATA] |
| 1136 | s = Gtk.Settings.get_default() |
| 1137 | - GObject.timeout_add(s.get_property("gtk-timeout-initial"), |
| 1138 | + GLib.timeout_add(s.get_property("gtk-timeout-initial"), |
| 1139 | self._app_activated_cb, |
| 1140 | btn, |
| 1141 | btn.name, |
| 1142 | |
| 1143 | === modified file 'softwarecenter/ui/gtk3/widgets/buttons.py' |
| 1144 | --- softwarecenter/ui/gtk3/widgets/buttons.py 2012-10-09 12:40:55 +0000 |
| 1145 | +++ softwarecenter/ui/gtk3/widgets/buttons.py 2012-11-30 19:08:32 +0000 |
| 1146 | @@ -18,7 +18,7 @@ |
| 1147 | |
| 1148 | import cairo |
| 1149 | |
| 1150 | -from gi.repository import Gtk, Gdk, Pango, GObject, GdkPixbuf |
| 1151 | +from gi.repository import Gtk, Gdk, Pango, GObject, GdkPixbuf, GLib |
| 1152 | from gettext import gettext as _ |
| 1153 | |
| 1154 | from softwarecenter.backend.installbackend import get_install_backend |
| 1155 | @@ -197,7 +197,7 @@ |
| 1156 | self.content_left.pack_start(self.image, False, False, 0) |
| 1157 | |
| 1158 | self.title = Gtk.Label.new(self._MARKUP % |
| 1159 | - GObject.markup_escape_text(label)) |
| 1160 | + GLib.markup_escape_text(label)) |
| 1161 | self.title.set_alignment(0.0, 0.5) |
| 1162 | self.title.set_use_markup(True) |
| 1163 | self.title.set_tooltip_text(label) |
| 1164 | @@ -207,7 +207,7 @@ |
| 1165 | categories = helper.get_categories(doc) |
| 1166 | if categories is not None: |
| 1167 | self.category = Gtk.Label.new('<span font_desc="%i">%s</span>' % |
| 1168 | - (em(0.6), GObject.markup_escape_text(categories))) |
| 1169 | + (em(0.6), GLib.markup_escape_text(categories))) |
| 1170 | self.category.set_use_markup(True) |
| 1171 | self.category.set_alignment(0.0, 0.5) |
| 1172 | self.category.set_ellipsize(Pango.EllipsizeMode.END) |
| 1173 | |
| 1174 | === modified file 'softwarecenter/ui/gtk3/widgets/cellrenderers.py' |
| 1175 | --- softwarecenter/ui/gtk3/widgets/cellrenderers.py 2012-08-17 08:25:04 +0000 |
| 1176 | +++ softwarecenter/ui/gtk3/widgets/cellrenderers.py 2012-11-30 19:08:32 +0000 |
| 1177 | @@ -17,7 +17,7 @@ |
| 1178 | # this program; if not, write to the Free Software Foundation, Inc., |
| 1179 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 1180 | |
| 1181 | -from gi.repository import Gtk, Gdk, GObject, Pango |
| 1182 | +from gi.repository import Gtk, Gdk, GObject, GLib, Pango |
| 1183 | |
| 1184 | from softwarecenter.utils import utf8 |
| 1185 | from softwarecenter.ui.gtk3.em import EM |
| 1186 | @@ -469,7 +469,7 @@ |
| 1187 | max_size = (0, 0) |
| 1188 | |
| 1189 | for k, variant in self.markup_variants.items(): |
| 1190 | - safe_markup = GObject.markup_escape_text(utf8(variant)) |
| 1191 | + safe_markup = GLib.markup_escape_text(utf8(variant)) |
| 1192 | layout.set_markup(safe_markup, -1) |
| 1193 | size = layout.get_size() |
| 1194 | max_size = max(max_size, size) |
| 1195 | |
| 1196 | === modified file 'softwarecenter/ui/gtk3/widgets/containers.py' |
| 1197 | --- softwarecenter/ui/gtk3/widgets/containers.py 2012-10-05 03:34:26 +0000 |
| 1198 | +++ softwarecenter/ui/gtk3/widgets/containers.py 2012-11-30 19:08:32 +0000 |
| 1199 | @@ -4,7 +4,7 @@ |
| 1200 | PI_OVER_180 = PI / 180 |
| 1201 | import softwarecenter.paths |
| 1202 | |
| 1203 | -from gi.repository import Gtk, Gdk, GObject |
| 1204 | +from gi.repository import Gtk, Gdk, GObject, GLib |
| 1205 | |
| 1206 | from buttons import MoreLink |
| 1207 | from softwarecenter.ui.gtk3.em import StockEms |
| 1208 | @@ -219,7 +219,7 @@ |
| 1209 | self.emit("application-activated", app) |
| 1210 | return False |
| 1211 | |
| 1212 | - GObject.timeout_add(50, timeout_emit) |
| 1213 | + GLib.timeout_add(50, timeout_emit) |
| 1214 | |
| 1215 | |
| 1216 | # first tier of caching, cache component assets from which frames are |
| 1217 | |
| 1218 | === modified file 'softwarecenter/ui/gtk3/widgets/description.py' |
| 1219 | --- softwarecenter/ui/gtk3/widgets/description.py 2012-11-23 22:57:21 +0000 |
| 1220 | +++ softwarecenter/ui/gtk3/widgets/description.py 2012-11-30 19:08:32 +0000 |
| 1221 | @@ -18,7 +18,7 @@ |
| 1222 | |
| 1223 | |
| 1224 | from gi.repository import Gtk, Gdk |
| 1225 | -from gi.repository import GObject |
| 1226 | +from gi.repository import GLib |
| 1227 | from gi.repository import Pango |
| 1228 | |
| 1229 | from softwarecenter.utils import normalize_package_description |
| 1230 | @@ -1174,7 +1174,7 @@ |
| 1231 | encoded_desc = unicode(raw_desc, 'utf8').encode('utf8') |
| 1232 | else: |
| 1233 | encoded_desc = raw_desc.encode('utf8') |
| 1234 | - self._text = GObject.markup_escape_text(encoded_desc) |
| 1235 | + self._text = GLib.markup_escape_text(encoded_desc) |
| 1236 | self._parse_desc(self._text, pkgname) |
| 1237 | self.show_all() |
| 1238 | |
| 1239 | |
| 1240 | === modified file 'softwarecenter/ui/gtk3/widgets/exhibits.py' |
| 1241 | --- softwarecenter/ui/gtk3/widgets/exhibits.py 2012-11-23 22:57:21 +0000 |
| 1242 | +++ softwarecenter/ui/gtk3/widgets/exhibits.py 2012-11-30 19:08:32 +0000 |
| 1243 | @@ -24,6 +24,7 @@ |
| 1244 | |
| 1245 | from gi.repository import Gtk |
| 1246 | from gi.repository import Gdk |
| 1247 | +from gi.repository import GLib |
| 1248 | from gi.repository import GObject |
| 1249 | from gi.repository import GdkPixbuf |
| 1250 | from gi.repository import WebKit |
| 1251 | @@ -179,7 +180,7 @@ |
| 1252 | if view.get_property("load-status") == WebKit.LoadStatus.FINISHED: |
| 1253 | # this needs to run with a timeout because otherwise the |
| 1254 | # status is emitted before the offscreen image is finished |
| 1255 | - GObject.timeout_add(100, lambda: self.emit("render-finished")) |
| 1256 | + GLib.timeout_add(100, lambda: self.emit("render-finished")) |
| 1257 | |
| 1258 | |
| 1259 | class ExhibitButton(Gtk.Button): |
| 1260 | @@ -400,7 +401,7 @@ |
| 1261 | |
| 1262 | def cleanup_timeout(self): |
| 1263 | if self._timeout > 0: |
| 1264 | - GObject.source_remove(self._timeout) |
| 1265 | + GLib.source_remove(self._timeout) |
| 1266 | self._timeout = 0 |
| 1267 | |
| 1268 | def _render_exhibit_at_cursor(self): |
| 1269 | @@ -443,7 +444,7 @@ |
| 1270 | |
| 1271 | def queue_next(self): |
| 1272 | self.cleanup_timeout() |
| 1273 | - self._timeout = GObject.timeout_add_seconds( |
| 1274 | + self._timeout = GLib.timeout_add_seconds( |
| 1275 | self.TIMEOUT_SECONDS, self.next_exhibit) |
| 1276 | return self._timeout |
| 1277 | |
| 1278 | @@ -453,7 +454,7 @@ |
| 1279 | if self.image.get_width() == 1: |
| 1280 | # the offscreen window is not really as such content not |
| 1281 | # correctly rendered |
| 1282 | - GObject.timeout_add(500, self.on_banner_rendered, renderer) |
| 1283 | + GLib.timeout_add(500, self.on_banner_rendered, renderer) |
| 1284 | return |
| 1285 | |
| 1286 | from gi.repository import Atk |
| 1287 | @@ -479,7 +480,7 @@ |
| 1288 | self.queue_draw() |
| 1289 | return retval |
| 1290 | |
| 1291 | - GObject.timeout_add(50, fade_step) |
| 1292 | + GLib.timeout_add(50, fade_step) |
| 1293 | |
| 1294 | def _cache_art_assets(self): |
| 1295 | global _asset_cache |
| 1296 | @@ -612,7 +613,7 @@ |
| 1297 | child.destroy() |
| 1298 | |
| 1299 | for sigid in self._dotsigs: |
| 1300 | - GObject.source_remove(sigid) |
| 1301 | + GLib.source_remove(sigid) |
| 1302 | |
| 1303 | self._dotsigs = [] |
| 1304 | if len(self.exhibits) > 1: |
| 1305 | |
| 1306 | === modified file 'softwarecenter/ui/gtk3/widgets/navlog.py' |
| 1307 | --- softwarecenter/ui/gtk3/widgets/navlog.py 2011-07-12 12:37:27 +0000 |
| 1308 | +++ softwarecenter/ui/gtk3/widgets/navlog.py 2012-11-30 19:08:32 +0000 |
| 1309 | @@ -1,4 +1,4 @@ |
| 1310 | -from gi.repository import Gtk, GObject |
| 1311 | +from gi.repository import Gtk, GLib |
| 1312 | |
| 1313 | |
| 1314 | class NavLog(Gtk.TreeView): |
| 1315 | @@ -29,7 +29,7 @@ |
| 1316 | |
| 1317 | def notify_append(self, nav_item): |
| 1318 | model = self.get_model() |
| 1319 | - pane_name = GObject.markup_escape_text( |
| 1320 | + pane_name = GLib.markup_escape_text( |
| 1321 | str(nav_item.pane.pane_name)) |
| 1322 | |
| 1323 | if nav_item.page >= 0: |
| 1324 | |
| 1325 | === modified file 'softwarecenter/ui/gtk3/widgets/recommendations.py' |
| 1326 | --- softwarecenter/ui/gtk3/widgets/recommendations.py 2012-11-23 22:57:21 +0000 |
| 1327 | +++ softwarecenter/ui/gtk3/widgets/recommendations.py 2012-11-30 19:08:32 +0000 |
| 1328 | @@ -17,7 +17,7 @@ |
| 1329 | # this program; if not, write to the Free Software Foundation, Inc., |
| 1330 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 1331 | |
| 1332 | -from gi.repository import Gtk, GObject |
| 1333 | +from gi.repository import Gtk, GObject, GLib |
| 1334 | import logging |
| 1335 | |
| 1336 | from gettext import gettext as _ |
| 1337 | @@ -133,7 +133,7 @@ |
| 1338 | self.properties_helper = properties_helper |
| 1339 | self.subcategory = subcategory |
| 1340 | if self.subcategory: |
| 1341 | - self.set_header_label(GObject.markup_escape_text(utf8( |
| 1342 | + self.set_header_label(GLib.markup_escape_text(utf8( |
| 1343 | _("Recommended For You in %s")) % utf8(self.subcategory.name))) |
| 1344 | self.recommended_for_you_content = None |
| 1345 | if self.recommender_agent.is_opted_in(): |
| 1346 | |
| 1347 | === modified file 'softwarecenter/ui/gtk3/widgets/reviews.py' |
| 1348 | --- softwarecenter/ui/gtk3/widgets/reviews.py 2012-11-23 22:57:21 +0000 |
| 1349 | +++ softwarecenter/ui/gtk3/widgets/reviews.py 2012-11-30 19:08:32 +0000 |
| 1350 | @@ -22,7 +22,7 @@ |
| 1351 | |
| 1352 | import gi |
| 1353 | gi.require_version("Gtk", "3.0") |
| 1354 | -from gi.repository import Gtk, GObject, Pango |
| 1355 | +from gi.repository import Gtk, GObject, Pango, GLib |
| 1356 | import datetime |
| 1357 | import logging |
| 1358 | |
| 1359 | @@ -622,7 +622,7 @@ |
| 1360 | modify_error = review_data.modify_error |
| 1361 | |
| 1362 | # upstream version |
| 1363 | - version = GObject.markup_escape_text(upstream_version(review_version)) |
| 1364 | + version = GLib.markup_escape_text(upstream_version(review_version)) |
| 1365 | # default string |
| 1366 | version_string = _("For version %(version)s") % { |
| 1367 | 'version': version, |
| 1368 | @@ -646,7 +646,7 @@ |
| 1369 | |
| 1370 | summary = Gtk.Label() |
| 1371 | try: |
| 1372 | - s = GObject.markup_escape_text(review_data.summary.encode("utf-8")) |
| 1373 | + s = GLib.markup_escape_text(review_data.summary.encode("utf-8")) |
| 1374 | summary.set_markup('<b>%s</b>' % s) |
| 1375 | except Exception: |
| 1376 | LOG.exception("_build() failed") |
| 1377 | @@ -855,16 +855,16 @@ |
| 1378 | |
| 1379 | if person == self.logged_in_person: |
| 1380 | m = '%s (%s), %s' % ( |
| 1381 | - GObject.markup_escape_text(utf8(correct_name)), |
| 1382 | + GLib.markup_escape_text(utf8(correct_name)), |
| 1383 | # TRANSLATORS: displayed in a review after the persons name, |
| 1384 | # e.g. "Jane Smith (that's you), 2011-02-11" |
| 1385 | utf8(_(u"that\u2019s you")), |
| 1386 | - GObject.markup_escape_text(utf8(nice_date))) |
| 1387 | + GLib.markup_escape_text(utf8(nice_date))) |
| 1388 | else: |
| 1389 | try: |
| 1390 | m = '%s, %s' % ( |
| 1391 | - GObject.markup_escape_text(correct_name.encode("utf-8")), |
| 1392 | - GObject.markup_escape_text(nice_date)) |
| 1393 | + GLib.markup_escape_text(correct_name.encode("utf-8")), |
| 1394 | + GLib.markup_escape_text(nice_date)) |
| 1395 | except Exception: |
| 1396 | LOG.exception("_who_when_markup failed") |
| 1397 | m = "Error parsing name" |
| 1398 | |
| 1399 | === modified file 'softwarecenter/ui/gtk3/widgets/searchaid.py' |
| 1400 | --- softwarecenter/ui/gtk3/widgets/searchaid.py 2012-11-23 22:57:21 +0000 |
| 1401 | +++ softwarecenter/ui/gtk3/widgets/searchaid.py 2012-11-30 19:08:32 +0000 |
| 1402 | @@ -1,5 +1,5 @@ |
| 1403 | # -*- coding: utf-8 -*- |
| 1404 | -from gi.repository import Gtk, GObject |
| 1405 | +from gi.repository import Gtk, GObject, GLib |
| 1406 | |
| 1407 | import gettext |
| 1408 | from gettext import gettext as _ |
| 1409 | @@ -67,7 +67,7 @@ |
| 1410 | |
| 1411 | def reset(self): |
| 1412 | for label, handler in zip(self._labels, self._handlers): |
| 1413 | - GObject.source_remove(handler) |
| 1414 | + GLib.source_remove(handler) |
| 1415 | label.destroy() |
| 1416 | |
| 1417 | self._labels = [] |
| 1418 | @@ -117,7 +117,7 @@ |
| 1419 | sub = utf8(_(u"No items in %s match “%s”")) |
| 1420 | sub = sub % (build_category_path(), term) |
| 1421 | |
| 1422 | - return self.HEADER_MARKUP % GObject.markup_escape_text(sub) |
| 1423 | + return self.HEADER_MARKUP % GLib.markup_escape_text(sub) |
| 1424 | |
| 1425 | def get_suggestions(self, term, category, state): |
| 1426 | correction = self.get_correction(term) |
| 1427 | @@ -148,7 +148,7 @@ |
| 1428 | |
| 1429 | # If spelling correction, offer alternative term(s) |
| 1430 | if correction: |
| 1431 | - correction = GObject.markup_escape_text(correction) |
| 1432 | + correction = GLib.markup_escape_text(correction) |
| 1433 | ref = "<a href=\"search/%s\">%s</a>" % (correction, correction) |
| 1434 | new_text = self.BULLET % _("Check that your spelling is correct. " |
| 1435 | "Did you mean: %s?") % ref |
| 1436 | @@ -306,7 +306,7 @@ |
| 1437 | def on_link_activate(self, suggestions, link, uri): |
| 1438 | markup = self.HEADER_MARKUP % _('Trying suggestion ...') |
| 1439 | self.title.set_markup(markup) |
| 1440 | - GObject.timeout_add(750, self._handle_suggestion_action, uri) |
| 1441 | + GLib.timeout_add(750, self._handle_suggestion_action, uri) |
| 1442 | |
| 1443 | def _handle_suggestion_action(self, uri): |
| 1444 | self = self.pane |
| 1445 | |
| 1446 | === modified file 'softwarecenter/ui/gtk3/widgets/searchentry.py' |
| 1447 | --- softwarecenter/ui/gtk3/widgets/searchentry.py 2012-11-23 22:57:21 +0000 |
| 1448 | +++ softwarecenter/ui/gtk3/widgets/searchentry.py 2012-11-30 19:08:32 +0000 |
| 1449 | @@ -21,7 +21,7 @@ |
| 1450 | # this program; if not, write to the Free Software Foundation, Inc., |
| 1451 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 1452 | |
| 1453 | -from gi.repository import Gtk, GObject |
| 1454 | +from gi.repository import Gtk, GObject, GLib |
| 1455 | from gettext import gettext as _ |
| 1456 | |
| 1457 | from softwarecenter.ui.gtk3.em import em |
| 1458 | @@ -134,8 +134,8 @@ |
| 1459 | """ |
| 1460 | self._check_style() |
| 1461 | if self._timeout_id > 0: |
| 1462 | - GObject.source_remove(self._timeout_id) |
| 1463 | - self._timeout_id = GObject.timeout_add(self.SEARCH_TIMEOUT, |
| 1464 | + GLib.source_remove(self._timeout_id) |
| 1465 | + self._timeout_id = GLib.timeout_add(self.SEARCH_TIMEOUT, |
| 1466 | self._emit_terms_changed) |
| 1467 | |
| 1468 | def _check_style(self): |
| 1469 | |
| 1470 | === modified file 'softwarecenter/ui/gtk3/widgets/spinner.py' |
| 1471 | --- softwarecenter/ui/gtk3/widgets/spinner.py 2012-09-19 07:37:33 +0000 |
| 1472 | +++ softwarecenter/ui/gtk3/widgets/spinner.py 2012-11-30 19:08:32 +0000 |
| 1473 | @@ -20,7 +20,7 @@ |
| 1474 | import gi |
| 1475 | gi.require_version("Gtk", "3.0") |
| 1476 | |
| 1477 | -from gi.repository import Gtk, GObject |
| 1478 | +from gi.repository import Gtk, GLib |
| 1479 | |
| 1480 | from softwarecenter.enums import SOFTWARE_CENTER_DEBUG_TABS |
| 1481 | |
| 1482 | @@ -117,13 +117,13 @@ |
| 1483 | # (but only if its not already visible anyway) |
| 1484 | if self.get_current_page() == self.CONTENT_PAGE: |
| 1485 | self.spinner_view.stop_and_hide() |
| 1486 | - self._last_timeout_id = GObject.timeout_add( |
| 1487 | + self._last_timeout_id = GLib.timeout_add( |
| 1488 | 250, self._unmask_view_spinner) |
| 1489 | |
| 1490 | def hide_spinner(self): |
| 1491 | """ hide the spinner page again and show the content page """ |
| 1492 | if self._last_timeout_id is not None: |
| 1493 | - GObject.source_remove(self._last_timeout_id) |
| 1494 | + GLib.source_remove(self._last_timeout_id) |
| 1495 | self._last_timeout_id = None |
| 1496 | self.spinner_view.stop_and_hide() |
| 1497 | self.set_current_page(self.CONTENT_PAGE) |
| 1498 | |
| 1499 | === modified file 'softwarecenter/ui/gtk3/widgets/symbolic_icons.py' |
| 1500 | --- softwarecenter/ui/gtk3/widgets/symbolic_icons.py 2012-05-30 18:39:55 +0000 |
| 1501 | +++ softwarecenter/ui/gtk3/widgets/symbolic_icons.py 2012-11-30 19:08:32 +0000 |
| 1502 | @@ -20,7 +20,7 @@ |
| 1503 | import os |
| 1504 | |
| 1505 | from math import pi as PI |
| 1506 | -from gi.repository import Gtk, Gdk, GObject, PangoCairo |
| 1507 | +from gi.repository import Gtk, Gdk, GLib, PangoCairo |
| 1508 | |
| 1509 | import softwarecenter.paths |
| 1510 | from softwarecenter.ui.gtk3.em import em |
| 1511 | @@ -112,7 +112,7 @@ |
| 1512 | |
| 1513 | def start(self): |
| 1514 | if not self.is_animating(): |
| 1515 | - self.animator = GObject.timeout_add(self.NEW_FRAME_DELAY, |
| 1516 | + self.animator = GLib.timeout_add(self.NEW_FRAME_DELAY, |
| 1517 | self.new_frame) |
| 1518 | |
| 1519 | def stop(self): |
| 1520 | |
| 1521 | === modified file 'softwarecenter/ui/gtk3/widgets/thumbnail.py' |
| 1522 | --- softwarecenter/ui/gtk3/widgets/thumbnail.py 2012-11-23 22:57:21 +0000 |
| 1523 | +++ softwarecenter/ui/gtk3/widgets/thumbnail.py 2012-11-30 19:08:32 +0000 |
| 1524 | @@ -18,7 +18,7 @@ |
| 1525 | |
| 1526 | import gi |
| 1527 | gi.require_version("Gtk", "3.0") |
| 1528 | -from gi.repository import Gtk, Gdk, Atk, Gio, GObject, GdkPixbuf |
| 1529 | +from gi.repository import Gtk, Gdk, Atk, Gio, GObject, GdkPixbuf, GLib |
| 1530 | |
| 1531 | import logging |
| 1532 | |
| 1533 | @@ -45,7 +45,7 @@ |
| 1534 | |
| 1535 | def set_app_details(self, app_details): |
| 1536 | if self._sig > 0: |
| 1537 | - GObject.source_remove(self._sig) |
| 1538 | + GLib.source_remove(self._sig) |
| 1539 | |
| 1540 | self.app_details = app_details |
| 1541 | self.appname = app_details.display_name |
| 1542 | @@ -435,7 +435,7 @@ |
| 1543 | self.cancel.reset() |
| 1544 | |
| 1545 | for sig in self._handlers: |
| 1546 | - GObject.source_remove(sig) |
| 1547 | + GLib.source_remove(sig) |
| 1548 | |
| 1549 | for child in self: |
| 1550 | child.destroy() |
| 1551 | |
| 1552 | === modified file 'softwarecenter/ui/qml/reviewslist.py' |
| 1553 | --- softwarecenter/ui/qml/reviewslist.py 2012-03-08 11:07:22 +0000 |
| 1554 | +++ softwarecenter/ui/qml/reviewslist.py 2012-11-30 19:08:32 +0000 |
| 1555 | @@ -17,7 +17,7 @@ |
| 1556 | # this program; if not, write to the Free Software Foundation, Inc., |
| 1557 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 1558 | |
| 1559 | -from gi.repository import GObject |
| 1560 | +from gi.repository import GLib |
| 1561 | from datetime import datetime |
| 1562 | |
| 1563 | from PyQt4.QtCore import QAbstractListModel, QModelIndex, pyqtSignal, pyqtSlot |
| 1564 | @@ -91,7 +91,7 @@ |
| 1565 | self.clear() |
| 1566 | |
| 1567 | # load in the eventloop to ensure that animations are not delayed |
| 1568 | - GObject.timeout_add( |
| 1569 | + GLib.timeout_add( |
| 1570 | 10, self.reviews.get_reviews, app, page) |
| 1571 | |
| 1572 | # refresh review-stats (for qml) |
| 1573 | |
| 1574 | === modified file 'softwarecenter/utils.py' |
| 1575 | --- softwarecenter/utils.py 2012-11-23 22:57:21 +0000 |
| 1576 | +++ softwarecenter/utils.py 2012-11-30 19:08:32 +0000 |
| 1577 | @@ -20,6 +20,7 @@ |
| 1578 | import gc |
| 1579 | import gettext |
| 1580 | from gi.repository import GObject |
| 1581 | +from gi.repository import GLib |
| 1582 | from gi.repository import Gio |
| 1583 | import logging |
| 1584 | import math |
| 1585 | @@ -183,7 +184,7 @@ |
| 1586 | if not self.cache.ready: |
| 1587 | if window: |
| 1588 | window.set_cursor(self.busy_cursor) |
| 1589 | - GObject.timeout_add(500, lambda: wrapper(*args, **kwargs)) |
| 1590 | + GLib.timeout_add(500, lambda: wrapper(*args, **kwargs)) |
| 1591 | return False |
| 1592 | # cache ready now |
| 1593 | if window: |
| 1594 | @@ -538,7 +539,7 @@ |
| 1595 | DBUS_CREDENTIALS_PATH, |
| 1596 | ) |
| 1597 | # clean |
| 1598 | - loop = GObject.MainLoop() |
| 1599 | + loop = GLib.MainLoop() |
| 1600 | bus = dbus.SessionBus() |
| 1601 | obj = bus.get_object(bus_name=DBUS_BUS_NAME, |
| 1602 | object_path=DBUS_CREDENTIALS_PATH, |
| 1603 | @@ -550,7 +551,7 @@ |
| 1604 | proxy.connect_to_signal("CredentialsError", loop.quit) |
| 1605 | proxy.clear_credentials(appname, {}) |
| 1606 | # ensure we don't hang forever here |
| 1607 | - GObject.timeout_add_seconds(2, loop.quit) |
| 1608 | + GLib.timeout_add_seconds(2, loop.quit) |
| 1609 | # run the mainloop until the credentials are clear |
| 1610 | loop.run() |
| 1611 | |
| 1612 | |
| 1613 | === modified file 'tests/create_transactions.py' |
| 1614 | --- tests/create_transactions.py 2011-07-15 14:24:08 +0000 |
| 1615 | +++ tests/create_transactions.py 2012-11-30 19:08:32 +0000 |
| 1616 | @@ -1,6 +1,6 @@ |
| 1617 | #!/usr/bin/python |
| 1618 | |
| 1619 | -from gi.repository import GObject |
| 1620 | +from gi.repository import GLib |
| 1621 | |
| 1622 | import time |
| 1623 | |
| 1624 | @@ -29,7 +29,7 @@ |
| 1625 | if __name__ == "__main__": |
| 1626 | #logging.basicConfig(level=logging.DEBUG) |
| 1627 | |
| 1628 | - context = GObject.main_context_default() |
| 1629 | + context = GLib.main_context_default() |
| 1630 | c = AptClient() |
| 1631 | for i in range(100): |
| 1632 | |
| 1633 | |
| 1634 | === modified file 'tests/gtk3/test_dialogs.py' |
| 1635 | --- tests/gtk3/test_dialogs.py 2012-05-30 21:52:08 +0000 |
| 1636 | +++ tests/gtk3/test_dialogs.py 2012-11-30 19:08:32 +0000 |
| 1637 | @@ -1,6 +1,6 @@ |
| 1638 | import unittest |
| 1639 | |
| 1640 | -from gi.repository import Gtk, GObject |
| 1641 | +from gi.repository import Gtk, GLib |
| 1642 | from tests.utils import setup_test_env |
| 1643 | setup_test_env() |
| 1644 | |
| 1645 | @@ -16,25 +16,25 @@ |
| 1646 | |
| 1647 | def get_test_window_dependency_dialog(self): |
| 1648 | dia = get_test_window_dependency_dialog() |
| 1649 | - GObject.timeout_add(TIMEOUT, |
| 1650 | + GLib.timeout_add(TIMEOUT, |
| 1651 | lambda: dia.response(Gtk.ResponseType.ACCEPT)) |
| 1652 | dia.run() |
| 1653 | |
| 1654 | def test_confirm_repair_broken_cache(self): |
| 1655 | datadir = softwarecenter.paths.datadir |
| 1656 | - GObject.timeout_add(TIMEOUT, self._close_dialog) |
| 1657 | + GLib.timeout_add(TIMEOUT, self._close_dialog) |
| 1658 | res = softwarecenter.ui.gtk3.dialogs.confirm_repair_broken_cache( |
| 1659 | parent=None, datadir=datadir) |
| 1660 | self.assertEqual(res, False) |
| 1661 | |
| 1662 | def test_error_dialog(self): |
| 1663 | - GObject.timeout_add(TIMEOUT, self._close_dialog) |
| 1664 | + GLib.timeout_add(TIMEOUT, self._close_dialog) |
| 1665 | res = softwarecenter.ui.gtk3.dialogs.error( |
| 1666 | parent=None, primary="primary", secondary="secondary") |
| 1667 | self.assertEqual(res, False) |
| 1668 | |
| 1669 | def test_accept_tos_dialog(self): |
| 1670 | - GObject.timeout_add(TIMEOUT, self._close_dialog) |
| 1671 | + GLib.timeout_add(TIMEOUT, self._close_dialog) |
| 1672 | res = softwarecenter.ui.gtk3.dialogs.show_accept_tos_dialog( |
| 1673 | parent=None) |
| 1674 | self.assertEqual(res, False) |
| 1675 | |
| 1676 | === modified file 'tests/gtk3/test_lp1048912.py' |
| 1677 | --- tests/gtk3/test_lp1048912.py 2012-09-13 15:01:37 +0000 |
| 1678 | +++ tests/gtk3/test_lp1048912.py 2012-11-30 19:08:32 +0000 |
| 1679 | @@ -1,7 +1,7 @@ |
| 1680 | import unittest |
| 1681 | |
| 1682 | from gi.repository import ( |
| 1683 | - GObject, |
| 1684 | + GLib, |
| 1685 | Gtk, |
| 1686 | ) |
| 1687 | |
| 1688 | @@ -67,13 +67,13 @@ |
| 1689 | # described in #1048912 on the top of the bottom frame the line |
| 1690 | # will not be drawn correctly - any subsequent redraw of the |
| 1691 | # window will fix it |
| 1692 | - GObject.timeout_add(1000, add_tiles, apptiles2) |
| 1693 | + GLib.timeout_add(1000, add_tiles, apptiles2) |
| 1694 | |
| 1695 | # this "viewport.queue_draw()" will fix the glitch |
| 1696 | - #GObject.timeout_add_seconds(2, lambda: viewport.queue_draw()) |
| 1697 | + #GLib.timeout_add_seconds(2, lambda: viewport.queue_draw()) |
| 1698 | |
| 1699 | # stop the test |
| 1700 | - GObject.timeout_add_seconds(3, Gtk.main_quit) |
| 1701 | + GLib.timeout_add_seconds(3, Gtk.main_quit) |
| 1702 | |
| 1703 | win.connect("destroy", Gtk.main_quit) |
| 1704 | win.show_all() |
| 1705 | |
| 1706 | === modified file 'tests/gtk3/test_recommendations_widgets.py' |
| 1707 | --- tests/gtk3/test_recommendations_widgets.py 2012-09-17 09:03:19 +0000 |
| 1708 | +++ tests/gtk3/test_recommendations_widgets.py 2012-11-30 19:08:32 +0000 |
| 1709 | @@ -1,7 +1,7 @@ |
| 1710 | import unittest |
| 1711 | |
| 1712 | from gi.repository import ( |
| 1713 | - GObject, |
| 1714 | + GLib, |
| 1715 | Gtk, |
| 1716 | ) |
| 1717 | |
| 1718 | @@ -25,19 +25,19 @@ |
| 1719 | child = win.get_children()[0] |
| 1720 | child.connect("size-allocate", self._on_size_allocate) |
| 1721 | self.addCleanup(win.destroy) |
| 1722 | - GObject.timeout_add(TIMEOUT, Gtk.main_quit) |
| 1723 | + GLib.timeout_add(TIMEOUT, Gtk.main_quit) |
| 1724 | Gtk.main() |
| 1725 | |
| 1726 | def test_recommendations_category(self): |
| 1727 | win = get_test_window_recommendations(panel_type="category") |
| 1728 | self.addCleanup(win.destroy) |
| 1729 | - GObject.timeout_add(TIMEOUT, Gtk.main_quit) |
| 1730 | + GLib.timeout_add(TIMEOUT, Gtk.main_quit) |
| 1731 | Gtk.main() |
| 1732 | |
| 1733 | def test_recommendations_details(self): |
| 1734 | win = get_test_window_recommendations(panel_type="details") |
| 1735 | self.addCleanup(win.destroy) |
| 1736 | - GObject.timeout_add(TIMEOUT, Gtk.main_quit) |
| 1737 | + GLib.timeout_add(TIMEOUT, Gtk.main_quit) |
| 1738 | Gtk.main() |
| 1739 | |
| 1740 | |
| 1741 | |
| 1742 | === modified file 'tests/gtk3/test_spinner.py' |
| 1743 | --- tests/gtk3/test_spinner.py 2012-09-19 07:37:33 +0000 |
| 1744 | +++ tests/gtk3/test_spinner.py 2012-11-30 19:08:32 +0000 |
| 1745 | @@ -80,7 +80,7 @@ |
| 1746 | assert self._interval is None |
| 1747 | assert self._callback is None |
| 1748 | |
| 1749 | - with patch.object(spinner.GObject, 'timeout_add', |
| 1750 | + with patch.object(spinner.GLib, 'timeout_add', |
| 1751 | self._fake_timeout_add): |
| 1752 | self.obj.show_spinner() |
| 1753 | |
| 1754 | @@ -102,7 +102,7 @@ |
| 1755 | def test_show_spinner_twice(self): |
| 1756 | """The spinner is not hiden/shown if its already visible.""" |
| 1757 | with patch.object(self.obj.spinner_view, "stop_and_hide") as m: |
| 1758 | - with patch.object(spinner.GObject, 'timeout_add', |
| 1759 | + with patch.object(spinner.GLib, 'timeout_add', |
| 1760 | lambda t,f: f()): |
| 1761 | self.obj.show_spinner("meep") |
| 1762 | self.obj.show_spinner("baap") |
| 1763 | @@ -114,25 +114,25 @@ |
| 1764 | def test_show_spinner_with_msg(self): |
| 1765 | """The spinner is shown with the given message.""" |
| 1766 | message = 'Something I want to show' |
| 1767 | - with patch.object(spinner.GObject, 'timeout_add', lambda *a: None): |
| 1768 | + with patch.object(spinner.GLib, 'timeout_add', lambda *a: None): |
| 1769 | self.obj.show_spinner(msg=message) |
| 1770 | |
| 1771 | self.assertEqual(self.obj.spinner_view.get_text(), message) |
| 1772 | |
| 1773 | def test_hide_spinner_before_timeout(self): |
| 1774 | """The spinner is hidden cancelling the timeout.""" |
| 1775 | - with patch.object(spinner.GObject, 'timeout_add', |
| 1776 | + with patch.object(spinner.GLib, 'timeout_add', |
| 1777 | self._fake_timeout_add): |
| 1778 | self.obj.show_spinner() |
| 1779 | |
| 1780 | - with patch.object(spinner.GObject, 'source_remove', |
| 1781 | + with patch.object(spinner.GLib, 'source_remove', |
| 1782 | self._fake_source_remove): |
| 1783 | self.obj.hide_spinner() |
| 1784 | |
| 1785 | # hide_spinner should call source_remove with the proper event id, |
| 1786 | # which in turn will set the _fake_timeout_id to None |
| 1787 | self.assertTrue(self._fake_timeout_id is None, |
| 1788 | - 'The timeout should be removed by calling GObject.source_remove') |
| 1789 | + 'The timeout should be removed by calling GLib.source_remove') |
| 1790 | # the content page is shown |
| 1791 | self.assertEqual(self.obj.get_current_page(), self.obj.CONTENT_PAGE) |
| 1792 | # the spinner is stoppped and hidden |
| 1793 | @@ -141,18 +141,18 @@ |
| 1794 | |
| 1795 | def test_hide_spinner_after_timeout(self): |
| 1796 | """The spinner is hidden without cancelling the timeout.""" |
| 1797 | - with patch.object(spinner.GObject, 'timeout_add', |
| 1798 | + with patch.object(spinner.GLib, 'timeout_add', |
| 1799 | self._fake_timeout_add): |
| 1800 | self.obj.show_spinner() |
| 1801 | |
| 1802 | self._callback() # fake the timeout being fired |
| 1803 | |
| 1804 | - with patch.object(spinner.GObject, 'source_remove', |
| 1805 | + with patch.object(spinner.GLib, 'source_remove', |
| 1806 | self._fake_source_remove): |
| 1807 | self.obj.hide_spinner() |
| 1808 | |
| 1809 | self.assertTrue(self._fake_timeout_id is not None, |
| 1810 | - 'GObject.source_remove should not be called if already fired.') |
| 1811 | + 'GLib.source_remove should not be called if already fired.') |
| 1812 | # the content page is shown |
| 1813 | self.assertEqual(self.obj.get_current_page(), self.obj.CONTENT_PAGE) |
| 1814 | # the spinner is stoppped and hidden |
| 1815 | |
| 1816 | === modified file 'tests/gtk3/test_webkit.py' |
| 1817 | --- tests/gtk3/test_webkit.py 2012-08-29 12:51:18 +0000 |
| 1818 | +++ tests/gtk3/test_webkit.py 2012-11-30 19:08:32 +0000 |
| 1819 | @@ -1,7 +1,7 @@ |
| 1820 | import unittest |
| 1821 | |
| 1822 | from gi.repository import ( |
| 1823 | - GObject, |
| 1824 | + GLib, |
| 1825 | Soup, |
| 1826 | WebKit, |
| 1827 | ) |
| 1828 | @@ -46,7 +46,7 @@ |
| 1829 | def _load_status_changed(view, status): |
| 1830 | if view.get_property("load-status") == WebKit.LoadStatus.FINISHED: |
| 1831 | loop.quit() |
| 1832 | - loop = GObject.MainLoop(GObject.main_context_default()) |
| 1833 | + loop = GLib.MainLoop(GLib.main_context_default()) |
| 1834 | webview = SoftwareCenterWebView() |
| 1835 | email = "foo@bar" |
| 1836 | webview.set_auto_insert_email(email) |
| 1837 | |
| 1838 | === modified file 'tests/gtk3/test_widgets.py' |
| 1839 | --- tests/gtk3/test_widgets.py 2012-09-24 07:01:56 +0000 |
| 1840 | +++ tests/gtk3/test_widgets.py 2012-11-30 19:08:32 +0000 |
| 1841 | @@ -1,7 +1,7 @@ |
| 1842 | import os |
| 1843 | import unittest |
| 1844 | |
| 1845 | -from gi.repository import Gtk, GdkPixbuf, GObject |
| 1846 | +from gi.repository import Gtk, GdkPixbuf, GLib |
| 1847 | from gettext import gettext as _ |
| 1848 | from mock import Mock, patch |
| 1849 | |
| 1850 | @@ -66,7 +66,7 @@ |
| 1851 | style_context = backforward.get_style_context() |
| 1852 | self.assertTrue(style_context.has_class(Gtk.STYLE_CLASS_LINKED)) |
| 1853 | self.addCleanup(win.destroy) |
| 1854 | - GObject.timeout_add(TIMEOUT, Gtk.main_quit) |
| 1855 | + GLib.timeout_add(TIMEOUT, Gtk.main_quit) |
| 1856 | Gtk.main() |
| 1857 | |
| 1858 | def test_containers(self): |
| 1859 | @@ -85,7 +85,7 @@ |
| 1860 | f = os.path.join(DATA_DIR, "test_images", "fallback.png") |
| 1861 | pix = GdkPixbuf.Pixbuf.new_from_file(f) |
| 1862 | d = SimpleShowImageDialog("test caption", pix) |
| 1863 | - GObject.timeout_add(TIMEOUT, lambda: d.destroy()) |
| 1864 | + GLib.timeout_add(TIMEOUT, lambda: d.destroy()) |
| 1865 | d.run() |
| 1866 | |
| 1867 | def test_searchentry(self): |
| 1868 | |
| 1869 | === modified file 'tests/gtk3/windows.py' |
| 1870 | --- tests/gtk3/windows.py 2012-09-26 07:36:55 +0000 |
| 1871 | +++ tests/gtk3/windows.py 2012-11-30 19:08:32 +0000 |
| 1872 | @@ -7,7 +7,7 @@ |
| 1873 | |
| 1874 | import xapian |
| 1875 | |
| 1876 | -from gi.repository import Gdk, GObject, Gtk |
| 1877 | +from gi.repository import Gdk, Gtk, GLib |
| 1878 | from mock import Mock |
| 1879 | |
| 1880 | import softwarecenter.distro |
| 1881 | @@ -177,8 +177,8 @@ |
| 1882 | do_events() |
| 1883 | |
| 1884 | if widget.stamp: |
| 1885 | - GObject.source_remove(widget.stamp) |
| 1886 | - widget.stamp = GObject.timeout_add(250, _work) |
| 1887 | + GLib.source_remove(widget.stamp) |
| 1888 | + widget.stamp = GLib.timeout_add(250, _work) |
| 1889 | |
| 1890 | |
| 1891 | def get_test_window_appview(): |
| 1892 | @@ -535,7 +535,7 @@ |
| 1893 | |
| 1894 | # useful for debugging |
| 1895 | #d.connect("key-press-event", _on_key_press) |
| 1896 | - #GObject.timeout_add_seconds(1, _generate_events, d) |
| 1897 | + #GLib.timeout_add_seconds(1, _generate_events, d) |
| 1898 | |
| 1899 | widget = purchaseview.PurchaseView() |
| 1900 | widget.config = Mock() |
| 1901 | @@ -913,7 +913,7 @@ |
| 1902 | w.register_computer("", "This computer should be first") |
| 1903 | w.select_first() |
| 1904 | |
| 1905 | - GObject.timeout_add_seconds(5, w.register_computer, "EEEEE", "NameE") |
| 1906 | + GLib.timeout_add_seconds(5, w.register_computer, "EEEEE", "NameE") |
| 1907 | |
| 1908 | def print_selected_hostid(widget, hostid, hostname): |
| 1909 | print("%s selected for %s" % (hostid, hostname)) |
| 1910 | @@ -970,7 +970,7 @@ |
| 1911 | |
| 1912 | win = get_test_window(child=spinner_notebook) |
| 1913 | spinner_notebook.show_spinner("Loading for 1s ...") |
| 1914 | - GObject.timeout_add_seconds(1, lambda: spinner_notebook.hide_spinner()) |
| 1915 | + GLib.timeout_add_seconds(1, lambda: spinner_notebook.hide_spinner()) |
| 1916 | return win |
| 1917 | |
| 1918 | |
| 1919 | @@ -1146,7 +1146,7 @@ |
| 1920 | if isinstance(result, Gtk.Dialog): |
| 1921 | response = result.run() |
| 1922 | result.hide() |
| 1923 | - GObject.timeout_add(1, Gtk.main_quit) |
| 1924 | + GLib.timeout_add(1, Gtk.main_quit) |
| 1925 | elif isinstance(result, Gtk.Window): |
| 1926 | result.connect("destroy", Gtk.main_quit) |
| 1927 | Gtk.main() |
| 1928 | |
| 1929 | === modified file 'tests/qml/test_ui_qml_helpers.py' |
| 1930 | --- tests/qml/test_ui_qml_helpers.py 2012-05-30 18:39:55 +0000 |
| 1931 | +++ tests/qml/test_ui_qml_helpers.py 2012-11-30 19:08:32 +0000 |
| 1932 | @@ -1,4 +1,4 @@ |
| 1933 | -from gi.repository import GObject |
| 1934 | +from gi.repository import GLib |
| 1935 | |
| 1936 | import random |
| 1937 | import os |
| 1938 | @@ -103,7 +103,7 @@ |
| 1939 | del self._i_am_refreshed |
| 1940 | |
| 1941 | def _p(self): |
| 1942 | - context = GObject.main_context_default() |
| 1943 | + context = GLib.main_context_default() |
| 1944 | while context.pending(): |
| 1945 | context.iteration() |
| 1946 | |
| 1947 | |
| 1948 | === modified file 'tests/test_aptd.py' |
| 1949 | --- tests/test_aptd.py 2012-10-11 08:53:54 +0000 |
| 1950 | +++ tests/test_aptd.py 2012-11-30 19:08:32 +0000 |
| 1951 | @@ -10,7 +10,7 @@ |
| 1952 | |
| 1953 | import dbus |
| 1954 | |
| 1955 | -from gi.repository import GObject |
| 1956 | +from gi.repository import GLib |
| 1957 | |
| 1958 | from tests.utils import ( |
| 1959 | setup_test_env, |
| 1960 | @@ -76,7 +76,7 @@ |
| 1961 | yield self.aptd.add_license_key( |
| 1962 | license_key, path, json_auth, pkgname) |
| 1963 | # ensure signals get delivered before quit() |
| 1964 | - GObject.timeout_add(500, lambda: aptdaemon.loop.mainloop.quit()) |
| 1965 | + GLib.timeout_add(500, lambda: aptdaemon.loop.mainloop.quit()) |
| 1966 | # run the callback |
| 1967 | run() |
| 1968 | aptdaemon.loop.mainloop.run() |
| 1969 | |
| 1970 | === modified file 'tests/test_apthistory.py' |
| 1971 | --- tests/test_apthistory.py 2012-06-12 15:37:34 +0000 |
| 1972 | +++ tests/test_apthistory.py 2012-11-30 19:08:32 +0000 |
| 1973 | @@ -5,7 +5,7 @@ |
| 1974 | import time |
| 1975 | import unittest |
| 1976 | |
| 1977 | -from gi.repository import GObject |
| 1978 | +from gi.repository import GLib |
| 1979 | from tests.utils import ( |
| 1980 | DATA_DIR, |
| 1981 | do_events, |
| 1982 | @@ -69,10 +69,10 @@ |
| 1983 | history = self._get_apt_history() |
| 1984 | self.assertEqual(len(history.transactions), 186) |
| 1985 | self._generate_big_history_file(new_history) |
| 1986 | - timer_id = GObject.timeout_add(100, self._glib_timeout) |
| 1987 | + timer_id = GLib.timeout_add(100, self._glib_timeout) |
| 1988 | with ExecutionTime("rescan %s byte file" % os.path.getsize(new_history+".gz")): |
| 1989 | history._rescan(use_cache=False) |
| 1990 | - GObject.source_remove(timer_id) |
| 1991 | + GLib.source_remove(timer_id) |
| 1992 | # verify rescan |
| 1993 | self.assertTrue(len(history.transactions) > 186) |
| 1994 | # check the timeouts |
| 1995 | |
| 1996 | === modified file 'tests/test_database.py' |
| 1997 | --- tests/test_database.py 2012-09-28 10:40:25 +0000 |
| 1998 | +++ tests/test_database.py 2012-11-30 19:08:32 +0000 |
| 1999 | @@ -7,7 +7,7 @@ |
| 2000 | import unittest |
| 2001 | import xapian |
| 2002 | |
| 2003 | -from gi.repository import GObject |
| 2004 | +from gi.repository import GLib |
| 2005 | from piston_mini_client import PistonResponseObject |
| 2006 | from mock import Mock, patch |
| 2007 | |
| 2008 | @@ -301,7 +301,7 @@ |
| 2009 | self.assertEqual(appdetails.installation_date, None) |
| 2010 | # then we need to wait until the history is loaded in the idle |
| 2011 | # handler |
| 2012 | - context = GObject.main_context_default() |
| 2013 | + context = GLib.main_context_default() |
| 2014 | while context.pending(): |
| 2015 | context.iteration() |
| 2016 | # ... and finally we test that its really there |
| 2017 | |
| 2018 | === modified file 'tests/test_dataprovider.py' |
| 2019 | --- tests/test_dataprovider.py 2012-11-22 15:24:28 +0000 |
| 2020 | +++ tests/test_dataprovider.py 2012-11-30 19:08:32 +0000 |
| 2021 | @@ -4,7 +4,7 @@ |
| 2022 | import time |
| 2023 | import unittest |
| 2024 | |
| 2025 | -from gi.repository import GObject |
| 2026 | +from gi.repository import GLib |
| 2027 | |
| 2028 | from dbus.mainloop.glib import DBusGMainLoop |
| 2029 | DBusGMainLoop(set_as_default=True) |
| 2030 | @@ -170,7 +170,7 @@ |
| 2031 | class IdleTimeoutTestCase(unittest.TestCase): |
| 2032 | |
| 2033 | def setUp(self): |
| 2034 | - self.loop = GObject.MainLoop(GObject.main_context_default()) |
| 2035 | + self.loop = GLib.MainLoop(GLib.main_context_default()) |
| 2036 | |
| 2037 | # setup bus |
| 2038 | dbus_service_name = DBUS_BUS_NAME |
| 2039 | |
| 2040 | === modified file 'tests/test_pkginfo.py' |
| 2041 | --- tests/test_pkginfo.py 2012-10-04 12:32:55 +0000 |
| 2042 | +++ tests/test_pkginfo.py 2012-11-30 19:08:32 +0000 |
| 2043 | @@ -2,7 +2,7 @@ |
| 2044 | import time |
| 2045 | import unittest |
| 2046 | |
| 2047 | -from gi.repository import GObject |
| 2048 | +from gi.repository import GLib |
| 2049 | from mock import patch |
| 2050 | |
| 2051 | from tests.utils import ( |
| 2052 | @@ -27,7 +27,7 @@ |
| 2053 | self.sccache = get_pkg_info() |
| 2054 | # cache is opened with a timeout_add() in get_pkg_info() |
| 2055 | time.sleep(0.2) |
| 2056 | - context = GObject.main_context_default() |
| 2057 | + context = GLib.main_context_default() |
| 2058 | while context.pending(): |
| 2059 | context.iteration() |
| 2060 | # compare with plain apt |
| 2061 | @@ -45,7 +45,7 @@ |
| 2062 | TEST_PKG = "casper" |
| 2063 | ADDONS_TO_INSTALL = [ "lupin-casper" ] |
| 2064 | ADDONS_TO_REMOVE = [] |
| 2065 | - loop = GObject.MainLoop(GObject.main_context_default()) |
| 2066 | + loop = GLib.MainLoop(GLib.main_context_default()) |
| 2067 | cache = get_test_pkg_info() |
| 2068 | cache.connect( |
| 2069 | "query-total-size-on-install-done", |
| 2070 | |
| 2071 | === modified file 'tests/test_purchase_backend.py' |
| 2072 | --- tests/test_purchase_backend.py 2012-09-19 08:08:17 +0000 |
| 2073 | +++ tests/test_purchase_backend.py 2012-11-30 19:08:32 +0000 |
| 2074 | @@ -1,7 +1,7 @@ |
| 2075 | import os |
| 2076 | import unittest |
| 2077 | |
| 2078 | -from gi.repository import GObject |
| 2079 | +from gi.repository import GLib |
| 2080 | from mock import Mock |
| 2081 | |
| 2082 | from tests.utils import ( |
| 2083 | @@ -35,7 +35,7 @@ |
| 2084 | backend.connect("transaction-finished", |
| 2085 | self._on_transaction_finished) |
| 2086 | # simulate repos becomes available for the public 20 s later |
| 2087 | - GObject.timeout_add_seconds(20, self._add_pw_to_commercial_repo) |
| 2088 | + GLib.timeout_add_seconds(20, self._add_pw_to_commercial_repo) |
| 2089 | # run it |
| 2090 | backend.add_repo_add_key_and_install_app(deb_line, |
| 2091 | signing_key_id, |
| 2092 | |
| 2093 | === modified file 'tests/test_recagent.py' |
| 2094 | --- tests/test_recagent.py 2012-08-30 00:08:39 +0000 |
| 2095 | +++ tests/test_recagent.py 2012-11-30 19:08:32 +0000 |
| 2096 | @@ -2,7 +2,7 @@ |
| 2097 | import unittest |
| 2098 | |
| 2099 | from mock import patch |
| 2100 | -from gi.repository import GObject |
| 2101 | +from gi.repository import GLib |
| 2102 | |
| 2103 | from tests.utils import ( |
| 2104 | get_test_db, |
| 2105 | @@ -35,7 +35,7 @@ |
| 2106 | @unittest.skipIf(os.getuid() == 0, |
| 2107 | "this is not supported running as root") |
| 2108 | def setUp(self): |
| 2109 | - self.loop = GObject.MainLoop(GObject.main_context_default()) |
| 2110 | + self.loop = GLib.MainLoop(GLib.main_context_default()) |
| 2111 | self.error = False |
| 2112 | if "SOFTWARE_CENTER_RECOMMENDER_HOST" in os.environ: |
| 2113 | orig_host = os.environ.get("SOFTWARE_CENTER_RECOMMENDER_HOST") |
| 2114 | |
| 2115 | === modified file 'tests/test_reinstall_purchased.py' |
| 2116 | --- tests/test_reinstall_purchased.py 2012-09-14 12:45:34 +0000 |
| 2117 | +++ tests/test_reinstall_purchased.py 2012-11-30 19:08:32 +0000 |
| 2118 | @@ -3,7 +3,7 @@ |
| 2119 | import unittest |
| 2120 | import xapian |
| 2121 | |
| 2122 | -from gi.repository import GObject |
| 2123 | +from gi.repository import GLib |
| 2124 | |
| 2125 | from mock import patch |
| 2126 | from piston_mini_client import PistonResponseObject |
| 2127 | @@ -366,9 +366,9 @@ |
| 2128 | |
| 2129 | def _make_fake_scagent(self, available_data, available_for_me_data): |
| 2130 | sca = ObjectWithSignals() |
| 2131 | - sca.query_available = lambda **kwargs: GObject.timeout_add( |
| 2132 | + sca.query_available = lambda **kwargs: GLib.timeout_add( |
| 2133 | 100, lambda: sca.emit('available', sca, available_data)) |
| 2134 | - sca.query_available_for_me = lambda **kwargs: GObject.timeout_add( |
| 2135 | + sca.query_available_for_me = lambda **kwargs: GLib.timeout_add( |
| 2136 | 100, lambda: sca.emit('available-for-me', |
| 2137 | sca, available_for_me_data)) |
| 2138 | return sca |
| 2139 | |
| 2140 | === modified file 'tests/test_scagent.py' |
| 2141 | --- tests/test_scagent.py 2012-08-29 12:18:09 +0000 |
| 2142 | +++ tests/test_scagent.py 2012-11-30 19:08:32 +0000 |
| 2143 | @@ -1,6 +1,6 @@ |
| 2144 | import unittest |
| 2145 | |
| 2146 | -from gi.repository import GObject |
| 2147 | +from gi.repository import GLib |
| 2148 | from mock import Mock, patch |
| 2149 | |
| 2150 | from tests.utils import ( |
| 2151 | @@ -14,7 +14,7 @@ |
| 2152 | """ tests software-center-agent """ |
| 2153 | |
| 2154 | def setUp(self): |
| 2155 | - self.loop = GObject.MainLoop(GObject.main_context_default()) |
| 2156 | + self.loop = GLib.MainLoop(GLib.main_context_default()) |
| 2157 | self.error = False |
| 2158 | |
| 2159 | def on_query_done(self, scagent, data): |
| 2160 | |
| 2161 | === modified file 'tests/utils.py' |
| 2162 | --- tests/utils.py 2012-10-05 07:24:09 +0000 |
| 2163 | +++ tests/utils.py 2012-11-30 19:08:32 +0000 |
| 2164 | @@ -29,7 +29,7 @@ |
| 2165 | |
| 2166 | import xapian |
| 2167 | |
| 2168 | -from gi.repository import GObject, Gtk |
| 2169 | +from gi.repository import GLib, Gtk |
| 2170 | from mock import Mock |
| 2171 | |
| 2172 | import softwarecenter.paths |
| 2173 | @@ -181,7 +181,7 @@ |
| 2174 | |
| 2175 | |
| 2176 | def do_events(): |
| 2177 | - main_loop = GObject.main_context_default() |
| 2178 | + main_loop = GLib.main_context_default() |
| 2179 | while main_loop.pending(): |
| 2180 | main_loop.iteration() |
| 2181 | |
| 2182 | |
| 2183 | === modified file 'utils/update-software-center' |
| 2184 | --- utils/update-software-center 2012-11-23 22:57:21 +0000 |
| 2185 | +++ utils/update-software-center 2012-11-30 19:08:32 +0000 |
| 2186 | @@ -177,6 +177,6 @@ |
| 2187 | if dbus_controller: |
| 2188 | time.sleep(APP_CATCHUP_DELAY) |
| 2189 | dbus_controller.DatabaseRebuilding(False) |
| 2190 | - context = GObject.main_context_default() |
| 2191 | + context = GLib.main_context_default() |
| 2192 | while context.pending(): |
| 2193 | context.iteration() |
| 2194 | |
| 2195 | === modified file 'utils/update-software-center-channels' |
| 2196 | --- utils/update-software-center-channels 2012-09-19 08:08:17 +0000 |
| 2197 | +++ utils/update-software-center-channels 2012-11-30 19:08:32 +0000 |
| 2198 | @@ -33,8 +33,8 @@ |
| 2199 | def trigger_axi_update_and_wait(): |
| 2200 | def _axi_finished(res): |
| 2201 | main.quit() |
| 2202 | - context = GObject.main_context_default() |
| 2203 | - main = GObject.MainLoop(context) |
| 2204 | + context = GLib.main_context_default() |
| 2205 | + main = GLib.MainLoop(context) |
| 2206 | system_bus = dbus.SystemBus() |
| 2207 | try: |
| 2208 | axi = dbus.Interface( |


Those kind of refactor-reviews are super unexciting ;) Looks good.