From 82dd8cc2ecab4b87849e29e97e8ca44a20a80604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 19 Aug 2018 20:00:57 +0200 Subject: [PATCH] Use material design icons * Redefine the default list of icons * Use custom implementation for IconFactory * Remove noimage * Allow configure maximum image size issue7059 issue474 review60291002 --- CHANGELOG | 1 + MANIFEST.in | 1 + tryton/client.py | 1 - tryton/common/button.py | 11 +- tryton/common/cellrendererbinary.py | 13 +- tryton/common/common.py | 197 +-- tryton/common/datetime_.py | 5 +- tryton/common/popup_menu.py | 25 +- tryton/config.py | 2 + tryton/data/pixmaps/tryton/LICENSE | 202 +++ tryton/data/pixmaps/tryton/tryton-add.svg | 4 + tryton/data/pixmaps/tryton/tryton-archive.svg | 320 +--- tryton/data/pixmaps/tryton/tryton-attach.svg | 4 + .../pixmaps/tryton/tryton-attachment-hi.svg | 245 --- .../data/pixmaps/tryton/tryton-attachment.svg | 187 --- tryton/data/pixmaps/tryton/tryton-back.svg | 4 + .../pixmaps/tryton/tryton-bookmark-border.svg | 4 + .../data/pixmaps/tryton/tryton-bookmark.svg | 429 +---- .../data/pixmaps/tryton/tryton-bookmarks.svg | 4 + .../data/pixmaps/tryton/tryton-calendar.svg | 317 ---- tryton/data/pixmaps/tryton/tryton-cancel.svg | 4 + tryton/data/pixmaps/tryton/tryton-clear.svg | 419 +---- tryton/data/pixmaps/tryton/tryton-close.svg | 362 +---- tryton/data/pixmaps/tryton/tryton-connect.svg | 1044 ------------ tryton/data/pixmaps/tryton/tryton-copy.svg | 331 +--- tryton/data/pixmaps/tryton/tryton-create.svg | 4 + tryton/data/pixmaps/tryton/tryton-date.svg | 4 + tryton/data/pixmaps/tryton/tryton-delete.svg | 899 +---------- .../pixmaps/tryton/tryton-dialog-error.svg | 331 ---- .../tryton/tryton-dialog-information.svg | 1160 -------------- .../pixmaps/tryton/tryton-dialog-warning.svg | 374 ----- .../data/pixmaps/tryton/tryton-disconnect.svg | 1415 ----------------- tryton/data/pixmaps/tryton/tryton-email.svg | 4 + tryton/data/pixmaps/tryton/tryton-error.svg | 4 + .../data/pixmaps/tryton/tryton-executable.svg | 179 --- tryton/data/pixmaps/tryton/tryton-exit.svg | 4 + tryton/data/pixmaps/tryton/tryton-export.svg | 4 + tryton/data/pixmaps/tryton/tryton-filter.svg | 4 + .../pixmaps/tryton/tryton-find-replace.svg | 975 ------------ tryton/data/pixmaps/tryton/tryton-find.svg | 751 --------- .../data/pixmaps/tryton/tryton-folder-new.svg | 453 ------ .../tryton/tryton-format-align-center.svg | 4 + .../tryton/tryton-format-align-justify.svg | 4 + .../tryton/tryton-format-align-left.svg | 4 + .../tryton/tryton-format-align-right.svg | 4 + .../pixmaps/tryton/tryton-format-bold.svg | 4 + .../tryton/tryton-format-color-text.svg | 5 + .../pixmaps/tryton/tryton-format-italic.svg | 4 + .../tryton/tryton-format-underline.svg | 4 + tryton/data/pixmaps/tryton/tryton-forward.svg | 4 + .../data/pixmaps/tryton/tryton-fullscreen.svg | 523 ------ tryton/data/pixmaps/tryton/tryton-go-home.svg | 446 ------ tryton/data/pixmaps/tryton/tryton-go-jump.svg | 205 --- tryton/data/pixmaps/tryton/tryton-go-next.svg | 193 --- .../pixmaps/tryton/tryton-go-previous.svg | 855 ---------- tryton/data/pixmaps/tryton/tryton-help.svg | 225 --- tryton/data/pixmaps/tryton/tryton-history.svg | 4 + tryton/data/pixmaps/tryton/tryton-icon.svg | 96 -- tryton/data/pixmaps/tryton/tryton-import.svg | 4 + tryton/data/pixmaps/tryton/tryton-info.svg | 4 + tryton/data/pixmaps/tryton/tryton-launch.svg | 4 + tryton/data/pixmaps/tryton/tryton-link.svg | 4 + .../data/pixmaps/tryton/tryton-list-add.svg | 437 ----- .../pixmaps/tryton/tryton-list-remove.svg | 425 ----- tryton/data/pixmaps/tryton/tryton-locale.svg | 879 ---------- tryton/data/pixmaps/tryton/tryton-lock.svg | 287 ---- tryton/data/pixmaps/tryton/tryton-log-out.svg | 458 ------ tryton/data/pixmaps/tryton/tryton-log.svg | 5 + .../tryton/tryton-mail-message-new.svg | 465 ------ .../pixmaps/tryton/tryton-mail-message.svg | 502 ------ tryton/data/pixmaps/tryton/tryton-menu.svg | 4 + tryton/data/pixmaps/tryton/tryton-new.svg | 449 ------ tryton/data/pixmaps/tryton/tryton-noimage.png | Bin 172 -> 0 bytes tryton/data/pixmaps/tryton/tryton-note-hi.svg | 405 ----- tryton/data/pixmaps/tryton/tryton-note.svg | 447 +----- tryton/data/pixmaps/tryton/tryton-ok.svg | 4 + tryton/data/pixmaps/tryton/tryton-open.svg | 538 +------ .../tryton-preferences-system-session.svg | 511 ------ .../tryton/tryton-preferences-system.svg | 399 ----- .../pixmaps/tryton/tryton-preferences.svg | 778 --------- .../pixmaps/tryton/tryton-print-email.svg | 883 ---------- .../data/pixmaps/tryton/tryton-print-open.svg | 869 ---------- tryton/data/pixmaps/tryton/tryton-print.svg | 505 +----- tryton/data/pixmaps/tryton/tryton-public.svg | 4 + tryton/data/pixmaps/tryton/tryton-refresh.svg | 396 +---- tryton/data/pixmaps/tryton/tryton-remove.svg | 4 + tryton/data/pixmaps/tryton/tryton-save-as.svg | 664 -------- tryton/data/pixmaps/tryton/tryton-save.svg | 622 +------- tryton/data/pixmaps/tryton/tryton-search.svg | 4 + .../pixmaps/tryton/tryton-star-border.svg | 4 + tryton/data/pixmaps/tryton/tryton-star.svg | 146 +- .../data/pixmaps/tryton/tryton-start-here.svg | 493 ------ tryton/data/pixmaps/tryton/tryton-switch.svg | 4 + .../tryton/tryton-system-file-manager.svg | 318 ---- tryton/data/pixmaps/tryton/tryton-system.svg | 741 --------- .../pixmaps/tryton/tryton-text-background.svg | 548 ------- .../pixmaps/tryton/tryton-text-foreground.svg | 569 ------- .../pixmaps/tryton/tryton-text-markup.svg | 577 ------- .../data/pixmaps/tryton/tryton-translate.svg | 4 + .../data/pixmaps/tryton/tryton-unarchive.svg | 9 + tryton/data/pixmaps/tryton/tryton-undo.svg | 233 +-- tryton/data/pixmaps/tryton/tryton-unstar.svg | 139 -- tryton/data/pixmaps/tryton/tryton-warning.svg | 4 + .../pixmaps/tryton/tryton-web-browser.svg | 983 ------------ tryton/gui/main.py | 53 +- tryton/gui/window/dblogin.py | 43 +- tryton/gui/window/email.py | 13 +- tryton/gui/window/form.py | 34 +- tryton/gui/window/infobar.py | 16 +- tryton/gui/window/limit.py | 13 +- tryton/gui/window/preference.py | 14 +- tryton/gui/window/revision.py | 13 +- tryton/gui/window/shortcuts.py | 8 +- tryton/gui/window/tabcontent.py | 61 +- tryton/gui/window/view_board/view_board.py | 17 +- tryton/gui/window/view_form/view/form.py | 9 +- .../window/view_form/view/form_gtk/binary.py | 16 +- .../window/view_form/view/form_gtk/char.py | 7 +- .../view_form/view/form_gtk/dictionary.py | 16 +- .../window/view_form/view/form_gtk/image.py | 9 +- .../view_form/view/form_gtk/many2many.py | 14 +- .../view_form/view/form_gtk/many2one.py | 22 +- .../view_form/view/form_gtk/one2many.py | 58 +- .../window/view_form/view/form_gtk/pyson.py | 12 +- .../view_form/view/form_gtk/richtextbox.py | 28 +- .../view_form/view/form_gtk/state_widget.py | 4 +- .../gui/window/view_form/view/form_gtk/url.py | 13 +- .../window/view_form/view/form_gtk/widget.py | 15 +- tryton/gui/window/view_form/view/graph.py | 18 +- .../window/view_form/view/list_gtk/widget.py | 13 +- .../window/view_form/view/screen_container.py | 60 +- tryton/gui/window/win_csv.py | 32 +- tryton/gui/window/win_export.py | 12 +- tryton/gui/window/win_form.py | 83 +- tryton/gui/window/win_import.py | 5 +- tryton/gui/window/win_search.py | 23 +- 136 files changed, 908 insertions(+), 28863 deletions(-) create mode 100644 tryton/data/pixmaps/tryton/LICENSE create mode 100644 tryton/data/pixmaps/tryton/tryton-add.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-attach.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-attachment-hi.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-attachment.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-back.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-bookmark-border.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-bookmarks.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-calendar.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-cancel.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-connect.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-create.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-date.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-dialog-error.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-dialog-information.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-dialog-warning.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-disconnect.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-email.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-error.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-executable.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-exit.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-export.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-filter.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-find-replace.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-find.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-folder-new.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-format-align-center.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-format-align-justify.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-format-align-left.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-format-align-right.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-format-bold.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-format-color-text.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-format-italic.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-format-underline.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-forward.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-fullscreen.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-go-home.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-go-jump.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-go-next.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-go-previous.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-help.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-history.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-icon.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-import.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-info.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-launch.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-link.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-list-add.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-list-remove.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-locale.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-lock.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-log-out.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-log.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-mail-message-new.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-mail-message.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-menu.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-new.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-noimage.png delete mode 100644 tryton/data/pixmaps/tryton/tryton-note-hi.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-ok.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-preferences-system-session.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-preferences-system.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-preferences.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-print-email.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-print-open.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-public.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-remove.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-save-as.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-search.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-star-border.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-start-here.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-switch.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-system-file-manager.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-system.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-text-background.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-text-foreground.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-text-markup.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-translate.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-unarchive.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-unstar.svg create mode 100644 tryton/data/pixmaps/tryton/tryton-warning.svg delete mode 100644 tryton/data/pixmaps/tryton/tryton-web-browser.svg diff --git a/CHANGELOG b/CHANGELOG index 05037e4eea..c14c81b4dc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* New icons * Support timestamp field * Add support for Python 3.7 * Use GtkApplication diff --git a/MANIFEST.in b/MANIFEST.in index a4bd4cfa7a..b7306f5b4e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -15,3 +15,4 @@ include doc/* recursive-include doc *.rst recursive-include doc *.po recursive-include doc *.pot +include tryton/data/pixmaps/tryton/LICENSE diff --git a/tryton/client.py b/tryton/client.py index 0cf2d89af1..eaedefa0a2 100644 --- a/tryton/client.py +++ b/tryton/client.py @@ -59,7 +59,6 @@ def main(): CONFIG.arguments = [] translate.set_language_direction(CONFIG['client.language_direction']) translate.setlang(CONFIG['client.lang']) - common.ICONFACTORY.load_client_icons() if CONFIG.arguments or DBLogin().run(): server = '%(hostname)s:%(port)s/%(database)s' % { 'hostname': common.get_hostname(CONFIG['login.host']), diff --git a/tryton/common/button.py b/tryton/common/button.py index 19d586edf8..38a88bfb5a 100644 --- a/tryton/common/button.py +++ b/tryton/common/button.py @@ -2,14 +2,14 @@ # this repository contains the full copyright notices and license terms. import gettext -import gtk +from gi.repository import Gtk -from tryton.common import ICONFACTORY +from tryton.common import IconFactory _ = gettext.gettext -class Button(gtk.Button): +class Button(Gtk.Button): def __init__(self, attrs=None): self.attrs = attrs or {} @@ -28,10 +28,7 @@ class Button(gtk.Button): if not stock: self.set_image(None) return - ICONFACTORY.register_icon(stock) - icon = gtk.Image() - icon.set_from_stock(stock, gtk.ICON_SIZE_SMALL_TOOLBAR) - self.set_image(icon) + self.set_image(IconFactory.get_image(stock, Gtk.IconSize.BUTTON)) def state_set(self, record): if record: diff --git a/tryton/common/cellrendererbinary.py b/tryton/common/cellrendererbinary.py index 1f18e0c4eb..bb43753ff5 100644 --- a/tryton/common/cellrendererbinary.py +++ b/tryton/common/cellrendererbinary.py @@ -4,6 +4,8 @@ import gtk import gobject import pango +from .common import IconFactory + BUTTON_BORDER = 2 BUTTON_SPACING = 1 @@ -36,15 +38,14 @@ class CellRendererBinary(gtk.GenericCellRenderer): self.use_filename = use_filename self.clicking = '' self.images = {} - widget = gtk.Button() - for key, stock_name in ( - ('select', 'tryton-find'), + for key, icon in ( + ('select', 'tryton-search'), ('open', 'tryton-open'), - ('save', 'tryton-save-as'), + ('save', 'tryton-save'), ('clear', 'tryton-clear')): # hack to get gtk.gdk.Image from stock icon - img_sensitive = widget.render_icon(stock_name, - gtk.ICON_SIZE_SMALL_TOOLBAR) + img_sensitive = IconFactory.get_pixbuf( + icon, gtk.ICON_SIZE_SMALL_TOOLBAR) img_insensitive = img_sensitive.copy() img_sensitive.saturate_and_pixelate(img_insensitive, 0, False) width = img_sensitive.get_width() diff --git a/tryton/common/common.py b/tryton/common/common.py index da2ffb6f84..e7e6c2fd2e 100644 --- a/tryton/common/common.py +++ b/tryton/common/common.py @@ -12,6 +12,8 @@ import re import logging import unicodedata import colorsys +import xml.etree.ElementTree as ET +from collections import defaultdict from decimal import Decimal from http import HTTPStatus from functools import partial @@ -47,47 +49,34 @@ from gi.repository import Gtk from tryton import __version__ from tryton.exceptions import TrytonServerError, TrytonError from tryton.pyson import PYSONEncoder - from .underline import set_underline _ = gettext.gettext logger = logging.getLogger(__name__) -class TrytonIconFactory(gtk.IconFactory): +class IconFactory: batchnum = 10 _tryton_icons = [] _name2id = {} - _locale_icons = set() - _loaded_icons = set() + _icons = {} + _local_icons = {} + _pixbufs = defaultdict(dict) - def load_client_icons(self): + @classmethod + def load_local_icons(cls): for fname in os.listdir(PIXMAPS_DIR): name = os.path.splitext(fname)[0] - if not name.startswith('tryton-'): - continue - if not os.path.isfile(os.path.join(PIXMAPS_DIR, fname)): - continue - try: - pixbuf = gtk.gdk.pixbuf_new_from_file( - os.path.join(PIXMAPS_DIR, fname)) - except (IOError, glib.GError): - continue - finally: - self._locale_icons.add(name) - icon_set = gtk.IconSet(pixbuf) - self.add(name, icon_set) - for name in ('ok', 'cancel'): - icon_set = gtk.Style().lookup_icon_set('gtk-%s' % name) - self.add('tryton-%s' % name, icon_set) - self._locale_icons.add('tryton-%s' % name) + path = os.path.join(PIXMAPS_DIR, fname) + cls._local_icons[name] = path - def load_icons(self, refresh=False): + @classmethod + def load_icons(cls, refresh=False): if not refresh: - self._name2id.clear() - self._loaded_icons.clear() - del self._tryton_icons[:] + cls._name2id.clear() + cls._icons.clear() + del cls._tryton_icons[:] try: icons = rpc.execute('model', 'ir.ui.icon', 'list_icons', @@ -95,42 +84,82 @@ class TrytonIconFactory(gtk.IconFactory): except TrytonServerError: icons = [] for icon_id, icon_name in icons: - if refresh and icon_name in self._loaded_icons: + if refresh and icon_name in cls._icons: continue - self._tryton_icons.append((icon_id, icon_name)) - self._name2id[icon_name] = icon_id + cls._tryton_icons.append((icon_id, icon_name)) + cls._name2id[icon_name] = icon_id - def register_icon(self, iconname): + @classmethod + def register_icon(cls, iconname): # iconname might be '' when page do not define icon if (not iconname - or iconname in (self._loaded_icons | self._locale_icons)): + or iconname in cls._icons + or iconname in cls._local_icons): return - if iconname not in self._name2id: - self.load_icons(refresh=True) + if iconname not in cls._name2id: + cls.load_icons(refresh=True) try: - icon_ref = (self._name2id[iconname], iconname) + icon_ref = (cls._name2id[iconname], iconname) except KeyError: return - idx = self._tryton_icons.index(icon_ref) - to_load = slice(max(0, idx - self.batchnum // 2), - idx + self.batchnum // 2) - ids = [e[0] for e in self._tryton_icons[to_load]] + idx = cls._tryton_icons.index(icon_ref) + to_load = slice(max(0, idx - cls.batchnum // 2), + idx + cls.batchnum // 2) + ids = [e[0] for e in cls._tryton_icons[to_load]] try: icons = rpc.execute('model', 'ir.ui.icon', 'read', ids, ['name', 'icon'], rpc.CONTEXT) except TrytonServerError: icons = [] for icon in icons: - pixbuf = _data2pixbuf(icon['icon'].encode('utf-8')) - self._tryton_icons.remove((icon['id'], icon['name'])) - del self._name2id[icon['name']] - self._loaded_icons.add(icon['name']) - iconset = gtk.IconSet(pixbuf) - self.add(icon['name'], iconset) + name = icon['name'] + data = icon['icon'].encode('utf-8') + cls._icons[name] = data + cls._tryton_icons.remove((icon['id'], icon['name'])) + del cls._name2id[icon['name']] + + @classmethod + def get_pixbuf(cls, iconname, size=Gtk.IconSize.MENU, color=None): + cls.register_icon(iconname) + if iconname not in cls._pixbufs[size]: + if iconname in cls._icons: + data = cls._icons[iconname] + elif iconname in cls._local_icons: + path = cls._local_icons[iconname] + with open(path, 'rb') as fp: + data = fp.read() + else: + logger.error("Unknown icon %s" % iconname) + return + if color is None: + color = CONFIG['icon.color'] + try: + ET.register_namespace('', 'http://www.w3.org/2000/svg') + root = ET.fromstring(data) + root.attrib['fill'] = color + data = ET.tostring(root) + except ET.ParseError: + pass + width = height = { + Gtk.IconSize.MENU: 16, + Gtk.IconSize.SMALL_TOOLBAR: 16, + Gtk.IconSize.LARGE_TOOLBAR: 24, + Gtk.IconSize.BUTTON: 16, + Gtk.IconSize.DND: 12, + Gtk.IconSize.DIALOG: 48, + }.get(size) + cls._pixbufs[size][iconname] = data2pixbuf(data, width, height) + return cls._pixbufs[size][iconname] + + @classmethod + def get_image(cls, iconname, size=Gtk.IconSize.BUTTON, color=None): + pixbuf = cls.get_pixbuf(iconname, size, color) + image = Gtk.Image() + image.set_from_pixbuf(pixbuf) + return image -ICONFACTORY = TrytonIconFactory() -ICONFACTORY.add_default() +IconFactory.load_local_icons() class ModelAccess(object): @@ -275,10 +304,8 @@ def selection(title, values, alwaysask=False): parent = get_toplevel_window() dialog = gtk.Dialog(_('Selection'), parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) - cancel_button = dialog.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) - cancel_button.set_always_show_image(True) - ok_button = dialog.add_button('gtk-ok', gtk.RESPONSE_OK) - ok_button.set_always_show_image(True) + dialog.add_button(set_underline(_("Cancel")), gtk.RESPONSE_CANCEL) + dialog.add_button(set_underline(_("OK")), gtk.RESPONSE_OK) dialog.set_icon(TRYTON_ICON) dialog.set_default_response(gtk.RESPONSE_OK) dialog.set_default_size(400, 400) @@ -333,11 +360,11 @@ def file_selection(title, filename='', filters=None): parent = get_toplevel_window() if action == gtk.FILE_CHOOSER_ACTION_OPEN: - buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_OPEN, gtk.RESPONSE_OK) + buttons = (set_underline(_("Cancel")), gtk.RESPONSE_CANCEL, + set_underline(_("Select")), gtk.RESPONSE_OK) else: - buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_SAVE, gtk.RESPONSE_OK) + buttons = (set_underline(_("Cancel")), gtk.RESPONSE_CANCEL, + set_underline(_("Save")), gtk.RESPONSE_OK) win = gtk.FileChooserDialog(title, None, action, buttons) win.set_transient_for(parent) win.set_icon(TRYTON_ICON) @@ -595,9 +622,9 @@ class Sur3BDialog(ConfirmationDialog): def build_dialog(self, *args, **kwargs): dialog = super().build_dialog(*args, **kwargs) - dialog.add_button("gtk-cancel", gtk.RESPONSE_CANCEL) - dialog.add_button("gtk-no", gtk.RESPONSE_NO) - dialog.add_button("gtk-yes", gtk.RESPONSE_YES) + dialog.add_button(set_underline(_("Cancel")), gtk.RESPONSE_CANCEL) + dialog.add_button(set_underline(_("No")), gtk.RESPONSE_NO) + dialog.add_button(set_underline(_("Yes")), gtk.RESPONSE_YES) dialog.set_default_response(gtk.RESPONSE_YES) return dialog @@ -643,25 +670,18 @@ class ConcurrencyDialog(UniqueDialog): gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_QUESTION, gtk.BUTTONS_NONE, _('Concurrency Exception')) - dialog.set_default_response(gtk.RESPONSE_CANCEL) dialog.format_secondary_text( _('This record has been modified while you were editing it.')) - cancel_button = dialog.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) + cancel_button = dialog.add_button( + set_underline(_("Cancel")), gtk.RESPONSE_CANCEL) tooltips.set_tip(cancel_button, _('Cancel saving')) - compare_button = gtk.Button( - set_underline(_('Compare')), use_underline=True) + compare_button = dialog.add_button( + set_underline(_("Compare")), gtk.RESPONSE_APPLY) tooltips.set_tip(compare_button, _('See the modified version')) - image = gtk.Image() - image.set_from_stock('tryton-find-replace', gtk.ICON_SIZE_BUTTON) - compare_button.set_image(image) - dialog.add_action_widget(compare_button, gtk.RESPONSE_APPLY) - write_button = gtk.Button( - set_underline(_('Write Anyway')), use_underline=True) + write_button = dialog.add_button( + set_underline(_("Write Anyway")), gtk.RESPONSE_OK) tooltips.set_tip(write_button, _('Save your current version')) - image = gtk.Image() - image.set_from_stock('tryton-save', gtk.ICON_SIZE_BUTTON) - write_button.set_image(image) - dialog.add_action_widget(write_button, gtk.RESPONSE_OK) + dialog.set_default_response(gtk.RESPONSE_CANCEL) return dialog def __call__(self, resource, obj_id, context): @@ -692,10 +712,8 @@ class ErrorDialog(UniqueDialog): _('Application Error')) dialog.set_default_size(600, 400) - but_send = gtk.Button(_('Report Bug')) - dialog.add_action_widget(but_send, gtk.RESPONSE_OK) - close_button = dialog.add_button("gtk-close", gtk.RESPONSE_CANCEL) - close_button.set_always_show_image(True) + dialog.add_button(set_underline(_("Report Bug")), gtk.RESPONSE_OK) + dialog.add_button(set_underline(_("Close")), gtk.RESPONSE_CANCEL) dialog.set_default_response(gtk.RESPONSE_CANCEL) vbox = dialog.vbox @@ -758,18 +776,16 @@ def send_bugtracker(title, msg): parent = get_toplevel_window() win = gtk.Dialog(_('Bug Tracker'), parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) - cancel_button = win.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) - cancel_button.set_always_show_image(True) - ok_button = win.add_button('gtk-ok', gtk.RESPONSE_OK) - ok_button.set_always_show_image(True) + win.add_button(set_underline(_("Cancel")), gtk.RESPONSE_CANCEL) + win.add_button(set_underline(_("OK")), gtk.RESPONSE_OK) win.set_icon(TRYTON_ICON) win.set_default_response(gtk.RESPONSE_OK) hbox = gtk.HBox() - image = gtk.Image() - image.set_from_stock('tryton-dialog-information', - gtk.ICON_SIZE_DIALOG) - hbox.pack_start(image, False, False) + hbox.pack_start( + IconFactory.get_image( + 'tryton-info', gtk.ICON_SIZE_DIALOG), + False, False) table = gtk.Table(2, 2) table.set_col_spacings(3) @@ -1258,26 +1274,21 @@ def resize_pixbuf(pixbuf, width, height): gtk.gdk.INTERP_BILINEAR) -def _data2pixbuf(data): +def _data2pixbuf(data, width=None, height=None): loader = gtk.gdk.PixbufLoader() + if width and height: + loader.set_size(width, height) loader.write(data) loader.close() return loader.get_pixbuf() -BIG_IMAGE_SIZE = 10 ** 6 -with open(os.path.join(PIXMAPS_DIR, 'tryton-noimage.png'), 'rb') as no_image: - NO_IMG_PIXBUF = _data2pixbuf(no_image.read()) - - -def data2pixbuf(data): - pixbuf = NO_IMG_PIXBUF +def data2pixbuf(data, width=None, height=None): if data: try: - pixbuf = _data2pixbuf(data) + return _data2pixbuf(data, width, height) except glib.GError: pass - return pixbuf def get_label_attributes(readonly, required): diff --git a/tryton/common/datetime_.py b/tryton/common/datetime_.py index a79e3dfe64..42609c098e 100644 --- a/tryton/common/datetime_.py +++ b/tryton/common/datetime_.py @@ -9,6 +9,7 @@ import gtk from dateutil.relativedelta import relativedelta from dateutil.parser import parse +from .common import IconFactory from .datetime_strftime import datetime_strftime as strftime __all__ = ['Date', 'CellRendererDate', 'Time', 'CellRendererTime', 'DateTime'] @@ -55,7 +56,9 @@ class Date(gtk.Entry): self.connect('activate', self.activate) # Calendar Popup - self.set_icon_from_stock(gtk.ENTRY_ICON_PRIMARY, 'tryton-calendar') + self.set_icon_from_pixbuf( + gtk.ENTRY_ICON_PRIMARY, + IconFactory.get_pixbuf('tryton-date', gtk.ICON_SIZE_MENU)) self.set_icon_tooltip_text(gtk.ENTRY_ICON_PRIMARY, _('Open the calendar')) self.connect('icon-press', self.icon_press) diff --git a/tryton/common/popup_menu.py b/tryton/common/popup_menu.py index ee01f29587..795d76a347 100644 --- a/tryton/common/popup_menu.py +++ b/tryton/common/popup_menu.py @@ -2,7 +2,7 @@ # this repository contains the full copyright notices and license terms. import gtk import gettext -from tryton.common import RPCExecute, RPCException +from tryton.common import RPCExecute, RPCException, IconFactory from tryton.gui.window.view_form.screen import Screen from tryton.action import Action from tryton.gui.window import Window @@ -87,16 +87,14 @@ def populate(menu, model, record, title='', field=None, context=None): action_menu.append(gtk.SeparatorMenuItem()) attachment_item = gtk.ImageMenuItem() attachment_item.set_label(_('Attachments...')) - attachment_icon = gtk.Image() - attachment_icon.set_from_stock('tryton-attachment', gtk.ICON_SIZE_MENU) - attachment_item.set_image(attachment_icon) + attachment_item.set_image(IconFactory.get_image( + 'tryton-attachment', gtk.ICON_SIZE_MENU)) action_menu.append(attachment_item) attachment_item.connect('activate', attachment) note_item = gtk.ImageMenuItem() note_item.set_label(_('Notes...')) - note_icon = gtk.Image() - note_icon.set_from_stock('tryton-note', gtk.ICON_SIZE_MENU) - note_item.set_image(note_icon) + note_item.set_image(IconFactory.get_image( + 'tryton-note', gtk.ICON_SIZE_MENU)) action_menu.append(note_item) note_item.connect('activate', note) @@ -106,19 +104,18 @@ def populate(menu, model, record, title='', field=None, context=None): except RPCException: return for atype, icon, label, flavor in ( - ('action', 'tryton-executable', _('Actions...'), None), - ('relate', 'tryton-go-jump', _('Relate...'), None), - ('print', 'tryton-print-open', _('Report...'), 'open'), - ('print', 'tryton-print-email', _('E-Mail...'), 'email'), + ('action', 'tryton-launch', _('Actions...'), None), + ('relate', 'tryton-link', _('Relate...'), None), + ('print', 'tryton-open', _('Report...'), 'open'), + ('print', 'tryton-email', _('E-Mail...'), 'email'), ('print', 'tryton-print', _('Print...'), 'print'), ): if len(action_menu): action_menu.append(gtk.SeparatorMenuItem()) title_item = gtk.ImageMenuItem() title_item.set_label(label) - title_icon = gtk.Image() - title_icon.set_from_stock(icon, gtk.ICON_SIZE_MENU) - title_item.set_image(title_icon) + title_item.set_image(IconFactory.get_image( + icon, gtk.ICON_SIZE_MENU)) action_menu.append(title_item) if not toolbar[atype]: title_item.set_sensitive(False) diff --git a/tryton/config.py b/tryton/config.py index b787e22a3a..6dd14d7a65 100644 --- a/tryton/config.py +++ b/tryton/config.py @@ -54,6 +54,8 @@ class ConfigManager(object): 'client.email': '', 'client.limit': 1000, 'client.check_version': True, + 'icon.color': '#3465a4', + 'image.max_size': 10 ** 6, 'roundup.url': 'http://bugs.tryton.org/', 'roundup.xmlrpc': 'roundup-xmlrpc.tryton.org', 'download.url': 'https://downloads.tryton.org/', diff --git a/tryton/data/pixmaps/tryton/LICENSE b/tryton/data/pixmaps/tryton/LICENSE new file mode 100644 index 0000000000..7a4a3ea242 --- /dev/null +++ b/tryton/data/pixmaps/tryton/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/tryton/data/pixmaps/tryton/tryton-add.svg b/tryton/data/pixmaps/tryton/tryton-add.svg new file mode 100644 index 0000000000..08cc2308c8 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-add.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-archive.svg b/tryton/data/pixmaps/tryton/tryton-archive.svg index 13c4f62501..a5d45991b7 100644 --- a/tryton/data/pixmaps/tryton/tryton-archive.svg +++ b/tryton/data/pixmaps/tryton/tryton-archive.svg @@ -1,318 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - File Manager - - - Jakub Steiner - - - http://jimmac.musichall.cz - - - file - manager - copy - move - filesystem - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/tryton/data/pixmaps/tryton/tryton-attach.svg b/tryton/data/pixmaps/tryton/tryton-attach.svg new file mode 100644 index 0000000000..23979032c2 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-attach.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-attachment-hi.svg b/tryton/data/pixmaps/tryton/tryton-attachment-hi.svg deleted file mode 100644 index 759177bb15..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-attachment-hi.svg +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Mail Attachment - 2005-11-04 - - - Andreas Nilsson - - - http://tango-project.org - - - attachment - file - - - - - - Garrett LeSage, Cédric Krier - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-attachment.svg b/tryton/data/pixmaps/tryton/tryton-attachment.svg deleted file mode 100644 index 00bc67b809..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-attachment.svg +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Mail Attachment - 2005-11-04 - - - Andreas Nilsson - - - http://tango-project.org - - - attachment - file - - - - - - Garrett LeSage - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-back.svg b/tryton/data/pixmaps/tryton/tryton-back.svg new file mode 100644 index 0000000000..c37f00025a --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-back.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-bookmark-border.svg b/tryton/data/pixmaps/tryton/tryton-bookmark-border.svg new file mode 100644 index 0000000000..abcd01628a --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-bookmark-border.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-bookmark.svg b/tryton/data/pixmaps/tryton/tryton-bookmark.svg index a05002f2d6..8b5a0a5539 100644 --- a/tryton/data/pixmaps/tryton/tryton-bookmark.svg +++ b/tryton/data/pixmaps/tryton/tryton-bookmark.svg @@ -1,427 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - - address - contact - book - office - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/tryton/data/pixmaps/tryton/tryton-bookmarks.svg b/tryton/data/pixmaps/tryton/tryton-bookmarks.svg new file mode 100644 index 0000000000..79839be669 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-bookmarks.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-calendar.svg b/tryton/data/pixmaps/tryton/tryton-calendar.svg deleted file mode 100644 index 536d4d61d9..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-calendar.svg +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Calendar - - - Jakub Steiner - - - http://jimmac.musichall.cz - - - calendar - date - time - cal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-cancel.svg b/tryton/data/pixmaps/tryton/tryton-cancel.svg new file mode 100644 index 0000000000..b2dac49d45 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-cancel.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-clear.svg b/tryton/data/pixmaps/tryton/tryton-clear.svg index c946399742..289d406e75 100644 --- a/tryton/data/pixmaps/tryton/tryton-clear.svg +++ b/tryton/data/pixmaps/tryton/tryton-clear.svg @@ -1,417 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Edit Clear - - - Andreas Nilsson - - - http://www.tango-project.org - - - clear - reset - blank - edit - - - - - - Jakub Steiner (although minimally ;) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/tryton/data/pixmaps/tryton/tryton-close.svg b/tryton/data/pixmaps/tryton/tryton-close.svg index 4f8c9db6a9..289d406e75 100644 --- a/tryton/data/pixmaps/tryton/tryton-close.svg +++ b/tryton/data/pixmaps/tryton/tryton-close.svg @@ -1,360 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Unreadable - - - emblem - access - denied - unreadable - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/tryton/data/pixmaps/tryton/tryton-connect.svg b/tryton/data/pixmaps/tryton/tryton-connect.svg deleted file mode 100644 index fe6b5a0f04..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-connect.svg +++ /dev/null @@ -1,1044 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Computer - 2005-03-08 - - - Jakub Steiner - - - - - workstation - computer - node - client - - - - http://jimmac.musichall.cz/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-copy.svg b/tryton/data/pixmaps/tryton/tryton-copy.svg index 1883eb9843..dbd8b0cfc2 100644 --- a/tryton/data/pixmaps/tryton/tryton-copy.svg +++ b/tryton/data/pixmaps/tryton/tryton-copy.svg @@ -1,329 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Edit Copy - 2005-10-15 - - - Andreas Nilsson - - - - - edit - copy - - - - - - Jakub Steiner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/tryton/data/pixmaps/tryton/tryton-create.svg b/tryton/data/pixmaps/tryton/tryton-create.svg new file mode 100644 index 0000000000..015dc1bcd4 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-create.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-date.svg b/tryton/data/pixmaps/tryton/tryton-date.svg new file mode 100644 index 0000000000..1aab65c4e6 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-date.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-delete.svg b/tryton/data/pixmaps/tryton/tryton-delete.svg index 362186733f..9308f4df56 100644 --- a/tryton/data/pixmaps/tryton/tryton-delete.svg +++ b/tryton/data/pixmaps/tryton/tryton-delete.svg @@ -1,897 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Delete - - - - Jakub Steiner - - - - - edit - delete - shredder - - - - - Novell, Inc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/tryton/data/pixmaps/tryton/tryton-dialog-error.svg b/tryton/data/pixmaps/tryton/tryton-dialog-error.svg deleted file mode 100644 index a8ccd7cb89..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-dialog-error.svg +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Rodney Dawes - - - - - Jakub Steiner, Garrett LeSage - - - - Dialog Error - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-dialog-information.svg b/tryton/data/pixmaps/tryton/tryton-dialog-information.svg deleted file mode 100644 index 2855792d82..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-dialog-information.svg +++ /dev/null @@ -1,1160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Info - - - Jakub Steiner - - - - - dialog - info - - - http://jimmac.musichall.cz - - - - Garrett LeSage - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-dialog-warning.svg b/tryton/data/pixmaps/tryton/tryton-dialog-warning.svg deleted file mode 100644 index 59ec3fbf94..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-dialog-warning.svg +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Dialog Warning - 2005-10-14 - - - Andreas Nilsson - - - - - Jakub Steiner, Garrett LeSage - - - - - dialog - warning - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-disconnect.svg b/tryton/data/pixmaps/tryton/tryton-disconnect.svg deleted file mode 100644 index 37be1ebf87..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-disconnect.svg +++ /dev/null @@ -1,1415 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Computer - 2005-03-08 - - - Jakub Steiner - - - - - workstation - computer - node - client - - - - http://jimmac.musichall.cz/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-email.svg b/tryton/data/pixmaps/tryton/tryton-email.svg new file mode 100644 index 0000000000..e1560c6374 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-email.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-error.svg b/tryton/data/pixmaps/tryton/tryton-error.svg new file mode 100644 index 0000000000..19c6c83163 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-error.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-executable.svg b/tryton/data/pixmaps/tryton/tryton-executable.svg deleted file mode 100644 index 5a6293b1dd..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-executable.svg +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Executable - - - Jakub Steiner - - - http://jimmac.musichall.cz/ - - - executable - program - binary - bin - script - shell - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-exit.svg b/tryton/data/pixmaps/tryton/tryton-exit.svg new file mode 100644 index 0000000000..dbd95bfd9c --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-exit.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-export.svg b/tryton/data/pixmaps/tryton/tryton-export.svg new file mode 100644 index 0000000000..41628798b2 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-export.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-filter.svg b/tryton/data/pixmaps/tryton/tryton-filter.svg new file mode 100644 index 0000000000..f0a2e4f31f --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-filter.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-find-replace.svg b/tryton/data/pixmaps/tryton/tryton-find-replace.svg deleted file mode 100644 index f6b51a2c8e..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-find-replace.svg +++ /dev/null @@ -1,975 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Edit Find Replace - - - edit - find - locate - search - - - - - - Garrett LeSage - - - - - - Jakub Steiner, Steven Garrity - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-find.svg b/tryton/data/pixmaps/tryton/tryton-find.svg deleted file mode 100644 index ab591370fe..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-find.svg +++ /dev/null @@ -1,751 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Edit Find - - - edit - find - locate - search - - - - - - Steven Garrity - - - - - - Jakub Steiner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-folder-new.svg b/tryton/data/pixmaps/tryton/tryton-folder-new.svg deleted file mode 100644 index cab1bc4079..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-folder-new.svg +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - New Folder - - - - Jakub Steiner - - - - http://jimmac.musichall.cz - - - folder - directory - create - new - - - - - Tuomas Kuosmanen - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-format-align-center.svg b/tryton/data/pixmaps/tryton/tryton-format-align-center.svg new file mode 100644 index 0000000000..75873e9185 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-format-align-center.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-format-align-justify.svg b/tryton/data/pixmaps/tryton/tryton-format-align-justify.svg new file mode 100644 index 0000000000..288727edfc --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-format-align-justify.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-format-align-left.svg b/tryton/data/pixmaps/tryton/tryton-format-align-left.svg new file mode 100644 index 0000000000..97645a3295 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-format-align-left.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-format-align-right.svg b/tryton/data/pixmaps/tryton/tryton-format-align-right.svg new file mode 100644 index 0000000000..c073397046 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-format-align-right.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-format-bold.svg b/tryton/data/pixmaps/tryton/tryton-format-bold.svg new file mode 100644 index 0000000000..ca6b4b63ce --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-format-bold.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-format-color-text.svg b/tryton/data/pixmaps/tryton/tryton-format-color-text.svg new file mode 100644 index 0000000000..4bda2cb107 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-format-color-text.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-format-italic.svg b/tryton/data/pixmaps/tryton/tryton-format-italic.svg new file mode 100644 index 0000000000..fa65b97d56 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-format-italic.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-format-underline.svg b/tryton/data/pixmaps/tryton/tryton-format-underline.svg new file mode 100644 index 0000000000..8615187f44 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-format-underline.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-forward.svg b/tryton/data/pixmaps/tryton/tryton-forward.svg new file mode 100644 index 0000000000..461dc3f692 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-forward.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-fullscreen.svg b/tryton/data/pixmaps/tryton/tryton-fullscreen.svg deleted file mode 100644 index e61ededec1..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-fullscreen.svg +++ /dev/null @@ -1,523 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - View Fullscreen - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-go-home.svg b/tryton/data/pixmaps/tryton/tryton-go-home.svg deleted file mode 100644 index f580c1876b..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-go-home.svg +++ /dev/null @@ -1,446 +0,0 @@ - -image/svg+xmlGo HomeJakub Steinerhttp://jimmac.musichall.czhomereturngodefaultuserdirectoryTuomas Kuosmanen - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-go-jump.svg b/tryton/data/pixmaps/tryton/tryton-go-jump.svg deleted file mode 100644 index 7921cdb0c7..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-go-jump.svg +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Go Jump - - - go - jump - seek - arrow - pointer - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-go-next.svg b/tryton/data/pixmaps/tryton/tryton-go-next.svg deleted file mode 100644 index 6c0a09018e..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-go-next.svg +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Go Next - - - go - next - right - arrow - pointer - > - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-go-previous.svg b/tryton/data/pixmaps/tryton/tryton-go-previous.svg deleted file mode 100644 index b95349738d..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-go-previous.svg +++ /dev/null @@ -1,855 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Go Previous - - - go - previous - left - arrow - pointer - < - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-help.svg b/tryton/data/pixmaps/tryton/tryton-help.svg deleted file mode 100644 index db1392466c..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-help.svg +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Help Browser - 2005-11-06 - - - Tuomas Kuosmanen - - - - - help - browser - documentation - docs - man - info - - - - - - Jakub Steiner, Andreas Nilsson - - - http://tigert.com - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-history.svg b/tryton/data/pixmaps/tryton/tryton-history.svg new file mode 100644 index 0000000000..05f201a445 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-history.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-icon.svg b/tryton/data/pixmaps/tryton/tryton-icon.svg deleted file mode 100644 index 5d42445920..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-icon.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - Tryton - - - - - - - - image/svg+xml - - Tryton - - - - Bertrand Chenal - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-import.svg b/tryton/data/pixmaps/tryton/tryton-import.svg new file mode 100644 index 0000000000..f093479f99 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-import.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-info.svg b/tryton/data/pixmaps/tryton/tryton-info.svg new file mode 100644 index 0000000000..5b31235b88 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-info.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-launch.svg b/tryton/data/pixmaps/tryton/tryton-launch.svg new file mode 100644 index 0000000000..7479e92628 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-launch.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-link.svg b/tryton/data/pixmaps/tryton/tryton-link.svg new file mode 100644 index 0000000000..08d13d80da --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-link.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-list-add.svg b/tryton/data/pixmaps/tryton/tryton-list-add.svg deleted file mode 100644 index b3ddd25252..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-list-add.svg +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Add - 2006-01-04 - - - Andreas Nilsson - - - http://tango-project.org - - - add - plus - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-list-remove.svg b/tryton/data/pixmaps/tryton/tryton-list-remove.svg deleted file mode 100644 index bd9b979c57..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-list-remove.svg +++ /dev/null @@ -1,425 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Remove - 2006-01-04 - - - Andreas Nilsson - - - http://tango-project.org - - - remove - delete - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-locale.svg b/tryton/data/pixmaps/tryton/tryton-locale.svg deleted file mode 100644 index 76cd4e588e..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-locale.svg +++ /dev/null @@ -1,879 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Locale Preferences - - - locale preferences - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-lock.svg b/tryton/data/pixmaps/tryton/tryton-lock.svg deleted file mode 100644 index 8c44878018..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-lock.svg +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - Jakub Steiner - - - http://jimmac.musichall.cz/ - - - Cédric Krier - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-log-out.svg b/tryton/data/pixmaps/tryton/tryton-log-out.svg deleted file mode 100644 index fb53bb23f2..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-log-out.svg +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - System Log Out - - - log out - logout - exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-log.svg b/tryton/data/pixmaps/tryton/tryton-log.svg new file mode 100644 index 0000000000..3bcd81e84c --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-log.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-mail-message-new.svg b/tryton/data/pixmaps/tryton/tryton-mail-message-new.svg deleted file mode 100644 index ad7de185f9..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-mail-message-new.svg +++ /dev/null @@ -1,465 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Mail New - - - Jakub Steiner - - - - - Andreas Nilsson, Steven Garrity - - - - - - mail - e-mail - MUA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-mail-message.svg b/tryton/data/pixmaps/tryton/tryton-mail-message.svg deleted file mode 100644 index 130d066234..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-mail-message.svg +++ /dev/null @@ -1,502 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Mail New - - - Jakub Steiner - - - - - Andreas Nilsson, Steven Garrity, Cédric Krier - - - - - - mail - e-mail - MUA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-menu.svg b/tryton/data/pixmaps/tryton/tryton-menu.svg new file mode 100644 index 0000000000..37e9cfb552 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-menu.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-new.svg b/tryton/data/pixmaps/tryton/tryton-new.svg deleted file mode 100644 index 47f216bf2b..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-new.svg +++ /dev/null @@ -1,449 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - New Document - - - Jakub Steiner - - - http://jimmac.musichall.cz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-noimage.png b/tryton/data/pixmaps/tryton/tryton-noimage.png deleted file mode 100644 index 0d2452b5af1248a4347b396c01d27f99ea42d8d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1SIoCSFHz9oCO|{#S9GG!XV7ZFl!D-1$&97 zuPgg?Rt`}Mnd>JOv;&1?OI#yLobz*YQ}ap~oQqNuOHxx5$}>wc6hbmm72G|21Ky{o z<^dHddAc};Se#D&^Z&m+vnhix^V9=_ZE&Kog diff --git a/tryton/data/pixmaps/tryton/tryton-note-hi.svg b/tryton/data/pixmaps/tryton/tryton-note-hi.svg deleted file mode 100644 index ad5a05b576..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-note-hi.svg +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - Jakub Steiner - - - - - - - - - - - group - chat - IRC - internet - network - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-note.svg b/tryton/data/pixmaps/tryton/tryton-note.svg index 458086732c..a10719ede4 100644 --- a/tryton/data/pixmaps/tryton/tryton-note.svg +++ b/tryton/data/pixmaps/tryton/tryton-note.svg @@ -1,445 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - Jakub Steiner - - - - - - - - - - - group - chat - IRC - internet - network - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/tryton/data/pixmaps/tryton/tryton-ok.svg b/tryton/data/pixmaps/tryton/tryton-ok.svg new file mode 100644 index 0000000000..535ff0390a --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-ok.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-open.svg b/tryton/data/pixmaps/tryton/tryton-open.svg index 144cb0e9f1..f33176ea28 100644 --- a/tryton/data/pixmaps/tryton/tryton-open.svg +++ b/tryton/data/pixmaps/tryton/tryton-open.svg @@ -1,536 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Folder Icon Accept - 2005-01-31 - - - Jakub Steiner - - - - http://jimmac.musichall.cz - Active state - when files are being dragged to. - - - Novell, Inc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/tryton/data/pixmaps/tryton/tryton-preferences-system-session.svg b/tryton/data/pixmaps/tryton/tryton-preferences-system-session.svg deleted file mode 100644 index 3490bba532..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-preferences-system-session.svg +++ /dev/null @@ -1,511 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Preferences Session - - - session - restart - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-preferences-system.svg b/tryton/data/pixmaps/tryton/tryton-preferences-system.svg deleted file mode 100644 index ed634284dd..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-preferences-system.svg +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Preferences System - - - preferences - settings - control panel - tweaks - system - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-preferences.svg b/tryton/data/pixmaps/tryton/tryton-preferences.svg deleted file mode 100644 index f5b070f24a..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-preferences.svg +++ /dev/null @@ -1,778 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Desktop Preferences - - - preferences - system - category - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-print-email.svg b/tryton/data/pixmaps/tryton/tryton-print-email.svg deleted file mode 100644 index 3f433b0189..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-print-email.svg +++ /dev/null @@ -1,883 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - Jakub Steiner - - - - - Andreas Nilsson, Steven Garrity - - - - - - mail - e-mail - MUA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-print-open.svg b/tryton/data/pixmaps/tryton/tryton-print-open.svg deleted file mode 100644 index 655e0b413a..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-print-open.svg +++ /dev/null @@ -1,869 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-print.svg b/tryton/data/pixmaps/tryton/tryton-print.svg index 213b3c9b09..7ffc5851fd 100644 --- a/tryton/data/pixmaps/tryton/tryton-print.svg +++ b/tryton/data/pixmaps/tryton/tryton-print.svg @@ -1,503 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Printer - - - Jakub Steiner - - - - http://jimmac.musichall.cz - - - printer - local - laser - bubblejet - inkjet - print - output - cups - lpd - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/tryton/data/pixmaps/tryton/tryton-public.svg b/tryton/data/pixmaps/tryton/tryton-public.svg new file mode 100644 index 0000000000..24d6e503ed --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-public.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-refresh.svg b/tryton/data/pixmaps/tryton/tryton-refresh.svg index 84a88911fb..e9618ab4f9 100644 --- a/tryton/data/pixmaps/tryton/tryton-refresh.svg +++ b/tryton/data/pixmaps/tryton/tryton-refresh.svg @@ -1,394 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - View Refresh - - - reload - refresh - view - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/tryton/data/pixmaps/tryton/tryton-remove.svg b/tryton/data/pixmaps/tryton/tryton-remove.svg new file mode 100644 index 0000000000..ab7f7ba90e --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-remove.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-save-as.svg b/tryton/data/pixmaps/tryton/tryton-save-as.svg deleted file mode 100644 index bcbcf483b1..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-save-as.svg +++ /dev/null @@ -1,664 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Save As - - - Jakub Steiner - - - - - hdd - hard drive - save as - io - store - - - - - http://jimmac.musichall.cz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-save.svg b/tryton/data/pixmaps/tryton/tryton-save.svg index d6380089d4..3754a0cf0d 100644 --- a/tryton/data/pixmaps/tryton/tryton-save.svg +++ b/tryton/data/pixmaps/tryton/tryton-save.svg @@ -1,620 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Save - - - Jakub Steiner - - - - - hdd - hard drive - save - io - store - - - - - http://jimmac.musichall.cz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/tryton/data/pixmaps/tryton/tryton-search.svg b/tryton/data/pixmaps/tryton/tryton-search.svg new file mode 100644 index 0000000000..6859898f79 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-search.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-star-border.svg b/tryton/data/pixmaps/tryton/tryton-star-border.svg new file mode 100644 index 0000000000..21862f2cd7 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-star-border.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-star.svg b/tryton/data/pixmaps/tryton/tryton-star.svg index b5785ef8b5..2b5e942ef8 100644 --- a/tryton/data/pixmaps/tryton/tryton-star.svg +++ b/tryton/data/pixmaps/tryton/tryton-star.svg @@ -1,143 +1,5 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-start-here.svg b/tryton/data/pixmaps/tryton/tryton-start-here.svg deleted file mode 100644 index 2e5f20217c..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-start-here.svg +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Start Here - To be replaced by vendor/distribution branding. - - - start - applications - launchers - - - - - Garrett LeSage - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-switch.svg b/tryton/data/pixmaps/tryton/tryton-switch.svg new file mode 100644 index 0000000000..cc607585b9 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-switch.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-system-file-manager.svg b/tryton/data/pixmaps/tryton/tryton-system-file-manager.svg deleted file mode 100644 index 13c4f62501..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-system-file-manager.svg +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - File Manager - - - Jakub Steiner - - - http://jimmac.musichall.cz - - - file - manager - copy - move - filesystem - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-system.svg b/tryton/data/pixmaps/tryton/tryton-system.svg deleted file mode 100644 index 748999f2d3..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-system.svg +++ /dev/null @@ -1,741 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Computer - 2005-03-08 - - - Jakub Steiner - - - - - workstation - computer - node - client - - - - http://jimmac.musichall.cz/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-text-background.svg b/tryton/data/pixmaps/tryton/tryton-text-background.svg deleted file mode 100644 index 3b2332fe44..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-text-background.svg +++ /dev/null @@ -1,548 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Graphics Category - - - - Jakub Steiner - - - - - - graphics - category - pixel - vector - editor - draw - paint - - - http://tango-project.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-text-foreground.svg b/tryton/data/pixmaps/tryton/tryton-text-foreground.svg deleted file mode 100644 index 7e076d3406..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-text-foreground.svg +++ /dev/null @@ -1,569 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - Jakub Steiner - - - - - - graphics - category - pixel - vector - editor - draw - paint - - - http://tango-project.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-text-markup.svg b/tryton/data/pixmaps/tryton/tryton-text-markup.svg deleted file mode 100644 index 00e755c557..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-text-markup.svg +++ /dev/null @@ -1,577 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Document Properties - - - document - settings - preferences - properties - tweak - - - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-translate.svg b/tryton/data/pixmaps/tryton/tryton-translate.svg new file mode 100644 index 0000000000..e0ed1220a3 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-translate.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-unarchive.svg b/tryton/data/pixmaps/tryton/tryton-unarchive.svg new file mode 100644 index 0000000000..765b534c0a --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-unarchive.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-undo.svg b/tryton/data/pixmaps/tryton/tryton-undo.svg index 0c0e81d3f9..6763ef40d0 100644 --- a/tryton/data/pixmaps/tryton/tryton-undo.svg +++ b/tryton/data/pixmaps/tryton/tryton-undo.svg @@ -1,231 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Edit Undo - - - edit - undo - revert - - - - - - - - - - - - - - - - + + + diff --git a/tryton/data/pixmaps/tryton/tryton-unstar.svg b/tryton/data/pixmaps/tryton/tryton-unstar.svg deleted file mode 100644 index e09223ec54..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-unstar.svg +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/data/pixmaps/tryton/tryton-warning.svg b/tryton/data/pixmaps/tryton/tryton-warning.svg new file mode 100644 index 0000000000..4a0fa05996 --- /dev/null +++ b/tryton/data/pixmaps/tryton/tryton-warning.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tryton/data/pixmaps/tryton/tryton-web-browser.svg b/tryton/data/pixmaps/tryton/tryton-web-browser.svg deleted file mode 100644 index 142e04218f..0000000000 --- a/tryton/data/pixmaps/tryton/tryton-web-browser.svg +++ /dev/null @@ -1,983 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Globe - - - Jakub Steiner - - - - - Tuomas Kuosmanen - - - - http://jimmac.musichall.cz - - - globe - international - web - www - internet - network - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tryton/gui/main.py b/tryton/gui/main.py index 6a8ed01b62..d28c2b4703 100644 --- a/tryton/gui/main.py +++ b/tryton/gui/main.py @@ -173,17 +173,15 @@ class Main(Gtk.Application): menu = Gtk.Button.new() menu .set_relief(Gtk.ReliefStyle.NONE) - icon = Gtk.Image.new() - icon.set_from_stock('gtk-home', Gtk.IconSize.BUTTON) - menu.set_image(icon) + menu.set_image( + common.IconFactory.get_image('tryton-menu', Gtk.IconSize.BUTTON)) menu.connect('clicked', self.menu_toggle) self.header.pack_start(menu) favorite = Gtk.MenuButton.new() favorite.set_relief(Gtk.ReliefStyle.NONE) - icon = Gtk.Image.new() - icon.set_from_stock('tryton-bookmark', Gtk.IconSize.BUTTON) - favorite.set_image(icon) + favorite.set_image(common.IconFactory.get_image( + 'tryton-bookmarks', Gtk.IconSize.BUTTON)) self.menu_favorite = Gtk.Menu.new() favorite.set_popup(self.menu_favorite) favorite.connect('clicked', self.favorite_set) @@ -365,9 +363,8 @@ class Main(Gtk.Application): _, model, model_name, record_id, record_name, icon = r if icon: text = common.to_xml(record_name) - common.ICONFACTORY.register_icon(icon) - pixbuf = widget.render_icon(stock_id=icon, - size=gtk.ICON_SIZE_BUTTON, detail=None) + pixbuf = common.IconFactory.get_pixbuf( + icon, gtk.ICON_SIZE_BUTTON) else: text = '%s:\n %s' % ( common.to_xml(model_name), @@ -453,11 +450,9 @@ class Main(Gtk.Application): return False for id_, name, icon in favorites: if icon: - common.ICONFACTORY.register_icon(icon) menuitem = gtk.ImageMenuItem(name) - image = gtk.Image() - image.set_from_stock(icon, gtk.ICON_SIZE_MENU) - menuitem.set_image(image) + menuitem.set_image( + common.IconFactory.get_image(name, gtk.ICON_SIZE_MENU)) else: menuitem = gtk.MenuItem(name) menuitem.connect('activate', _action_favorite, id_) @@ -516,7 +511,7 @@ class Main(Gtk.Application): prefs = {} threads = [] for target in ( - common.ICONFACTORY.load_icons, + common.IconFactory.load_icons, common.MODELACCESS.load_models, common.MODELHISTORY.load_history, common.VIEW_SEARCH.load_searches, @@ -658,13 +653,16 @@ class Main(Gtk.Application): menu = store.get_value(iter_, 0) favorite = menu.value.get('favorite') if favorite: - stock_id = 'tryton-star' + icon = 'tryton-star' elif favorite is False: - stock_id = 'tryton-unstar' + icon = 'tryton-star-border' else: - stock_id = '' - pixbuf = treeview.render_icon(stock_id=stock_id, - size=gtk.ICON_SIZE_MENU, detail=None) + icon = None + if icon: + pixbuf = common.IconFactory.get_pixbuf( + icon, gtk.ICON_SIZE_MENU) + else: + pixbuf = None cell.set_property('pixbuf', pixbuf) column.set_cell_data_func(favorite_renderer, favorite_setter) @@ -726,12 +724,11 @@ class Main(Gtk.Application): self.previous_pages[page] = previous_widget self.pages.append(page) hbox = gtk.HBox(spacing=3) - icon_w, icon_h = gtk.icon_size_lookup(gtk.ICON_SIZE_SMALL_TOOLBAR)[-2:] - if page.icon is not None: - common.ICONFACTORY.register_icon(page.icon) - image = gtk.Image() - image.set_from_stock(page.icon, gtk.ICON_SIZE_SMALL_TOOLBAR) - hbox.pack_start(image, expand=False, fill=False) + if page.icon: + hbox.pack_start( + common.IconFactory.get_image( + page.icon, gtk.ICON_SIZE_SMALL_TOOLBAR), + expand=False, fill=False) name = page.name label = gtk.Label(common.ellipsize(name, 20)) self.tooltips.set_tip(label, page.name) @@ -740,12 +737,10 @@ class Main(Gtk.Application): hbox.pack_start(label, expand=True, fill=True) button = gtk.Button() - img = gtk.Image() - img.set_from_stock('tryton-close', gtk.ICON_SIZE_MENU) - width, height = img.size_request() button.set_relief(gtk.RELIEF_NONE) button.set_can_focus(False) - button.add(img) + button.add(common.IconFactory.get_image( + 'tryton-close', gtk.ICON_SIZE_MENU)) self.tooltips.set_tip(button, _('Close Tab')) button.connect('clicked', self._sig_remove_book, page.widget) hbox.pack_start(button, expand=False, fill=False) diff --git a/tryton/gui/window/dblogin.py b/tryton/gui/window/dblogin.py index c0e367edd4..93bcfa5ee3 100644 --- a/tryton/gui/window/dblogin.py +++ b/tryton/gui/window/dblogin.py @@ -32,13 +32,13 @@ class DBListEditor(object): self.parent = parent self.dialog = gtk.Dialog(title=_('Profile Editor'), parent=parent, flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) - self.ok_button = self.dialog.add_button(gtk.STOCK_OK, - gtk.RESPONSE_ACCEPT) - self.ok_button.get_style_context().add_class( - Gtk.STYLE_CLASS_SUGGESTED_ACTION) + self.ok_button = self.dialog.add_button( + set_underline(_("Close")), gtk.RESPONSE_CLOSE) self.dialog.set_position(gtk.WIN_POS_CENTER_ON_PARENT) self.dialog.set_icon(TRYTON_ICON) + tooltips = common.Tooltips() + hpaned = gtk.HPaned() vbox_profiles = gtk.VBox(homogeneous=False, spacing=6) self.cell = gtk.CellRendererText() @@ -52,21 +52,23 @@ class DBListEditor(object): scroll = gtk.ScrolledWindow() scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) scroll.add(self.profile_tree) - self.add_button = gtk.Button(_('_Add'), use_underline=True) + self.add_button = gtk.Button() + self.add_button.set_image(common.IconFactory.get_image( + 'tryton-add', gtk.ICON_SIZE_BUTTON)) + tooltips.set_tip(self.add_button, _("Add new profile")) self.add_button.connect('clicked', self.profile_create) - add_image = gtk.Image() - add_image.set_from_stock('gtk-add', gtk.ICON_SIZE_BUTTON) - self.add_button.set_image(add_image) - self.remove_button = gtk.Button(_('_Remove'), use_underline=True) + self.remove_button = gtk.Button() + self.remove_button.set_image(common.IconFactory.get_image( + 'tryton-remove', gtk.ICON_SIZE_BUTTON)) + tooltips.set_tip(self.remove_button, _("Remove selected profile")) self.remove_button.get_style_context().add_class( Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION) self.remove_button.connect('clicked', self.profile_delete) - remove_image = gtk.Image() - remove_image.set_from_stock('gtk-remove', gtk.ICON_SIZE_BUTTON) - self.remove_button.set_image(remove_image) + bbox = Gtk.ButtonBox() + bbox.pack_start(self.remove_button) + bbox.pack_start(self.add_button) vbox_profiles.pack_start(scroll, expand=True, fill=True) - vbox_profiles.pack_start(self.add_button, expand=False, fill=True) - vbox_profiles.pack_start(self.remove_button, expand=False, fill=True) + vbox_profiles.pack_start(bbox, expand=False, fill=True) hpaned.add1(vbox_profiles) table = gtk.Table(4, 2, homogeneous=False) @@ -104,8 +106,6 @@ class DBListEditor(object): self.database_combo.connect('changed', self.dbcombo_changed) self.database_progressbar = gtk.ProgressBar() self.database_progressbar.set_text(_('Fetching databases list')) - image = gtk.Image() - image.set_from_stock('tryton-new', gtk.ICON_SIZE_BUTTON) db_box = gtk.VBox(homogeneous=True) db_box.pack_start(self.database_entry) db_box.pack_start(self.database_combo) @@ -135,7 +135,7 @@ class DBListEditor(object): self.dialog.vbox.pack_start(hpaned) self.dialog.set_default_size(640, 350) - self.dialog.set_default_response(gtk.RESPONSE_ACCEPT) + self.dialog.set_default_response(gtk.RESPONSE_CLOSE) self.dialog.connect('close', lambda *a: False) self.dialog.connect('response', self.response) @@ -394,18 +394,12 @@ class DBLogin(object): tooltips = common.Tooltips() button_cancel = gtk.Button(_('_Cancel'), use_underline=True) - img_cancel = gtk.Image() - img_cancel.set_from_stock('gtk-cancel', gtk.ICON_SIZE_BUTTON) - button_cancel.set_image(img_cancel) tooltips.set_tip(button_cancel, _('Cancel connection to the Tryton server')) self.dialog.add_action_widget(button_cancel, gtk.RESPONSE_CANCEL) self.button_connect = gtk.Button(_('C_onnect'), use_underline=True) self.button_connect.get_style_context().add_class( Gtk.STYLE_CLASS_SUGGESTED_ACTION) - img_connect = gtk.Image() - img_connect.set_from_stock('tryton-connect', gtk.ICON_SIZE_BUTTON) - self.button_connect.set_image(img_connect) self.button_connect.set_can_default(True) tooltips.set_tip(self.button_connect, _('Connect the Tryton server')) self.dialog.add_action_widget(self.button_connect, gtk.RESPONSE_OK) @@ -449,9 +443,6 @@ class DBLogin(object): self.table_main.attach(self.combo_profile, 1, 2, 1, 2) self.table_main.attach(self.profile_button, 2, 3, 1, 2, xoptions=gtk.FILL) - image = gtk.Image() - image.set_from_stock('gtk-edit', gtk.ICON_SIZE_BUTTON) - self.profile_button.set_image(image) self.expander = gtk.Expander() self.expander.set_label(_('Host / Database information')) self.expander.connect('notify::expanded', self.expand_hostspec) diff --git a/tryton/gui/window/email.py b/tryton/gui/window/email.py index 20ed9b3936..1c72ba6c21 100644 --- a/tryton/gui/window/email.py +++ b/tryton/gui/window/email.py @@ -4,7 +4,8 @@ import gtk import gettext -from tryton.common import get_toplevel_window +from tryton.common import get_toplevel_window, IconFactory +from tryton.common.underline import set_underline from tryton.config import TRYTON_ICON, CONFIG from tryton.gui import Main @@ -18,9 +19,15 @@ class Email(object): self.win = gtk.Dialog(_('Email'), self.parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) Main().add_window(self.win) - cancel_button = self.win.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) + cancel_button = self.win.add_button( + set_underline(_("Cancel")), gtk.RESPONSE_CANCEL) + cancel_button.set_image(IconFactory.get_image( + 'tryton-cancel', gtk.ICON_SIZE_BUTTON)) cancel_button.set_always_show_image(True) - ok_button = self.win.add_button('gtk-ok', gtk.RESPONSE_OK) + ok_button = self.win.add_button( + set_underline(_("OK")), gtk.RESPONSE_OK) + ok_button.set_image(IconFactory.get_image( + 'tryton-ok', gtk.ICON_SIZE_BUTTON)) ok_button.set_always_show_image(True) self.win.set_default_response(gtk.RESPONSE_OK) self.win.set_icon(TRYTON_ICON) diff --git a/tryton/gui/window/form.py b/tryton/gui/window/form.py index 053a227de7..2420a7f25a 100644 --- a/tryton/gui/window/form.py +++ b/tryton/gui/window/form.py @@ -4,6 +4,9 @@ import gettext import gtk import gobject + +from gi.repository import Gtk + from tryton.gui.window.view_form.screen import Screen from tryton.action import Action from tryton.gui import Main @@ -121,9 +124,13 @@ class Form(SignalEvent, TabContent): label = _('Attachment(%d)') % signal_data self.buttons['attach'].set_label(label) if signal_data: - self.buttons['attach'].set_stock_id('tryton-attachment-hi') + # FIXME + icon = 'tryton-attach' else: - self.buttons['attach'].set_stock_id('tryton-attachment') + icon = 'tryton-attach' + image = common.IconFactory.get_image(icon, gtk.ICON_SIZE_LARGE_TOOLBAR) + image.show() + self.buttons['attach'].set_icon_widget(image) record = self.screen.current_record self.buttons['attach'].props.sensitive = bool( record.id >= 0 if record else False) @@ -511,10 +518,10 @@ class Form(SignalEvent, TabContent): iconstock = { 'print': 'tryton-print', - 'action': 'tryton-executable', - 'relate': 'tryton-go-jump', - 'email': 'tryton-print-email', - 'open': 'tryton-print-open', + 'action': 'tryton-launch', + 'relate': 'tryton-link', + 'email': 'tryton-email', + 'open': 'tryton-open', } for action_type, special_action, action_name, tooltip in ( ('action', 'action', _('Action'), _('Launch action')), @@ -525,7 +532,10 @@ class Form(SignalEvent, TabContent): ('print', 'print', _('Print'), _('Print report')), ): if action_type is not None: - tbutton = gtk.ToggleToolButton(iconstock.get(special_action)) + tbutton = gtk.ToggleToolButton() + tbutton.set_icon_widget(common.IconFactory.get_image( + iconstock.get(special_action), + gtk.ICON_SIZE_LARGE_TOOLBAR)) tbutton.set_label(action_name) tbutton._menu = self._create_popup_menu(tbutton, action_type, toolbars[action_type], special_action) @@ -541,7 +551,10 @@ class Form(SignalEvent, TabContent): gtktoolbar.insert(gtk.SeparatorToolItem(), -1) - url_button = gtk.ToggleToolButton('tryton-web-browser') + url_button = gtk.ToggleToolButton() + url_button.set_icon_widget( + common.IconFactory.get_image( + 'tryton-public', gtk.ICON_SIZE_LARGE_TOOLBAR)) url_button.set_label(_('_Copy URL')) url_button.set_use_underline(True) self.tooltips.set_tip( @@ -607,9 +620,8 @@ class Form(SignalEvent, TabContent): menuitem.set_label('_' + button.attrs.get('string', _('Unknown'))) menuitem.set_use_underline(True) if button.attrs.get('icon'): - icon = gtk.Image() - icon.set_from_stock(button.attrs['icon'], gtk.ICON_SIZE_MENU) - menuitem.set_image(icon) + menuitem.set_image(common.IconFactory.get_image( + button.attrs['icon'], gtk.ICON_SIZE_MENU)) menuitem.connect('activate', lambda m, attrs: self.screen.button(attrs), button.attrs) menuitem._update_action = True diff --git a/tryton/gui/window/infobar.py b/tryton/gui/window/infobar.py index a25400b30d..75598c8030 100644 --- a/tryton/gui/window/infobar.py +++ b/tryton/gui/window/infobar.py @@ -1,23 +1,25 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -import gtk +from gi.repository import Gtk class InfoBar(object): def create_info_bar(self): - self.info_label = gtk.Label() + self.info_label = Gtk.Label() - self.info_bar = gtk.InfoBar() + self.info_bar = Gtk.InfoBar() self.info_bar.get_content_area().pack_start( self.info_label, False, False) - close_button = self.info_bar.add_button( - gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE) - close_button.set_always_show_image(True) + self.info_bar.set_show_close_button(True) self.info_bar.connect('response', lambda i, r: i.hide()) - def message_info(self, message=None, type_=gtk.MESSAGE_ERROR): + def response(self, bar, response): + if response == Gtk.ResponseType.CLOSE: + bar.hide() + + def message_info(self, message=None, type_=Gtk.MessageType.ERROR): if message: # Work around https://bugzilla.gnome.org/show_bug.cgi?id=710888 parent = self.info_bar.get_parent() diff --git a/tryton/gui/window/limit.py b/tryton/gui/window/limit.py index ede747e92c..e317364970 100644 --- a/tryton/gui/window/limit.py +++ b/tryton/gui/window/limit.py @@ -4,7 +4,8 @@ import sys import gtk import gettext -from tryton.common import get_toplevel_window +from tryton.common import get_toplevel_window, IconFactory +from tryton.common.underline import set_underline from tryton.config import TRYTON_ICON, CONFIG from tryton.gui import Main @@ -19,9 +20,15 @@ class Limit(object): self.win = gtk.Dialog(_('Limit'), self.parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) Main().add_window(self.win) - cancel_button = self.win.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) + cancel_button = self.win.add_button( + set_underline(_("Cancel")), gtk.RESPONSE_CANCEL) + cancel_button.set_image(IconFactory.get_image( + 'tryton-cancel', gtk.ICON_SIZE_BUTTON)) cancel_button.set_always_show_image(True) - ok_button = self.win.add_button('gtk-ok', gtk.RESPONSE_OK) + ok_button = self.win.add_button( + set_underline(_("OK")), gtk.RESPONSE_OK) + ok_button.set_image(IconFactory.get_image( + 'tryton-ok', gtk.ICON_SIZE_BUTTON)) ok_button.set_always_show_image(True) self.win.set_default_response(gtk.RESPONSE_OK) self.win.set_icon(TRYTON_ICON) diff --git a/tryton/gui/window/preference.py b/tryton/gui/window/preference.py index 211b8e0a02..461fb0e9e8 100644 --- a/tryton/gui/window/preference.py +++ b/tryton/gui/window/preference.py @@ -6,7 +6,8 @@ import gtk import copy import tryton.rpc as rpc -from tryton.common import RPCExecute, RPCException, Login +from tryton.common import RPCExecute, RPCException, Login, IconFactory +from tryton.common.underline import set_underline from tryton.config import TRYTON_ICON from tryton.exceptions import TrytonError from tryton.gui import Main @@ -31,10 +32,15 @@ class Preference(NoModal): self.accel_group = gtk.AccelGroup() self.win.add_accel_group(self.accel_group) - self.but_cancel = self.win.add_button(gtk.STOCK_CANCEL, - gtk.RESPONSE_CANCEL) + self.but_cancel = self.win.add_button( + set_underline(_("Cancel")), gtk.RESPONSE_CANCEL) + self.but_cancel.set_image(IconFactory.get_image( + 'tryton-cancel', gtk.ICON_SIZE_BUTTON)) self.but_cancel.set_always_show_image(True) - self.but_ok = self.win.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + self.but_ok = self.win.add_button( + set_underline(_("OK")), gtk.RESPONSE_OK) + self.but_ok.set_image(IconFactory.get_image( + 'tryton-ok', gtk.ICON_SIZE_BUTTON)) self.but_ok.set_always_show_image(True) self.but_ok.add_accelerator('clicked', self.accel_group, gtk.keysyms.Return, gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE) diff --git a/tryton/gui/window/revision.py b/tryton/gui/window/revision.py index a06ecc43fe..c26aaccb8e 100644 --- a/tryton/gui/window/revision.py +++ b/tryton/gui/window/revision.py @@ -3,9 +3,10 @@ import gtk import gettext -from tryton.common import get_toplevel_window +from tryton.common import get_toplevel_window, IconFactory from tryton.common.datetime_ import date_parse from tryton.common.datetime_strftime import datetime_strftime +from tryton.common.underline import set_underline from tryton.config import TRYTON_ICON from tryton.gui import Main @@ -20,9 +21,15 @@ class Revision(object): self.win = gtk.Dialog(_('Revision'), self.parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) Main().add_window(self.win) - cancel_button = self.win.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) + cancel_button = self.win.add_button( + set_underline(_("Cancel")), gtk.RESPONSE_CANCEL) + cancel_button.set_image(IconFactory.get_image( + 'tryton-cancel', gtk.ICON_SIZE_BUTTON)) cancel_button.set_always_show_image(True) - ok_button = self.win.add_button('gtk-ok', gtk.RESPONSE_OK) + ok_button = self.win.add_button( + set_underline(_("OK")), gtk.RESPONSE_OK) + ok_button.set_image(IconFactory.get_image( + 'tryton-ok', gtk.ICON_SIZE_BUTTON)) ok_button.set_always_show_image(True) self.win.set_default_response(gtk.RESPONSE_OK) self.win.set_icon(TRYTON_ICON) diff --git a/tryton/gui/window/shortcuts.py b/tryton/gui/window/shortcuts.py index cbe57e4813..6891eac4fa 100644 --- a/tryton/gui/window/shortcuts.py +++ b/tryton/gui/window/shortcuts.py @@ -4,7 +4,8 @@ import gtk import gettext -from tryton.common import get_toplevel_window +from tryton.common import get_toplevel_window, IconFactory +from tryton.common.underline import set_underline from tryton.config import TRYTON_ICON from tryton.gui import Main @@ -20,7 +21,10 @@ class Shortcuts(object): gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT | gtk.WIN_POS_CENTER_ON_PARENT | gtk.gdk.WINDOW_TYPE_HINT_DIALOG) Main().add_window(self.dialog) - ok_button = self.dialog.add_button('gtk-ok', gtk.RESPONSE_OK) + ok_button = self.dialog.add_button( + set_underline(_("OK")), gtk.RESPONSE_OK) + ok_button.set_image(IconFactory.get_image( + 'tryton-ok', gtk.ICON_SIZE_BUTTON)) ok_button.set_always_show_image(True) self.dialog.set_icon(TRYTON_ICON) self.dialog.set_default_response(gtk.RESPONSE_OK) diff --git a/tryton/gui/window/tabcontent.py b/tryton/gui/window/tabcontent.py index 1d5d61877b..3476bbe0d7 100644 --- a/tryton/gui/window/tabcontent.py +++ b/tryton/gui/window/tabcontent.py @@ -16,11 +16,11 @@ _ = gettext.gettext class ToolbarItem(object): def __init__(self, id, label, - tooltip=None, stock_id=None, accel_path=None): + tooltip=None, icon_name=None, accel_path=None): self.id = id self.label = label self.tooltip = tooltip - self.stock_id = stock_id + self.icon_name = icon_name self.accel_path = accel_path @property @@ -41,121 +41,123 @@ class TabContent(InfoBar): id='switch', label=_("_Switch View"), tooltip=_("Switch View"), - stock_id='tryton-fullscreen', + icon_name='tryton-switch', accel_path='/Form/Switch View'), ToolbarItem( id='previous', label=_("_Previous"), tooltip=_("Previous Record"), - stock_id='tryton-go-previous', + icon_name='tryton-back', accel_path='/Form/Previous'), ToolbarItem( id='next', label=_("_Next"), tooltip=_("Next Record"), - stock_id='tryton-go-next', + icon_name='tryton-forward', accel_path='/Form/Next'), ToolbarItem( id='search', label=_("_Search"), - stock_id='tryton-find', + icon_name='tryton-search', accel_path='/Form/Search'), None, ToolbarItem( id='new', label=_("_New"), tooltip=_("Create a new record"), - stock_id='tryton-new', + icon_name='tryton-create', accel_path='/Form/New'), ToolbarItem( id='save', label=_("_Save"), tooltip=_("Save this record"), - stock_id='tryton-save', + icon_name='tryton-save', accel_path='/Form/Save'), ToolbarItem( id='reload', label=_("_Reload/Undo"), tooltip=_("Reload/Undo"), - stock_id='tryton-refresh', + icon_name='tryton-refresh', accel_path='/Form/Reload'), ToolbarItem( id='copy', label=_("_Duplicate"), - stock_id='tryton-copy', + icon_name='tryton-copy', accel_path='/Form/Duplicate'), ToolbarItem( id='remove', label=_("_Delete..."), - stock_id='tryton-delete', + icon_name='tryton-delete', accel_path='/Form/Delete'), None, ToolbarItem( id='logs', - label=_("View _Logs...")), + label=_("View _Logs..."), + icon_name='tryton-log'), ToolbarItem( id='revision' if self.model in common.MODELHISTORY else None, label=_("Show revisions..."), - stock_id='tryton-clock'), + icon_name='tryton-history'), None, ToolbarItem( id='attach', label=_("A_ttachments..."), tooltip=_("Add an attachment to the record"), - stock_id='tryton-attachment', + icon_name='tryton-attach', accel_path='/Form/Attachments'), ToolbarItem( id='note', label=_("_Notes..."), tooltip=_("Add a note to the record"), - stock_id='tryton-note', + icon_name='tryton-note', accel_path='/Form/Notes'), ToolbarItem( id='action', label=_("_Actions..."), - stock_id='tryton-executable', + icon_name='tryton-launch', accel_path='/Form/Actions'), ToolbarItem( id='relate', label=_("_Relate..."), - stock_id='tryton-go-jump', + icon_name='tryton-link', accel_path='/Form/Relate'), None, ToolbarItem( id='print_open', label=_("_Report..."), - stock_id='tryton-print-open', + icon_name='tryton-open', accel_path='/Form/Report'), ToolbarItem( id='print_email', label=_("_E-Mail..."), - stock_id='tryton-print-email', + icon_name='tryton-email', accel_path='/Form/Email'), ToolbarItem( id='print', label=_("_Print..."), - stock_id='tryton-print', + icon_name='tryton-print', accel_path='/Form/Print'), None, ToolbarItem( id='export', label=_("_Export Data..."), - stock_id='tryton-save-as', + icon_name='tryton-export', accel_path='/Form/Export Data'), ToolbarItem( id='import', label=_("_Import Data..."), + icon_name='tryton-import', accel_path='/Form/Import Data'), ToolbarItem( id='copy_url', label=_("Copy _URL..."), - stock_id='tryton-web-browser', + icon_name='tryton-public', accel_path='/Form/Copy URL'), None, ToolbarItem( id='win_close', label=_("_Close Tab"), - stock_id='tryton-close', + icon_name='tryton-close', accel_path='/Form/Close'), ] @@ -246,7 +248,10 @@ class TabContent(InfoBar): callback = getattr(self, 'sig_%s' % item.id, None) if not callback: continue - toolitem = gtk.ToolButton(item.stock_id) + toolitem = gtk.ToolButton() + toolitem.set_icon_widget( + common.IconFactory.get_image( + item.icon_name, gtk.ICON_SIZE_LARGE_TOOLBAR)) toolitem.set_label(item.label) toolitem.set_use_underline(True) toolitem.connect('clicked', callback) @@ -273,10 +278,10 @@ class TabContent(InfoBar): menuitem.set_use_underline(True) menuitem.connect('activate', callback) - if item.stock_id: - image = gtk.Image() - image.set_from_stock(item.stock_id, gtk.ICON_SIZE_MENU) - menuitem.set_image(image) + if item.icon_name: + menuitem.set_image( + common.IconFactory.get_image( + item.icon_name, gtk.ICON_SIZE_MENU)) if item.accel_path: menuitem.set_accel_path(item.accel_path) self.menu_buttons[item.id] = menuitem diff --git a/tryton/gui/window/view_board/view_board.py b/tryton/gui/window/view_board/view_board.py index 360883ae91..0366007c6c 100644 --- a/tryton/gui/window/view_board/view_board.py +++ b/tryton/gui/window/view_board/view_board.py @@ -5,7 +5,7 @@ import gettext import xml.dom.minidom from tryton.gui.window.view_form.view.form import Container -from tryton.common import node_attributes, ICONFACTORY +from tryton.common import node_attributes, IconFactory from .action import Action _ = gettext.gettext @@ -47,10 +47,9 @@ class ViewBoard(object): return container def _parse_image(self, node, container, attributes): - ICONFACTORY.register_icon(attributes['name']) - image = gtk.Image() - image.set_from_stock(attributes['name'], gtk.ICON_SIZE_DIALOG) - container.add(image, attributes) + container.add( + IconFactory.get_image(attributes['name'], gtk.ICON_SIZE_DIALOG), + attributes) def _parse_separator(self, node, container, attributes): vbox = gtk.VBox() @@ -93,12 +92,8 @@ class ViewBoard(object): tab_box.pack_start(label) if 'icon' in attributes: - ICONFACTORY.register_icon(attributes['icon']) - pixbuf = tab_box.render_icon(attributes['icon'], - gtk.ICON_SIZE_SMALL_TOOLBAR) - icon = gtk.Image() - icon.set_from_pixbuf(pixbuf) - tab_box.pack_start(icon) + tab_box.pack_start(IconFactory.get_image( + attributes['icon'], gtk.ICON_SIZE_SMALL_TOOLBAR)) tab_box.show_all() viewport = gtk.Viewport() diff --git a/tryton/gui/window/view_form/view/form.py b/tryton/gui/window/view_form/view/form.py index f16d6be6f6..50c05cbe2d 100644 --- a/tryton/gui/window/view_form/view/form.py +++ b/tryton/gui/window/view_form/view/form.py @@ -8,7 +8,7 @@ from collections import defaultdict from . import View from tryton.common.focus import (get_invisible_ancestor, find_focused_child, next_focus_widget, find_focusable_child, find_first_focus_widget) -from tryton.common import Tooltips, node_attributes, ICONFACTORY +from tryton.common import Tooltips, node_attributes, IconFactory from tryton.common.underline import set_underline from tryton.common.button import Button from tryton.config import CONFIG @@ -323,11 +323,8 @@ class ViewForm(View): label.set_use_underline(True) if 'icon' in attributes: - ICONFACTORY.register_icon(attributes['icon']) - icon = gtk.Image() - icon.set_from_stock( - attributes['icon'], gtk.ICON_SIZE_SMALL_TOOLBAR) - tab_box.pack_start(icon) + tab_box.pack_start(IconFactory.get_image( + attributes['icon'], gtk.ICON_SIZE_SMALL_TOOLBAR)) tab_box.pack_start(label) tab_box.show_all() diff --git a/tryton/gui/window/view_form/view/form_gtk/binary.py b/tryton/gui/window/view_form/view/form_gtk/binary.py index 6bf38b6b88..0b15ced810 100644 --- a/tryton/gui/window/view_form/view/form_gtk/binary.py +++ b/tryton/gui/window/view_form/view/form_gtk/binary.py @@ -25,28 +25,24 @@ class BinaryMixin(Widget): tooltips = Tooltips() self.but_save_as = gtk.Button() - img_save_as = gtk.Image() - img_save_as.set_from_stock('tryton-save-as', - gtk.ICON_SIZE_SMALL_TOOLBAR) - self.but_save_as.set_image(img_save_as) + self.but_save_as.set_image(common.IconFactory.get_image( + 'tryton-save', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_save_as.set_relief(gtk.RELIEF_NONE) self.but_save_as.connect('clicked', self.save_as) tooltips.set_tip(self.but_save_as, _('Save As...')) hbox.pack_start(self.but_save_as, expand=False, fill=False) self.but_select = gtk.Button() - img_select = gtk.Image() - img_select.set_from_stock('tryton-find', gtk.ICON_SIZE_SMALL_TOOLBAR) - self.but_select.set_image(img_select) + self.but_select.set_image(common.IconFactory.get_image( + 'tryton-search', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_select.set_relief(gtk.RELIEF_NONE) self.but_select.connect('clicked', self.select) tooltips.set_tip(self.but_select, _('Select...')) hbox.pack_start(self.but_select, expand=False, fill=False) self.but_clear = gtk.Button() - img_clear = gtk.Image() - img_clear.set_from_stock('tryton-clear', gtk.ICON_SIZE_SMALL_TOOLBAR) - self.but_clear.set_image(img_clear) + self.but_clear.set_image(common.IconFactory.get_image( + 'tryton-clear', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_clear.set_relief(gtk.RELIEF_NONE) self.but_clear.connect('clicked', self.clear) tooltips.set_tip(self.but_clear, _('Clear')) diff --git a/tryton/gui/window/view_form/view/form_gtk/char.py b/tryton/gui/window/view_form/view/form_gtk/char.py index 380e92cbd7..36f08c6097 100644 --- a/tryton/gui/window/view_form/view/form_gtk/char.py +++ b/tryton/gui/window/view_form/view/form_gtk/char.py @@ -5,7 +5,7 @@ import gettext import gobject import gtk from .widget import Widget, TranslateMixin -from tryton.common import Tooltips +from tryton.common import Tooltips, IconFactory from tryton.common.entry_position import reset_position from tryton.common.selection import PopdownMixin, selection_shortcuts from tryton.config import CONFIG @@ -46,8 +46,9 @@ class Char(Widget, TranslateMixin, PopdownMixin): self.widget.pack_start(self.entry, expand=expand, fill=fill) if attrs.get('translate'): - self.entry.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, - 'tryton-locale') + self.entry.set_icon_from_pixbuf( + gtk.ENTRY_ICON_SECONDARY, + IconFactory.get_pixbuf('tryton-translate', gtk.ICON_SIZE_MENU)) self.entry.connect('icon-press', self.translate) def translate_widget(self): diff --git a/tryton/gui/window/view_form/view/form_gtk/dictionary.py b/tryton/gui/window/view_form/view/form_gtk/dictionary.py index 6de48098f7..6291189f22 100644 --- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py +++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py @@ -11,7 +11,8 @@ from decimal import Decimal from .widget import Widget from tryton.gui.window.win_search import WinSearch -from tryton.common import Tooltips, timezoned_date, untimezoned_date +from tryton.common import Tooltips, timezoned_date, untimezoned_date, \ + IconFactory from tryton.common.selection import selection_shortcuts from tryton.common.completion import get_completion, update_completion from tryton.common.datetime_ import Date, DateTime @@ -357,10 +358,8 @@ class DictWidget(Widget): self.but_add = gtk.Button() self.but_add.connect('clicked', self._sig_add) - img_add = gtk.Image() - img_add.set_from_stock('tryton-list-add', gtk.ICON_SIZE_SMALL_TOOLBAR) - img_add.set_alignment(0.5, 0.5) - self.but_add.add(img_add) + self.but_add.add(IconFactory.get_image( + 'tryton-add', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_add.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_add, expand=False, fill=False) hbox.set_focus_chain([self.wid_text]) @@ -379,11 +378,8 @@ class DictWidget(Widget): def _new_remove_btn(self): but_remove = gtk.Button() - img_remove = gtk.Image() - img_remove.set_from_stock('tryton-list-remove', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_remove.set_alignment(0.5, 0.5) - but_remove.add(img_remove) + but_remove.add(IconFactory.get_image( + 'tryton-remove', gtk.ICON_SIZE_SMALL_TOOLBAR)) but_remove.set_relief(gtk.RELIEF_NONE) return but_remove diff --git a/tryton/gui/window/view_form/view/form_gtk/image.py b/tryton/gui/window/view_form/view/form_gtk/image.py index 67dfb76028..07118a701a 100644 --- a/tryton/gui/window/view_form/view/form_gtk/image.py +++ b/tryton/gui/window/view_form/view/form_gtk/image.py @@ -4,7 +4,8 @@ import gtk import gettext import urllib.request -from tryton.common import resize_pixbuf, data2pixbuf, BIG_IMAGE_SIZE +from tryton.common import resize_pixbuf, data2pixbuf +from tryton.config import CONFIG from .widget import Widget from .binary import BinaryMixin @@ -96,11 +97,13 @@ class Image(BinaryMixin, Widget): if self.field: value = self.field.get_client(self.record) if isinstance(value, int): - if value > BIG_IMAGE_SIZE: + if value > CONFIG.get('image.max_size'): value = False else: value = self.field.get_data(self.record) - pixbuf = resize_pixbuf(data2pixbuf(value), self.width, self.height) + pixbuf = data2pixbuf(value) + if pixbuf: + pixbuf = resize_pixbuf(pixbuf, self.width, self.height) self.image.set_from_pixbuf(pixbuf) return bool(value) diff --git a/tryton/gui/window/view_form/view/form_gtk/many2many.py b/tryton/gui/window/view_form/view/form_gtk/many2many.py index 550a660d18..f401059d48 100644 --- a/tryton/gui/window/view_form/view/form_gtk/many2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/many2many.py @@ -66,22 +66,16 @@ class Many2Many(Widget): self.but_add = gtk.Button() tooltips.set_tip(self.but_add, _('Add existing record')) self.but_add.connect('clicked', self._sig_add) - img_add = gtk.Image() - img_add.set_from_stock('tryton-list-add', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_add.set_alignment(0.5, 0.5) - self.but_add.add(img_add) + self.but_add.add(common.IconFactory.get_image( + 'tryton-add', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_add.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_add, expand=False, fill=False) self.but_remove = gtk.Button() tooltips.set_tip(self.but_remove, _('Remove selected record ')) self.but_remove.connect('clicked', self._sig_remove) - img_remove = gtk.Image() - img_remove.set_from_stock('tryton-list-remove', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_remove.set_alignment(0.5, 0.5) - self.but_remove.add(img_remove) + self.but_remove.add(common.IconFactory.get_image( + 'tryton-remove', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_remove.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_remove, expand=False, fill=False) diff --git a/tryton/gui/window/view_form/view/form_gtk/many2one.py b/tryton/gui/window/view_form/view/form_gtk/many2one.py index 5ab8c668be..e938624303 100644 --- a/tryton/gui/window/view_form/view/form_gtk/many2one.py +++ b/tryton/gui/window/view_form/view/form_gtk/many2one.py @@ -302,16 +302,22 @@ class Many2One(Widget): return False self.set_text(field.get_client(record)) if self.has_target(field.get(record)): - stock1, tooltip1 = 'tryton-open', _('Open the record ') - stock2, tooltip2 = 'tryton-clear', _('Clear the field ') + icon1, tooltip1 = 'tryton-open', _('Open the record ') + icon2, tooltip2 = 'tryton-clear', _('Clear the field ') else: - stock1, tooltip1 = None, '' - stock2, tooltip2 = 'tryton-find', _('Search a record ') + icon1, tooltip1 = None, '' + icon2, tooltip2 = 'tryton-search', _('Search a record ') if not self.wid_text.get_editable(): - stock2, tooltip2 = None, '' - for pos, stock, tooltip in [(gtk.ENTRY_ICON_PRIMARY, stock1, tooltip1), - (gtk.ENTRY_ICON_SECONDARY, stock2, tooltip2)]: - self.wid_text.set_icon_from_stock(pos, stock) + icon2, tooltip2 = None, '' + for pos, icon, tooltip in [ + (gtk.ENTRY_ICON_PRIMARY, icon1, tooltip1), + (gtk.ENTRY_ICON_SECONDARY, icon2, tooltip2)]: + if icon: + pixbuf = common.IconFactory.get_pixbuf( + icon, gtk.ICON_SIZE_MENU) + else: + pixbuf = None + self.wid_text.set_icon_from_pixbuf(pos, pixbuf) self.wid_text.set_icon_tooltip_text(pos, tooltip) self.changed = True diff --git a/tryton/gui/window/view_form/view/form_gtk/one2many.py b/tryton/gui/window/view_form/view/form_gtk/one2many.py index 3dcca188a1..c4c1dc5f9c 100644 --- a/tryton/gui/window/view_form/view/form_gtk/one2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/one2many.py @@ -48,22 +48,16 @@ class One2Many(Widget): but_switch = gtk.Button() tooltips.set_tip(but_switch, _('Switch')) but_switch.connect('clicked', self.switch_view) - img_switch = gtk.Image() - img_switch.set_from_stock('tryton-fullscreen', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_switch.set_alignment(0.5, 0.5) - but_switch.add(img_switch) + but_switch.add(common.IconFactory.get_image( + 'tryton-switch', gtk.ICON_SIZE_SMALL_TOOLBAR)) but_switch.set_relief(gtk.RELIEF_NONE) hbox.pack_start(but_switch, expand=False, fill=False) self.but_pre = gtk.Button() tooltips.set_tip(self.but_pre, _('Previous')) self.but_pre.connect('clicked', self._sig_previous) - img_pre = gtk.Image() - img_pre.set_from_stock('tryton-go-previous', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_pre.set_alignment(0.5, 0.5) - self.but_pre.add(img_pre) + self.but_pre.add(common.IconFactory.get_image( + 'tryton-back', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_pre.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_pre, expand=False, fill=False) @@ -73,10 +67,8 @@ class One2Many(Widget): self.but_next = gtk.Button() tooltips.set_tip(self.but_next, _('Next')) self.but_next.connect('clicked', self._sig_next) - img_next = gtk.Image() - img_next.set_from_stock('tryton-go-next', gtk.ICON_SIZE_SMALL_TOOLBAR) - img_next.set_alignment(0.5, 0.5) - self.but_next.add(img_next) + self.but_next.add(common.IconFactory.get_image( + 'tryton-forward', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_next.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_next, expand=False, fill=False) @@ -107,11 +99,8 @@ class One2Many(Widget): self.but_add = gtk.Button() tooltips.set_tip(self.but_add, _('Add existing record')) self.but_add.connect('clicked', self._sig_add) - img_add = gtk.Image() - img_add.set_from_stock('tryton-list-add', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_add.set_alignment(0.5, 0.5) - self.but_add.add(img_add) + self.but_add.add(common.IconFactory.get_image( + 'tryton-add', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_add.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_add, expand=False, fill=False) @@ -119,11 +108,8 @@ class One2Many(Widget): tooltips.set_tip(self.but_remove, _('Remove selected record')) self.but_remove.connect('clicked', self._sig_remove, True) - img_remove = gtk.Image() - img_remove.set_from_stock('tryton-list-remove', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_remove.set_alignment(0.5, 0.5) - self.but_remove.add(img_remove) + self.but_remove.add(common.IconFactory.get_image( + 'tryton-remove', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_remove.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_remove, expand=False, fill=False) @@ -132,40 +118,32 @@ class One2Many(Widget): self.but_new = gtk.Button() tooltips.set_tip(self.but_new, _('Create a new record ')) self.but_new.connect('clicked', self._sig_new) - img_new = gtk.Image() - img_new.set_from_stock('tryton-new', gtk.ICON_SIZE_SMALL_TOOLBAR) - img_new.set_alignment(0.5, 0.5) - self.but_new.add(img_new) + self.but_new.add(common.IconFactory.get_image( + 'tryton-create', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_new.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_new, expand=False, fill=False) self.but_open = gtk.Button() tooltips.set_tip(self.but_open, _('Edit selected record ')) self.but_open.connect('clicked', self._sig_edit) - img_open = gtk.Image() - img_open.set_from_stock('tryton-open', gtk.ICON_SIZE_SMALL_TOOLBAR) - img_open.set_alignment(0.5, 0.5) - self.but_open.add(img_open) + self.but_open.add(common.IconFactory.get_image( + 'tryton-open', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_open.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_open, expand=False, fill=False) self.but_del = gtk.Button() tooltips.set_tip(self.but_del, _('Delete selected record ')) self.but_del.connect('clicked', self._sig_remove, False) - img_del = gtk.Image() - img_del.set_from_stock('tryton-delete', gtk.ICON_SIZE_SMALL_TOOLBAR) - img_del.set_alignment(0.5, 0.5) - self.but_del.add(img_del) + self.but_del.add(common.IconFactory.get_image( + 'tryton-delete', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_del.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_del, expand=False, fill=False) self.but_undel = gtk.Button() tooltips.set_tip(self.but_undel, _('Undelete selected record ')) self.but_undel.connect('clicked', self._sig_undelete) - img_undel = gtk.Image() - img_undel.set_from_stock('tryton-undo', gtk.ICON_SIZE_SMALL_TOOLBAR) - img_undel.set_alignment(0.5, 0.5) - self.but_undel.add(img_undel) + self.but_undel.add(common.IconFactory.get_image( + 'tryton-undo', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_undel.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_undel, expand=False, fill=False) diff --git a/tryton/gui/window/view_form/view/form_gtk/pyson.py b/tryton/gui/window/view_form/view/form_gtk/pyson.py index 73f3448cb0..63854d6d2e 100644 --- a/tryton/gui/window/view_form/view/form_gtk/pyson.py +++ b/tryton/gui/window/view_form/view/form_gtk/pyson.py @@ -1,7 +1,9 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -import gtk +from gi.repository import Gtk + from .char import Char +from tryton.common import IconFactory from tryton.pyson import CONTEXT, PYSONEncoder, PYSONDecoder @@ -39,10 +41,12 @@ class PYSON(Char): return value def validate_pyson(self, *args): - icon = gtk.STOCK_OK + icon = 'tryton-ok' if self.get_encoded_value() is None: - icon = gtk.STOCK_CANCEL - self.entry.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, icon) + icon = 'tryton-error' + pixbuf = IconFactory.get_pixbuf(icon, Gtk.IconSize.MENU) + self.entry.set_icon_from_pixbuf( + Gtk.EntryIconPosition.SECONDARY, pixbuf) def _focus_out(self): self.validate_pyson() diff --git a/tryton/gui/window/view_form/view/form_gtk/richtextbox.py b/tryton/gui/window/view_form/view/form_gtk/richtextbox.py index b54a3de088..2b9487a0a2 100644 --- a/tryton/gui/window/view_form/view/form_gtk/richtextbox.py +++ b/tryton/gui/window/view_form/view/form_gtk/richtextbox.py @@ -6,7 +6,7 @@ from weakref import WeakKeyDictionary import gtk from .textbox import TextBox -from tryton.common import get_toplevel_window +from tryton.common import get_toplevel_window, IconFactory from tryton.common.htmltextbuffer import (serialize, deserialize, setup_tags, normalize_markup, remove_tags, register_foreground, FAMILIES, SIZE2SCALE, MIME, use_serialize_func) @@ -37,7 +37,10 @@ class RichTextBox(TextBox): tag_widgets = self.tag_widgets[textview] = {} for icon in ['bold', 'italic', 'underline']: - button = gtk.ToggleToolButton('gtk-%s' % icon) + button = gtk.ToggleToolButton() + button.set_icon_widget(IconFactory.get_image( + 'tryton-format-%s' % icon, + gtk.ICON_SIZE_SMALL_TOOLBAR)) button.connect('toggled', self.toggle_props, icon, textview) toolbar.insert(button, -1) tag_widgets[icon] = button @@ -65,16 +68,11 @@ class RichTextBox(TextBox): toolbar.insert(gtk.SeparatorToolItem(), -1) button = None - for icon in ['left', 'center', 'right', 'fill']: - name = icon - if icon == 'fill': - name = 'justify' - stock_id = 'gtk-justify-%s' % icon - if hasattr(gtk.RadioToolButton, 'new_with_stock_from_widget'): - button = gtk.RadioToolButton.new_with_stock_from_widget( - button, stock_id) - else: - button = gtk.RadioToolButton(button, stock_id) + for name in ['left', 'center', 'right', 'justify']: + icon = 'tryton-format-align-%s' % name + button = gtk.RadioToolButton.new_from_widget(button) + button.set_icon_widget(IconFactory.get_image( + icon, gtk.ICON_SIZE_SMALL_TOOLBAR)) button.set_active(icon == 'left') button.connect( 'toggled', self.toggle_justification, name, textview) @@ -87,7 +85,11 @@ class RichTextBox(TextBox): ('foreground', _('Foreground')), # TODO ('background', _('Background')), ]: - button = gtk.ToolButton('tryton-text-%s' % icon) + button = gtk.ToolButton() + if icon == 'foreground': + button.set_icon_widget(IconFactory.get_image( + 'tryton-format-color-text', + gtk.ICON_SIZE_SMALL_TOOLBAR)) button.set_label(label) button.connect('clicked', self.toggle_color, icon, textview) toolbar.insert(button, -1) diff --git a/tryton/gui/window/view_form/view/form_gtk/state_widget.py b/tryton/gui/window/view_form/view/form_gtk/state_widget.py index 6c8b7cc570..d4939cbae9 100644 --- a/tryton/gui/window/view_form/view/form_gtk/state_widget.py +++ b/tryton/gui/window/view_form/view/form_gtk/state_widget.py @@ -65,8 +65,8 @@ class Image(StateMixin, gtk.Image): if name in record.group.fields: field = record.group.fields[name] name = field.get(record) - common.ICONFACTORY.register_icon(name) - self.set_from_stock(name, gtk.ICON_SIZE_DIALOG) + self.set_from_pixbuf(common.IconFactory.get_pixbuf( + name, gtk.ICON_SIZE_DIALOG)) class Frame(StateMixin, gtk.Frame): diff --git a/tryton/gui/window/view_form/view/form_gtk/url.py b/tryton/gui/window/view_form/view/form_gtk/url.py index 315a2f7a5b..08ccda0f5f 100644 --- a/tryton/gui/window/view_form/view/form_gtk/url.py +++ b/tryton/gui/window/view_form/view/form_gtk/url.py @@ -15,9 +15,8 @@ class URL(Char): self.tooltips = common.Tooltips() self.button = gtk.Button() - img = gtk.Image() - img.set_from_stock('tryton-web-browser', gtk.ICON_SIZE_SMALL_TOOLBAR) - self.button.set_image(img) + self.button.set_image(common.IconFactory.get_image( + 'tryton-public', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.button.set_relief(gtk.RELIEF_NONE) self.button.connect('clicked', self.button_clicked) self.button.set_alignment(0.5, 0.5) @@ -30,13 +29,11 @@ class URL(Char): if record and 'icon' in self.attrs: icon = self.attrs['icon'] if icon in record.group.fields: - value = record[icon].get_client(record) or 'tryton-web-browser' + value = record[icon].get_client(record) or 'tryton-public' else: value = icon - common.ICONFACTORY.register_icon(value) - img = gtk.Image() - img.set_from_stock(value, gtk.ICON_SIZE_SMALL_TOOLBAR) - self.button.set_image(img) + self.button.set_image(common.IconFactory.get_image( + value, gtk.ICON_SIZE_SMALL_TOOLBAR)) def set_tooltips(self): value = self.entry.get_text() diff --git a/tryton/gui/window/view_form/view/form_gtk/widget.py b/tryton/gui/window/view_form/view/form_gtk/widget.py index 2a58390b10..78e8760ed8 100644 --- a/tryton/gui/window/view_form/view/form_gtk/widget.py +++ b/tryton/gui/window/view_form/view/form_gtk/widget.py @@ -7,6 +7,7 @@ import gettext import tryton.common as common from tryton.common import RPCExecute, RPCException from tryton.common import TRYTON_ICON +from tryton.common.underline import set_underline from tryton.common.widget_style import widget_class from tryton.gui import Main from tryton.gui.window.nomodal import NoModal @@ -145,9 +146,14 @@ class TranslateDialog(NoModal): self.win.add_accel_group(self.accel_group) cancel_button = self.win.add_button( - gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) + set_underline(_("Cancel")), gtk.RESPONSE_CANCEL) + cancel_button.set_image(common.IconFactory.get_image( + 'tryton-cancel', gtk.ICON_SIZE_BUTTON)) cancel_button.set_always_show_image(True) - ok_button = self.win.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + ok_button = self.win.add_button( + set_underline(_("OK")), gtk.RESPONSE_OK) + ok_button.set_image(common.IconFactory.get_image( + 'tryton-ok', gtk.ICON_SIZE_BUTTON)) ok_button.set_always_show_image(True) ok_button.add_accelerator( 'clicked', self.accel_group, gtk.keysyms.Return, @@ -266,9 +272,8 @@ class TranslateMixin: def translate_button(self): button = gtk.Button() - img = gtk.Image() - img.set_from_stock('tryton-locale', gtk.ICON_SIZE_SMALL_TOOLBAR) - button.set_image(img) + button.set_image(common.IconFactory.get_image( + 'tryton-translate', gtk.ICON_SIZE_SMALL_TOOLBAR)) button.set_relief(gtk.RELIEF_NONE) button.connect('clicked', self.translate) return button diff --git a/tryton/gui/window/view_form/view/graph.py b/tryton/gui/window/view_form/view/graph.py index 1cd155f750..ba6272a319 100644 --- a/tryton/gui/window/view_form/view/graph.py +++ b/tryton/gui/window/view_form/view/graph.py @@ -9,8 +9,9 @@ from . import View from .graph_gtk.bar import VerticalBar, HorizontalBar from .graph_gtk.line import Line from .graph_gtk.pie import Pie -from tryton.common import file_selection +from tryton.common import file_selection, IconFactory from tryton.common import node_attributes, get_toplevel_window, message +from tryton.common.underline import set_underline from tryton.config import TRYTON_ICON from tryton.gui import Main @@ -101,9 +102,15 @@ class ViewGraph(View): dia = gtk.Dialog(_('Image Size'), parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) Main().add_window(dia) - cancel_button = dia.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) + cancel_button = dia.add_button( + set_underline(_("Cancel")), gtk.RESPONSE_CANCEL) + cancel_button.set_image(IconFactory.get_image( + 'tryton-cancel', gtk.ICON_SIZE_BUTTON)) cancel_button.set_always_show_image(True) - ok_button = dia.add_button('gtk-ok', gtk.RESPONSE_OK) + ok_button = dia.add_button( + set_underline(_("OK")), gtk.RESPONSE_OK) + ok_button.set_image(IconFactory.get_image( + 'tryton-ok', gtk.ICON_SIZE_BUTTON)) ok_button.set_always_show_image(True) dia.set_icon(TRYTON_ICON) dia.set_default_response(gtk.RESPONSE_OK) @@ -162,9 +169,8 @@ class ViewGraph(View): if event.button == 3: menu = gtk.Menu() item = gtk.ImageMenuItem(_('Save As...')) - img = gtk.Image() - img.set_from_stock('tryton-save-as', gtk.ICON_SIZE_MENU) - item.set_image(img) + item.set_image(IconFactory.get_image( + 'tryton-save-as', gtk.ICON_SIZE_MENU)) item.connect('activate', self.save) item.show() menu.append(item) diff --git a/tryton/gui/window/view_form/view/list_gtk/widget.py b/tryton/gui/window/view_form/view/list_gtk/widget.py index 33370fda1a..99ca15a4eb 100644 --- a/tryton/gui/window/view_form/view/list_gtk/widget.py +++ b/tryton/gui/window/view_form/view/list_gtk/widget.py @@ -30,6 +30,7 @@ from tryton.common.selection import SelectionMixin, PopdownMixin from tryton.common.datetime_ import CellRendererDate, CellRendererTime from tryton.common.datetime_strftime import datetime_strftime from tryton.common.domain_parser import quote +from tryton.config import CONFIG _ = gettext.gettext @@ -127,7 +128,7 @@ class Affix(Cell): self.renderer = CellRendererClickablePixbuf() self.renderer.connect('clicked', self.clicked) if not self.icon: - self.icon = 'tryton-web-browser' + self.icon = 'tryton-public' elif self.icon: self.renderer = gtk.CellRendererPixbuf() else: @@ -147,9 +148,7 @@ class Affix(Cell): value = record[self.icon].get_client(record) or '' else: value = self.icon - common.ICONFACTORY.register_icon(value) - pixbuf = self.view.treeview.render_icon(stock_id=value, - size=gtk.ICON_SIZE_BUTTON, detail=None) + pixbuf = common.IconFactory.get_pixbuf(value, gtk.ICON_SIZE_BUTTON) cell.set_property('pixbuf', pixbuf) else: text = self.attrs.get('string', '') @@ -531,14 +530,14 @@ class Image(GenericText): field = record[self.field_name] value = field.get_client(record) if isinstance(value, int): - if value > common.BIG_IMAGE_SIZE: + if value > CONFIG.get('image.max_size'): value = None else: value = field.get_data(record) pixbuf = data2pixbuf(value) width = self.attrs.get('width', -1) height = self.attrs.get('height', -1) - if width != -1 or height != -1: + if pixbuf and width != -1 or height != -1: pixbuf = common.resize_pixbuf(pixbuf, width, height) cell.set_property('pixbuf', pixbuf) @@ -584,7 +583,7 @@ class M2O(GenericText): stock2, tooltip2 = 'tryton-clear', _("Clear the field ") else: stock1, tooltip1 = None, '' - stock2, tooltip2 = 'tryton-find', _("Search a record ") + stock2, tooltip2 = 'tryton-search', _("Search a record ") for pos, stock, tooltip in [ (gtk.ENTRY_ICON_PRIMARY, stock1, tooltip1), (gtk.ENTRY_ICON_SECONDARY, stock2, tooltip2)]: diff --git a/tryton/gui/window/view_form/view/screen_container.py b/tryton/gui/window/view_form/view/screen_container.py index 43022e8c86..6af5fc0cc6 100644 --- a/tryton/gui/window/view_form/view/screen_container.py +++ b/tryton/gui/window/view_form/view/screen_container.py @@ -145,8 +145,9 @@ class ScreenContainer(object): self.search_entry = gtk.Entry() self.search_entry.set_placeholder_text(_('Search')) self.search_entry.set_alignment(0.0) - self.search_entry.set_icon_from_stock( - gtk.ENTRY_ICON_PRIMARY, 'tryton-find') + self.search_entry.set_icon_from_pixbuf( + gtk.ENTRY_ICON_PRIMARY, + common.IconFactory.get_pixbuf('tryton-filter', gtk.ICON_SIZE_MENU)) self.search_entry.set_icon_tooltip_text( gtk.ENTRY_ICON_PRIMARY, _('Open filters')) self.completion = gtk.EntryCompletion() @@ -197,11 +198,8 @@ class ScreenContainer(object): but_active = gtk.ToggleButton() self.but_active = but_active self._set_active_tooltip() - img_active = gtk.Image() - img_active.set_from_stock( - 'tryton-archive', gtk.ICON_SIZE_SMALL_TOOLBAR) - img_active.set_alignment(0.5, 0.5) - but_active.add(img_active) + but_active.add(common.IconFactory.get_image( + 'tryton-archive', gtk.ICON_SIZE_SMALL_TOOLBAR)) but_active.set_relief(gtk.RELIEF_NONE) but_active.connect('toggled', self.search_active) hbox.pack_start(but_active, expand=False, fill=False) @@ -209,11 +207,8 @@ class ScreenContainer(object): but_bookmark = gtk.ToggleButton() self.but_bookmark = but_bookmark tooltips.set_tip(but_bookmark, _('Show bookmarks of filters')) - img_bookmark = gtk.Image() - img_bookmark.set_from_stock('tryton-bookmark', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_bookmark.set_alignment(0.5, 0.5) - but_bookmark.add(img_bookmark) + but_bookmark.add(common.IconFactory.get_image( + 'tryton-bookmarks', gtk.ICON_SIZE_SMALL_TOOLBAR)) but_bookmark.set_relief(gtk.RELIEF_NONE) menu = gtk.Menu() menu.set_property('reserve-toggle-size', False) @@ -226,11 +221,8 @@ class ScreenContainer(object): self.but_prev = but_prev tooltips.set_tip(but_prev, _('Previous')) but_prev.connect('clicked', self.search_prev) - img_prev = gtk.Image() - img_prev.set_from_stock('tryton-go-previous', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_prev.set_alignment(0.5, 0.5) - but_prev.add(img_prev) + but_prev.add(common.IconFactory.get_image( + 'tryton-back', gtk.ICON_SIZE_SMALL_TOOLBAR)) but_prev.set_relief(gtk.RELIEF_NONE) hbox.pack_start(but_prev, expand=False, fill=False) @@ -238,11 +230,8 @@ class ScreenContainer(object): self.but_next = but_next tooltips.set_tip(but_next, _('Next')) but_next.connect('clicked', self.search_next) - img_next = gtk.Image() - img_next.set_from_stock('tryton-go-next', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_next.set_alignment(0.5, 0.5) - but_next.add(img_next) + but_next.add(common.IconFactory.get_image( + 'tryton-forward', gtk.ICON_SIZE_SMALL_TOOLBAR)) but_next.set_relief(gtk.RELIEF_NONE) hbox.pack_start(but_next, expand=False, fill=False) @@ -362,7 +351,6 @@ class ScreenContainer(object): self.do_search() def bookmark_match(self): - icon_stock = self.search_entry.get_icon_stock(gtk.ENTRY_ICON_SECONDARY) current_text = self.get_text() if current_text: current_domain = self.screen.domain_parser.parse(current_text) @@ -375,15 +363,17 @@ class ScreenContainer(object): domain = self.screen.domain_parser.parse(text) if (text == current_text or domain == current_domain): - if icon_stock != 'tryton-star': - self.search_entry.set_icon_from_stock( - gtk.ENTRY_ICON_SECONDARY, 'tryton-star') + self.search_entry.set_icon_from_pixbuf( + gtk.ENTRY_ICON_SECONDARY, + common.IconFactory.get_pixbuf( + 'tryton-bookmark', gtk.ICON_SIZE_MENU)) self.search_entry.set_icon_tooltip_text( gtk.ENTRY_ICON_SECONDARY, _('Remove this bookmark')) return id_ - if icon_stock != 'tryton-unstar': - self.search_entry.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, - 'tryton-unstar') + self.search_entry.set_icon_from_pixbuf( + gtk.ENTRY_ICON_SECONDARY, + common.IconFactory.get_pixbuf( + 'tryton-bookmark-border', gtk.ICON_SIZE_MENU)) if current_text: self.search_entry.set_icon_tooltip_text(gtk.ENTRY_ICON_SECONDARY, _('Bookmark this filter')) @@ -480,9 +470,9 @@ class ScreenContainer(object): if icon_pos == gtk.ENTRY_ICON_PRIMARY: self.search_box(widget) elif icon_pos == gtk.ENTRY_ICON_SECONDARY: - icon_stock = self.search_entry.get_icon_stock(icon_pos) model_name = self.screen.model_name - if icon_stock == 'tryton-unstar': + id_ = self.bookmark_match() + if not id_: text = self.get_text() if not text: return @@ -492,8 +482,7 @@ class ScreenContainer(object): domain = self.screen.domain_parser.parse(text) common.VIEW_SEARCH.add(model_name, name, domain) self.set_text(self.screen.domain_parser.string(domain)) - elif icon_stock == 'tryton-star': - id_ = self.bookmark_match() + else: common.VIEW_SEARCH.remove(model_name, id_) # Refresh icon and bookmark button self.bookmark_match() @@ -609,9 +598,8 @@ class ScreenContainer(object): vbox.pack_start(scrolled, expand=True, fill=True) find_button = gtk.Button(_('Find')) find_button.connect('clicked', lambda *a: search()) - find_img = gtk.Image() - find_img.set_from_stock('tryton-find', gtk.ICON_SIZE_SMALL_TOOLBAR) - find_button.set_image(find_img) + find_button.set_image(common.IconFactory.get_image( + 'tryton-search', gtk.ICON_SIZE_SMALL_TOOLBAR)) hbuttonbox = gtk.HButtonBox() hbuttonbox.set_spacing(5) hbuttonbox.pack_start(find_button) diff --git a/tryton/gui/window/win_csv.py b/tryton/gui/window/win_csv.py index 85b9cd3383..c8977f0344 100644 --- a/tryton/gui/window/win_csv.py +++ b/tryton/gui/window/win_csv.py @@ -8,6 +8,8 @@ import gtk import gobject import gettext +from tryton.common import IconFactory +from tryton.common.underline import set_underline from tryton.config import TRYTON_ICON from tryton.gui import Main from tryton.gui.window.nomodal import NoModal @@ -65,30 +67,24 @@ class WinCSV(NoModal): hbox_mapping.pack_start(vbox_buttons, False, True, 0) button_add = gtk.Button(_('_Add'), stock=None, use_underline=True) - button_add.set_alignment(0.0, 0.0) - img_button = gtk.Image() - img_button.set_from_stock('tryton-list-add', gtk.ICON_SIZE_BUTTON) - button_add.set_image(img_button) + button_add.set_image(IconFactory.get_image( + 'tryton-add', gtk.ICON_SIZE_BUTTON)) button_add.set_always_show_image(True) button_add.connect_after('clicked', self.sig_sel) vbox_buttons.pack_start(button_add, False, False, 0) button_remove = gtk.Button( _('_Remove'), stock=None, use_underline=True) - button_remove.set_alignment(0.0, 0.0) - img_button = gtk.Image() - img_button.set_from_stock('tryton-list-remove', gtk.ICON_SIZE_BUTTON) - button_remove.set_image(img_button) + button_remove.set_image(IconFactory.get_image( + 'tryton-remove', gtk.ICON_SIZE_BUTTON)) button_remove.set_always_show_image(True) button_remove.connect_after('clicked', self.sig_unsel) vbox_buttons.pack_start(button_remove, False, False, 0) button_remove_all = gtk.Button( _('_Clear'), stock=None, use_underline=True) - button_remove_all.set_alignment(0.0, 0.0) - img_button = gtk.Image() - img_button.set_from_stock('tryton-clear', gtk.ICON_SIZE_BUTTON) - button_remove_all.set_image(img_button) + button_remove_all.set_image(IconFactory.get_image( + 'tryton-clear', gtk.ICON_SIZE_BUTTON)) button_remove_all.set_always_show_image(True) button_remove_all.connect_after('clicked', self.sig_unsel_all) vbox_buttons.pack_start(button_remove_all, False, False, 0) @@ -173,11 +169,15 @@ class WinCSV(NoModal): self.add_csv_header_param(table) - button_cancel = gtk.Button("gtk-cancel", stock="gtk-cancel") - self.dialog.add_action_widget(button_cancel, gtk.RESPONSE_CANCEL) + button_cancel = self.dialog.add_button( + set_underline(_("Cancel")), gtk.RESPONSE_CANCEL) + button_cancel.set_image(IconFactory.get_image( + 'tryton-cancel', gtk.ICON_SIZE_BUTTON)) - button_ok = gtk.Button("gtk-ok", stock="gtk-ok") - self.dialog.add_action_widget(button_ok, gtk.RESPONSE_OK) + button_ok = self.dialog.add_button( + set_underline(_("OK")), gtk.RESPONSE_OK) + button_ok.set_image(IconFactory.get_image( + 'tryton-ok', gtk.ICON_SIZE_BUTTON)) self.dialog.vbox.pack_start(dialog_vbox) diff --git a/tryton/gui/window/win_export.py b/tryton/gui/window/win_export.py index 398fae9cbb..77508ed6c5 100644 --- a/tryton/gui/window/win_export.py +++ b/tryton/gui/window/win_export.py @@ -29,20 +29,16 @@ class WinExport(WinCSV): def add_buttons(self, box): button_save_export = gtk.Button( _('_Save Export'), stock=None, use_underline=True) - button_save_export.set_alignment(0.0, 0.0) - img_button = gtk.Image() - img_button.set_from_stock('tryton-save', gtk.ICON_SIZE_BUTTON) - button_save_export.set_image(img_button) + button_save_export.set_image(common.IconFactory.get_image( + 'tryton-save', gtk.ICON_SIZE_BUTTON)) button_save_export.set_always_show_image(True) button_save_export.connect_after('clicked', self.addreplace_predef) box.pack_start(button_save_export, False, False, 0) button_del_export = gtk.Button( _('_Delete Export'), stock=None, use_underline=True) - button_del_export.set_alignment(0.0, 0.0) - img_button = gtk.Image() - img_button.set_from_stock('tryton-delete', gtk.ICON_SIZE_BUTTON) - button_del_export.set_image(img_button) + button_del_export.set_image(common.IconFactory.get_image( + 'tryton-delete', gtk.ICON_SIZE_BUTTON)) button_del_export.set_always_show_image(True) button_del_export.connect_after('clicked', self.remove_predef) box.pack_start(button_del_export, False, False, 0) diff --git a/tryton/gui/window/win_form.py b/tryton/gui/window/win_form.py index 05d2721b86..f6b7e5adcb 100644 --- a/tryton/gui/window/win_form.py +++ b/tryton/gui/window/win_form.py @@ -8,6 +8,7 @@ import gettext from .infobar import InfoBar from tryton.common.domain_parser import quote +from tryton.common.underline import set_underline from tryton.gui import Main from tryton.gui.window.nomodal import NoModal @@ -65,25 +66,28 @@ class WinForm(NoModal, InfoBar): self._initial_value = None if view_type == 'form': if new: - stock_id = gtk.STOCK_DELETE + label, icon = _("Delete"), 'tryton-delete' else: - stock_id = gtk.STOCK_CANCEL + label, icon = _("Cancel"), 'tryton-cancel' self._initial_value = self.screen.current_record.get_eval() - self.but_cancel = self.win.add_button(stock_id, - gtk.RESPONSE_CANCEL) + self.but_cancel = self.win.add_button( + set_underline(label), gtk.RESPONSE_CANCEL) + self.but_cancel.set_image(common.IconFactory.get_image( + icon, gtk.ICON_SIZE_BUTTON)) self.but_cancel.set_always_show_image(True) if new and self.many: - self.but_new = self.win.add_button(gtk.STOCK_NEW, - gtk.RESPONSE_ACCEPT) + self.but_new = self.win.add_button( + set_underline(_("New")), gtk.RESPONSE_ACCEPT) + self.but_new.set_image(common.IconFactory.get_image( + 'tryton-create', gtk.ICON_SIZE_BUTTON)) self.but_new.set_always_show_image(True) self.but_new.set_accel_path('/Form/New', self.accel_group) if self.save_current: self.but_ok = gtk.Button(_('_Save'), use_underline=True) - img_save = gtk.Image() - img_save.set_from_stock('tryton-save', gtk.ICON_SIZE_BUTTON) - self.but_ok.set_image(img_save) + self.but_ok.set_image(common.IconFactory.get_image( + 'tryton-save', gtk.ICON_SIZE_BUTTON)) self.but_ok.set_always_show_image(True) self.but_ok.set_accel_path('/Form/Save', self.accel_group) self.but_ok.set_can_default(True) @@ -92,8 +96,10 @@ class WinForm(NoModal, InfoBar): if not new: self.but_ok.props.sensitive = False else: - self.but_ok = self.win.add_button(gtk.STOCK_OK, - gtk.RESPONSE_OK) + self.but_ok = self.win.add_button( + set_underline(_("OK")), gtk.RESPONSE_OK) + self.but_ok.set_image(common.IconFactory.get_image( + 'tryton-ok', gtk.ICON_SIZE_BUTTON)) self.but_ok.set_always_show_image(True) self.but_ok.add_accelerator('clicked', self.accel_group, gtk.keysyms.Return, gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE) @@ -143,11 +149,8 @@ class WinForm(NoModal, InfoBar): self.but_add = gtk.Button() tooltips.set_tip(self.but_add, _('Add')) self.but_add.connect('clicked', self._sig_add) - img_add = gtk.Image() - img_add.set_from_stock('tryton-list-add', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_add.set_alignment(0.5, 0.5) - self.but_add.add(img_add) + self.but_add.add(common.IconFactory.get_image( + 'tryton-add', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_add.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_add, expand=False, fill=False) if not access['read'] or readonly: @@ -156,11 +159,8 @@ class WinForm(NoModal, InfoBar): self.but_remove = gtk.Button() tooltips.set_tip(self.but_remove, _('Remove ')) self.but_remove.connect('clicked', self._sig_remove, True) - img_remove = gtk.Image() - img_remove.set_from_stock('tryton-list-remove', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_remove.set_alignment(0.5, 0.5) - self.but_remove.add(img_remove) + self.but_remove.add(common.IconFactory.get_image( + 'tryton-remove', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_remove.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_remove, expand=False, fill=False) if not access['read'] or readonly: @@ -171,10 +171,8 @@ class WinForm(NoModal, InfoBar): self.but_new = gtk.Button() tooltips.set_tip(self.but_new, _('Create a new record ')) self.but_new.connect('clicked', self._sig_new) - img_new = gtk.Image() - img_new.set_from_stock('tryton-new', gtk.ICON_SIZE_SMALL_TOOLBAR) - img_new.set_alignment(0.5, 0.5) - self.but_new.add(img_new) + self.but_new.add(common.IconFactory.get_image( + 'tryton-create', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_new.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_new, expand=False, fill=False) if not access['create'] or readonly: @@ -183,11 +181,8 @@ class WinForm(NoModal, InfoBar): self.but_del = gtk.Button() tooltips.set_tip(self.but_del, _('Delete selected record ')) self.but_del.connect('clicked', self._sig_remove, False) - img_del = gtk.Image() - img_del.set_from_stock('tryton-delete', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_del.set_alignment(0.5, 0.5) - self.but_del.add(img_del) + self.but_del.add(common.IconFactory.get_image( + 'tryton-delete', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_del.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_del, expand=False, fill=False) if not access['delete'] or readonly: @@ -197,11 +192,8 @@ class WinForm(NoModal, InfoBar): tooltips.set_tip(self.but_undel, _('Undelete selected record ')) self.but_undel.connect('clicked', self._sig_undelete) - img_undel = gtk.Image() - img_undel.set_from_stock('tryton-undo', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_undel.set_alignment(0.5, 0.5) - self.but_undel.add(img_undel) + self.but_undel.add(common.IconFactory.get_image( + 'tryton-undo', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_undel.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_undel, expand=False, fill=False) if not access['delete'] or readonly: @@ -212,11 +204,8 @@ class WinForm(NoModal, InfoBar): self.but_pre = gtk.Button() tooltips.set_tip(self.but_pre, _('Previous')) self.but_pre.connect('clicked', self._sig_previous) - img_pre = gtk.Image() - img_pre.set_from_stock('tryton-go-previous', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_pre.set_alignment(0.5, 0.5) - self.but_pre.add(img_pre) + self.but_pre.add(common.IconFactory.get_image( + 'tryton-back', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_pre.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_pre, expand=False, fill=False) @@ -226,11 +215,8 @@ class WinForm(NoModal, InfoBar): self.but_next = gtk.Button() tooltips.set_tip(self.but_next, _('Next')) self.but_next.connect('clicked', self._sig_next) - img_next = gtk.Image() - img_next.set_from_stock('tryton-go-next', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_next.set_alignment(0.5, 0.5) - self.but_next.add(img_next) + self.but_next.add(common.IconFactory.get_image( + 'tryton-forward', gtk.ICON_SIZE_SMALL_TOOLBAR)) self.but_next.set_relief(gtk.RELIEF_NONE) hbox.pack_start(self.but_next, expand=False, fill=False) @@ -239,11 +225,8 @@ class WinForm(NoModal, InfoBar): but_switch = gtk.Button() tooltips.set_tip(but_switch, _('Switch')) but_switch.connect('clicked', self.switch_view) - img_switch = gtk.Image() - img_switch.set_from_stock('tryton-fullscreen', - gtk.ICON_SIZE_SMALL_TOOLBAR) - img_switch.set_alignment(0.5, 0.5) - but_switch.add(img_switch) + but_switch.add(common.IconFactory.get_image( + 'tryton-switch', gtk.ICON_SIZE_SMALL_TOOLBAR)) but_switch.set_relief(gtk.RELIEF_NONE) hbox.pack_start(but_switch, expand=False, fill=False) diff --git a/tryton/gui/window/win_import.py b/tryton/gui/window/win_import.py index 57ddf92740..4ca9c5100e 100644 --- a/tryton/gui/window/win_import.py +++ b/tryton/gui/window/win_import.py @@ -28,9 +28,8 @@ class WinImport(WinCSV): button_autodetect = gtk.Button( _('_Auto-Detect'), stock=None, use_underline=True) button_autodetect.set_alignment(0.0, 0.0) - img_button = gtk.Image() - img_button.set_from_stock('tryton-find', gtk.ICON_SIZE_BUTTON) - button_autodetect.set_image(img_button) + button_autodetect.set_image(common.IconFactory.get_image( + 'tryton-search', gtk.ICON_SIZE_BUTTON)) button_autodetect.set_always_show_image(True) button_autodetect.connect_after('clicked', self.sig_autodetect) box.pack_start(button_autodetect, False, False, 0) diff --git a/tryton/gui/window/win_search.py b/tryton/gui/window/win_search.py index 8d29385eea..9461e5fe1e 100644 --- a/tryton/gui/window/win_search.py +++ b/tryton/gui/window/win_search.py @@ -4,6 +4,7 @@ import gtk import gettext import tryton.common as common +from tryton.common.underline import set_underline from tryton.config import TRYTON_ICON from tryton.gui import Main from tryton.gui.window.nomodal import NoModal @@ -49,18 +50,28 @@ class WinSearch(NoModal): self.accel_group = gtk.AccelGroup() self.win.add_accel_group(self.accel_group) - self.but_cancel = self.win.add_button(gtk.STOCK_CANCEL, - gtk.RESPONSE_CANCEL) + self.but_cancel = self.win.add_button( + set_underline(_("Cancel")), gtk.RESPONSE_CANCEL) + self.but_cancel.set_image(common.IconFactory.get_image( + 'tryton-cancel', gtk.ICON_SIZE_BUTTON)) self.but_cancel.set_always_show_image(True) - self.but_find = self.win.add_button(gtk.STOCK_FIND, gtk.RESPONSE_APPLY) + self.but_find = self.win.add_button( + set_underline(_("Search")), gtk.RESPONSE_APPLY) + self.but_find.set_image(common.IconFactory.get_image( + 'tryton-search', gtk.ICON_SIZE_BUTTON)) self.but_find.set_always_show_image(True) if new and common.MODELACCESS[model]['create']: - self.but_new = self.win.add_button(gtk.STOCK_NEW, - gtk.RESPONSE_ACCEPT) + self.but_new = self.win.add_button( + set_underline(_("New")), gtk.RESPONSE_ACCEPT) + self.but_new.set_image(common.IconFactory.get_image( + 'tryton-create', gtk.ICON_SIZE_BUTTON)) self.but_new.set_always_show_image(True) self.but_new.set_accel_path('/Form/New', self.accel_group) - self.but_ok = self.win.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + self.but_ok = self.win.add_button( + set_underline(_("OK")), gtk.RESPONSE_OK) + self.but_ok.set_image(common.IconFactory.get_image( + 'tryton-ok', gtk.ICON_SIZE_BUTTON)) self.but_ok.set_always_show_image(True) self.but_ok.add_accelerator('clicked', self.accel_group, gtk.keysyms.Return, gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE)