~ubuntu-branches/ubuntu/lucid/software-center/lucid

« back to all changes in this revision

Viewing changes to softwarecenter/view/appview.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt, Gary Lasker, Michael Vogt
  • Date: 2010-03-11 16:58:00 UTC
  • Revision ID: james.westby@ubuntu.com-20100311165800-t1x7nerqb5dxjyeq
Tags: 1.1.17
[ Gary Lasker ]
* softwarecenter/view/navhistory.py:
  - unescape the nav button label text (LP: #531689)
  - fix up and just use a single __str__ method (LP: #531780)
* softwarecenter/view/availablepane.py,
  softwarecenter/view/channelpane.py:
  - fix intermittent AttributeError when a previous
    model does not exist when refreshing the apps view
    (LP: #531820)

[ Michael Vogt ]
* merged lp:~mpt/software-center/bug-499893 (thanks)
* merged lp:~mpt/software-center/categorization (thanks)
* merged lp:~michaelforrest/software-center/ui-changes (thanks)
* data/icons/scalable/apps/partner.svg:
  - add partner icon (LP: #531694)
* softwarecenter/view/catview.py:
  - do not show header in subsection view
* softwarecenter/view/availablepane.py:
  - fix race in initial part creation (LP: #531798)
* debian/control:
  - add gnome-app-install transitional package (closes: #572941)

Show diffs side-by-side

added added

removed removed

Lines of Context:
518
518
        self.show_ratings = show_ratings
519
519
        # get rating icons
520
520
        icons = gtk.icon_theme_get_default()
521
 
        self.star_pixbuf = icons.load_icon("sc-emblem-favorite", 16, 0)
522
 
        self.star_not_pixbuf = icons.load_icon("sc-emblem-favorite-not", 16, 0)
 
521
        self.star_pixbuf = icons.load_icon("sc-emblem-favorite", 12, 0)
 
522
        self.star_not_pixbuf = icons.load_icon("sc-emblem-favorite-not", 12, 0)
523
523
        # specify the func that calc's distance from margin, based on text dir
524
524
        self._calc_x = self._calc_x_ltr
525
525
        return
597
597
        return
598
598
 
599
599
    def draw_rating_and_reviews(self, window, widget, cell_area, layout, xpad, ypad, w, h, max_star_width, flags):
600
 
        dst_y = cell_area.y+ypad
 
600
        dst_y = cell_area.y+ypad + ( 0 if self.reviews > 0 else 10) # unnamed constant because I can't see a place to put these 
 
601
        
601
602
        # draw star rating
602
603
        self.draw_rating(window, cell_area, dst_y, max_star_width, xpad, self.rating)
603
604
 
 
605
        if self.reviews == 0: return
604
606
        # draw number of reviews
605
607
        nr_reviews_str = gettext.ngettext("%s review",
606
608
                                          "%s reviews",
607
609
                                          self.reviews) % self.reviews
 
610
        
608
611
        layout.set_markup("<small>%s</small>" % nr_reviews_str)
609
612
        lw = self._get_layout_pixel_width(layout)
610
613
        dst_x = self._calc_x(cell_area, lw, cell_area.width-xpad-max_star_width+(max_star_width-lw)/2)