~mmcg069/software-center/small-catview-cleanup

« back to all changes in this revision

Viewing changes to utils/submit_review.py

  • Committer: Matthew McGowan
  • Date: 2011-03-03 20:13:57 UTC
  • mfrom: (1556.1.6 software-center)
  • Revision ID: matthew.joseph.mcgowan@gmail.com-20110303201357-u270kic1br7clmn8
misc

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
from softwarecenter.paths import *
50
50
from softwarecenter.enums import MISSING_APP_ICON
 
51
from softwarecenter.config import get_config
51
52
from softwarecenter.backend.login_sso import LoginBackendDbusSSO
52
53
from softwarecenter.db.database import Application
53
54
from softwarecenter.db.reviews import Review
60
61
 
61
62
from softwarecenter.backend.rnrclient import RatingsAndReviewsAPI, ReviewRequest
62
63
 
63
 
from softwarecenter.config import get_config
64
 
 
65
64
#import httplib2
66
65
#httplib2.debuglevel = 1
67
66
 
831
830
        # run parent handler on gwibber success, otherwise this will be dealt
832
831
        # with in _on_gwibber_fail
833
832
        if gwibber_success:
834
 
            if using_gwibber:
835
 
                self._gwibber_success_status()
 
833
            self._success_status()
836
834
            BaseApp.on_transmit_success(self, api, trans)
837
835
    
838
836
    def _gwibber_retry_some(self, api, trans, accounts):
852
850
            #FIXME: send an error string to this method instead of empty string
853
851
            self._on_gwibber_fail(api, trans, failed_accounts, "")
854
852
        else:
855
 
            self._gwibber_success_status()
 
853
            self._success_status()
856
854
            BaseApp.on_transmit_success(self, api, trans)
857
855
    
858
 
    def _gwibber_success_status(self):
859
 
        """Updates status area to show Gwibber success for 2 seconds then allows window to proceed"""
860
 
        self._change_status("success", _("Successfully posted via Gwibber"))
 
856
    def _success_status(self):
 
857
        """Updates status area to show success for 2 seconds then allows window to proceed"""
 
858
        self._change_status("success", _("Review submitted."))
861
859
        while gtk.events_pending():
862
860
            gtk.main_iteration(False)
863
861
        time.sleep(2)