def load_config(self): """"Just a proxy for all the configuration stuff. """ self.settings.general.triggerOnChangedValue(self.settings.general, 'use-trayicon') self.settings.general.triggerOnChangedValue(self.settings.general, 'prompt-on-quit') self.settings.general.triggerOnChangedValue(self.settings.general, 'prompt-on-close-tab') self.settings.general.triggerOnChangedValue(self.settings.general, 'window-tabbar') self.settings.general.triggerOnChangedValue(self.settings.general, 'mouse-display') self.settings.general.triggerOnChangedValue(self.settings.general, 'display-n') self.settings.general.triggerOnChangedValue(self.settings.general, 'window-ontop') if not FullscreenManager(self.settings, self.window).is_fullscreen(): self.settings.general.triggerOnChangedValue( self.settings.general, 'window-height') self.settings.general.triggerOnChangedValue( self.settings.general, 'window-width') self.settings.general.triggerOnChangedValue(self.settings.general, 'use-scrollbar') self.settings.general.triggerOnChangedValue(self.settings.general, 'history-size') self.settings.general.triggerOnChangedValue(self.settings.general, 'infinite-history') self.settings.general.triggerOnChangedValue(self.settings.general, 'use-vte-titles') self.settings.general.triggerOnChangedValue(self.settings.general, 'set-window-title') self.settings.general.triggerOnChangedValue(self.settings.general, 'abbreviate-tab-names') self.settings.general.triggerOnChangedValue(self.settings.general, 'max-tab-name-length') self.settings.general.triggerOnChangedValue(self.settings.general, 'quick-open-enable') self.settings.general.triggerOnChangedValue(self.settings.general, 'quick-open-command-line') self.settings.style.triggerOnChangedValue(self.settings.style, 'cursor-shape') self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'style') self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'palette') self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'palette-name') self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'allow-bold') self.settings.styleBackground.triggerOnChangedValue( self.settings.styleBackground, 'transparency') self.settings.general.triggerOnChangedValue(self.settings.general, 'use-default-font') self.settings.general.triggerOnChangedValue(self.settings.general, 'compat-backspace') self.settings.general.triggerOnChangedValue(self.settings.general, 'compat-delete')
def on_toggle_fullscreen(self, *args): FullscreenManager(self.settings, self.window).toggle()
def unfullscreen(self): FullscreenManager(self.settings, self.window).unfullscreen()
def accel_toggle_fullscreen(self, *args): FullscreenManager(self.settings, self.window).toggle() return True
def show(self): """Shows the main window and grabs the focus on it. """ self.hidden = False # setting window in all desktops window_rect = RectCalculator.set_final_window_rect( self.settings, self.window) self.get_widget('window-root').stick() # add tab must be called before window.show to avoid a # blank screen before adding the tab. if not self.notebook.has_page(): self.add_tab() self.window.set_keep_below(False) self.window.show_all() # this is needed because self.window.show_all() results in showing every # thing which includes the scrollbar too self.settings.general.triggerOnChangedValue(self.settings.general, "use-scrollbar") # move the window even when in fullscreen-mode log.debug("Moving window to: %r", window_rect) self.window.move(window_rect.x, window_rect.y) # this works around an issue in fluxbox if not FullscreenManager(self.settings, self.window).is_fullscreen(): self.settings.general.triggerOnChangedValue( self.settings.general, 'window-height') time = get_server_time(self.window) # TODO PORT this # When minized, the window manager seems to refuse to resume # log.debug("self.window: %s. Dir=%s", type(self.window), dir(self.window)) # is_iconified = self.is_iconified() # if is_iconified: # log.debug("Is iconified. Ubuntu Trick => " # "removing skip_taskbar_hint and skip_pager_hint " # "so deiconify can work!") # self.get_widget('window-root').set_skip_taskbar_hint(False) # self.get_widget('window-root').set_skip_pager_hint(False) # self.get_widget('window-root').set_urgency_hint(False) # log.debug("get_skip_taskbar_hint: {}".format( # self.get_widget('window-root').get_skip_taskbar_hint())) # log.debug("get_skip_pager_hint: {}".format( # self.get_widget('window-root').get_skip_pager_hint())) # log.debug("get_urgency_hint: {}".format( # self.get_widget('window-root').get_urgency_hint())) # glib.timeout_add_seconds(1, lambda: self.timeout_restore(time)) # log.debug("order to present and deiconify") self.window.present() self.window.deiconify() self.window.show() self.window.get_window().focus(time) self.window.set_type_hint(Gdk.WindowTypeHint.DOCK) self.window.set_type_hint(Gdk.WindowTypeHint.NORMAL) # log.debug("Restoring skip_taskbar_hint and skip_pager_hint") # if is_iconified: # self.get_widget('window-root').set_skip_taskbar_hint(False) # self.get_widget('window-root').set_skip_pager_hint(False) # self.get_widget('window-root').set_urgency_hint(False) # This is here because vte color configuration works only after the # widget is shown. self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'color') self.settings.styleBackground.triggerOnChangedValue( self.settings.styleBackground, 'color') log.debug("Current window position: %r", self.window.get_position()) self.execute_hook('show')