def __init__(self):
     HIGMainWindow.__init__(self)
     self.vbox = HIGVBox()
     self.main_hbox = gtk.HBox()
     self.set_default_size(500, 30)
     self.set_border_width(0)
     self.connect('delete-event', gtk.main_quit)
Beispiel #2
0
 def __init__(self):
     HIGMainWindow.__init__(self)
     self.vbox = HIGVBox()
     self.main_hbox = gtk.HBox()
     self.set_default_size(500, 30)
     self.set_border_width(0)
     self.connect('delete-event', gtk.main_quit)
Beispiel #3
0
    def __init__(self, nodes):
        """
        """
        HIGMainWindow.__init__(self)
        self.set_title('Hosts Viewer')
        self.set_default_size(DIMENSION[0], DIMENSION[1])

        self.__nodes = nodes
        self.__view = None

        self.__create_widgets()
Beispiel #4
0
    def __init__(self, nodes):
        """
        """
        HIGMainWindow.__init__(self)
        self.set_title('Hosts Viewer')
        self.set_default_size(DIMENSION[0], DIMENSION[1])

        self.__nodes = nodes
        self.__view = None

        self.__create_widgets()
Beispiel #5
0
 def __init__(self):
     HIGMainWindow.__init__(self)
     self._old_umit_status = "Not Set"
     self.vbox = gtk.VBox()
     self.service_table = gtk.Table(5, 2)
     self.notebook = gtk.Notebook()
     try:
         self.service_manager = WindowsService("UMIT")
         self.umit_status = self.service_manager.status()
     except Exception, ex:
         self.service_manager = None
         self.umit_status = str(ex)
    def __init__(self, daddy=None):
        HIGMainWindow.__init__(self)

        self.daddy = daddy

        self.tip_timer = -1
        self.main_accel_group = gtk.AccelGroup()
        self.add_accel_group(self.main_accel_group)

        self.viewernb = HIGNotebook()

        self.invsearch = SearchDB(umitdb)
        self.invdb = ConnectInventoryDB(umitdb)
        self.invtree = InventoryTree(self)
        self.invnb = HIGNotebook()
        self.invnb_close_btn = startup_options()["tabs_close_btn"]
        self.invnbpages_titles = []
        self.invnbpages_objects = []

        # timeline tab
        self.timeline = TLHolder()

        # statusbars
        self.std_statusbar = gtk.Statusbar()
        self.std_sb = self.std_statusbar.get_context_id("stdbar")
        self._write_statusbar("                              ")

        self.tip_statusbar = gtk.Statusbar()
        self.tip_statusbar.set_has_resize_grip(False)
        self.tip_sb = self.tip_statusbar.get_context_id("tipbar")
        self.write_tips = startup_options()["tips"]

        # timer for checking updates
        self.db_stat = os.stat(umitdb).st_mtime
        self.schema_stat = os.stat(Path.sched_schemas).st_mtime
        self.timer_updater = gobject.timeout_add(
            4200,  # nice number
            self.__check_for_updates)

        # gui scheduler controller
        self.schedctrl = SchedControl(self)

        self.inventories = self.invtree.fill_tree()
        self._create_ui_manager()
        self.__set_props()
        self.__do_layout()

        self.connect('inventory-activated', self._inventory_activated)
        self.connect('delete-event', self._exit_ni)
        self.connect('realize', self.on_realize)
