~kelemeng/software-center/bug640969

« back to all changes in this revision

Viewing changes to softwarecenter/gwibber_helper.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt, Gary Lasker, Michael Vogt, Kiwinote, Mohamed Amine IL Idrissi
  • Date: 2010-09-09 09:11:23 UTC
  • Revision ID: james.westby@ubuntu.com-20100909091123-domo868235pb7vuk
Tags: 2.1.17
[ Gary Lasker ]
* softwarecenter/view/purchasedialog.py:
  - make popup window a modal dialog so it works with
    metacity too (LP: #625398)
* softwarecenter/view/softwarepane.py,
  softwarecenter/view/availablepane.py,
  softwarecenter/view/channelpane.py
  softwarecenter/view/installedpane.py,
  test/test_appview.py:
  - factor show/hide nonapps functionality up to the
    SoftwarePane base class, cleanup redundant code
  - enable show/hide nonapps in the "Provided by Ubuntu"
    subitem of "Installed Software" per updated spec
    (LP: #556375) 
  - add test for show/hide nonapps
* softwarecenter/backend/channel.py:
  - small fix in debug code

[ Michael Vogt ]
* merged lp:~mpt/software-center/basic-css, improves the
  style of the purchase dialog (thanks!)
* merged lp:~mmcg069/software-center/small-fixes that fixes
  minor drawing error with the paging dot drawing outside its 
  allocated area (thanks!)
* merged lp:~mpt/software-center/help-3.0 (thanks!)
* softwarecenter/gwibber_helper.py:
  - to find out if gwibber has accounts setup, poke around in
    gconf instead of doing a dbus call. The dbus call will trigger
    a gwibber start on each s-c start

[ Kiwinote ]
* softwarecenter/view/appdetailsview_gtk.py:
  - set action_bar.pkg_state as well as local state 
    (LP: #629230, LP: #632889)
    this means that the button will always take the right action
    (testcase: click 'install', cancel auth, click 'install', auth)
  - don't show warning in pkgstatusbar while transaction is in progress,
    instead show 'installing..', 'updating..', etc
    (test case: install any deb file and watch the pkgstatusbar)
* softwarecenter/view/catview.py:
  - sort categories alphabetically (LP: #633238)
* softwarecenter/view/catview_gtk.py:
  - skip the carousel transition if we are hovering above a poster, or if
    the poster is selected (ie hold down mouse, but don't release)

[ Mohamed Amine IL Idrissi ]
* Fix bug that allowed silent removal of conflicting packages
  (LP: #554319)
* Fix missing icons in the remove alerts

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 
19
19
 
20
 
import json
 
20
 
 
21
# don't use dbus, triggers a gwibber start
 
22
 
 
23
#import json
21
24
#from dbus.mainloop.glib import DBusGMainLoop
22
 
 
23
25
#DBusGMainLoop(set_as_default=True)
24
 
 
25
 
try:
26
 
    from gwibber.lib import GwibberPublic
27
 
    _gwibber_is_available = True
28
 
    Gwibber = GwibberPublic()
29
 
    Gwibber.service.refresh()
30
 
except:
31
 
    _gwibber_is_available = False
32
 
 
33
 
 
34
 
def gwibber_service_available():
35
 
    if not _gwibber_is_available:
36
 
        return False
37
 
    return len(json.loads(Gwibber.GetAccounts())) > 0
38
 
 
39
 
GWIBBER_SERVICE_AVAILABLE = gwibber_service_available()
 
26
# try:
 
27
#     from gwibber.lib import GwibberPublic
 
28
#     _gwibber_is_available = True
 
29
#     Gwibber = GwibberPublic()
 
30
#     Gwibber.service.refresh()
 
31
# except:
 
32
#     _gwibber_is_available = False
 
33
 
 
34
 
 
35
# def gwibber_service_available():
 
36
#     if not _gwibber_is_available:
 
37
#         return False
 
38
#     return len(json.loads(Gwibber.GetAccounts())) > 0
 
39
 
 
40
#GWIBBER_SERVICE_AVAILABLE = gwibber_service_available()
40
41
#print 'Gwibber Serice Available: %s' % GWIBBER_SERVICE_AVAILABLE 
41
42
 
 
43
def gwibber_has_accounts_in_gconf():
 
44
    import gconf
 
45
    client = gconf.client_get_default()
 
46
    v = client.get("/apps/gwibber/accounts/index")
 
47
    if v:
 
48
        return True
 
49
    return False
42
50
 
 
51
GWIBBER_SERVICE_AVAILABLE = gwibber_has_accounts_in_gconf()
43
52
 
44
53