示例#1
0
 def _update_recommended_for_you_content(self):
     if (self.recommended_for_you_panel and
             self.recommended_for_you_panel.get_parent()):
         # disconnect listeners
         self.recommended_for_you_panel.disconnect_by_func(
                 self.on_application_activated)
         self.recommended_for_you_panel.disconnect_by_func(
                 self.on_category_clicked)
         # and remove the panel
         self.right_column.remove(self.recommended_for_you_panel)
     self.recommended_for_you_panel = RecommendationsPanelLobby(
             self.db,
             self.properties_helper)
     self.recommended_for_you_panel.connect("application-activated",
                                            self.on_application_activated)
     self.recommended_for_you_panel.connect(
             'more-button-clicked',
             self.on_category_clicked)
     # until bug #1048912 with the testcase in
     #    tests/gtk3/test_lp1048912.py
     # is fixed this workaround for the drawing code in FramedHeaderBox
     # is needed
     self.recommended_for_you_panel.connect(
         "size-allocate", self._on_recommended_for_you_panel_size_allocate)
     self.right_column.pack_start(self.recommended_for_you_panel,
                                 True, True, 0)
示例#2
0
 def _update_recommended_for_you_content(self):
     if (self.recommended_for_you_panel
             and self.recommended_for_you_panel.get_parent()):
         self.bottom_hbox.remove(self.recommended_for_you_panel)
     self.recommended_for_you_panel = RecommendationsPanelLobby(self)
     self.bottom_hbox.pack_start(self.recommended_for_you_panel, True, True,
                                 0)
示例#3
0
    def _append_recommended_for_you(self):
        # TODO: This space will initially contain an opt-in screen, and this
        #       will update to the tile view of recommended apps when ready
        #       see https://wiki.ubuntu.com/SoftwareCenter#Home_screen
        self.bottom_hbox = Gtk.HBox(spacing=StockEms.SMALL)
        bottom_hbox_alignment = Gtk.Alignment()
        bottom_hbox_alignment.set_padding(0, 0, StockEms.MEDIUM - 2,
                                          StockEms.MEDIUM - 2)
        bottom_hbox_alignment.add(self.bottom_hbox)
        self.vbox.pack_start(bottom_hbox_alignment, False, False, 0)

        # TODO: During development, place the "Recommended For You" panel
        #       at the bottom, but swap this with the Top Rated panel once
        #       the recommended for you pieces are done and deployed
        #       see https://wiki.ubuntu.com/SoftwareCenter#Home_screen
        self.recommended_for_you_panel = RecommendationsPanelLobby(self)
        self.bottom_hbox.pack_start(self.recommended_for_you_panel, True, True,
                                    0)