Beispiel #7
0
    def __init__(self, daddy=None):
        HIGMainWindow.__init__(self)

        self.daddy = daddy

        self.tip_timer = -1
        self.main_accel_group = gtk.AccelGroup()
        self.add_accel_group(self.main_accel_group)

        self.viewernb = HIGNotebook()

        self.invsearch = SearchDB(umitdb)
        self.invdb = ConnectInventoryDB(umitdb)
        self.invtree = InventoryTree(self)
        self.invnb = HIGNotebook()
        self.invnb_close_btn = startup_options()["tabs_close_btn"]
        self.invnbpages_titles = [ ]
        self.invnbpages_objects = [ ]

        # timeline tab
        self.timeline = TLHolder()

        # statusbars
        self.std_statusbar = gtk.Statusbar()
        self.std_sb = self.std_statusbar.get_context_id("stdbar")
        self._write_statusbar("                              ")

        self.tip_statusbar = gtk.Statusbar()
        self.tip_statusbar.set_has_resize_grip(False)
        self.tip_sb = self.tip_statusbar.get_context_id("tipbar")
        self.write_tips = startup_options()["tips"]

        # timer for checking updates
        self.db_stat = os.stat(umitdb).st_mtime
        self.schema_stat = os.stat(Path.sched_schemas).st_mtime
        self.timer_updater = gobject.timeout_add(4200, # nice number
            self.__check_for_updates)

        # gui scheduler controller
        self.schedctrl = SchedControl(self)


        self.inventories = self.invtree.fill_tree()
        self._create_ui_manager()
        self.__set_props()
        self.__do_layout()

        self.connect('inventory-activated', self._inventory_activated)
        self.connect('delete-event', self._exit_ni)
        self.connect('realize', self.on_realize)
    def __init__(self, daddy=None):
        HIGMainWindow.__init__(self)
        self._proprieties = None
        self.profile_box = None
        self.wizard_box = None
        self._current_edit_mode = None
        self._tooldesign = None
        self.profile_box_b = None
        self.wizard_box_b = None
        self.edit_mode_opt = None
        self._show_bar = True
        self.set_title(_('Interface Editor'))
        self.set_size_request(800, 400)
        self.set_position(gtk.WIN_POS_CENTER)
        #self.maximize()
        self.list_options_box = OptionList()
        self.notebook = HIGNotebook()
        self._proprieties = Proprieties()
        self.create_profile_edit()
        self.create_wizard_edit()
        self.obj = self.profile_box
        #Create Widgets
        self.__create_widgets()
        #Packing - Group of widgets
        self.__pack_widgets()
        self.__option_display()
        self.edit_mode_opt = "Options"

        self.connect("delete_event", self._destroy)

        self.opt_display.set_profile(self.profile_box)
        self.opt_display.set_wizard(self.wizard_box)
        self.profile_box.notebook.connect_after('need-save',
                                                self._update_menu_s)
        self.wizard_box.notebook.connect_after('need-save',
                                               self._update_menu_s)
        self.profile_box.notebook.connect_after('changed', self._update_menu)
        self.wizard_box.notebook.connect_after('changed', self._update_menu)
        self.opt_display.connect_after('need-save', self._update_menu_s)

        self.daddy = daddy
Beispiel #9
0
    def __init__(self, daddy=None):
        HIGMainWindow.__init__(self)
        self._proprieties = None
        self.profile_box = None
        self.wizard_box = None
        self._current_edit_mode = None
        self._tooldesign = None
        self.profile_box_b = None
        self.wizard_box_b = None
        self.edit_mode_opt = None
        self._show_bar = True
        self.set_title(_("Interface Editor"))
        self.set_size_request(800, 400)
        self.set_position(gtk.WIN_POS_CENTER)
        # self.maximize()
        self.list_options_box = OptionList()
        self.notebook = HIGNotebook()
        self._proprieties = Proprieties()
        self.create_profile_edit()
        self.create_wizard_edit()
        self.obj = self.profile_box
        # Create Widgets
        self.__create_widgets()
        # Packing - Group of widgets
        self.__pack_widgets()
        self.__option_display()
        self.edit_mode_opt = "Options"

        self.connect("delete_event", self._destroy)

        self.opt_display.set_profile(self.profile_box)
        self.opt_display.set_wizard(self.wizard_box)
        self.profile_box.notebook.connect_after("need-save", self._update_menu_s)
        self.wizard_box.notebook.connect_after("need-save", self._update_menu_s)
        self.profile_box.notebook.connect_after("changed", self._update_menu)
        self.wizard_box.notebook.connect_after("changed", self._update_menu)
        self.opt_display.connect_after("need-save", self._update_menu_s)

        self.daddy = daddy
    def __init__(self):
        HIGMainWindow.__init__(self)
        self.set_title("Preferences")
        self.set_position(gtk.WIN_POS_CENTER_ALWAYS)
        self.resize(950,500)
        self.set_border_width(10)
        self.__pixmap_d = Path.pixmaps_dir
        self.__list = {
            'General settings':'general.svg',
            'Fonts':'fonts.svg',
            'Expose/Interface':'expose.svg',
            'Network':'network.svg'
            }
        self.__list_bw = {
            'General settings':'general-bw.svg',
            'Fonts':'fonts-bw.svg',
            'Expose/Interface':'expose-bw.svg',
            'Network':'network-bw.svg'
            }
        # FIXME
        ### Replace two list above
        self.__dic_tabs = {
            'Expose/Interface':['expose.svg','expose-bw.svg', ExposeGeneral],
            #'Network':['network.svg', 'network-bw.svg', NetworkTab],
            '.General settings':['general.svg','general-bw.svg',\
                                 GeneralSettings],
            'Interface Details':['fonts.svg','fonts-bw.svg', InterfaceDetails],
            }

        self.__create()
        self.__pack()
        self.__frame = None





        #self.connect("destroy", lambda w: gtk.main_quit())
        self.connect("delete_event", lambda w, e: self.close())
        self._create_frame("General Settings", GeneralSettings)



        # Add button Close and Help Button
        self.__closeb = HIGButton(stock=gtk.STOCK_CANCEL)
        self.__helpb = HIGButton(stock=gtk.STOCK_HELP)
        self.__applyb = HIGButton(stock = gtk.STOCK_APPLY)
        self.__okb = HIGButton(stock = gtk.STOCK_OK)
        self.__buttons_box = HIGHBox()

        self.__alignb_c = gtk.Alignment(0,0,0,0)
        self.__alignb_h = gtk.Alignment(0,0,0,0)
        self.__alignb_y = gtk.Alignment(0,0,0,0)
        self.__alignb_k = gtk.Alignment(0,0,0,0)

        self.__alignb_c.add(self.__closeb)
        self.__alignb_h.add(self.__helpb)
        self.__alignb_y.add(self.__applyb)
        self.__alignb_k.add(self.__okb)
        self.__alignb_y.set_padding(0,0, 1,1)
        self.__alignb_c.set_padding(0,0, 1,1)
        self.__alignb_h.set_padding(0,0, 1,1)
        self.__alignb_k.set_padding(0,0, 1,1)

        self.__buttons_box.pack_end(self.__alignb_k, False, False)
        self.__buttons_box.pack_end(self.__alignb_y, False, False)
        self.__buttons_box.pack_end(self.__alignb_c, False, False)

        self.__buttons_box.pack_start(self.__alignb_h, False, False)




        self.__box.pack_end(self.__buttons_box, False,  True)

        self.__closeb.connect("clicked", lambda e: self.close())
        self.__applyb.connect("clicked", self.save_changes)
        self.__okb.connect("clicked", self._save_close)

        self.connect("key-press-event", self.cb_keypress)
        self.show_all()
