diff --git a/data/icons/HighContrast/16x16/actions/terminator_active_broadcast_all.png b/data/icons/HighContrast/16x16/actions/terminator_active_broadcast_all.png new file mode 100644 index 00000000..04752c3d Binary files /dev/null and b/data/icons/HighContrast/16x16/actions/terminator_active_broadcast_all.png differ diff --git a/data/icons/HighContrast/16x16/actions/terminator_active_broadcast_group.png b/data/icons/HighContrast/16x16/actions/terminator_active_broadcast_group.png new file mode 100644 index 00000000..7bc8b223 Binary files /dev/null and b/data/icons/HighContrast/16x16/actions/terminator_active_broadcast_group.png differ diff --git a/data/icons/HighContrast/16x16/actions/terminator_active_broadcast_off.png b/data/icons/HighContrast/16x16/actions/terminator_active_broadcast_off.png new file mode 100644 index 00000000..771d35f2 Binary files /dev/null and b/data/icons/HighContrast/16x16/actions/terminator_active_broadcast_off.png differ diff --git a/data/icons/HighContrast/16x16/actions/terminator_horiz.png b/data/icons/HighContrast/16x16/actions/terminator_horiz.png new file mode 100644 index 00000000..8cb6408d Binary files /dev/null and b/data/icons/HighContrast/16x16/actions/terminator_horiz.png differ diff --git a/data/icons/HighContrast/16x16/actions/terminator_receive_off.png b/data/icons/HighContrast/16x16/actions/terminator_receive_off.png new file mode 100644 index 00000000..eba128f3 Binary files /dev/null and b/data/icons/HighContrast/16x16/actions/terminator_receive_off.png differ diff --git a/data/icons/HighContrast/16x16/actions/terminator_receive_on.png b/data/icons/HighContrast/16x16/actions/terminator_receive_on.png new file mode 100644 index 00000000..434ad997 Binary files /dev/null and b/data/icons/HighContrast/16x16/actions/terminator_receive_on.png differ diff --git a/data/icons/HighContrast/16x16/actions/terminator_vert.png b/data/icons/HighContrast/16x16/actions/terminator_vert.png new file mode 100644 index 00000000..be44d088 Binary files /dev/null and b/data/icons/HighContrast/16x16/actions/terminator_vert.png differ diff --git a/data/icons/HighContrast/16x16/apps/terminator-custom-commands.png b/data/icons/HighContrast/16x16/apps/terminator-custom-commands.png new file mode 100644 index 00000000..75a9445d Binary files /dev/null and b/data/icons/HighContrast/16x16/apps/terminator-custom-commands.png differ diff --git a/data/icons/HighContrast/16x16/apps/terminator-layout.png b/data/icons/HighContrast/16x16/apps/terminator-layout.png new file mode 100644 index 00000000..f6485948 Binary files /dev/null and b/data/icons/HighContrast/16x16/apps/terminator-layout.png differ diff --git a/data/icons/HighContrast/16x16/apps/terminator-preferences.png b/data/icons/HighContrast/16x16/apps/terminator-preferences.png new file mode 100644 index 00000000..41103fd6 Binary files /dev/null and b/data/icons/HighContrast/16x16/apps/terminator-preferences.png differ diff --git a/data/icons/HighContrast/16x16/apps/terminator.png b/data/icons/HighContrast/16x16/apps/terminator.png new file mode 100644 index 00000000..83b04af4 Binary files /dev/null and b/data/icons/HighContrast/16x16/apps/terminator.png differ diff --git a/data/icons/HighContrast/16x16/status/terminal-bell.png b/data/icons/HighContrast/16x16/status/terminal-bell.png new file mode 100644 index 00000000..877095b6 Binary files /dev/null and b/data/icons/HighContrast/16x16/status/terminal-bell.png differ diff --git a/data/icons/HighContrast/22x22/apps/terminator-custom-commands.png b/data/icons/HighContrast/22x22/apps/terminator-custom-commands.png new file mode 100644 index 00000000..2161b2b7 Binary files /dev/null and b/data/icons/HighContrast/22x22/apps/terminator-custom-commands.png differ diff --git a/data/icons/HighContrast/22x22/apps/terminator-layout.png b/data/icons/HighContrast/22x22/apps/terminator-layout.png new file mode 100644 index 00000000..ed221dc4 Binary files /dev/null and b/data/icons/HighContrast/22x22/apps/terminator-layout.png differ diff --git a/data/icons/HighContrast/22x22/apps/terminator-preferences.png b/data/icons/HighContrast/22x22/apps/terminator-preferences.png new file mode 100644 index 00000000..9993383c Binary files /dev/null and b/data/icons/HighContrast/22x22/apps/terminator-preferences.png differ diff --git a/data/icons/HighContrast/22x22/apps/terminator.png b/data/icons/HighContrast/22x22/apps/terminator.png new file mode 100644 index 00000000..147e7391 Binary files /dev/null and b/data/icons/HighContrast/22x22/apps/terminator.png differ diff --git a/data/icons/HighContrast/24x24/apps/terminator-custom-commands.png b/data/icons/HighContrast/24x24/apps/terminator-custom-commands.png new file mode 100644 index 00000000..33fa537d Binary files /dev/null and b/data/icons/HighContrast/24x24/apps/terminator-custom-commands.png differ diff --git a/data/icons/HighContrast/24x24/apps/terminator-layout.png b/data/icons/HighContrast/24x24/apps/terminator-layout.png new file mode 100644 index 00000000..71823381 Binary files /dev/null and b/data/icons/HighContrast/24x24/apps/terminator-layout.png differ diff --git a/data/icons/HighContrast/24x24/apps/terminator-preferences.png b/data/icons/HighContrast/24x24/apps/terminator-preferences.png new file mode 100644 index 00000000..0e9d5e1f Binary files /dev/null and b/data/icons/HighContrast/24x24/apps/terminator-preferences.png differ diff --git a/data/icons/HighContrast/24x24/apps/terminator.png b/data/icons/HighContrast/24x24/apps/terminator.png new file mode 100644 index 00000000..d99ffcee Binary files /dev/null and b/data/icons/HighContrast/24x24/apps/terminator.png differ diff --git a/data/icons/HighContrast/32x32/apps/terminator-custom-commands.png b/data/icons/HighContrast/32x32/apps/terminator-custom-commands.png new file mode 100644 index 00000000..c8ae92ba Binary files /dev/null and b/data/icons/HighContrast/32x32/apps/terminator-custom-commands.png differ diff --git a/data/icons/HighContrast/32x32/apps/terminator-layout.png b/data/icons/HighContrast/32x32/apps/terminator-layout.png new file mode 100644 index 00000000..7ecef061 Binary files /dev/null and b/data/icons/HighContrast/32x32/apps/terminator-layout.png differ diff --git a/data/icons/HighContrast/32x32/apps/terminator-preferences.png b/data/icons/HighContrast/32x32/apps/terminator-preferences.png new file mode 100644 index 00000000..d27b510a Binary files /dev/null and b/data/icons/HighContrast/32x32/apps/terminator-preferences.png differ diff --git a/data/icons/HighContrast/32x32/apps/terminator.png b/data/icons/HighContrast/32x32/apps/terminator.png new file mode 100644 index 00000000..ddd43e06 Binary files /dev/null and b/data/icons/HighContrast/32x32/apps/terminator.png differ diff --git a/data/icons/HighContrast/48x48/apps/terminator-custom-commands.png b/data/icons/HighContrast/48x48/apps/terminator-custom-commands.png new file mode 100644 index 00000000..0e6f9b6a Binary files /dev/null and b/data/icons/HighContrast/48x48/apps/terminator-custom-commands.png differ diff --git a/data/icons/HighContrast/48x48/apps/terminator-layout.png b/data/icons/HighContrast/48x48/apps/terminator-layout.png new file mode 100644 index 00000000..fac8934e Binary files /dev/null and b/data/icons/HighContrast/48x48/apps/terminator-layout.png differ diff --git a/data/icons/HighContrast/48x48/apps/terminator-preferences.png b/data/icons/HighContrast/48x48/apps/terminator-preferences.png new file mode 100644 index 00000000..ef3316a9 Binary files /dev/null and b/data/icons/HighContrast/48x48/apps/terminator-preferences.png differ diff --git a/data/icons/HighContrast/48x48/apps/terminator.png b/data/icons/HighContrast/48x48/apps/terminator.png new file mode 100644 index 00000000..8aa6c713 Binary files /dev/null and b/data/icons/HighContrast/48x48/apps/terminator.png differ diff --git a/data/icons/HighContrast/scalable/actions/terminator_active_broadcast_all.svg b/data/icons/HighContrast/scalable/actions/terminator_active_broadcast_all.svg new file mode 100644 index 00000000..75c7951f --- /dev/null +++ b/data/icons/HighContrast/scalable/actions/terminator_active_broadcast_all.svg @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/data/icons/HighContrast/scalable/actions/terminator_active_broadcast_group.svg b/data/icons/HighContrast/scalable/actions/terminator_active_broadcast_group.svg new file mode 100644 index 00000000..51f158ed --- /dev/null +++ b/data/icons/HighContrast/scalable/actions/terminator_active_broadcast_group.svg @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/data/icons/HighContrast/scalable/actions/terminator_active_broadcast_off.svg b/data/icons/HighContrast/scalable/actions/terminator_active_broadcast_off.svg new file mode 100644 index 00000000..19358fbc --- /dev/null +++ b/data/icons/HighContrast/scalable/actions/terminator_active_broadcast_off.svg @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/data/icons/HighContrast/scalable/actions/terminator_horiz.svg b/data/icons/HighContrast/scalable/actions/terminator_horiz.svg new file mode 100644 index 00000000..1c75798d --- /dev/null +++ b/data/icons/HighContrast/scalable/actions/terminator_horiz.svg @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/data/icons/HighContrast/scalable/actions/terminator_receive_off.svg b/data/icons/HighContrast/scalable/actions/terminator_receive_off.svg new file mode 100644 index 00000000..ac0cb3ba --- /dev/null +++ b/data/icons/HighContrast/scalable/actions/terminator_receive_off.svg @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/data/icons/HighContrast/scalable/actions/terminator_receive_on.svg b/data/icons/HighContrast/scalable/actions/terminator_receive_on.svg new file mode 100644 index 00000000..ca42e189 --- /dev/null +++ b/data/icons/HighContrast/scalable/actions/terminator_receive_on.svg @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/data/icons/HighContrast/scalable/actions/terminator_vert.svg b/data/icons/HighContrast/scalable/actions/terminator_vert.svg new file mode 100644 index 00000000..1cf4f763 --- /dev/null +++ b/data/icons/HighContrast/scalable/actions/terminator_vert.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/data/icons/HighContrast/scalable/apps/terminator-custom-commands.svg b/data/icons/HighContrast/scalable/apps/terminator-custom-commands.svg new file mode 100644 index 00000000..a7982554 --- /dev/null +++ b/data/icons/HighContrast/scalable/apps/terminator-custom-commands.svg @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/data/icons/HighContrast/scalable/apps/terminator-layout.svg b/data/icons/HighContrast/scalable/apps/terminator-layout.svg new file mode 100644 index 00000000..10a91065 --- /dev/null +++ b/data/icons/HighContrast/scalable/apps/terminator-layout.svg @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/data/icons/HighContrast/scalable/apps/terminator-preferences.svg b/data/icons/HighContrast/scalable/apps/terminator-preferences.svg new file mode 100644 index 00000000..e7820921 --- /dev/null +++ b/data/icons/HighContrast/scalable/apps/terminator-preferences.svg @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/data/icons/HighContrast/scalable/apps/terminator.svg b/data/icons/HighContrast/scalable/apps/terminator.svg new file mode 100644 index 00000000..03f27fc0 --- /dev/null +++ b/data/icons/HighContrast/scalable/apps/terminator.svg @@ -0,0 +1,154 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/data/icons/HighContrast/scalable/status/terminal_bell.svg b/data/icons/HighContrast/scalable/status/terminal_bell.svg new file mode 100644 index 00000000..a6079f8f --- /dev/null +++ b/data/icons/HighContrast/scalable/status/terminal_bell.svg @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/setup.py b/setup.py index c2d5e989..a08d1c01 100755 --- a/setup.py +++ b/setup.py @@ -181,16 +181,23 @@ setup(name=APP_NAME.capitalize(), ('share/applications', ['data/terminator.desktop']), (os.path.join(man_dir, 'man1'), ['doc/terminator.1']), (os.path.join(man_dir, 'man5'), ['doc/terminator_config.5']), - ('share/pixmaps', ['data/icons/48x48/apps/terminator.png']), - ('share/icons/hicolor/scalable/apps', glob.glob('data/icons/scalable/apps/*.svg')), - ('share/icons/hicolor/16x16/apps', glob.glob('data/icons/16x16/apps/*.png')), - ('share/icons/hicolor/22x22/apps', glob.glob('data/icons/22x22/apps/*.png')), - ('share/icons/hicolor/24x24/apps', glob.glob('data/icons/24x24/apps/*.png')), - ('share/icons/hicolor/32x32/apps', glob.glob('data/icons/32x32/apps/*.png')), - ('share/icons/hicolor/48x48/apps', glob.glob('data/icons/48x48/apps/*.png')), - ('share/icons/hicolor/16x16/actions', glob.glob('data/icons/16x16/actions/*.png')), - ('share/icons/hicolor/16x16/status', - glob.glob('data/icons/16x16/status/*.png')), + ('share/pixmaps', ['data/icons/hicolor/48x48/apps/terminator.png']), + ('share/icons/hicolor/scalable/apps', glob.glob('data/icons/hicolor/scalable/apps/*.svg')), + ('share/icons/hicolor/16x16/apps', glob.glob('data/icons/hicolor/16x16/apps/*.png')), + ('share/icons/hicolor/22x22/apps', glob.glob('data/icons/hicolor/22x22/apps/*.png')), + ('share/icons/hicolor/24x24/apps', glob.glob('data/icons/hicolor/24x24/apps/*.png')), + ('share/icons/hicolor/32x32/apps', glob.glob('data/icons/hicolor/32x32/apps/*.png')), + ('share/icons/hicolor/48x48/apps', glob.glob('data/icons/hicolor/48x48/apps/*.png')), + ('share/icons/hicolor/16x16/actions', glob.glob('data/icons/hicolor/16x16/actions/*.png')), + ('share/icons/hicolor/16x16/status', glob.glob('data/icons/hicolor/16x16/status/*.png')), + ('share/icons/HighContrast/scalable/apps', glob.glob('data/icons/HighContrast/scalable/apps/*.svg')), + ('share/icons/HighContrast/16x16/apps', glob.glob('data/icons/HighContrast/16x16/apps/*.png')), + ('share/icons/HighContrast/22x22/apps', glob.glob('data/icons/HighContrast/22x22/apps/*.png')), + ('share/icons/HighContrast/24x24/apps', glob.glob('data/icons/HighContrast/24x24/apps/*.png')), + ('share/icons/HighContrast/32x32/apps', glob.glob('data/icons/HighContrast/32x32/apps/*.png')), + ('share/icons/HighContrast/48x48/apps', glob.glob('data/icons/HighContrast/48x48/apps/*.png')), + ('share/icons/HighContrast/16x16/actions', glob.glob('data/icons/HighContrast/16x16/actions/*.png')), + ('share/icons/HighContrast/16x16/status', glob.glob('data/icons/HighContrast/16x16/status/*.png')), ], packages=['terminatorlib', 'terminatorlib.configobj', 'terminatorlib.plugins'], diff --git a/terminatorlib/notebook.py b/terminatorlib/notebook.py index 24573d61..a44a3e6a 100755 --- a/terminatorlib/notebook.py +++ b/terminatorlib/notebook.py @@ -5,6 +5,7 @@ from gi.repository import GObject from gi.repository import Gtk +from gi.repository import Gio from terminator import Terminator from config import Config @@ -547,10 +548,9 @@ class TabLabel(Gtk.HBox): if not self.button: self.button = Gtk.Button() if not self.icon: - self.icon = Gtk.Image() - self.icon.set_from_stock(Gtk.STOCK_CLOSE, - Gtk.IconSize.MENU) - + self.icon = Gio.ThemedIcon.new_with_default_fallbacks("window-close-symbolic") + self.icon = Gtk.Image.new_from_gicon(self.icon, Gtk.IconSize.MENU) + self.button.set_focus_on_click(False) self.button.set_relief(Gtk.ReliefStyle.NONE) # style = Gtk.RcStyle() # FIXME FOR GTK3 how to do it there? actually do we really want to override the theme? diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index c655ba11..b178505a 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -17,6 +17,7 @@ from translation import _ from encoding import TerminatorEncoding from terminator import Terminator from plugin import PluginRegistry +from version import APP_NAME def color2hex(widget): """Pull the colour values out of a Gtk ColorPicker widget and return them @@ -156,6 +157,7 @@ class PrefsEditor: self.config.base.reload() self.term = term self.builder = Gtk.Builder() + self.builder.set_translation_domain(APP_NAME) self.keybindings = Keybindings() try: # Figure out where our library is on-disk so we can open our diff --git a/terminatorlib/window.py b/terminatorlib/window.py index fc153d62..53c67952 100755 --- a/terminatorlib/window.py +++ b/terminatorlib/window.py @@ -168,35 +168,27 @@ class Window(Container, Gtk.Window): def apply_icon(self, requested_icon): """Set the window icon""" - icon_theme = Gtk.IconTheme() - icon = None - + icon_theme = Gtk.IconTheme.get_default() + icon_name_list = [APP_NAME] # disable self.wmclass_name, n/a in GTK3 + if requested_icon: try: self.set_icon_from_file(requested_icon) - icon = self.get_icon() + return except (NameError, GObject.GError): - dbg('Unable to load 48px %s icon as file' % (repr(requested_icon))) - - if requested_icon and icon is None: - try: - icon = icon_theme.load_icon(requested_icon, 48, 0) - except (NameError, GObject.GError): - dbg('Unable to load 48px %s icon' % (repr(requested_icon))) - -# if icon is None: -# try: -# icon = icon_theme.load_icon(self.wmclass_name, 48, 0) # FIXME FOR GTK3 -# except (NameError, GObject.GError): -# dbg('Unable to load 48px %s icon' % (self.wmclass_name)) - - if icon is None: - try: - icon = icon_theme.load_icon(APP_NAME, 48, 0) - except (NameError, GObject.GError): - dbg('Unable to load 48px Terminator icon') - icon = self.render_icon(Gtk.STOCK_DIALOG_INFO, Gtk.IconSize.BUTTON) + dbg('Unable to load %s icon as file' % (repr(requested_icon))) + icon_name_list.insert(0, requested_icon) + + for icon_name in icon_name_list: + # Test if the icon is available first + if icon_theme.lookup_icon(icon_name, 48, 0): + self.set_icon_name(icon_name) + return # Success! We're done. + else: + dbg('Unable to load %s icon' % (icon_name)) + + icon = self.render_icon(Gtk.STOCK_DIALOG_INFO, Gtk.ICON_SIZE_BUTTON) self.set_icon(icon) def on_key_press(self, window, event):