~mmcg069/software-center/reviews-and-netstatus

« back to all changes in this revision

Viewing changes to softwarecenter/view/appdetailsview.py

  • Committer: Matthew McGowan
  • Date: 2011-01-01 09:24:23 UTC
  • mfrom: (1354.2.40 software-center)
  • Revision ID: matthew.joseph.mcgowan@gmail.com-20110101092423-7xjj9ra1adjdx1h8
merge w trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from softwarecenter.enums import *
28
28
from softwarecenter.utils import get_current_arch, get_default_language
29
29
 
30
 
from purchasedialog import PurchaseDialog
31
 
 
32
30
class AppDetailsViewBase(object):
33
31
 
34
32
    __gsignals__ = {
37
35
                                        (gobject.TYPE_PYOBJECT, 
38
36
                                         gobject.TYPE_PYOBJECT, 
39
37
                                         gobject.TYPE_PYOBJECT, 
40
 
                                         str),
41
 
                                       ),
 
38
                                         str,)),
 
39
         "purchase-requested" : (gobject.SIGNAL_RUN_LAST,
 
40
                                 gobject.TYPE_NONE,
 
41
                                 (gobject.TYPE_PYOBJECT,
 
42
                                  str,)),
42
43
    }
43
44
 
44
45
    def __init__(self, db, distro, icons, cache, datadir):
98
99
                    'archive_id' : self.appdetails.ppaname, 
99
100
                    'arch' : get_current_arch() ,
100
101
                    }))
101
 
        appdetails = self.app.get_details(self.db)
102
 
        self.purchase_dialog = PurchaseDialog(url=url, 
103
 
                                              app=self.app,
104
 
                                              iconname=appdetails.icon)
105
 
        res = self.purchase_dialog.run()
106
 
        self.purchase_dialog.destroy()
107
 
        del self.purchase_dialog
108
 
        # re-init view if user canceled, otherwise the transactions 
109
 
        # will finish it after some time
110
 
        if res != gtk.RESPONSE_OK:
111
 
            self.show_app(self.app)
 
102
        
 
103
        self.emit("purchase-requested", self.app, url)
112
104
 
113
105
    def reinstall_purchased(self):
114
106
        """ reinstall a purchased app """