Beispiel #11
0
    def __init__(self):
        HIGMainWindow.__init__(self)
        self.set_title("Preferences")
        self.set_position(gtk.WIN_POS_CENTER_ALWAYS)
        self.resize(950, 500)
        self.set_border_width(10)
        self.__pixmap_d = Path.pixmaps_dir
        self.__list = {
            'General settings': 'general.svg',
            'Fonts': 'fonts.svg',
            'Expose/Interface': 'expose.svg',
            'Network': 'network.svg'
        }
        self.__list_bw = {
            'General settings': 'general-bw.svg',
            'Fonts': 'fonts-bw.svg',
            'Expose/Interface': 'expose-bw.svg',
            'Network': 'network-bw.svg'
        }
        # FIXME
        ### Replace two list above
        self.__dic_tabs = {
            'Expose/Interface':['expose.svg','expose-bw.svg', ExposeGeneral],
            #'Network':['network.svg', 'network-bw.svg', NetworkTab],
            '.General settings':['general.svg','general-bw.svg',\
                                 GeneralSettings],
            'Interface Details':['fonts.svg','fonts-bw.svg', InterfaceDetails],
            }

        self.__create()
        self.__pack()
        self.__frame = None

        #self.connect("destroy", lambda w: gtk.main_quit())
        self.connect("delete_event", lambda w, e: self.close())
        self._create_frame("General Settings", GeneralSettings)

        # Add button Close and Help Button
        self.__closeb = HIGButton(stock=gtk.STOCK_CANCEL)
        self.__helpb = HIGButton(stock=gtk.STOCK_HELP)
        self.__applyb = HIGButton(stock=gtk.STOCK_APPLY)
        self.__okb = HIGButton(stock=gtk.STOCK_OK)
        self.__buttons_box = HIGHBox()

        self.__alignb_c = gtk.Alignment(0, 0, 0, 0)
        self.__alignb_h = gtk.Alignment(0, 0, 0, 0)
        self.__alignb_y = gtk.Alignment(0, 0, 0, 0)
        self.__alignb_k = gtk.Alignment(0, 0, 0, 0)

        self.__alignb_c.add(self.__closeb)
        self.__alignb_h.add(self.__helpb)
        self.__alignb_y.add(self.__applyb)
        self.__alignb_k.add(self.__okb)
        self.__alignb_y.set_padding(0, 0, 1, 1)
        self.__alignb_c.set_padding(0, 0, 1, 1)
        self.__alignb_h.set_padding(0, 0, 1, 1)
        self.__alignb_k.set_padding(0, 0, 1, 1)

        self.__buttons_box.pack_end(self.__alignb_k, False, False)
        self.__buttons_box.pack_end(self.__alignb_y, False, False)
        self.__buttons_box.pack_end(self.__alignb_c, False, False)

        self.__buttons_box.pack_start(self.__alignb_h, False, False)

        self.__box.pack_end(self.__buttons_box, False, True)

        self.__closeb.connect("clicked", lambda e: self.close())
        self.__applyb.connect("clicked", self.save_changes)
        self.__okb.connect("clicked", self._save_close)

        self.connect("key-press-event", self.cb_keypress)
        self.show_all()