def __init__(self): Enum.__init__(self) self.MainWindowStyle = CSSMakeUpGenerator.CSS() GtkWindow = self.MainWindowStyle.addElementSelector('GtkWindow') GtkWindow.addElement('margin', '30px') GtkWindow.addElement('padding', '30px') GtkLabel = self.MainWindowStyle.addElementSelector('GtkLabel') GtkLabel.addElement('padding', '3px') GtkLabelIDTitle = self.MainWindowStyle.addElementSelector('GtkLabel#title') GtkLabelIDTitle.addElement('font-size', '30') GtkLabelIDTitle.addElement('padding', '20px') GtkLabelIDTitle.addElement('padding-right', '30px') GtkLabelIDTitle.addElement('padding-left', '30px') GtkLabelIDPre = self.MainWindowStyle.addElementSelector('GtkLabel#pre') GtkLabelIDPre.addElement('font-size', '15') GtkLabelIDPre.addElement('color', '#00abab') GtkLabelIDHeadline = self.MainWindowStyle.addElementSelector('GtkLabel#headline') GtkLabelIDHeadline.addElement('padding-top', '10px') GtkLabelIDHeadline.addElement('font-size', '20') GtkLabelIDHeadline.addElement('border-bottom', '3px solid #000') InfoBox = self.MainWindowStyle.addElementSelector('#infobox') InfoBox.addElement('background-color', '#66bb55') InfoBox.addElement('color', '#434343') InfoBox.addElement('padding', '10px') InfoBox.addElement('margin', '10px') Toolbar_Black = self.MainWindowStyle.addElementSelector('GtkToolbar#black') Toolbar_Black.addElement('background-color', '#333333')
def __init__(self, Parent=None, ProjectDatabase=None, Projectname=""): Enum.__init__(self) ProjectDatabase.getProject(Projectname) self.FilesDatabase = ProjectDatabase.getFilesDatabase() self.ID = None self.Parent = Parent
def __init__(self): Enum.__init__(self) self.read_languages_file() for translate_object in languages.translates.TranslatesObjects(): named_object = translate_object.split("_", 1)[1] self.__dict__[translate_object] = self.get_translations_for(named_object)
def __init__(self): SETTINGS = SettingsDatabase.Settings() Enum.__init__(self) self.Critical = Enum(BG=Color(SETTINGS.get("TreeColor_BG_Critical")), FG=Color(SETTINGS.get("TreeColor_FG_Critical"))) self.Important = Enum(BG=Color(SETTINGS.get("TreeColor_BG_Important")), FG=Color(SETTINGS.get("TreeColor_FG_Important"))) self.Revise = Enum(BG=Color(SETTINGS.get("TreeColor_BG_Revise")), FG=Color(SETTINGS.get("TreeColor_FG_Revise"))) self.InOrder = Enum(BG=Color(SETTINGS.get("TreeColor_BG_InOrder")), FG=Color(SETTINGS.get("TreeColor_FG_InOrder"))) self.Default = Enum(BG=Color(SETTINGS.get("TreeColor_BG_Default")), FG=Color(SETTINGS.get("TreeColor_FG_Default")))
class Tab(Gtk.Notebook, TabWidgets): def __init__(self, ClassRegister): Gtk.Notebook.__init__(self) TabWidgets.__init__(self) self.Tabs = Enum() self.TempTabs = Enum() self.NamedTabs = Enum() self.Scrollabe = False self.ClassRegister = ClassRegister self.connect("switch-page", self.tabChanged) def addTab(self, TabWidget, TabLabel, Pos=None): CurrentPage = self.get_n_pages() if Pos: CurrentPage = Pos self.Tabs[CurrentPage] = Enum(TabWidget=TabWidget, TabLabel=TabLabel) TabLabel.connect('close-clicked', self.removeTabByWidget, TabWidget) if hasattr(TabLabel, "get_text"): self.NamedTabs[TabLabel.get_text()] = CurrentPage self.insert_page(TabWidget, TabLabel, CurrentPage) return True def removeTabByWidget(self, TabLabel=None, TabWidget=None): self.remove_page(self.page_num(TabWidget)) def hasTab(self, name): return self.NamedTabs.has_key(name) def tabChanged(self, notebook, current_page, index): if self.ClassRegister.CreatingTabsIsFinish: if hasattr(self.Tabs[index].TabWidget, "preload"): if not self.Tabs[index].TabWidget.IsLoad: self.Tabs[index].TabWidget.preload() if not index: return try: title = self.Tabs[index].TabWidget.title except AttributeError: title = '' if title: self.ClassRegister.Window.set_title("{0} - {1}".format(self.ClassRegister.Windowname, title)) def setScrollabe(self, state=None): if state: self.set_scrollable(state) else: self.set_scrollable(not self.Scrollabe) self.Scrollabe = not self.Scrollabe
def __init__(self, ClassRegister): Gtk.Notebook.__init__(self) TabWidgets.__init__(self) self.Tabs = Enum() self.TempTabs = Enum() self.NamedTabs = Enum() self.Scrollabe = False self.ClassRegister = ClassRegister self.connect("switch-page", self.tabChanged)
def __init__(self): Enum.__init__(self)
def __getitem__(self, key): try: return Enum.__getitem__(self, key) except KeyError: return self.Default
def __init__(self, name, runobject): super(SubAction, self).__init__() Enum.__init__(self) self.name = name self.runobject = runobject
def __init__(self, name=None): super(Action, self).__init__() Enum.__init__(self) self.name = name self.subactions = Enum()