~paolorotolo/software-center/fix-for-963309

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/app.py

  • Committer: Danny Tamez
  • Date: 2012-01-19 16:17:34 UTC
  • mfrom: (2682 trunk)
  • mto: This revision was merged to the branch mainline in revision 2683.
  • Revision ID: danny.tamez@canonical.com-20120119161734-8viwvv83ph9d4kfx
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import atexit
24
24
import collections
25
 
import locale
26
25
import dbus
27
26
import dbus.service
28
27
from dbus.mainloop.glib import DBusGMainLoop
48
47
# db imports
49
48
from softwarecenter.db.application import Application
50
49
from softwarecenter.db import DebFileApplication
 
50
from softwarecenter.i18n import init_locale
51
51
 
52
52
# misc imports
53
53
from softwarecenter.plugin import PluginManager
187
187
        gettext.bindtextdomain("software-center", "/usr/share/locale")
188
188
        gettext.textdomain("software-center")
189
189
 
190
 
        try:
191
 
            locale.setlocale(locale.LC_ALL, "")
192
 
            # we need this for bug #846038, with en_NG setlocale() is fine
193
 
            # but the next getlocale() will crash (fun!)
194
 
            locale.getlocale()
195
 
        except:
196
 
            LOG.exception("setlocale failed, resetting to C")
197
 
            locale.setlocale(locale.LC_ALL, "C")
198
 
 
 
190
        init_locale()
199
191
 
200
192
        if "SOFTWARE_CENTER_DEBUG_TABS" in os.environ:
201
193
            self.notebook_view.set_show_tabs(True)
591
583
        # appmanager needs to know about the oauth token for the reinstall
592
584
        # previous purchases add_license_key call
593
585
        self.app_manager.oauth_token = oauth_result
594
 
        # consumer key is the openid identifier
595
 
        self.scagent.query_available_for_me(oauth_result["token"],
596
 
                                            oauth_result["consumer_key"])
 
586
        self.scagent.query_available_for_me()
597
587
 
598
588
    def _on_style_updated(self, widget, init_css_callback, *args):
599
589
        init_css_callback(widget, *args)