~ubuntu-branches/ubuntu/raring/software-center/raring-proposed

« back to all changes in this revision

Viewing changes to softwarecenter/db/dataprovider.py

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2012-12-06 17:30:50 UTC
  • Revision ID: package-import@ubuntu.com-20121206173050-n7mxi5fzlsvtdh9l
Tags: 5.5.2
* lp:~mvo/software-center/fix-pygobject-deprecation-warnings:
  - fix deprecation warninings with the latest python-gi
* lp:~mvo/software-center/minor-logging-fixes:
  - drop some LOG.info() messages to LOG.debug() to spam the user
    less
* lp:~mvo/software-center/trivial-close-ui-tweak:
  - hide the main window immediately when closing down
* lp:~mvo/software-center/5.4-fix-save-person-to-config:
  - This branch ensures that the "username" is saved everytime
    that the ubuntu sso whoami call is done
* lp:~mvo/software-center/use-dpkg-builddeps:
  - use dpkg-checkbuilddeps to find test-dependencies
* lp:~mvo/software-center/update-sc-cmdline-flexibility:
  - update-software-center-agent: 
    + add --target-db-path commandline
  - update-software-center: 
    + add --app-install-desktop-dir and --target-db-path commandline
* lp:~mvo/software-center/raring-pep8:
  - fixes for new pep8

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from dbus.mainloop.glib import DBusGMainLoop
25
25
DBusGMainLoop(set_as_default=True)
26
26
 
27
 
from gi.repository import GObject
 
27
from gi.repository import GLib
28
28
 
29
29
from .categories import (
30
30
    CategoriesParser,
31
31
    get_category_by_name,
32
 
    )
 
32
)
33
33
from .database import StoreDatabase
34
34
from .application import Application
35
35
from softwarecenter.backend.reviews import get_review_loader
70
70
        dbus.service.Object.__init__(self, bus_name, object_path)
71
71
        self.bus_name = bus_name
72
72
        if main_loop is None:
73
 
            main_loop = GObject.MainLoop(GObject.main_context_default())
 
73
            main_loop = GLib.MainLoop(GLib.main_context_default())
74
74
        self.main_loop = main_loop
75
75
        # the database
76
76
        self.db = StoreDatabase()
85
85
        run_software_center_agent(self.db)
86
86
        # setup inactivity timer
87
87
        self._update_activity_timestamp()
88
 
        self._idle_timeout = GObject.timeout_add_seconds(
 
88
        self._idle_timeout = GLib.timeout_add_seconds(
89
89
            self.IDLE_CHECK_INTERVAL, self._check_inactivity)
90
90
 
91
91
    def stop(self):
159
159
                 self.db.get_pkgname(doc),
160
160
                 self.db.get_iconname(doc),
161
161
                 self.db.get_desktopfile(doc),
162
 
                ))
 
162
                 ))
163
163
        return result
164
164
 
165
165
 
167
167
    if bus is None:
168
168
        bus = dbus.SessionBus()
169
169
 
170
 
    main_context = GObject.main_context_default()
171
 
    main_loop = GObject.MainLoop(main_context)
 
170
    main_context = GLib.main_context_default()
 
171
    main_loop = GLib.MainLoop(main_context)
172
172
 
173
173
    bus_name = dbus.service.BusName(DBUS_BUS_NAME, bus)
174
174
    data_provider = SoftwareCenterDataProvider(bus_name, main_loop=main_loop)