diff --git a/ChangeLog b/ChangeLog index 48731d87..24899dd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +terminator 0.97: + * Allow font dimming in inactive terminals + terminator 0.96: * Unity support for opening new windows (Lucian Adrian Grijincu) * Fix searching with infinite scrollback (Julien Thewys #755077) diff --git a/doc/terminator_config.5 b/doc/terminator_config.5 index 115b5499..baa85513 100644 --- a/doc/terminator_config.5 +++ b/doc/terminator_config.5 @@ -102,6 +102,11 @@ Default value: \fB'#000000'\fR Sets the colour of the background of the titlebar of any terminal that will \fBnot\fR receive input from the active terminal. Default value: \fB'#C0BEBF'\fR .TP +.B inactive_color_offset +Controls how much to reduce the colour values of fonts in terminals that do not have focus. It is a simple multiplication +factor. A font colour that was RGB(200,200,200) with an inactive_color_offset of 0.5 would set inactive terminals to +RGB(100,100,100). +.TP .B enabled_plugins A list of plugins which should be loaded by default. All other plugin classes will be ignored. The default value includes two plugins related to Launchpad, which are enabled by default to provide continuity with earlier releases where these were the diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 47b6973e..53307641 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -98,6 +98,7 @@ DEFAULTS = { 'title_receive_bg_color' : '#0076c9', 'title_inactive_fg_color' : '#000000', 'title_inactive_bg_color' : '#c0bebf', + 'inactive_color_offset': 0.8, 'enabled_plugins' : ['LaunchpadBugURLHandler', 'LaunchpadCodeURLHandler', 'APTURLHandler'], diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index e1b4b40a..4ed38cc0 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -1,81 +1,23 @@ - + - - + - + - GNOME Default + Automatic - Click to focus + Control-H - Follow mouse pointer - - - - - - - - - - - Normal + ASCII DEL - Hidden - - - Maximised - - - Fullscreen - - - - - - - - - - - Top - - - Bottom - - - Left - - - Right - - - Hidden - - - - - - - - - - - Block - - - Underline - - - I-Beam + Escape sequence @@ -128,40 +70,20 @@ - + - + - On the left side + Block - On the right side + Underline - Disabled - - - - - - - - - - - Automatic - - - Control-H - - - ASCII DEL - - - Escape sequence + I-Beam @@ -185,6 +107,31 @@ + + + + + + + + + + + + + + + + GNOME Default + + + Click to focus + + + Follow mouse pointer + + + @@ -197,14 +144,6 @@ - - - - - - - - @@ -213,17 +152,6 @@ - - - - - - - - default - - - @@ -266,23 +194,176 @@ - + - - - + + + + + 10000000 + 1 + 10 + + + + + + + + + On the left side + + + On the right side + + + Disabled + + + + + + + + + + + Top + + + Bottom + + + Left + + + Right + + + Hidden + + + + + + + + + + + Normal + + + Hidden + + + Maximised + + + Fullscreen + + + + + -1 + 5 + -1 + 1 + 2 + + + 100 + 1 + 10 + 10 + + + 100 + 1 + 10 + 10 + + + 100 + 1 + 10 + 10 + + + 100 + 1 + 10 + 10 + + + 100 + 1 + 10 + 10 + + + 1 + 0.10000000000000001 + 0.20000000000000001 + + + 1 + 0.10000000000000001 + 0.20000000000000001 + + + + + + + + + default + + + + False 5 Terminator Preferences normal - False - + True + False 2 + + + True + False + end + + + gtk-close + True + True + True + False + True + + + + False + False + 0 + + + + + False + True + end + 0 + + True @@ -290,20 +371,24 @@ True + False 6 True + False 18 True - 12 + False + 13 2 6 True + False Window geometry hints @@ -318,9 +403,10 @@ True True False + False True True - + 1 @@ -334,6 +420,7 @@ True + False Window state @@ -346,9 +433,10 @@ True + False WindowStateListStore 0 - + @@ -368,6 +456,7 @@ True + False Window borders @@ -382,9 +471,10 @@ True True False + False True True - + 1 @@ -398,6 +488,7 @@ True + False Tab position @@ -410,9 +501,10 @@ True + False TabPositionListStore 0 - + @@ -432,6 +524,7 @@ True + False Mouse focus @@ -442,9 +535,10 @@ True + False FocusListStore 0 - + @@ -462,6 +556,7 @@ True + False Terminal separator size @@ -478,7 +573,7 @@ adjustment1 0 left - + 1 @@ -492,6 +587,7 @@ True + False Hide from taskbar @@ -506,9 +602,10 @@ True True False + False True True - + 1 @@ -522,6 +619,7 @@ True + False Always on top @@ -534,6 +632,7 @@ True + False Hide on lose focus @@ -548,9 +647,10 @@ True True False + False True True - + 1 @@ -566,9 +666,10 @@ True True False + False True True - + 1 @@ -582,6 +683,7 @@ True + False Show on all workspaces @@ -596,9 +698,10 @@ True True False + False True True - + 1 @@ -612,6 +715,7 @@ True + False DBus server @@ -624,9 +728,10 @@ True True False + False True True - + 1 @@ -640,6 +745,7 @@ True + False 0.50999999046325684 Hide size from title @@ -655,9 +761,10 @@ True True False + False True True - + 1 @@ -668,18 +775,50 @@ GTK_EXPAND + + + True + False + Unfocused terminal font brightness + + + 12 + 13 + + + + + True + True + adjustment7 + True + 1 + left + + + + 1 + 2 + 12 + 13 + + + True + True 0 True + False 6 True + False 0 <b>Titlebar</b> True @@ -693,10 +832,12 @@ True + False 12 True + False 3 4 6 @@ -706,8 +847,9 @@ True True True + False #000000000000 - + 1 @@ -723,8 +865,9 @@ True True True + False #000000000000 - + 2 @@ -740,8 +883,9 @@ True True True + False #000000000000 - + 1 @@ -757,8 +901,9 @@ True True True + False #000000000000 - + 2 @@ -774,8 +919,9 @@ True True True + False #000000000000 - + 3 @@ -791,8 +937,9 @@ True True True + False #000000000000 - + 3 @@ -806,6 +953,7 @@ True + False Receiving terminal @@ -818,6 +966,7 @@ True + False Focused terminal @@ -830,6 +979,7 @@ True + False Inactive terminal @@ -842,6 +992,7 @@ True + False Font colour @@ -854,6 +1005,7 @@ True + False Background @@ -871,11 +1023,14 @@ False + True 1 + True + True 1 @@ -886,6 +1041,7 @@ True + False Global @@ -895,25 +1051,30 @@ True + False True + False True True - ProfilesListStore adjustment2 adjustment3 + ProfilesListStore False 0 + + + Profile True - + 1 @@ -924,12 +1085,15 @@ + True + True 0 True + False @@ -939,8 +1103,9 @@ True True True + False True - + False @@ -954,8 +1119,9 @@ True True True + False True - + False @@ -966,11 +1132,14 @@ False + True 1 + True + True 0 @@ -982,6 +1151,7 @@ True + False 12 6 @@ -990,9 +1160,10 @@ True True False + False True True - + False @@ -1003,14 +1174,17 @@ True + False 12 True + False 12 True + False 0 _Font: True @@ -1027,10 +1201,11 @@ True True True + False False Choose A Terminal Font True - + False @@ -1053,9 +1228,10 @@ True True False + False True True - + False @@ -1069,10 +1245,13 @@ True True False + False True - + + True + True 3 @@ -1082,8 +1261,9 @@ True True False + False True - + False @@ -1097,20 +1277,25 @@ True True False + False True - + + True + True 5 True + False 12 True + False 0 Select-by-_word characters: True @@ -1127,26 +1312,31 @@ True True - - + + + True + True 1 False + True 6 True + False 6 True + False 0 <b>Cursor</b> True @@ -1160,16 +1350,20 @@ True + False 12 True + False True + False True + False 2 2 12 @@ -1177,9 +1371,10 @@ True + False CursorShapeListStore 0 - + @@ -1197,6 +1392,7 @@ True + False Cursor colour: @@ -1209,8 +1405,9 @@ True True True + False #000000000000 - + 1 @@ -1224,6 +1421,7 @@ True + False Cursor _shape: True cursor_shape_combobox @@ -1232,6 +1430,7 @@ False + True 0 @@ -1241,6 +1440,7 @@ False + True 0 @@ -1250,8 +1450,9 @@ True True False + False True - + False @@ -1264,6 +1465,7 @@ False + True 1 @@ -1277,10 +1479,12 @@ True + False 6 True + False 0 <b>Terminal bell</b> True @@ -1294,20 +1498,25 @@ True + False 12 True + False Titlebar icon True True False + False True - + + True + True 0 @@ -1317,9 +1526,10 @@ True True False + False True True - + False @@ -1333,9 +1543,10 @@ True True False + False True True - + False @@ -1349,9 +1560,10 @@ True True False + False True True - + False @@ -1380,6 +1592,7 @@ True + False General True center @@ -1391,6 +1604,7 @@ True + False 6 6 6 @@ -1398,10 +1612,12 @@ True + False 6 True + False 0 <b>Command</b> True @@ -1415,13 +1631,16 @@ True + False 12 True + False True + False 6 @@ -1429,9 +1648,10 @@ True True False + False True True - + False @@ -1445,9 +1665,10 @@ True True False + False True True - + False @@ -1461,9 +1682,10 @@ True True False + False True True - + False @@ -1474,14 +1696,17 @@ True + False 12 True + False 12 True + False 0 Custom co_mmand: True @@ -1498,10 +1723,12 @@ True True - - + + + True + True 1 @@ -1510,16 +1737,19 @@ False + True 3 True + False 12 True + False 0 When command _exits: True @@ -1535,9 +1765,10 @@ True + False ChildExitedListStore 0 - + @@ -1546,17 +1777,22 @@ + True + True 1 + True + True 4 False + True 0 @@ -1565,6 +1801,7 @@ False + True 1 @@ -1578,6 +1815,7 @@ True + False Command True center @@ -1590,15 +1828,18 @@ True + False 12 18 True + False 6 True + False 0 <b>Foreground and Background</b> True @@ -1612,10 +1853,12 @@ True + False 12 True + False 4 2 12 @@ -1623,6 +1866,7 @@ True + False 0 _Text color: True @@ -1642,9 +1886,10 @@ True True False + False True True - + 2 @@ -1655,6 +1900,7 @@ True + False 0 _Background color: True @@ -1671,6 +1917,7 @@ True + False 0 Built-in sche_mes: True @@ -1687,14 +1934,16 @@ True + False True True True + False Choose Terminal Text Color #000000000000 - + False @@ -1718,14 +1967,16 @@ True + False True True True + False Choose Terminal Background Color #000000000000 - + False @@ -1749,9 +2000,10 @@ True + False ColourSchemeListStore 2 - + @@ -1772,22 +2024,26 @@ False + True 1 False + True 0 True + False 6 True + False 0 <b>Palette</b> True @@ -1801,10 +2057,12 @@ True + False 12 True + False 3 2 12 @@ -1812,6 +2070,7 @@ True + False 0 Built-in _schemes: True @@ -1828,6 +2087,7 @@ True + False 2 8 6 @@ -1837,8 +2097,9 @@ True True True + False #000000000000 - + @@ -1850,8 +2111,9 @@ True True True + False #000000000000 - + 1 @@ -1865,8 +2127,9 @@ True True True + False #000000000000 - + 2 @@ -1880,8 +2143,9 @@ True True True + False #000000000000 - + 3 @@ -1895,8 +2159,9 @@ True True True + False #000000000000 - + 4 @@ -1910,8 +2175,9 @@ True True True + False #000000000000 - + 5 @@ -1925,8 +2191,9 @@ True True True + False #000000000000 - + 7 @@ -1940,8 +2207,9 @@ True True True + False #000000000000 - + 1 @@ -1955,8 +2223,9 @@ True True True + False #000000000000 - + 1 @@ -1972,8 +2241,9 @@ True True True + False #000000000000 - + 3 @@ -1989,8 +2259,9 @@ True True True + False #000000000000 - + 2 @@ -2006,8 +2277,9 @@ True True True + False #000000000000 - + 4 @@ -2023,8 +2295,9 @@ True True True + False #000000000000 - + 7 @@ -2040,8 +2313,9 @@ True True True + False #000000000000 - + 5 @@ -2057,8 +2331,9 @@ True True True + False #000000000000 - + 6 @@ -2072,8 +2347,9 @@ True True True + False #000000000000 - + 6 @@ -2097,6 +2373,7 @@ True + False 0 <small><i><b>Note:</b> Terminal applications have these colors available to them.</i></small> True @@ -2111,9 +2388,10 @@ True + False PaletteListStore 0 - + @@ -2132,6 +2410,7 @@ True + False 0 0 Color p_alette: @@ -2151,12 +2430,14 @@ False + True 1 False + True 1 @@ -2168,6 +2449,7 @@ True + False Colors True center @@ -2180,6 +2462,7 @@ True + False 12 6 @@ -2188,10 +2471,11 @@ True True False + False True True True - + False @@ -2202,6 +2486,7 @@ True + False 6 @@ -2209,10 +2494,11 @@ True True False + False True True solid_radiobutton - + False @@ -2223,18 +2509,22 @@ True + False 12 True + False 6 True + False 12 True + False 0 Image _file: True @@ -2253,14 +2543,18 @@ True False Select Background Image - + + True + True 1 + True + True 0 @@ -2270,9 +2564,10 @@ True True False + False True True - + False @@ -2285,12 +2580,14 @@ False + True 1 False + True 1 @@ -2300,10 +2597,11 @@ True True False + False True True solid_radiobutton - + False @@ -2314,10 +2612,12 @@ True + False 6 True + False 0 S_hade transparent or image background: True @@ -2333,9 +2633,11 @@ True + False True + False 0 6 <small><i>None</i></small> @@ -2351,18 +2653,20 @@ True True - delayed background_darkness_scale bottom - + + True + True 1 True + False 1 6 <small><i>Maximum</i></small> @@ -2385,6 +2689,7 @@ False + True 3 @@ -2396,6 +2701,7 @@ True + False 0 Background True @@ -2408,6 +2714,7 @@ True + False 12 6 2 @@ -2419,9 +2726,10 @@ True True False + False True True - + 2 @@ -2436,9 +2744,10 @@ True True False + False True True - + 2 @@ -2453,9 +2762,10 @@ True True False + False True True - + 2 @@ -2467,12 +2777,14 @@ True + False True + False ScrollbarPositionListStore 0 - + @@ -2482,6 +2794,7 @@ False + True 0 @@ -2495,25 +2808,28 @@ True + False 6 True True - + ScrollbackAdjustmend 1 True - + False + True 0 True + False 0 lines True @@ -2539,6 +2855,7 @@ True + False 0 _Scrollbar is: True @@ -2553,6 +2870,7 @@ True + False 0 Scroll_back: True @@ -2572,8 +2890,9 @@ True True False + False True - + 1 @@ -2595,6 +2914,7 @@ True + False Scrolling True @@ -2606,11 +2926,13 @@ True + False 12 12 True + False 0 7.4505801528346183e-09 <small><i><b>Note:</b> These options may cause some applications to behave incorrectly. They are only here to allow you to work around certain applications and operating systems that expect different terminal behavior.</i></small> @@ -2619,12 +2941,14 @@ False + True 0 True + False 2 3 12 @@ -2632,6 +2956,7 @@ True + False 0 _Delete key generates: True @@ -2648,6 +2973,7 @@ True + False 0 _Backspace key generates: True @@ -2662,9 +2988,10 @@ True + False BackspaceKeyListStore 1 - + @@ -2682,9 +3009,10 @@ True + False DeleteKeyListStore 2 - + @@ -2704,12 +3032,14 @@ False + True 1 True + False start @@ -2717,8 +3047,9 @@ True True True + False True - + False @@ -2736,10 +3067,12 @@ True + False 6 True + False 0 <b>Encoding</b> True @@ -2753,16 +3086,19 @@ True + False 12 True + False 2 12 6 True + False 0 Default: True @@ -2777,8 +3113,9 @@ True + False EncodingListStore - + @@ -2797,12 +3134,14 @@ False + True 1 False + True 3 @@ -2814,6 +3153,7 @@ True + False Compatibility True center @@ -2825,6 +3165,8 @@ + True + True 1 @@ -2836,6 +3178,7 @@ True + False Profiles @@ -2846,24 +3189,29 @@ True + False True + False True True - LayoutListStore adjustment5 adjustment6 + LayoutListStore 0 + + + Layout True - + 1 @@ -2874,12 +3222,15 @@ + True + True 0 True + False @@ -2889,8 +3240,9 @@ True True True + False True - + False @@ -2904,8 +3256,9 @@ True True True + False True - + False @@ -2916,18 +3269,21 @@ False + True 1 False + True 0 True + False 6 6 6 @@ -2937,7 +3293,6 @@ True True never - automatic True @@ -2945,6 +3300,9 @@ LayoutTreeStore False 0 + + + Type @@ -2973,19 +3331,24 @@ + True + True 1 True + False True + False 6 True + False 2 2 12 @@ -2993,6 +3356,7 @@ True + False Profile @@ -3003,6 +3367,7 @@ True + False Custom command @@ -3016,8 +3381,8 @@ True True - - + + 1 @@ -3031,9 +3396,10 @@ True + False layoutprofilelist 0 - + @@ -3063,6 +3429,7 @@ False + True 2 @@ -3074,6 +3441,7 @@ True + False Layouts @@ -3087,7 +3455,6 @@ True adjustment4 never - automatic True @@ -3095,6 +3462,9 @@ KeybindingsListStore False 0 + + + Name @@ -3124,8 +3494,8 @@ True other - - + + 2 @@ -3144,6 +3514,7 @@ True + False Keybindings @@ -3154,21 +3525,25 @@ True + False True True - PluginListStore adjustment2 adjustment3 + PluginListStore 0 + + + Plugin True - + 1 @@ -3184,15 +3559,20 @@ + True + True 0 True + False This plugin has no configuration options + True + True 1 @@ -3204,6 +3584,7 @@ True + False Plugins @@ -3212,34 +3593,10 @@ - - 1 - - - - - True - end - - - gtk-close - True - True - True - True - - - - False - False - 0 - - - False - end - 0 + True + 1 @@ -3248,51 +3605,4 @@ okbutton - - -1 - -1 - 5 - 1 - 2 - - - 100 - 1 - 10 - 10 - - - 100 - 1 - 10 - 10 - - - 1 - 0.10000000000000001 - 0.20000000000000001 - - - 10000000 - 1 - 10 - - - 100 - 1 - 10 - 10 - - - 100 - 1 - 10 - 10 - - - 100 - 1 - 10 - 10 - diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index 3d401e3b..e1e48510 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -457,6 +457,9 @@ class PrefsEditor: 'title_inactive_fg_color', 'title_inactive_bg_color']: widget = guiget(bit) widget.set_color(gtk.gdk.Color(self.config[bit])) + # Inactive terminal shading + widget = guiget('inactive_color_offset') + widget.set_value(float(self.config['inactive_color_offset'])) ## Background tab # Radio values @@ -881,6 +884,11 @@ class PrefsEditor: self.config['title_transmit_fg_color'] = color2hex(widget) self.config.save() + def on_inactive_color_offset_change_value(self, widget, scroll, value): + """Inactive color offset setting changed""" + self.config['inactive_color_offset'] = round(value, 2) + self.config.save() + def on_handlesize_change_value(self, widget, scroll, value): """Handle size changed""" value = int(value) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index b6365e98..f94daca9 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -56,6 +56,7 @@ class Terminal(gtk.VBox): (gobject.TYPE_BOOLEAN, gobject.TYPE_OBJECT)), 'tab-top-new': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()), 'focus-in': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()), + 'focus-out': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()), 'zoom': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()), 'maximise': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()), 'unzoom': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()), @@ -95,6 +96,12 @@ class Terminal(gtk.VBox): custom_font_size = None layout_command = None + fgcolor_active = None + fgcolor_inactive = None + bgcolor = None + palette_active = None + palette_inactive = None + composite_support = None cnxids = None @@ -346,6 +353,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) self.emit('title-change', self.get_window_title())) self.vte.connect('grab-focus', self.on_vte_focus) self.vte.connect('focus-in-event', self.on_vte_focus_in) + self.vte.connect('focus-out-event', self.on_vte_focus_out) self.vte.connect('size-allocate', self.deferred_on_vte_size_allocate) self.vte.add_events(gtk.gdk.ENTER_NOTIFY_MASK) @@ -602,28 +610,34 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) pass self.vte.set_allow_bold(self.config['allow_bold']) if self.config['use_theme_colors']: - fgcolor = self.vte.get_style().text[gtk.STATE_NORMAL] - bgcolor = self.vte.get_style().base[gtk.STATE_NORMAL] + self.fgcolor_active = self.vte.get_style().text[gtk.STATE_NORMAL] + self.bgcolor = self.vte.get_style().base[gtk.STATE_NORMAL] else: - fgcolor = gtk.gdk.color_parse(self.config['foreground_color']) - bgcolor = gtk.gdk.color_parse(self.config['background_color']) + self.fgcolor_active = gtk.gdk.color_parse(self.config['foreground_color']) + self.bgcolor = gtk.gdk.color_parse(self.config['background_color']) + + factor = self.config['inactive_color_offset'] + self.fgcolor_inactive = self.fgcolor_active.copy() + + for bit in ['red', 'green', 'blue']: + setattr(self.fgcolor_inactive, bit, + getattr(self.fgcolor_inactive, bit) * factor) colors = self.config['palette'].split(':') - palette = [] + self.palette_active = [] + self.palette_inactive = [] for color in colors: if color: - palette.append(gtk.gdk.color_parse(color)) - self.vte.set_colors(fgcolor, bgcolor, palette) - if self.config['cursor_color'] == self.config['foreground_color']: - try: - self.vte.set_color_cursor(None) - except TypeError: - # FIXME: I think this is only necessary because of - # https://bugzilla.gnome.org/show_bug.cgi?id=614910 - pass - elif self.config['cursor_color'] != '': - self.vte.set_color_cursor(gtk.gdk.color_parse( - self.config['cursor_color'])) + newcolor = gtk.gdk.color_parse(color) + newcolor_inactive = newcolor.copy() + for bit in ['red', 'green', 'blue']: + setattr(newcolor_inactive, bit, + getattr(newcolor_inactive, bit) * factor) + self.palette_active.append(newcolor) + self.palette_inactive.append(newcolor_inactive) + self.vte.set_colors(self.fgcolor_active, self.bgcolor, + self.palette_active) + self.set_cursor_color() if hasattr(self.vte, 'set_cursor_shape'): self.vte.set_cursor_shape(getattr(vte, 'CURSOR_SHAPE_' + self.config['cursor_shape'].upper())) @@ -730,6 +744,19 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) self.titlebar.update() self.vte.queue_draw() + def set_cursor_color(self): + """Set the cursor color appropriately""" + if self.config['cursor_color'] == self.config['foreground_color']: + try: + self.vte.set_color_cursor(None) + except TypeError: + # FIXME: I think this is only necessary because of + # https://bugzilla.gnome.org/show_bug.cgi?id=614910 + pass + elif self.config['cursor_color'] != '': + self.vte.set_color_cursor(gtk.gdk.color_parse( + self.config['cursor_color'])) + def get_window_title(self): """Return the window title""" return(self.vte.get_window_title() or str(self.command)) @@ -1009,8 +1036,18 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) def on_vte_focus_in(self, _widget, _event): """Inform other parts of the application when focus is received""" + self.vte.set_colors(self.fgcolor_active, self.bgcolor, + self.palette_active) + self.set_cursor_color() self.emit('focus-in') + def on_vte_focus_out(self, _widget, _event): + """Inform other parts of the application when focus is lost""" + self.vte.set_colors(self.fgcolor_inactive, self.bgcolor, + self.palette_inactive) + self.set_cursor_color() + self.emit('focus-out') + def on_window_focus_out(self): """Update our UI when the window loses focus""" self.titlebar.update('window-focus-out')