Beispiel #1
0
    def _setup_context_menu(self):
        menu = ContextMenu()        
 
        item = ContextMenuItem('Editar', stock=gtk.STOCK_EDIT)
        item.connect('activate', self._on_context_edit__activate)
        item.connect('can-disable', self._on_context_edit__can_disable)
        menu.append(item)

        self.fileTree.set_context_menu(menu)
        menu.show_all()
Beispiel #2
0
    def _create_context_menu(self):
        menu = ContextMenu()

        item = ContextMenuItem(gtk.STOCK_ADD)
        item.connect('activate', self._on_context_add__activate)
        menu.append(item)

        item = ContextMenuItem(gtk.STOCK_REMOVE)
        item.connect('activate', self._on_context_remove__activate)
        item.connect('can-disable', self._on_context_remove__can_disable)
        menu.append(item)

        self.sale_items.set_context_menu(menu)
        menu.show_all()
Beispiel #3
0
    def _create_context_menu(self):
        menu = ContextMenu()

        item = ContextMenuItem(gtk.STOCK_ADD)
        item.connect('activate', self._on_context_add__activate)
        menu.append(item)

        item = ContextMenuItem(gtk.STOCK_REMOVE)
        item.connect('activate', self._on_context_remove__activate)
        item.connect('can-disable', self._on_context_remove__can_disable)
        menu.append(item)

        self.sale_items.set_context_menu(menu)
        menu.show_all()
Beispiel #4
0
    def _create_menu(self):
        menu = ContextMenu()

        item = ContextMenuItem('_Foo', gtk.STOCK_COPY)
        item.connect('activate', self._on_foo_activate)
        item.connect('can-disable', self._on_foo_can_disable)
        menu.append(item)

        item = ContextMenuItem('Bar')
        item.connect('activate', self._on_bar_activate)
        menu.append(item)

        menu.append_separator()

        item = ContextMenuItem(gtk.STOCK_PASTE)
        item.connect('activate', self._on_paste_activate)
        menu.append(item)

        self.listcontainer.list.set_context_menu(menu)
        menu.show_all()
Beispiel #5
0
    def _create_menu(self):
        menu = ContextMenu()

        item = ContextMenuItem('_Foo', Gtk.STOCK_COPY)
        item.connect('activate', self._on_foo_activate)
        item.connect('can-disable', self._on_foo_can_disable)
        menu.append(item)

        item = ContextMenuItem('Bar')
        item.connect('activate', self._on_bar_activate)
        menu.append(item)

        menu.append_separator()

        item = ContextMenuItem(Gtk.STOCK_PASTE)
        item.connect('activate', self._on_paste_activate)
        menu.append(item)

        self.listcontainer.list.set_context_menu(menu)
        menu.show_all()