Exemple #1
0
    def create_tab(self, tab_name, section_name, tab, number):
        box = BoxEditable(tab_name, self.options, self._listoption, self)
        box.set_profile_core(self._profilecore)
        label = NotebookLabel(tab_name)
        label.set_name(tab_name)
        #eventbox = gtk.EventBox()

        #eventbox.add(label)
        label.set_flags( label.flags() |  gtk.CAN_FOCUS) 
        label.connect('key-press-event', self.on_key_press)
        label.connect('button-press-event', self.on_button_press)  


        label.connect('drag_data_received', self.label_drag_data_received)
        label.drag_dest_set(gtk.DEST_DEFAULT_ALL, target[:-1],
                            gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE)
        #eventbox.show_all()
        label.show_all()
        self.sections_widgets[label] = number
        self.sections_widgets_list.append(label)
        box._fill_table()
        self.append_page(box, label)
    def create_tab(self, tab_name, section_name, tab, number):
        box = BoxEditable(tab_name, self.options, self._listoption, self)
        box.set_profile_core(self._profilecore)
        label = NotebookLabel(tab_name)
        label.set_name(tab_name)
        #eventbox = gtk.EventBox()

        #eventbox.add(label)
        label.set_flags(label.flags() | gtk.CAN_FOCUS)
        label.connect('key-press-event', self.on_key_press)
        label.connect('button-press-event', self.on_button_press)

        label.connect('drag_data_received', self.label_drag_data_received)
        label.drag_dest_set(gtk.DEST_DEFAULT_ALL, target[:-1],
                            gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE)
        #eventbox.show_all()
        label.show_all()
        self.sections_widgets[label] = number
        self.sections_widgets_list.append(label)
        box._fill_table()
        self.append_page(box, label)
Exemple #3
0
    def create_label(self, name):
        label = NotebookLabel(name)
        label.set_name(name)
        label.set_flags( label.flags() |  gtk.CAN_FOCUS) 
        label.connect('key-press-event', self.on_key_press)
        label.connect('button-press-event', self.on_button_press)  


        label.connect('drag_data_received', self.label_drag_data_received)
        label.drag_dest_set(gtk.DEST_DEFAULT_ALL, target[:-1],
                            gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE)

        return label
    def create_label(self, name):
        label = NotebookLabel(name)
        label.set_name(name)
        label.set_flags(label.flags() | gtk.CAN_FOCUS)
        label.connect('key-press-event', self.on_key_press)
        label.connect('button-press-event', self.on_button_press)

        label.connect('drag_data_received', self.label_drag_data_received)
        label.drag_dest_set(gtk.DEST_DEFAULT_ALL, target[:-1],
                            gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE)

        return label