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.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 _load_settings(self): """ Load current settings values. """ options = startup_options() start_tlkind = self.tl_kind_opts[options['kind']] start_tlmode = self.tl_mode_opts[options['mode']] store = self.tl_kind.get_model() for indx, item in enumerate(store): if item[0] == start_tlkind: self.tl_kind.set_active(indx) break store = self.tl_mode.get_model() for indx, item in enumerate(store): if item[0] == start_tlmode: self.tl_mode.set_active(indx) break self.tabs_cbtn.set_active(options['tabs_close_btn']) self.sbar_tips.set_active(options['tips'])
def _load_settings(self): """ Load current settings values. """ options = startup_options() start_tlkind = self.tl_kind_opts[options['kind']] start_tlmode = self.tl_mode_opts[options['mode']] store = self.tl_kind.get_model() for indx, item in enumerate(store): if item[0] == start_tlkind: self.tl_kind.set_active(indx) break store = self.tl_mode.get_model() for indx, item in enumerate(store): if item[0] == start_tlmode: self.tl_mode.set_active(indx) break self.tabs_cbtn.set_active(options['tabs_close_btn']) self.sbar_tips.set_active(options['tips'])