def _recreate_available_activities_menu(self):
        for child in self._activities_submenu.get_children():
            self._activities_submenu.remove(child)

        for activity in self._activities.values():
            n = activity.props.name
            MenuBuilder.make_menu_item(self._activities_submenu, n,
                                       self._join_activity_cb, activity)
    def _recreate_available_activities_menu(self):
        for child in self._activities_submenu.get_children():
            self._activities_submenu.remove(child)

        for activity in self._activities.values():
            n = activity.props.name
            MenuBuilder.make_menu_item(self._activities_submenu, n,
                                       self._join_activity_cb, activity)
    def _recreate_available_buddies_menu(self):
        for child in self._buddies_submenu.get_children():
            self._buddies_submenu.remove(child)

        for buddy in self._buddies.values():
            key = buddy.get_key()
            if key is None:
                key = ''
            n = buddy.get_nick() + '|' + key[0:15]
            MenuBuilder.make_menu_item(self._buddies_submenu, n,
                                       self._buddy_actions_cb, buddy)
    def _recreate_available_buddies_menu(self):
        for child in self._buddies_submenu.get_children():
            self._buddies_submenu.remove(child)

        for buddy in self._buddies.values():
            key = buddy.get_key()
            if key is None:
                key = ''
            n = buddy.get_nick() + '|' + key[0:15]
            MenuBuilder.make_menu_item(self._buddies_submenu, n,
                                       self._buddy_actions_cb, buddy)
예제 #5
0
 def get_menu(self):
     if _('Upload') in MENUBAR:
         menu, upload_menu = MENUBAR[_('Upload')]
     else:
         upload_menu = None
         menu = gtk.Menu()
     MenuBuilder.make_menu_item(menu, _('Upload to Web'),
                                self.do_upload_to_web)
     if upload_menu is not None:
         return None  # We don't have to add it since it already exists
     else:
         upload_menu = MenuBuilder.make_sub_menu(menu, _('Upload'))
         return upload_menu
예제 #6
0
 def get_menu(self):
     if _('Upload') in MENUBAR:
         menu, upload_menu = MENUBAR[_('Upload')]
     else:
         upload_menu = None
         menu = gtk.Menu()
     MenuBuilder.make_menu_item(menu, _('Facebook wall post'),
                                self._post_menu_cb)
     if upload_menu is not None:
         return None  # We don't have to add it since it already exists
     else:
         upload_menu = MenuBuilder.make_sub_menu(menu, _('Upload'))
         return upload_menu
    def get_menu(self):
        if _('Upload') in MENUBAR:
            menu, upload_menu = MENUBAR[_('Upload')]
        else:
            upload_menu = None
            menu = Gtk.Menu()

        MenuBuilder.make_menu_item(menu, _('Facebook wall post'),
                                   self._post_menu_cb)
        if upload_menu is not None:
            return None  # We don't have to add it since it already exists
        else:
            upload_menu = MenuBuilder.make_sub_menu(menu, _('Upload'))
            return upload_menu
    def get_menu(self):
        menu = Gtk.Menu()

        MenuBuilder.make_menu_item(menu, _('Enable collaboration'),
                                   self._connect_cb)

        self._activities_submenu = Gtk.Menu()
        activities_menu = MenuBuilder.make_sub_menu(self._activities_submenu,
                                                    _('Activities'))
        menu.append(activities_menu)

        self._buddies_submenu = Gtk.Menu()
        buddies_menu = MenuBuilder.make_sub_menu(self._buddies_submenu,
                                                 _('Buddies'))
        menu.append(buddies_menu)

        MenuBuilder.make_menu_item(menu, _('Share'), self._share_cb)
        MenuBuilder.make_menu_item(menu, _('Configuration'),
                                   self._config_neighborhood_cb)

        neighborhood_menu = MenuBuilder.make_sub_menu(menu, _('Neighborhood'))

        return neighborhood_menu
    def get_menu(self):
        menu = gtk.Menu()

        MenuBuilder.make_menu_item(menu, _('Enable collaboration'),
                                   self._connect_cb)

        self._activities_submenu = gtk.Menu()
        activities_menu = MenuBuilder.make_sub_menu(self._activities_submenu,
                                                    _('Activities'))
        menu.append(activities_menu)

        self._buddies_submenu = gtk.Menu()
        buddies_menu = MenuBuilder.make_sub_menu(self._buddies_submenu,
                                                 _('Buddies'))
        menu.append(buddies_menu)

        MenuBuilder.make_menu_item(menu, _('Share'), self._share_cb)
        MenuBuilder.make_menu_item(menu, _('Configuration'),
                                   self._config_neighborhood_cb)

        neighborhood_menu = MenuBuilder.make_sub_menu(menu, _('Neighborhood'))

        return neighborhood_menu