Пример #1
0
 def __init_topbar(self, topbar):
     self.__toolbar_area = gtk.HBox()
     topbar.pack_start(self.__toolbar_area, expand=False)
     self.__toolbar = toolbar.Toolbar()
     self.__toolbar_area.pack_start(self.__toolbar, expand=False)
     self.__toolbar.connect('clicked', self.cb_toolbar_clicked)
     for name, icon, tooltip in self.BUTTONS:
         self.__toolbar.add_button(name, icon, tooltip)
     if self.HAS_CONTROL_BOX:
         if self.HAS_DETACH_BUTTON:
             detbut = paned.sizer('menu')
             self.__toolbar_area.pack_start(detbut, expand=False)
             detbut.connect('clicked',
                         self.cb_controlbar_detach_clicked)
     self.__long_title_label = gtk.Label(self.__long_title)
     if self.HAS_TITLE:
         topbar.pack_start(self.__long_title_label)
         self.__long_title_label.set_alignment(0, 0.5)
         self.__long_title_label.set_selectable(True)
     if self.HAS_CONTROL_BOX:
         if self.HAS_CLOSE_BUTTON:
             self.__toolbar_area.pack_start(gtk.Alignment())
             closebut = paned.sizer('close')
             self.__toolbar_area.pack_start(closebut, expand=False)
             closebut.connect('clicked',
                         self.cb_controlbar_close_clicked)
Пример #2
0
 def __init_topbar(self, topbar):
     self.__toolbar_area = gtk.HBox()
     self.__toolbar_area.show()
     
     topbar.pack_start(self.__toolbar_area, expand=False)
     # TODO: check if toolbar.Toolbar needs work too
     self.__toolbar = toolbar.Toolbar()
     self.__toolbar.show()
     
     self.__toolbar_area.pack_start(self.__toolbar, expand=False)
     self.__toolbar.connect('clicked', self.cb_toolbar_clicked)
     for name, icon, tooltip in self.BUTTONS:
         self.__toolbar.add_button(name, icon, tooltip)
     if self.HAS_CONTROL_BOX:
         if self.HAS_DETACH_BUTTON:
             detbut = paned.sizer('menu', tooltip='Detach this view')
             #self.__toolbar_area.pack_start(detbut, expand=False)
             detbut.connect('clicked',
                         self.cb_controlbar_detach_clicked)
     self.__long_title_label = gtk.Label(self.__long_title)
     self.__long_title_label.show()
     
     if self.HAS_TITLE:
         self.__toolbar_area.pack_start(self.__long_title_label, padding=6)
         self.__long_title_label.set_alignment(0.0, 0.5)
         self.__long_title_label.set_selectable(True)
     if self.HAS_CONTROL_BOX:
         if self.HAS_CLOSE_BUTTON:
             align = gtk.Alignment()
             align.show()
             self.__toolbar_area.pack_start(align)
             
             closebut = paned.sizer('close', tooltip='Close this view')
             closebut.show()
             
             self.__toolbar_area.pack_start(closebut, expand=False)
             closebut.connect('clicked',
                         self.cb_controlbar_close_clicked)
             self.__close_button = closebut
Пример #3
0
 def __init_topbar(self, topbar):
     self.__toolbar_area = gtk.HBox()
     self.__toolbar_area.show()
     
     topbar.pack_start(self.__toolbar_area, expand=False)
     # TODO: check if toolbar.Toolbar needs work too
     self.__toolbar = toolbar.Toolbar()
     self.__toolbar.show()
     
     self.__toolbar_area.pack_start(self.__toolbar, expand=False)
     self.__toolbar.connect('clicked', self.cb_toolbar_clicked)
     for name, icon, tooltip in self.BUTTONS:
         self.__toolbar.add_button(name, icon, tooltip)
     if self.HAS_CONTROL_BOX:
         if self.HAS_DETACH_BUTTON:
             detbut = paned.sizer('menu')
             self.__toolbar_area.pack_start(detbut, expand=False)
             detbut.connect('clicked',
                         self.cb_controlbar_detach_clicked)
     self.__long_title_label = gtk.Label(self.__long_title)
     self.__long_title_label.show()
     
     if self.HAS_TITLE:
         self.__toolbar_area.pack_start(self.__long_title_label, padding=6)
         self.__long_title_label.set_alignment(0.0, 0.5)
         self.__long_title_label.set_selectable(True)
     if self.HAS_CONTROL_BOX:
         if self.HAS_CLOSE_BUTTON:
             align = gtk.Alignment()
             align.show()
             self.__toolbar_area.pack_start(align)
             
             closebut = paned.sizer('close')
             closebut.show()
             
             self.__toolbar_area.pack_start(closebut, expand=False)
             closebut.connect('clicked',
                         self.cb_controlbar_close_clicked)