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

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/widgets/recommendations.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:
17
17
# this program; if not, write to the Free Software Foundation, Inc.,
18
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
19
 
20
 
from gi.repository import Gtk, GObject
 
20
from gi.repository import Gtk, GObject, GLib
21
21
import logging
22
22
 
23
23
from gettext import gettext as _
38
38
    SOFTWARE_CENTER_NAME_KEYRING,
39
39
    RecommenderFeedbackActions,
40
40
    TransactionTypes,
41
 
    )
 
41
)
42
42
from softwarecenter.utils import utf8
43
43
from softwarecenter.netstatus import network_state_is_connected
44
44
 
54
54
        "application-activated": (GObject.SIGNAL_RUN_LAST,
55
55
                                  GObject.TYPE_NONE,
56
56
                                  (GObject.TYPE_PYOBJECT,),
57
 
                                 ),
58
 
        }
 
57
                                  ),
 
58
    }
59
59
 
60
60
    def __init__(self):
61
61
        FramedHeaderBox.__init__(self)
124
124
        "more-button-clicked": (GObject.SignalFlags.RUN_LAST,
125
125
                                None,
126
126
                                (GObject.TYPE_PYOBJECT, ),
127
 
                               ),
128
 
        }
 
127
                                ),
 
128
    }
129
129
 
130
130
    def __init__(self, db, properties_helper, subcategory):
131
131
        RecommendationsPanel.__init__(self)
133
133
        self.properties_helper = properties_helper
134
134
        self.subcategory = subcategory
135
135
        if self.subcategory:
136
 
            self.set_header_label(GObject.markup_escape_text(utf8(
 
136
            self.set_header_label(GLib.markup_escape_text(utf8(
137
137
                _("Recommended For You in %s")) % utf8(self.subcategory.name)))
138
138
        self.recommended_for_you_content = None
139
139
        if self.recommender_agent.is_opted_in():
195
195
        "recommendations-opt-in": (GObject.SIGNAL_RUN_LAST,
196
196
                                   GObject.TYPE_NONE,
197
197
                                   (),
198
 
                                  ),
 
198
                                   ),
199
199
        "recommendations-opt-out": (GObject.SIGNAL_RUN_LAST,
200
200
                                    GObject.TYPE_NONE,
201
201
                                    (),
202
 
                                   ),
203
 
        }
 
202
                                    ),
 
203
    }
204
204
 
205
205
    TURN_ON_RECOMMENDATIONS_TEXT = _(u"Turn On Recommendations")
206
206
    RECOMMENDATIONS_OPT_IN_TEXT = _(u"To make recommendations, "