diff --git a/gramps/gui/actiongroup.py b/gramps/gui/actiongroup.py
new file mode 100644
index 000000000..f856e95c3
--- /dev/null
+++ b/gramps/gui/actiongroup.py
@@ -0,0 +1,45 @@
+#
+# Gramps - a GTK+/GNOME based genealogy program
+#
+# Copyright (C) 2015 Nick Hall
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+"""
+A replacement ActionGroup that correctly loads named icons from an icon theme.
+"""
+
+from gi.repository import Gtk
+
+class ActionGroup(Gtk.ActionGroup):
+
+ def add_actions(self, action_list, **kwargs):
+ Gtk.ActionGroup.add_actions(self, action_list, **kwargs)
+ self.fix_icon_name(action_list)
+
+ def add_toggle_actions(self, action_list, **kwargs):
+ Gtk.ActionGroup.add_toggle_actions(self, action_list, **kwargs)
+ self.fix_icon_name(action_list)
+
+ def add_radio_actions(self, action_list, **kwargs):
+ Gtk.ActionGroup.add_radio_actions(self, action_list, **kwargs)
+ self.fix_icon_name(action_list)
+
+ def fix_icon_name(self, action_list):
+ for action_tuple in action_list:
+ if action_tuple[1]:
+ action = self.get_action(action_tuple[0])
+ action.set_icon_name(action_tuple[1])
diff --git a/gramps/gui/clipboard.py b/gramps/gui/clipboard.py
index c26486cff..af0209276 100644
--- a/gramps/gui/clipboard.py
+++ b/gramps/gui/clipboard.py
@@ -74,29 +74,28 @@ WIKI_HELP_SEC = _('manual|Using_the_Clipboard')
#
#-------------------------------------------------------------------------
-_stock_image = os.path.join(IMAGE_DIR,'stock_link.png')
-LINK_PIC = GdkPixbuf.Pixbuf.new_from_file(_stock_image)
+theme = Gtk.IconTheme.get_default()
+LINK_PIC = theme.load_icon('stock_link', 16, 0)
ICONS = {}
-for (name, file) in (
- ("media", "gramps-media.png"),
- ("note", "gramps-notes.png"),
- ("person", "gramps-person.png"),
- ("place", "gramps-place.png"),
- ('address', 'gramps-address.png'),
- ('attribute', 'gramps-attribute.png'),
- ('event', 'gramps-event.png'),
- ('family', 'gramps-family.png'),
- ('location', 'geo-place-link.png'),
- ('media', 'gramps-media.png'),
- ('name', 'geo-show-person.png'),
- ('repository', 'gramps-repository.png'),
- ('source', 'gramps-source.png'),
- ('citation', 'gramps-citation.png'),
- ('text', 'gramps-font.png'),
- ('url', 'gramps-geo.png'),
+for (name, icon) in (
+ ("media", "gramps-media"),
+ ("note", "gramps-notes"),
+ ("person", "gramps-person"),
+ ("place", "gramps-place"),
+ ('address', 'gramps-address'),
+ ('attribute', 'gramps-attribute'),
+ ('event', 'gramps-event'),
+ ('family', 'gramps-family'),
+ ('location', 'geo-place-link'),
+ ('media', 'gramps-media'),
+ ('name', 'geo-show-person'),
+ ('repository', 'gramps-repository'),
+ ('source', 'gramps-source'),
+ ('citation', 'gramps-citation'),
+ ('text', 'gramps-font'),
+ ('url', 'gramps-geo'),
):
- _image = os.path.join(IMAGE_DIR, '16x16', file)
- ICONS[name] = GdkPixbuf.Pixbuf.new_from_file(_image)
+ ICONS[name] = theme.load_icon(icon, 16, 0)
#-------------------------------------------------------------------------
#
@@ -174,7 +173,7 @@ def model_contains(model, data):
#
#-------------------------------------------------------------------------
class ClipWrapper(object):
- UNAVAILABLE_ICON = Gtk.STOCK_DIALOG_ERROR
+ UNAVAILABLE_ICON = 'dialog-error'
def __init__(self, dbstate, obj):
dbstate.connect('database-changed', self.database_changed)
@@ -1125,7 +1124,7 @@ class ClipboardListView(object):
o = model.get_value(node, 1)
if o._dbid != self.dbstate.db.get_dbid():
if isinstance(o.__class__.UNAVAILABLE_ICON, str):
- cell.set_property('stock-id',
+ cell.set_property('icon-name',
o.__class__.UNAVAILABLE_ICON)
else:
cell.set_property('pixbuf',
diff --git a/gramps/gui/columnorder.py b/gramps/gui/columnorder.py
index 5a8b7ccc3..271e935be 100644
--- a/gramps/gui/columnorder.py
+++ b/gramps/gui/columnorder.py
@@ -104,7 +104,7 @@ class ColumnOrder(Gtk.Box):
self.tree = Gtk.TreeView()
self.tree.set_reorderable(True)
scroll.add(self.tree)
- self.apply_button = Gtk.Button(stock='gtk-apply')
+ self.apply_button = Gtk.Button.new_with_mnemonic(_('_Apply'))
btns = Gtk.ButtonBox()
btns.set_layout(Gtk.ButtonBoxStyle.END)
btns.pack_start(self.apply_button, True, True, 0)
diff --git a/gramps/gui/configure.py b/gramps/gui/configure.py
index 88bd09884..58be41eb9 100644
--- a/gramps/gui/configure.py
+++ b/gramps/gui/configure.py
@@ -101,7 +101,7 @@ class DisplayNameEditor(ManagedWindow):
self.dbstate = dbstate
self.set_window(
Gtk.Dialog(_('Display Name Editor'),
- buttons=(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)),
+ buttons=(_('_Close'), Gtk.ResponseType.CLOSE)),
None, _('Display Name Editor'), None)
grid = self.dialog._build_custom_name_ui()
label = Gtk.Label(label=_("""The following keywords are replaced with the appropriate name parts:
@@ -177,7 +177,7 @@ class ConfigureDialog(ManagedWindow):
ManagedWindow.__init__(self, uistate, [], configobj)
self.set_window(
Gtk.Dialog(dialogtitle,
- buttons=(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)),
+ buttons=(_('_Close'), Gtk.ResponseType.CLOSE)),
None, dialogtitle, None)
self.panel = Gtk.Notebook()
self.panel.set_scrollable(True)
@@ -333,7 +333,7 @@ class ConfigureDialog(ManagedWindow):
btn = Gtk.Button()
btn.connect('clicked', callback_sel)
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_OPEN, Gtk.IconSize.BUTTON)
+ image.set_from_icon_name('document-open', Gtk.IconSize.BUTTON)
image.show()
btn.add(image)
hbox.pack_start(entry, True, True, 0)
@@ -837,14 +837,14 @@ class GrampsPreferences(ConfigureDialog):
self.selected_fmt = ()
self.iter = None
- self.insert_button = Gtk.Button(stock=Gtk.STOCK_ADD)
+ self.insert_button = Gtk.Button.new_with_mnemonic(_('_Add'))
self.insert_button.connect('clicked', self.__new_name)
- self.edit_button = Gtk.Button(stock=Gtk.STOCK_EDIT)
+ self.edit_button = Gtk.Button.new_with_mnemonic(_('_Edit'))
self.edit_button.connect('clicked', self.__edit_name)
self.edit_button.set_sensitive(False)
- self.remove_button = Gtk.Button(stock=Gtk.STOCK_REMOVE)
+ self.remove_button = Gtk.Button.new_with_mnemonic(_('_Remove'))
self.remove_button.connect('clicked', self.cb_del_fmt_str)
self.remove_button.set_sensitive(False)
@@ -1402,9 +1402,9 @@ class GrampsPreferences(ConfigureDialog):
f = Gtk.FileChooserDialog(title=_("Select media directory"),
parent=self.window,
action=Gtk.FileChooserAction.SELECT_FOLDER,
- buttons=(Gtk.STOCK_CANCEL,
+ buttons=(_('_Cancel'),
Gtk.ResponseType.CANCEL,
- Gtk.STOCK_APPLY,
+ _('_Apply'),
Gtk.ResponseType.OK)
)
mpath = self.dbstate.db.get_mediapath()
@@ -1427,9 +1427,9 @@ class GrampsPreferences(ConfigureDialog):
f = Gtk.FileChooserDialog(title=_("Select database directory"),
parent=self.window,
action=Gtk.FileChooserAction.SELECT_FOLDER,
- buttons=(Gtk.STOCK_CANCEL,
+ buttons=(_('_Cancel'),
Gtk.ResponseType.CANCEL,
- Gtk.STOCK_APPLY,
+ _('_Apply'),
Gtk.ResponseType.OK)
)
dbpath = config.get('behavior.database-path')
@@ -1485,13 +1485,3 @@ class GrampsPreferences(ConfigureDialog):
def build_menu_names(self, obj):
return (_('Preferences'), _('Preferences'))
-
- # FIXME: is this needed?
- def _set_button(self, stock):
- button = Gtk.Button()
- image = Gtk.Image()
- image.set_from_stock(stock, Gtk.IconSize.BUTTON)
- image.show()
- button.add(image)
- button.show()
- return button
diff --git a/gramps/gui/dbloader.py b/gramps/gui/dbloader.py
index 6d4b283d4..6e7f85d5e 100644
--- a/gramps/gui/dbloader.py
+++ b/gramps/gui/dbloader.py
@@ -138,7 +138,7 @@ class DbLoader(CLIDbLoader):
import_dialog = Gtk.FileChooserDialog(_('Gramps: Import Family Tree'),
self.uistate.window,
Gtk.FileChooserAction.OPEN,
- (Gtk.STOCK_CANCEL,
+ (_('_Cancel'),
Gtk.ResponseType.CANCEL,
_('Import'),
Gtk.ResponseType.OK))
diff --git a/gramps/gui/dbman.py b/gramps/gui/dbman.py
index f4605623a..1869a679a 100644
--- a/gramps/gui/dbman.py
+++ b/gramps/gui/dbman.py
@@ -102,7 +102,7 @@ FILE_COL = 2
DATE_COL = 3
DSORT_COL = 4
OPEN_COL = 5
-STOCK_COL = 6
+ICON_COL = 6
RCS_BUTTON = { True : _('_Extract'), False : _('_Archive') }
@@ -113,9 +113,9 @@ class DbManager(CLIDbManager):
"""
ICON_MAP = {
CLIDbManager.ICON_NONE : None,
- CLIDbManager.ICON_RECOVERY : Gtk.STOCK_DIALOG_ERROR,
+ CLIDbManager.ICON_RECOVERY : 'dialog-error',
CLIDbManager.ICON_LOCK : 'gramps-lock',
- CLIDbManager.ICON_OPEN : Gtk.STOCK_OPEN,
+ CLIDbManager.ICON_OPEN : 'document-open',
}
ERROR = ErrorDialog
@@ -231,7 +231,7 @@ class DbManager(CLIDbManager):
is_rev = len(path.get_indices()) > 1
self.rcs.set_label(RCS_BUTTON[is_rev])
- if store.get_value(node, STOCK_COL) == Gtk.STOCK_OPEN:
+ if store.get_value(node, ICON_COL) == 'document-open':
self.connect.set_sensitive(False)
if _RCS_FOUND:
self.rcs.set_sensitive(True)
@@ -242,7 +242,7 @@ class DbManager(CLIDbManager):
else:
self.rcs.set_sensitive(False)
- if store.get_value(node, STOCK_COL) == Gtk.STOCK_DIALOG_ERROR:
+ if store.get_value(node, ICON_COL) == 'dialog-error':
path = conv_to_unicode(store.get_value(node, PATH_COL), 'utf8')
backup = os.path.join(path, "person.gbkp")
self.repair.set_sensitive(os.path.isfile(backup))
@@ -289,7 +289,7 @@ class DbManager(CLIDbManager):
# build the icon column
render = Gtk.CellRendererPixbuf()
#icon_column = Gtk.TreeViewColumn(_('Status'), render,
- #stock_id=STOCK_COL)
+ #icon_name=ICON_COL)
icon_column = Gtk.TreeViewColumn(_('Status'), render)
icon_column.set_cell_data_func(render, bug_fix)
self.dblist.append_column(icon_column)
@@ -350,7 +350,7 @@ class DbManager(CLIDbManager):
if value == Gtk.ResponseType.OK:
store, node = self.selection.get_selected()
# don't open a locked file
- if store.get_value(node, STOCK_COL) == 'gramps-lock':
+ if store.get_value(node, ICON_COL) == 'gramps-lock':
self.__ask_to_break_lock(store, node)
continue
# don't open a version
@@ -398,7 +398,7 @@ class DbManager(CLIDbManager):
dbpath = conv_to_unicode(store.get_value(node, PATH_COL), 'utf8')
(tval, last) = time_val(dbpath)
store.set_value(node, OPEN_COL, 0)
- store.set_value(node, STOCK_COL, "")
+ store.set_value(node, ICON_COL, "")
store.set_value(node, DATE_COL, last)
store.set_value(node, DSORT_COL, tval)
except IOError:
@@ -966,7 +966,7 @@ def bug_fix(column, renderer, model, iter_, data):
None using the TreeModel set_value method. Instead we set it to an empty
string and convert it to None here.
"""
- stock_id = model.get_value(iter_, STOCK_COL)
- if stock_id == '':
- stock_id = None
- renderer.set_property('stock_id', stock_id)
+ icon_name = model.get_value(iter_, ICON_COL)
+ if icon_name == '':
+ icon_name = None
+ renderer.set_property('icon-name', icon_name)
diff --git a/gramps/gui/editors/displaytabs/backreflist.py b/gramps/gui/editors/displaytabs/backreflist.py
index 886a9b716..90504ab67 100644
--- a/gramps/gui/editors/displaytabs/backreflist.py
+++ b/gramps/gui/editors/displaytabs/backreflist.py
@@ -95,7 +95,7 @@ class BackRefList(EmbeddedList):
This button box is then appended hbox (self).
Method has signature of, and overrides create_buttons from _ButtonTab.py
"""
- self.edit_btn = SimpleButton(Gtk.STOCK_EDIT, self.edit_button_clicked)
+ self.edit_btn = SimpleButton('gtk-edit', self.edit_button_clicked)
self.edit_btn.set_tooltip_text(_('Edit reference'))
hbox = Gtk.Box()
diff --git a/gramps/gui/editors/displaytabs/buttontab.py b/gramps/gui/editors/displaytabs/buttontab.py
index 0d97134c5..047b28d27 100644
--- a/gramps/gui/editors/displaytabs/buttontab.py
+++ b/gramps/gui/editors/displaytabs/buttontab.py
@@ -122,9 +122,9 @@ class ButtonTab(GrampsTab):
self.top_label.set_use_markup(True)
self.track_ref_for_deletion("top_label")
- self.add_btn = SimpleButton(Gtk.STOCK_ADD, self.add_button_clicked)
- self.edit_btn = SimpleButton(Gtk.STOCK_EDIT, self.edit_button_clicked)
- self.del_btn = SimpleButton(Gtk.STOCK_REMOVE, self.del_button_clicked)
+ self.add_btn = SimpleButton('list-add', self.add_button_clicked)
+ self.edit_btn = SimpleButton('gtk-edit', self.edit_button_clicked)
+ self.del_btn = SimpleButton('list-remove', self.del_button_clicked)
self.track_ref_for_deletion("add_btn")
self.track_ref_for_deletion("edit_btn")
self.track_ref_for_deletion("del_btn")
@@ -134,17 +134,16 @@ class ButtonTab(GrampsTab):
self.del_btn.set_tooltip_text(self._MSG['del'])
if share_button:
- self.share_btn = SimpleButton(Gtk.STOCK_INDEX, self.share_button_clicked)
+ self.share_btn = SimpleButton('gtk-index', self.share_button_clicked)
self.share_btn.set_tooltip_text(self._MSG['share'])
self.track_ref_for_deletion("share_btn")
else:
self.share_btn = None
if move_buttons:
- self.up_btn = SimpleButton(Gtk.STOCK_GO_UP, self.up_button_clicked)
+ self.up_btn = SimpleButton('go-up', self.up_button_clicked)
self.up_btn.set_tooltip_text(self._MSG['up'])
- self.down_btn = SimpleButton(Gtk.STOCK_GO_DOWN,
- self.down_button_clicked)
+ self.down_btn = SimpleButton('go-down', self.down_button_clicked)
self.down_btn.set_tooltip_text(self._MSG['down'])
self.track_ref_for_deletion("up_btn")
self.track_ref_for_deletion("down_btn")
@@ -153,7 +152,7 @@ class ButtonTab(GrampsTab):
self.down_btn = None
if jump_button:
- self.jump_btn = SimpleButton(Gtk.STOCK_JUMP_TO, self.jump_button_clicked)
+ self.jump_btn = SimpleButton('go-jump', self.jump_button_clicked)
self.track_ref_for_deletion("jump_btn")
self.jump_btn.set_tooltip_text(self._MSG['jump'])
else:
diff --git a/gramps/gui/editors/displaytabs/embeddedlist.py b/gramps/gui/editors/displaytabs/embeddedlist.py
index a9e2466bc..f6ed07320 100644
--- a/gramps/gui/editors/displaytabs/embeddedlist.py
+++ b/gramps/gui/editors/displaytabs/embeddedlist.py
@@ -148,16 +148,16 @@ class EmbeddedList(ButtonTab):
"""
if self.share_btn:
itemlist = [
- (True, True, Gtk.STOCK_ADD, self.add_button_clicked),
- (True, False, _('Share'), self.share_button_clicked),
- (False,True, Gtk.STOCK_EDIT, self.edit_button_clicked),
- (True, True, Gtk.STOCK_REMOVE, self.del_button_clicked),
+ (True, _('_Add'), 'list-add', self.add_button_clicked),
+ (True, _('Share'), None, self.share_button_clicked),
+ (False, _('_Edit'), 'gtk-edit', self.edit_button_clicked),
+ (True, _('_Remove'), 'list-remove', self.del_button_clicked),
]
else:
itemlist = [
- (True, True, Gtk.STOCK_ADD, self.add_button_clicked),
- (False,True, Gtk.STOCK_EDIT, self.edit_button_clicked),
- (True, True, Gtk.STOCK_REMOVE, self.del_button_clicked),
+ (True, _('_Add'), 'list-add', self.add_button_clicked),
+ (False, _('_Edit'), 'gtk-edit', self.edit_button_clicked),
+ (True, _('_Remove'), 'list-remove', self.del_button_clicked),
]
return itemlist
@@ -171,20 +171,15 @@ class EmbeddedList(ButtonTab):
"""
self.__store_menu = Gtk.Menu() #need to keep reference or menu disappears
menu = self.__store_menu
- for (needs_write_access, image, title, func) in self.get_popup_menu_items():
- if image:
- if isinstance(title, tuple):
- img_stock, txt = title
- item = Gtk.ImageMenuItem.new_with_label(txt)
- img = Gtk.Image()
- img.set_from_stock(img_stock, Gtk.IconSize.MENU)
- item.set_image(img)
- else:
- item = Gtk.ImageMenuItem.new_from_stock(title, None)
+ for (need_write, title, icon_name, func) in self.get_popup_menu_items():
+ if icon_name:
+ item = Gtk.ImageMenuItem.new_with_mnemonic(title)
+ img = Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.MENU)
+ item.set_image(img)
else:
- item = Gtk.MenuItem(label=title)
+ item = Gtk.MenuItem.new_with_mnemonic(title)
item.connect('activate', func)
- if needs_write_access and self.dbstate.db.readonly:
+ if need_write and self.dbstate.db.readonly:
item.set_sensitive(False)
item.show()
menu.append(item)
@@ -369,7 +364,7 @@ class EmbeddedList(ButtonTab):
STOCK_JUSTIFY_FILL icon, which in the default GTK style
looks kind of like a list.
"""
- return Gtk.STOCK_JUSTIFY_FILL
+ return 'format-justify-fill'
def del_button_clicked(self, obj):
ref = self.get_selected()
@@ -524,7 +519,7 @@ class EmbeddedList(ButtonTab):
raise NotImplementedError('Unknown column type: %s, with column name %s' % (type_col, self._column_names[pair[1]][3]))
if col_icon is not None:
image = Gtk.Image()
- image.set_from_stock(col_icon, Gtk.IconSize.MENU)
+ image.set_from_icon_name(col_icon, Gtk.IconSize.MENU)
image.set_tooltip_text(name)
image.show()
column.set_widget(image)
@@ -547,12 +542,12 @@ class EmbeddedList(ButtonTab):
Set the stock icon property of the cell renderer. We use a cell data
function because there is a problem returning None from a model.
'''
- stock_id = model.get_value(iter_, col_num)
- if stock_id == '' or stock_id == False:
- stock_id = None
- elif stock_id == True:
- stock_id = self.col_icons[col_num]
- renderer.set_property('stock_id', stock_id)
+ icon_name = model.get_value(iter_, col_num)
+ if icon_name == '' or icon_name == False:
+ icon_name = None
+ elif icon_name == True:
+ icon_name = self.col_icons[col_num]
+ renderer.set_property('icon-name', icon_name)
def construct_model(self):
"""
diff --git a/gramps/gui/editors/displaytabs/eventembedlist.py b/gramps/gui/editors/displaytabs/eventembedlist.py
index 61997d209..e3efb410b 100644
--- a/gramps/gui/editors/displaytabs/eventembedlist.py
+++ b/gramps/gui/editors/displaytabs/eventembedlist.py
@@ -309,8 +309,8 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
return GroupEmbeddedList.get_popup_menu_items(self)
else:
return [
- (True, True, Gtk.STOCK_ADD, self.add_button_clicked),
- (False,True, Gtk.STOCK_EDIT, self.edit_button_clicked),
+ (True, _('_Add'), 'list-add', self.add_button_clicked),
+ (False, _('_Edit'), 'gtk-edit', self.edit_button_clicked),
]
def _non_native_change(self):
diff --git a/gramps/gui/editors/displaytabs/gallerytab.py b/gramps/gui/editors/displaytabs/gallerytab.py
index 44722c202..65f3db8bc 100644
--- a/gramps/gui/editors/displaytabs/gallerytab.py
+++ b/gramps/gui/editors/displaytabs/gallerytab.py
@@ -125,10 +125,10 @@ class GalleryTab(ButtonTab, DbGUIElement):
def right_click(self, obj, event):
itemlist = [
- (True, True, Gtk.STOCK_ADD, self.add_button_clicked),
- (True, False, _('Share'), self.share_button_clicked),
- (False,True, Gtk.STOCK_EDIT, self.edit_button_clicked),
- (True, True, Gtk.STOCK_REMOVE, self.del_button_clicked),
+ (True, True, 'list-add', self.add_button_clicked),
+ (True, False, _('Share'), self.share_button_clicked),
+ (False,True, 'gtk-edit', self.edit_button_clicked),
+ (True, True, 'list-remove', self.del_button_clicked),
]
self.menu = Gtk.Menu()
@@ -138,7 +138,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
if media_path:
item = Gtk.ImageMenuItem(_('View'))
img = Gtk.Image()
- img.set_from_stock("gramps-viewmedia", Gtk.IconSize.MENU)
+ img.set_from_icon_name("gramps-viewmedia", Gtk.IconSize.MENU)
item.set_image(img)
item.connect('activate', make_launcher(media_path))
item.show()
@@ -162,7 +162,9 @@ class GalleryTab(ButtonTab, DbGUIElement):
for (needs_write_access, image, title, func) in itemlist:
if image:
- item = Gtk.ImageMenuItem.new_from_stock(title, None)
+ item = Gtk.ImageMenuItem()
+ img = Gtk.Image.new_from_icon_name(title, Gtk.IconSize.MENU)
+ item.set_image(img)
else:
item = Gtk.MenuItem(label=title)
item.connect('activate', func)
diff --git a/gramps/gui/editors/displaytabs/grampstab.py b/gramps/gui/editors/displaytabs/grampstab.py
index 61f1c7af2..fafe0804a 100644
--- a/gramps/gui/editors/displaytabs/grampstab.py
+++ b/gramps/gui/editors/displaytabs/grampstab.py
@@ -108,16 +108,11 @@ class GrampsTab(Gtk.Box):
icon = self.get_icon_name()
if isinstance(icon, tuple):
- if icon[0] == 0:
- func = Gtk.Image.new_from_icon_name
- else:
- func = Gtk.Image.new_from_stock
name = icon[1]
else:
- func = Gtk.Image.new_from_stock
name = icon
- self.tab_image = func(name, Gtk.IconSize.MENU)
+ self.tab_image = Gtk.Image.new_from_icon_name(name, Gtk.IconSize.MENU)
self.track_ref_for_deletion("tab_image")
self.label = Gtk.Label(label=self.tab_name)
self.track_ref_for_deletion("label")
@@ -135,7 +130,7 @@ class GrampsTab(Gtk.Box):
@returns: stock icon name
@rtype: str
"""
- return Gtk.STOCK_NEW
+ return 'document-new'
def get_tab_widget(self):
"""
diff --git a/gramps/gui/editors/displaytabs/groupembeddedlist.py b/gramps/gui/editors/displaytabs/groupembeddedlist.py
index c17a46b75..b9d451f3f 100644
--- a/gramps/gui/editors/displaytabs/groupembeddedlist.py
+++ b/gramps/gui/editors/displaytabs/groupembeddedlist.py
@@ -364,7 +364,7 @@ class GroupEmbeddedList(EmbeddedList):
STOCK_JUSTIFY_FILL icon, which in the default GTK style
looks kind of like a list.
"""
- return Gtk.STOCK_JUSTIFY_FILL
+ return 'format-justify-fill'
def del_button_clicked(self, obj):
ref = self.get_selected()
diff --git a/gramps/gui/editors/displaytabs/nameembedlist.py b/gramps/gui/editors/displaytabs/nameembedlist.py
index d4fd97b3c..9b403ab55 100644
--- a/gramps/gui/editors/displaytabs/nameembedlist.py
+++ b/gramps/gui/editors/displaytabs/nameembedlist.py
@@ -119,15 +119,15 @@ class NameEmbedList(GroupEmbeddedList):
def get_popup_menu_items(self):
if self._tmpgroup == self._WORKGROUP:
return [
- (True, True, Gtk.STOCK_ADD, self.add_button_clicked),
- (False,True, Gtk.STOCK_EDIT, self.edit_button_clicked),
- (True, True, Gtk.STOCK_REMOVE, self.del_button_clicked),
- (True, False, _('Set as default name'), self.name_button_clicked),
+ (True, _('_Add'), 'list-add', self.add_button_clicked),
+ (False, _('_Edit'), 'gtk-edit', self.edit_button_clicked),
+ (True, _('_Remove'), 'list-remove', self.del_button_clicked),
+ (True, _('Set as default name'), None, self.name_button_clicked),
]
else:
return [
- (True, True, Gtk.STOCK_ADD, self.add_button_clicked),
- (False,True, Gtk.STOCK_EDIT, self.edit_button_clicked),
+ (True, _('_Add'), 'list-add', self.add_button_clicked),
+ (False,_('_Edit'), 'gtk-edit', self.edit_button_clicked),
]
def name_button_clicked(self, obj):
diff --git a/gramps/gui/editors/displaytabs/webembedlist.py b/gramps/gui/editors/displaytabs/webembedlist.py
index e2beba03e..445866976 100644
--- a/gramps/gui/editors/displaytabs/webembedlist.py
+++ b/gramps/gui/editors/displaytabs/webembedlist.py
@@ -112,10 +112,10 @@ class WebEmbedList(EmbeddedList):
def get_popup_menu_items(self):
return [
- (True, True, Gtk.STOCK_ADD, self.add_button_clicked),
- (False, True, Gtk.STOCK_EDIT, self.edit_button_clicked),
- (True, True, Gtk.STOCK_REMOVE, self.del_button_clicked),
- (True, True, Gtk.STOCK_JUMP_TO, self.jump_button_clicked),
+ (True, _('_Add'), 'list-add', self.add_button_clicked),
+ (False, _('_Edit'), 'gtk-edit', self.edit_button_clicked),
+ (True, _('_Remove'), 'list-remove', self.del_button_clicked),
+ (True, _('_Jump to'), 'go-jump', self.jump_button_clicked),
]
def jump_button_clicked(self, obj):
diff --git a/gramps/gui/editors/editfamily.py b/gramps/gui/editors/editfamily.py
index 61071debc..8d1dcf461 100644
--- a/gramps/gui/editors/editfamily.py
+++ b/gramps/gui/editors/editfamily.py
@@ -135,14 +135,13 @@ class ChildEmbedList(EmbeddedList):
def get_popup_menu_items(self):
return [
- (False, True, (Gtk.STOCK_EDIT, _('Edit child')),
+ (False, _('Edit child'), 'gtk-edit',
self.edit_child_button_clicked),
- (True, True, Gtk.STOCK_ADD, self.add_button_clicked),
- (True, False, _('Add an existing child'),
- self.share_button_clicked),
- (False, True, (Gtk.STOCK_EDIT, _('Edit relationship')),
+ (True, _('_Add'), 'list-add', self.add_button_clicked),
+ (True, _('Add an existing child'), None, self.share_button_clicked),
+ (False, _('Edit relationship'), 'gtk-edit',
self.edit_button_clicked),
- (True, True, Gtk.STOCK_REMOVE, self.del_button_clicked),
+ (True, _('_Remove'), 'list-remove', self.del_button_clicked),
]
def get_middle_click(self):
diff --git a/gramps/gui/editors/editperson.py b/gramps/gui/editors/editperson.py
index 9d047e0ce..183f3bf3d 100644
--- a/gramps/gui/editors/editperson.py
+++ b/gramps/gui/editors/editperson.py
@@ -687,11 +687,11 @@ class EditPerson(EditPrimary):
self.track_ref_for_deletion("home_action")
self.all_action.add_actions([
- ('ActivePerson', Gtk.STOCK_APPLY, _("Make Active Person"),
+ ('ActivePerson', None, _("Make Active Person"),
None, None, self._make_active),
])
self.home_action.add_actions([
- ('HomePerson', Gtk.STOCK_HOME, _("Make Home Person"),
+ ('HomePerson', 'go-home', _("Make Home Person"),
None, None, self._make_home_person),
])
diff --git a/gramps/gui/editors/editplacename.py b/gramps/gui/editors/editplacename.py
index ed9538f91..0573e101b 100644
--- a/gramps/gui/editors/editplacename.py
+++ b/gramps/gui/editors/editplacename.py
@@ -57,11 +57,11 @@ class EditPlaceName(ManagedWindow):
window = Gtk.Dialog('', uistate.window,
Gtk.DialogFlags.DESTROY_WITH_PARENT, None)
- self.cancel_button = window.add_button(Gtk.STOCK_CANCEL,
+ self.cancel_button = window.add_button(_('_Cancel'),
Gtk.ResponseType.CANCEL)
- self.ok_button = window.add_button(Gtk.STOCK_OK,
+ self.ok_button = window.add_button(_('_OK'),
Gtk.ResponseType.ACCEPT)
- self.help_button = window.add_button(Gtk.STOCK_HELP,
+ self.help_button = window.add_button(_('_Help'),
Gtk.ResponseType.HELP)
window.connect('response', self.response)
diff --git a/gramps/gui/editors/edittaglist.py b/gramps/gui/editors/edittaglist.py
index af36df08e..e13958a0e 100644
--- a/gramps/gui/editors/edittaglist.py
+++ b/gramps/gui/editors/edittaglist.py
@@ -114,9 +114,9 @@ class EditTagList(ManagedWindow):
slist.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
top.vbox.pack_start(slist, 1, 1, 5)
- top.add_button(Gtk.STOCK_HELP, Gtk.ResponseType.HELP)
- top.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
- top.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK)
+ top.add_button(_('_Help'), Gtk.ResponseType.HELP)
+ top.add_button(_('_Cancel'), Gtk.ResponseType.CANCEL)
+ top.add_button(_('_OK'), Gtk.ResponseType.OK)
top.show_all()
return top
diff --git a/gramps/gui/editors/objectentries.py b/gramps/gui/editors/objectentries.py
index 1f882aadb..be9985860 100644
--- a/gramps/gui/editors/objectentries.py
+++ b/gramps/gui/editors/objectentries.py
@@ -262,25 +262,25 @@ class ObjEntry(object):
if use_add:
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_REMOVE, Gtk.IconSize.BUTTON)
+ image.set_from_icon_name('list-remove', Gtk.IconSize.BUTTON)
image.show()
self.share.add(image)
self.share.set_tooltip_text(self.DEL_STR)
if self.add_edt is not None:
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_EDIT, Gtk.IconSize.BUTTON)
+ image.set_from_icon_name('gtk-edit', Gtk.IconSize.BUTTON)
image.show()
self.add_edt.add(image)
self.add_edt.set_tooltip_text(self.EDIT_STR)
else:
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_INDEX, Gtk.IconSize.BUTTON)
+ image.set_from_icon_name('gtk-index', Gtk.IconSize.BUTTON)
image.show()
self.share.add(image)
self.share.set_tooltip_text(self.SHARE_STR)
if self.add_edt is not None:
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_ADD, Gtk.IconSize.BUTTON)
+ image.set_from_icon_name('list-add', Gtk.IconSize.BUTTON)
image.show()
self.add_edt.add(image)
self.add_edt.set_tooltip_text(self.ADD_STR)
diff --git a/gramps/gui/filters/_searchbar.py b/gramps/gui/filters/_searchbar.py
index 6ce54f345..ccd1363c9 100644
--- a/gramps/gui/filters/_searchbar.py
+++ b/gramps/gui/filters/_searchbar.py
@@ -52,8 +52,8 @@ class SearchBar(object):
self.filterbar = Gtk.Box()
self.filter_text = Gtk.Entry()
- self.filter_button = Gtk.Button(stock=Gtk.STOCK_FIND)
- self.clear_button = Gtk.Button(stock=Gtk.STOCK_CLEAR)
+ self.filter_button = Gtk.Button.new_with_mnemonic(_('_Find'))
+ self.clear_button = Gtk.Button.new_with_mnemonic(_('_Clear'))
self.filter_list = Gtk.ComboBox()
self.filter_model = Gtk.ListStore(GObject.TYPE_STRING,
GObject.TYPE_INT,
diff --git a/gramps/gui/filters/sidebar/_sidebarfilter.py b/gramps/gui/filters/sidebar/_sidebarfilter.py
index f152ae23e..e6ba40c70 100644
--- a/gramps/gui/filters/sidebar/_sidebarfilter.py
+++ b/gramps/gui/filters/sidebar/_sidebarfilter.py
@@ -53,7 +53,7 @@ class SidebarFilter(DbGUIElement):
self.grid.set_border_width(6)
self.grid.set_row_spacing(6)
self.grid.set_column_spacing(6)
- self.apply_btn = Gtk.Button(stock=Gtk.STOCK_FIND)
+ self.apply_btn = Gtk.Button.new_with_mnemonic(_('_Find'))
self.clear_btn = Gtk.Button()
self._init_interface()
@@ -73,7 +73,7 @@ class SidebarFilter(DbGUIElement):
hbox = Gtk.Box()
hbox.show()
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_UNDO, Gtk.IconSize.BUTTON)
+ image.set_from_icon_name('edit-undo', Gtk.IconSize.BUTTON)
image.show()
label = Gtk.Label(label=_('Reset'))
label.show()
@@ -226,7 +226,7 @@ class SidebarFilter(DbGUIElement):
"""
hbox = Gtk.Box()
hbox.pack_start(widget, True, True, 0)
- hbox.pack_start(widgets.SimpleButton(Gtk.STOCK_EDIT, self.edit_filter),
+ hbox.pack_start(widgets.SimpleButton('gtk-edit', self.edit_filter),
False, False, 0)
self.add_entry(text, hbox)
diff --git a/gramps/gui/grampsgui.py b/gramps/gui/grampsgui.py
index c60da70be..3923f8a17 100644
--- a/gramps/gui/grampsgui.py
+++ b/gramps/gui/grampsgui.py
@@ -106,104 +106,6 @@ except ImportError:
#
#-------------------------------------------------------------------------
-def register_stock_icons ():
- """
- Add the gramps names for its icons (eg gramps-person) to the GTK icon
- factory. This allows all gramps modules to call up the icons by their name
- """
- from .pluginmanager import base_reg_stock_icons
-
- #iconpath to the base image. The front of the list has highest priority
- if win():
- iconpaths = [
- (os.path.join(IMAGE_DIR, '48x48'), '.png'),
- (IMAGE_DIR, '.png'),
- ]
- else :
- iconpaths = [
- (os.path.join(IMAGE_DIR, 'scalable'), '.svg'),
- (IMAGE_DIR, '.svg'), (IMAGE_DIR, '.png'),
- ]
-
- #sizes: menu=16, small_toolbar=18, large_toolbar=24,
- # button=20, dnd=32, dialog=48
- #add to the back of this list to overrule images set at beginning of list
- extraiconsize = [
- (os.path.join(IMAGE_DIR, '22x22'),
- Gtk.IconSize.LARGE_TOOLBAR),
- (os.path.join(IMAGE_DIR, '16x16'),
- Gtk.IconSize.MENU),
- (os.path.join(IMAGE_DIR, '22x22'),
- Gtk.IconSize.BUTTON),
- ]
-
- items = [
- ('gramps-db', _('Family Trees'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-address', _('Address'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-attribute', _('Attribute'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- #('gramps-bookmark', _('Bookmarks'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- #('gramps-bookmark-delete', _('Delete bookmark'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-bookmark-new', _('_Add bookmark'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-bookmark-edit', _('Organize Bookmarks'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-config', _('Configure'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-date', _('Date'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-date-edit', _('Edit Date'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-event', _('Events'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-family', _('Family'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-fanchart', _('Fan Chart'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-fanchartdesc', _('Descendant Fan Chart'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-font', _('Font'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-font-color', _('Font Color'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-font-bgcolor', _('Font Background Color'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-gramplet', _('Gramplets'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-geo', _('Geography'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-geo-mainmap', _('Geography'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-geo-altmap', _('Geography'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('geo-show-person', _('GeoPerson'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('geo-show-family', _('GeoFamily'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('geo-show-event', _('GeoEvents'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('geo-show-place', _('GeoPlaces'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-lock', _('Public'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-media', _('Media'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-merge', _('Merge'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-notes', _('Notes'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-parents', _('Parents'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-parents-add', _('Add Parents'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-parents-open', _('Select Parents'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-pedigree', _('Pedigree'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-person', _('Person'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-place', _('Places'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-relation', _('Relationships'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-reports', _('Reports'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-repository', _('Repositories'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-source', _('Sources'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-spouse', _('Add Spouse'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-tag', _('Tag'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-tag-new', _('New Tag'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-tools', _('Tools'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-tree-group', _('Grouped List'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-tree-list', _('List'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-tree-select', _('Select'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-unlock', _('Private'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-view', _('View'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-viewmedia', _('View'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-zoom-in', _('Zoom In'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-zoom-out', _('Zoom Out'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-zoom-fit-width', _('Fit Width'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-zoom-best-fit', _('Fit Page'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-citation', _('Citations'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ]
- #TODO# the following icons are not yet in new directory structure
- # they should be ported in the near future
- items_legacy = [
- ('gramps-export', _('Export'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-import', _('Import'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-undo-history', _('Undo History'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ('gramps-url', _('URL'), Gdk.ModifierType.CONTROL_MASK, 0, ''),
- ]
-
- base_reg_stock_icons(iconpaths, extraiconsize, items+items_legacy)
-
def _display_welcome_message():
"""
Display a welcome message to the user.
@@ -257,7 +159,10 @@ class Gramps(object):
import gettext
_display_welcome_message()
- register_stock_icons()
+
+ # Append image directory to the theme search path
+ theme = Gtk.IconTheme.get_default()
+ theme.append_search_path(IMAGE_DIR)
if lin() and glocale.lang != 'C' and not gettext.find(GTK_GETTEXT_DOMAIN):
LOG.warn("GTK translations missing, GUI will be broken, especially for RTL languages!")
diff --git a/gramps/gui/logger/_errorview.py b/gramps/gui/logger/_errorview.py
index 5fda1180f..80731c90e 100644
--- a/gramps/gui/logger/_errorview.py
+++ b/gramps/gui/logger/_errorview.py
@@ -95,7 +95,7 @@ class ErrorView(object):
hbox = Gtk.Box()
hbox.set_spacing(12)
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_DIALOG_ERROR, Gtk.IconSize.DIALOG)
+ image.set_from_icon_name('dialog-error', Gtk.IconSize.DIALOG)
label = Gtk.Label(label='%s'
% _("Gramps has experienced an unexpected error"))
label.set_use_markup(True)
@@ -135,9 +135,9 @@ class ErrorView(object):
vbox.pack_start(tb_expander, True, True, 5)
- self.top.add_button(Gtk.STOCK_CANCEL,Gtk.ResponseType.CANCEL)
- self.top.add_button(_("Report"),Gtk.ResponseType.YES)
- self.top.add_button(Gtk.STOCK_HELP,Gtk.ResponseType.HELP)
+ self.top.add_button(_('_Cancel'), Gtk.ResponseType.CANCEL)
+ self.top.add_button(_("Report"), Gtk.ResponseType.YES)
+ self.top.add_button(_('_Help'), Gtk.ResponseType.HELP)
self.top.show_all()
diff --git a/gramps/gui/navigator.py b/gramps/gui/navigator.py
index 5de121605..e6eeb6146 100644
--- a/gramps/gui/navigator.py
+++ b/gramps/gui/navigator.py
@@ -38,6 +38,7 @@ from gi.repository import Gdk
#-------------------------------------------------------------------------
from gramps.gen.plug import (START, END)
from .pluginmanager import GuiPluginManager
+from .actiongroup import ActionGroup
#-------------------------------------------------------------------------
#
@@ -113,7 +114,7 @@ class Navigator(object):
self.__menu_button_pressed)
#close_button = Gtk.Button()
- #img = Gtk.Image.new_from_stock(Gtk.STOCK_CLOSE, Gtk.IconSize.MENU)
+ #img = Gtk.Image.new_from_icon_name('window-close', Gtk.IconSize.MENU)
#close_button.set_image(img)
#close_button.set_relief(Gtk.ReliefStyle.NONE)
#close_button.connect('clicked', self.cb_close_clicked)
@@ -228,7 +229,7 @@ class Navigator(object):
list(map(uimanager.remove_ui, self.merge_ids))
if cat_num in self.ui_category:
- self.cat_view_group = Gtk.ActionGroup(name='viewmenu')
+ self.cat_view_group = ActionGroup(name='viewmenu')
self.cat_view_group.add_radio_actions(
self.view_toggle_actions[cat_num], value=view_num,
on_change=self.cb_view_clicked, user_data=cat_num)
diff --git a/gramps/gui/plug/_guioptions.py b/gramps/gui/plug/_guioptions.py
index 8b1c3ccbd..155c22639 100644
--- a/gramps/gui/plug/_guioptions.py
+++ b/gramps/gui/plug/_guioptions.py
@@ -76,7 +76,7 @@ class LastNameDialog(ManagedWindow):
ManagedWindow.__init__(self, uistate, track, self)
flags = Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT
- buttons = (Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT, Gtk.STOCK_OK,
+ buttons = (_('_Cancel'), Gtk.ResponseType.REJECT, _('_OK'),
Gtk.ResponseType.ACCEPT)
self.__dlg = Gtk.Dialog(None, uistate.window, flags, buttons)
self.__dlg.set_position(Gtk.WindowPosition.CENTER_ON_PARENT)
@@ -621,7 +621,7 @@ class GuiPersonOption(Gtk.Box):
pevt = Gtk.EventBox()
pevt.add(self.__person_label)
- person_button = widgets.SimpleButton(Gtk.STOCK_INDEX,
+ person_button = widgets.SimpleButton('gtk-index',
self.__get_person_clicked)
person_button.set_relief(Gtk.ReliefStyle.NORMAL)
@@ -746,7 +746,7 @@ class GuiFamilyOption(Gtk.Box):
pevt = Gtk.EventBox()
pevt.add(self.__family_label)
- family_button = widgets.SimpleButton(Gtk.STOCK_INDEX,
+ family_button = widgets.SimpleButton('gtk-index',
self.__get_family_clicked)
family_button.set_relief(Gtk.ReliefStyle.NORMAL)
@@ -935,7 +935,7 @@ class GuiNoteOption(Gtk.Box):
pevt = Gtk.EventBox()
pevt.add(self.__note_label)
- note_button = widgets.SimpleButton(Gtk.STOCK_INDEX,
+ note_button = widgets.SimpleButton('gtk-index',
self.__get_note_clicked)
note_button.set_relief(Gtk.ReliefStyle.NORMAL)
@@ -1039,7 +1039,7 @@ class GuiMediaOption(Gtk.Box):
pevt = Gtk.EventBox()
pevt.add(self.__media_label)
- media_button = widgets.SimpleButton(Gtk.STOCK_INDEX,
+ media_button = widgets.SimpleButton('gtk-index',
self.__get_media_clicked)
media_button.set_relief(Gtk.ReliefStyle.NORMAL)
@@ -1161,9 +1161,9 @@ class GuiPersonListOption(Gtk.Box):
# now setup the '+' and '-' pushbutton for adding/removing people from
# the container
- self.__add_person = widgets.SimpleButton(Gtk.STOCK_ADD,
+ self.__add_person = widgets.SimpleButton('list-add',
self.__add_person_clicked)
- self.__del_person = widgets.SimpleButton(Gtk.STOCK_REMOVE,
+ self.__del_person = widgets.SimpleButton('list-remove',
self.__del_person_clicked)
self.__vbbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
self.__vbbox.add(self.__add_person)
@@ -1338,9 +1338,9 @@ class GuiPlaceListOption(Gtk.Box):
# now setup the '+' and '-' pushbutton for adding/removing places from
# the container
- self.__add_place = widgets.SimpleButton(Gtk.STOCK_ADD,
+ self.__add_place = widgets.SimpleButton('list-add',
self.__add_place_clicked)
- self.__del_place = widgets.SimpleButton(Gtk.STOCK_REMOVE,
+ self.__del_place = widgets.SimpleButton('list-remove',
self.__del_place_clicked)
self.__vbbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
self.__vbbox.add(self.__add_place)
@@ -1481,9 +1481,9 @@ class GuiSurnameColorOption(Gtk.Box):
self.scrolled_window.set_shadow_type(Gtk.ShadowType.OUT)
self.pack_start(self.scrolled_window, True, True, 0)
- self.add_surname = widgets.SimpleButton(Gtk.STOCK_ADD,
+ self.add_surname = widgets.SimpleButton('list-add',
self.__add_clicked)
- self.del_surname = widgets.SimpleButton(Gtk.STOCK_REMOVE,
+ self.del_surname = widgets.SimpleButton('list-remove',
self.__del_clicked)
self.vbbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
self.vbbox.add(self.add_surname)
@@ -1647,7 +1647,7 @@ class GuiDestinationOption(Gtk.Box):
self.__button = Gtk.Button()
img = Gtk.Image()
- img.set_from_stock(Gtk.STOCK_OPEN, Gtk.IconSize.BUTTON)
+ img.set_from_icon_name('document-open', Gtk.IconSize.BUTTON)
self.__button.add(img)
self.__button.connect('clicked', self.__select_file)
@@ -1694,9 +1694,9 @@ class GuiDestinationOption(Gtk.Box):
my_action = Gtk.FileChooserAction.SAVE
fcd = Gtk.FileChooserDialog(_("Save As"), action=my_action,
- buttons=(Gtk.STOCK_CANCEL,
+ buttons=(_('_Cancel'),
Gtk.ResponseType.CANCEL,
- Gtk.STOCK_OPEN,
+ _('_Open'),
Gtk.ResponseType.OK))
name = os.path.abspath(self.__option.get_value())
diff --git a/gramps/gui/plug/_windows.py b/gramps/gui/plug/_windows.py
index 154e07d38..9cc67e7e5 100644
--- a/gramps/gui/plug/_windows.py
+++ b/gramps/gui/plug/_windows.py
@@ -100,7 +100,7 @@ class PluginStatus(ManagedWindow):
self.__preg = PluginRegister.get_instance()
self.set_window(Gtk.Dialog("", uistate.window,
Gtk.DialogFlags.DESTROY_WITH_PARENT,
- (Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)),
+ (_('_Close'), Gtk.ResponseType.CLOSE)),
None, self.title)
self.window.set_size_request(750, 400)
self.window.connect('response', self.close)
@@ -249,7 +249,7 @@ class PluginStatus(ManagedWindow):
button = Gtk.Button()
img = Gtk.Image()
- img.set_from_stock(Gtk.STOCK_OPEN, Gtk.IconSize.BUTTON)
+ img.set_from_icon_name('document-open', Gtk.IconSize.BUTTON)
button.add(img)
button.connect('clicked', self.__select_file)
install_row.pack_start(self.install_addon_path, True, True, 0)
@@ -424,9 +424,9 @@ class PluginStatus(ManagedWindow):
Select a file from the file system.
"""
fcd = Gtk.FileChooserDialog(_("Load Addon"),
- buttons=(Gtk.STOCK_CANCEL,
+ buttons=(_('_Cancel'),
Gtk.ResponseType.CANCEL,
- Gtk.STOCK_OPEN,
+ _('_Open'),
Gtk.ResponseType.OK))
name = self.install_addon_path.get_text()
dir = os.path.dirname(name)
@@ -673,7 +673,7 @@ class PluginTrace(ManagedWindow):
self.set_window(Gtk.Dialog("", uistate.window,
Gtk.DialogFlags.DESTROY_WITH_PARENT,
- (Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)),
+ (_('_Close'), Gtk.ResponseType.CLOSE)),
None, title)
self.window.set_size_request(600, 400)
self.window.connect('response', self.close)
@@ -729,11 +729,11 @@ class ToolManagedWindowBase(ManagedWindow):
self.set_window(window, None, self.get_title())
#self.window.connect('response', self.close)
- self.cancel = self.window.add_button(Gtk.STOCK_CLOSE,
+ self.cancel = self.window.add_button(_('_Close'),
Gtk.ResponseType.CANCEL)
self.cancel.connect('clicked', self.close)
- self.ok = self.window.add_button(Gtk.STOCK_EXECUTE, Gtk.ResponseType.OK)
+ self.ok = self.window.add_button(_('_Execute'), Gtk.ResponseType.OK)
self.ok.connect('clicked', self.on_ok_clicked)
self.window.set_default_size(600, -1)
diff --git a/gramps/gui/plug/export/_exportoptions.py b/gramps/gui/plug/export/_exportoptions.py
index d654e3949..f985430b2 100644
--- a/gramps/gui/plug/export/_exportoptions.py
+++ b/gramps/gui/plug/export/_exportoptions.py
@@ -271,7 +271,7 @@ class WriterOptionBox(object):
box.pack_start(label, False, True, 0)
box.pack_start(self.filter_obj, True, True, 0)
box.pack_start(
- SimpleButton(Gtk.STOCK_EDIT,
+ SimpleButton('gtk-edit',
lambda obj: self.edit_filter('Person', self.filter_obj)),
False, True, 0)
button.set_tooltip_text(_("Click to see preview after person filter"))
@@ -288,7 +288,7 @@ class WriterOptionBox(object):
box.pack_start(label_note, False, True, 0)
box.pack_start(self.filter_note, True, True, 0)
box.pack_start(
- SimpleButton(Gtk.STOCK_EDIT,
+ SimpleButton('gtk-edit',
lambda obj: self.edit_filter('Note', self.filter_note)),
False, True, 0)
button.set_tooltip_text(_("Click to see preview after note filter"))
@@ -334,16 +334,14 @@ class WriterOptionBox(object):
if row == 0:
up.set_sensitive(0) # can't go up
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_GO_UP,
- Gtk.IconSize.MENU)
+ image.set_from_icon_name('go-up', Gtk.IconSize.MENU)
up.set_image(image)
up.row = row - 1
self.up_n.append(up)
down = Gtk.Button()
down.connect("clicked", self.swap)
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_GO_DOWN,
- Gtk.IconSize.MENU)
+ image.set_from_icon_name('go-down', Gtk.IconSize.MENU)
down.set_image(image)
down.row = row
if row == 4:
@@ -384,15 +382,13 @@ class WriterOptionBox(object):
up = Gtk.Button()
up.set_sensitive(0)
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_GO_UP,
- Gtk.IconSize.MENU)
+ image.set_from_icon_name('go-up', Gtk.IconSize.MENU)
up.set_image(image)
self.spacer.pack_start(up, False, True, 0)
down = Gtk.Button()
down.set_sensitive(0)
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_GO_DOWN,
- Gtk.IconSize.MENU)
+ image.set_from_icon_name('go-down', Gtk.IconSize.MENU)
down.set_image(image)
self.spacer.pack_end(down, False, True, 0)
self.spacer_up = up
diff --git a/gramps/gui/plug/quick/_textbufdoc.py b/gramps/gui/plug/quick/_textbufdoc.py
index 3ce490628..d0c260fc5 100644
--- a/gramps/gui/plug/quick/_textbufdoc.py
+++ b/gramps/gui/plug/quick/_textbufdoc.py
@@ -59,7 +59,7 @@ class DisplayBuf(ManagedWindow):
document)
self.set_window(Gtk.Dialog("",document.uistate.window,
Gtk.DialogFlags.DESTROY_WITH_PARENT,
- (Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)),
+ (_('_Close'), Gtk.ResponseType.CLOSE)),
None, title)
self.window.set_size_request(600,400)
scrolled_window = Gtk.ScrolledWindow()
diff --git a/gramps/gui/plug/report/_bookdialog.py b/gramps/gui/plug/report/_bookdialog.py
index 5b633d799..fa9a766ce 100644
--- a/gramps/gui/plug/report/_bookdialog.py
+++ b/gramps/gui/plug/report/_bookdialog.py
@@ -653,27 +653,32 @@ class BookSelector(ManagedWindow):
else:
sensitivity = 0
entries = [
- (Gtk.STOCK_GO_UP, self.on_up_clicked, sensitivity),
- (Gtk.STOCK_GO_DOWN, self.on_down_clicked, sensitivity),
- (_("Setup"), self.on_setup_clicked, sensitivity),
- (Gtk.STOCK_REMOVE, self.on_remove_clicked, sensitivity),
- (None,None,0),
- (Gtk.STOCK_CLEAR, self.on_clear_clicked, 1),
- (Gtk.STOCK_SAVE, self.on_save_clicked, 1),
- (Gtk.STOCK_OPEN, self.on_open_clicked, 1),
- (_("Edit"), self.on_edit_clicked, 1),
+ (_('_Up'), 'go-up', self.on_up_clicked, sensitivity),
+ (_('_Down'), 'go-down', self.on_down_clicked, sensitivity),
+ (_("Setup"), None, self.on_setup_clicked, sensitivity),
+ (_('_Remove'), 'list-remove', self.on_remove_clicked, sensitivity),
+ ('', None, None, 0),
+ (_('_Clear'), 'edit-clear', self.on_clear_clicked, 1),
+ (_('_Save'), 'document-save', self.on_save_clicked, 1),
+ (_('_Open'), 'document-open', self.on_open_clicked, 1),
+ (_("Edit"), None, self.on_edit_clicked, 1),
]
- menu = Gtk.Menu()
- menu.set_title(_('Book Menu'))
- for stock_id, callback, sensitivity in entries:
- item = Gtk.ImageMenuItem(stock_id)
+ self.menu = Gtk.Menu()
+ self.menu.set_title(_('Book Menu'))
+ for title, icon_name, callback, sensitivity in entries:
+ if icon_name:
+ item = Gtk.ImageMenuItem.new_with_mnemonic(title)
+ img = Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.MENU)
+ item.set_image(img)
+ else:
+ item = Gtk.MenuItem.new_with_mnemonic(title)
if callback:
item.connect("activate", callback)
item.set_sensitive(sensitivity)
item.show()
- menu.append(item)
- menu.popup(None, None, None, None, event.button, event.time)
+ self.menu.append(item)
+ self.menu.popup(None, None, None, None, event.button, event.time)
def build_avail_context_menu(self, event):
"""Builds the menu with the single Add option."""
@@ -684,19 +689,24 @@ class BookSelector(ManagedWindow):
else:
sensitivity = 0
entries = [
- (Gtk.STOCK_ADD, self.on_add_clicked, sensitivity),
+ (_('_Add'), 'list-add', self.on_add_clicked, sensitivity),
]
- menu = Gtk.Menu()
- menu.set_title(_('Available Items Menu'))
- for stock_id, callback, sensitivity in entries:
- item = Gtk.ImageMenuItem(stock_id)
+ self.menu = Gtk.Menu()
+ self.menu.set_title(_('Available Items Menu'))
+ for title, icon_name, callback, sensitivity in entries:
+ if icon_name:
+ item = Gtk.ImageMenuItem.new_with_mnemonic(title)
+ img = Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.MENU)
+ item.set_image(img)
+ else:
+ item = Gtk.MenuItem.new_with_mnemonic(title)
if callback:
item.connect("activate", callback)
item.set_sensitive(sensitivity)
item.show()
- menu.append(item)
- menu.popup(None, None, None, None, event.button, event.time)
+ self.menu.append(item)
+ self.menu.popup(None, None, None, None, event.button, event.time)
def on_book_ok_clicked(self, obj):
"""
diff --git a/gramps/gui/plug/report/_fileentry.py b/gramps/gui/plug/report/_fileentry.py
index 1a61b09ac..dc51a86e0 100644
--- a/gramps/gui/plug/report/_fileentry.py
+++ b/gramps/gui/plug/report/_fileentry.py
@@ -41,7 +41,7 @@ class FileEntry(Gtk.Box):
self.set_homogeneous(False)
self.button = Gtk.Button()
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_OPEN, Gtk.IconSize.BUTTON)
+ image.set_from_icon_name('document-open', Gtk.IconSize.BUTTON)
self.button.add(image)
self.button.connect('clicked', self.__select_file)
self.pack_start(self.entry, True, True, 0)
@@ -57,9 +57,9 @@ class FileEntry(Gtk.Box):
dialog = Gtk.FileChooserDialog(self.title,
self.parent,
action=my_action,
- buttons=(Gtk.STOCK_CANCEL,
+ buttons=(_('_Cancel'),
Gtk.ResponseType.CANCEL,
- Gtk.STOCK_OPEN,
+ _('_Open'),
Gtk.ResponseType.OK))
name = os.path.basename(conv_to_unicode(self.entry.get_text()))
diff --git a/gramps/gui/plug/report/_reportdialog.py b/gramps/gui/plug/report/_reportdialog.py
index 38fbe65b3..1935d4c9c 100644
--- a/gramps/gui/plug/report/_reportdialog.py
+++ b/gramps/gui/plug/report/_reportdialog.py
@@ -154,14 +154,14 @@ class ReportDialog(ManagedWindow):
self.set_window(window, None, self.get_title())
self.window.set_modal(True)
- self.help = self.window.add_button(Gtk.STOCK_HELP, Gtk.ResponseType.HELP)
+ self.help = self.window.add_button(_('_Help'), Gtk.ResponseType.HELP)
self.help.connect('clicked', self.on_help_clicked)
- self.cancel = self.window.add_button(Gtk.STOCK_CANCEL,
+ self.cancel = self.window.add_button(_('_Cancel'),
Gtk.ResponseType.CANCEL)
self.cancel.connect('clicked', self.on_cancel)
- self.ok = self.window.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK)
+ self.ok = self.window.add_button(_('_OK'), Gtk.ResponseType.OK)
self.ok.connect('clicked', self.on_ok_clicked)
self.window.set_position(Gtk.WindowPosition.CENTER)
diff --git a/gramps/gui/pluginmanager.py b/gramps/gui/pluginmanager.py
index 51833b94b..edde82dac 100644
--- a/gramps/gui/pluginmanager.py
+++ b/gramps/gui/pluginmanager.py
@@ -47,71 +47,6 @@ from gramps.gen.constfunc import win
from gramps.gen.config import config
from gramps.gen.const import ICON
-#-------------------------------------------------------------------------
-#
-# Functions
-#
-#-------------------------------------------------------------------------
-
-def base_reg_stock_icons(iconpaths, extraiconsize, items):
- """
- Reusable base to register stock icons in Gramps
- :param iconpaths: list of main directory of the base icon, and extension,
- eg:
- [(os.path.join(IMAGE_DIR, 'scalable'), '.svg')]
- :param extraiconsize: list of dir with extra prepared icon sizes and the
- gtk size to use them for, eg:
- [(os.path.join(IMAGE_DIR, '22x22'), Gtk.IconSize.LARGE_TOOLBAR)]
- :param items: list of icons to register, eg:
- [('gramps-db', _('Family Trees'), Gdk.ModifierType.CONTROL_MASK, 0, '')]
- """
-
- # Register our stock items
-##TODO GTK3: stock_add does not work on items, it must be Gtk.StockItem, but
-## in python one cannot create them, bug http://www.gramps-project.org/bugs/view.php?id=5009
-## However, it seems we do not need this line as stock icons are found via Iconset
-## Gtk.stock_add (items)
-
- # Add our custom icon factory to the list of defaults
- factory = Gtk.IconFactory()
- factory.add_default()
-
- for data in items:
- pixbuf = 0
- for (dirname, ext) in iconpaths:
- icon_file = os.path.expanduser(os.path.join(dirname, data[0]+ext))
- if os.path.isfile(icon_file):
- try:
- pixbuf = GdkPixbuf.Pixbuf.new_from_file (icon_file)
- break
- except:
- pass
-
- if not pixbuf :
- pixbuf = GdkPixbuf.Pixbuf.new_from_file (ICON)
-
- pixbuf = pixbuf.add_alpha(True, 255, 255, 255)
- icon_set = Gtk.IconSet.new_from_pixbuf (pixbuf)
- #add different sized icons, always png type!
- for size in extraiconsize :
- pixbuf = 0
- icon_file = os.path.expanduser(
- os.path.join(size[0], data[0]+'.png'))
- if os.path.isfile(icon_file):
- try:
- pixbuf = GdkPixbuf.Pixbuf.new_from_file (icon_file)
- except:
- pass
-
- if pixbuf :
- source = Gtk.IconSource()
- source.set_size_wildcarded(False)
- source.set_size(size[1])
- source.set_pixbuf(pixbuf)
- icon_set.add_source(source)
-
- factory.add (data[0], icon_set)
-
#-------------------------------------------------------------------------
#
# GuiPluginManager
@@ -154,7 +89,9 @@ class GuiPluginManager(Callback):
else:
#use the plugin directory
dir = pdata.directory
- self.load_icons(pdata.icons, dir)
+ # Append icon directory to the theme search path
+ theme = Gtk.IconTheme.get_default()
+ theme.append_search_path(dir)
return self.basemgr.load_plugin(pdata)
def reload_plugins(self):
@@ -164,52 +101,6 @@ class GuiPluginManager(Callback):
def __getattr__(self, name):
return getattr(self.basemgr, name)
- def load_icons(self, icons, dir):
- """
- Load icons in the iconfactory of Gramps, so they can be used in the
- plugin.
-
- The plugin directory must contain the directories scalable, 48x48, 22x22
- and 16x16 with the icons, e.g. in dir we have:
-
- - scalable/gramps_myplugin.svg
- - 48x48/gramps_myplugin.png
- - 22x22/gramps_myplugin.png
-
- :param icons: New stock icons to register. e.g.
- [('gramps_myplugin', _('My Plugin')),
- ('gramps_myplugin_open', _('Open Plugin'))]
- :type icons: A list of tuples (stock_id, icon_label)
- :param dir: Directory from where to load the icons
- :type dir: str
- """
- if win():
- iconpaths = [
- (os.path.join(dir, '48x48'), '.png'),
- (dir, '.png'),
- ]
- else :
- iconpaths = [
- (os.path.join(dir, 'scalable'), '.svg'),
- (dir, '.svg'), (dir, '.png'),
- ]
-
- #sizes: menu=16, small_toolbar=18, large_toolbar=24,
- # button=20, dnd=32, dialog=48
- #add to the back of this list to overrule images set at beginning of list
- extraiconsize = [
- (os.path.join(dir, '22x22'), Gtk.IconSize.LARGE_TOOLBAR),
- (os.path.join(dir, '16x16'), Gtk.IconSize.MENU),
- (os.path.join(dir, '22x22'), Gtk.IconSize.BUTTON),
- ]
-
- items = []
- for stock_id, label in icons:
- items.append((stock_id, label, Gdk.ModifierType.CONTROL_MASK, 0, ''))
-
- base_reg_stock_icons(iconpaths, extraiconsize, items)
-
-
def __hidden_changed(self, *args):
#if hidden changed, stored data must be emptied as it could contain
#something that now must be hidden
diff --git a/gramps/gui/undohistory.py b/gramps/gui/undohistory.py
index a553914cd..29832e191 100644
--- a/gramps/gui/undohistory.py
+++ b/gramps/gui/undohistory.py
@@ -69,13 +69,13 @@ class UndoHistory(ManagedWindow):
window = Gtk.Dialog("", uistate.window,
Gtk.DialogFlags.DESTROY_WITH_PARENT, None)
- self.undo_button = window.add_button(Gtk.STOCK_UNDO,
+ self.undo_button = window.add_button(_('_Undo'),
Gtk.ResponseType.REJECT)
- self.redo_button = window.add_button(Gtk.STOCK_REDO,
+ self.redo_button = window.add_button(_('_Redo'),
Gtk.ResponseType.ACCEPT)
- self.clear_button = window.add_button(Gtk.STOCK_CLEAR,
+ self.clear_button = window.add_button(_('_Clear'),
Gtk.ResponseType.APPLY)
- self.close_button = window.add_button(Gtk.STOCK_CLOSE,
+ self.close_button = window.add_button(_('_Close'),
Gtk.ResponseType.CLOSE)
self.set_window(window, None, self.title)
diff --git a/gramps/gui/utils.py b/gramps/gui/utils.py
index 89f78780c..ad063859e 100644
--- a/gramps/gui/utils.py
+++ b/gramps/gui/utils.py
@@ -167,7 +167,7 @@ class ProgressMeter(object):
if self.__can_cancel:
self.__dialog.set_size_request(350, 170)
- self.__cancel_button = Gtk.Button(stock=Gtk.STOCK_CANCEL)
+ self.__cancel_button = Gtk.Button.new_with_mnemonic(_('_Cancel'))
self.__cancel_button.connect('clicked', self.__cancel_callback)
self.__dialog.vbox.add(self.__cancel_button)
@@ -181,7 +181,7 @@ class ProgressMeter(object):
area.add_with_viewport(text)
area.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
self.__dialog.vbox.add(area)
- self.message_area_ok = Gtk.Button(stock=Gtk.STOCK_OK)
+ self.message_area_ok = Gtk.Button.new_with_mnemonic(_('_OK'))
self.message_area_ok.connect("clicked", self.close)
self.message_area_ok.set_sensitive(False)
self.__dialog.vbox.pack_start(self.message_area_ok, expand=False, fill=False)
diff --git a/gramps/gui/viewmanager.py b/gramps/gui/viewmanager.py
index 75b4271fc..832f03a21 100644
--- a/gramps/gui/viewmanager.py
+++ b/gramps/gui/viewmanager.py
@@ -92,6 +92,7 @@ from gramps.gen.db.exceptions import DbException
from .aboutdialog import GrampsAboutDialog
from .navigator import Navigator
from .views.tags import Tags
+from .actiongroup import ActionGroup
#-------------------------------------------------------------------------
#
@@ -446,7 +447,8 @@ class ViewManager(CLIManager):
Build the OPEN button. Since GTK's UIManager does not have support for
the Open Recent button, we must build in on our own.
"""
- openbtn = Gtk.MenuToolButton.new_from_stock('gramps-db')
+ openbtn = Gtk.MenuToolButton()
+ openbtn.set_icon_name('gramps')
openbtn.connect('clicked', self.__open_activate)
openbtn.set_sensitive(False)
openbtn.set_tooltip_text(_("Connect to a recent database"))
@@ -472,11 +474,11 @@ class ViewManager(CLIManager):
_("Manage databases"), self.__open_activate),
('OpenRecent', None, _('Open _Recent'), None,
_("Open an existing database")),
- ('Quit', Gtk.STOCK_QUIT, _('_Quit'), "q", None,
+ ('Quit', 'application-exit', _('_Quit'), "q", None,
self.quit),
('ViewMenu', None, _('_View')),
('EditMenu', None, _('_Edit')),
- ('Preferences', Gtk.STOCK_PREFERENCES, _('_Preferences...'), None,
+ ('Preferences', 'preferences-system', _('_Preferences...'), None,
None, self.preferences_activate),
('HelpMenu', None, _('_Help')),
('HomePage', None, _('Gramps _Home Page'), None, None,
@@ -487,13 +489,13 @@ class ViewManager(CLIManager):
report_bug_activate),
('ExtraPlugins', None, _('_Extra Reports/Tools'), None, None,
extra_plugins_activate),
- ('About', Gtk.STOCK_ABOUT, _('_About'), None, None,
+ ('About', 'help-about', _('_About'), None, None,
self.display_about_box),
('PluginStatus', None, _('_Plugin Manager'), None, None,
self.__plugin_status),
('FAQ', None, _('_FAQ'), None, None, faq_activate),
('KeyBindings', None, _('_Key Bindings'), None, None, key_bindings),
- ('UserManual', Gtk.STOCK_HELP, _('_User Manual'), 'F1', None,
+ ('UserManual', 'help-browser', _('_User Manual'), 'F1', None,
manual_activate),
('TipOfDay', None, _('Tip of the Day'), None, None,
self.tip_of_day_activate),
@@ -504,7 +506,7 @@ class ViewManager(CLIManager):
self.export_data),
('Backup', None, _("Make Backup..."), None,
_("Make a Gramps XML backup of the database"), self.quick_backup),
- ('Abandon', Gtk.STOCK_REVERT_TO_SAVED,
+ ('Abandon', 'document-revert',
_('_Abandon Changes and Quit'), None, None, self.abort),
('Reports', 'gramps-reports', _('_Reports'), None,
_("Open the reports dialog"), self.reports_clicked),
@@ -548,7 +550,7 @@ class ViewManager(CLIManager):
]
self._action_action_list = [
- ('Clipboard', Gtk.STOCK_PASTE, _('Clip_board'), "b",
+ ('Clipboard', 'edit-paste', _('Clip_board'), "b",
_("Open the Clipboard dialog"), self.clipboard),
('Import', 'gramps-import', _('_Import...'), "i", None,
self.import_data),
@@ -571,12 +573,12 @@ class ViewManager(CLIManager):
]
self._undo_action_list = [
- ('Undo', Gtk.STOCK_UNDO, _('_Undo'), 'z', None,
+ ('Undo', 'edit-undo', _('_Undo'), 'z', None,
self.undo),
]
self._redo_action_list = [
- ('Redo', Gtk.STOCK_REDO, _('_Redo'), 'z', None,
+ ('Redo', 'edit-redo', _('_Redo'), 'z', None,
self.redo),
]
@@ -795,7 +797,7 @@ class ViewManager(CLIManager):
"""
Initialize an action group for the UIManager
"""
- new_group = Gtk.ActionGroup(name=name)
+ new_group = ActionGroup(name=name)
new_group.add_actions(actions)
if toggles:
new_group.add_toggle_actions(toggles)
@@ -974,7 +976,7 @@ class ViewManager(CLIManager):
# create icon/label for notebook tab (useful for debugging)
hbox = Gtk.Box()
image = Gtk.Image()
- image.set_from_stock(page.get_stock(), Gtk.IconSize.MENU)
+ image.set_from_icon_name(page.get_stock(), Gtk.IconSize.MENU)
hbox.pack_start(image, False, True, 0)
hbox.add(Gtk.Label(label=pdata.name))
hbox.show_all()
@@ -1159,10 +1161,10 @@ class ViewManager(CLIManager):
self.undoactions = Gtk.ActionGroup(name='Undo')
if label:
self.undoactions.add_actions([
- ('Undo', Gtk.STOCK_UNDO, label, 'z', None, self.undo)])
+ ('Undo', 'edit-undo', label, 'z', None, self.undo)])
else:
self.undoactions.add_actions([
- ('Undo', Gtk.STOCK_UNDO, _('_Undo'),
+ ('Undo', 'edit-undo', _('_Undo'),
'z', None, self.undo)])
self.undoactions.set_sensitive(False)
self.uimanager.insert_action_group(self.undoactions, 1)
@@ -1175,11 +1177,11 @@ class ViewManager(CLIManager):
self.redoactions = Gtk.ActionGroup(name='Redo')
if label:
self.redoactions.add_actions([
- ('Redo', Gtk.STOCK_REDO, label, 'z',
+ ('Redo', 'edit-redo', label, 'z',
None, self.redo)])
else:
self.redoactions.add_actions([
- ('Redo', Gtk.STOCK_UNDO, _('_Redo'),
+ ('Redo', 'edit-undo', _('_Redo'),
'z', None, self.redo)])
self.redoactions.set_sensitive(False)
self.uimanager.insert_action_group(self.redoactions, 1)
@@ -1218,9 +1220,9 @@ class ViewManager(CLIManager):
self.uistate.window,
Gtk.DialogFlags.DESTROY_WITH_PARENT, None)
window.set_size_request(400, -1)
- ok_button = window.add_button(Gtk.STOCK_OK,
+ ok_button = window.add_button(_('_OK'),
Gtk.ResponseType.APPLY)
- close_button = window.add_button(Gtk.STOCK_CLOSE,
+ close_button = window.add_button(_('_Close'),
Gtk.ResponseType.CLOSE)
vbox = window.get_content_area()
hbox = Gtk.Box()
@@ -1238,7 +1240,7 @@ class ViewManager(CLIManager):
button.connect("clicked",
lambda widget: self.select_backup_path(widget, path_entry))
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_OPEN, Gtk.IconSize.BUTTON)
+ image.set_from_icon_name('document-open', Gtk.IconSize.BUTTON)
image.show()
button.add(image)
hbox.pack_end(button, False, True, 0)
@@ -1337,9 +1339,9 @@ class ViewManager(CLIManager):
title=_("Select backup directory"),
parent=self.window,
action=Gtk.FileChooserAction.SELECT_FOLDER,
- buttons=(Gtk.STOCK_CANCEL,
+ buttons=(_('_Cancel'),
Gtk.ResponseType.CANCEL,
- Gtk.STOCK_APPLY,
+ _('_Apply'),
Gtk.ResponseType.OK))
mpath = path_entry.get_text()
if not mpath:
diff --git a/gramps/gui/views/bookmarks.py b/gramps/gui/views/bookmarks.py
index 10c83d6e9..007dfb37a 100644
--- a/gramps/gui/views/bookmarks.py
+++ b/gramps/gui/views/bookmarks.py
@@ -227,14 +227,14 @@ class Bookmarks :
bbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
bbox.set_layout(Gtk.ButtonBoxStyle.START)
bbox.set_spacing(6)
- up = Gtk.Button(stock=Gtk.STOCK_GO_UP)
- down = Gtk.Button(stock=Gtk.STOCK_GO_DOWN)
- delete = Gtk.Button(stock=Gtk.STOCK_REMOVE)
+ up = Gtk.Button.new_with_mnemonic(_('_Up'))
+ down = Gtk.Button.new_with_mnemonic(_('_Down'))
+ delete = Gtk.Button.new_with_mnemonic(_('_Remove'))
up.connect('clicked', self.up_clicked)
down.connect('clicked', self.down_clicked)
delete.connect('clicked', self.delete_clicked)
- self.top.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
- self.top.add_button(Gtk.STOCK_HELP, Gtk.ResponseType.HELP)
+ self.top.add_button(_('_Close'), Gtk.ResponseType.CLOSE)
+ self.top.add_button(_('_Help'), Gtk.ResponseType.HELP)
self.top.connect('delete-event', self.close)
bbox.add(up)
bbox.add(down)
diff --git a/gramps/gui/views/listview.py b/gramps/gui/views/listview.py
index c825ad723..6253b38e2 100644
--- a/gramps/gui/views/listview.py
+++ b/gramps/gui/views/listview.py
@@ -51,6 +51,7 @@ from gi.repository import Pango
#----------------------------------------------------------------
from .pageview import PageView
from .navigationview import NavigationView
+from ..actiongroup import ActionGroup
from ..columnorder import ColumnOrder
from gramps.gen.config import config
from gramps.gen.errors import WindowActiveError
@@ -203,23 +204,23 @@ class ListView(NavigationView):
NavigationView.define_actions(self)
- self.edit_action = Gtk.ActionGroup(name=self.title + '/ChangeOrder')
+ self.edit_action = ActionGroup(name=self.title + '/ChangeOrder')
self.edit_action.add_actions([
- ('Add', Gtk.STOCK_ADD, _("_Add..."), "Insert",
- self.ADD_MSG, self.add),
- ('Remove', Gtk.STOCK_REMOVE, _("_Remove"), "Delete",
- self.DEL_MSG, self.remove),
+ ('Add', 'list-add', _("_Add..."), "Insert",
+ self.ADD_MSG, self.add),
+ ('Remove', 'list-remove', _("_Remove"), "Delete",
+ self.DEL_MSG, self.remove),
('Merge', 'gramps-merge', _('_Merge...'), None,
self.MERGE_MSG, self.merge),
('ExportTab', None, _('Export View...'), None, None,
- self.export),
+ self.export),
])
self._add_action_group(self.edit_action)
- self._add_action('Edit', Gtk.STOCK_EDIT, _("action|_Edit..."),
- accel="Return",
- tip=self.EDIT_MSG,
+ self._add_action('Edit', 'gtk-edit', _("action|_Edit..."),
+ accel="Return",
+ tip=self.EDIT_MSG,
callback=self.edit)
def build_columns(self):
@@ -244,7 +245,7 @@ class ListView(NavigationView):
if col_icon is not None:
image = Gtk.Image()
- image.set_from_stock(col_icon, Gtk.IconSize.MENU)
+ image.set_from_icon_name(col_icon, Gtk.IconSize.MENU)
image.set_tooltip_text(col_name)
image.show()
column.set_widget(image)
@@ -265,13 +266,13 @@ class ListView(NavigationView):
def icon(self, column, renderer, model, iter_, col_num):
'''
- Set the stock icon property of the cell renderer. We use a cell data
+ Set the icon-name property of the cell renderer. We use a cell data
function because there is a problem returning None from a model.
'''
- stock_id = model.get_value(iter_, col_num)
- if stock_id == '':
- stock_id = None
- renderer.set_property('stock_id', stock_id)
+ icon_name = model.get_value(iter_, col_num)
+ if icon_name == '':
+ icon_name = None
+ renderer.set_property('icon-name', icon_name)
def foreground_color(self, column, renderer, model, iter_, data=None):
'''
@@ -471,7 +472,7 @@ class ListView(NavigationView):
return None
def drag_begin(self, widget, context):
- widget.drag_source_set_icon_stock(self.get_stock())
+ widget.drag_source_set_icon_name(self.get_stock())
def drag_data_get(self, widget, context, sel_data, info, time):
selected_ids = self.selected_handles()
@@ -998,8 +999,8 @@ class ListView(NavigationView):
_("Export View as Spreadsheet"),
self.uistate.window,
Gtk.FileChooserAction.SAVE,
- (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
- Gtk.STOCK_SAVE, Gtk.ResponseType.OK))
+ (_('_Cancel'), Gtk.ResponseType.CANCEL,
+ _('_Save'), Gtk.ResponseType.OK))
chooser.set_do_overwrite_confirmation(True)
combobox = Gtk.ComboBoxText()
diff --git a/gramps/gui/views/navigationview.py b/gramps/gui/views/navigationview.py
index dbca7b945..4a5c0eda5 100644
--- a/gramps/gui/views/navigationview.py
+++ b/gramps/gui/views/navigationview.py
@@ -46,6 +46,7 @@ from gi.repository import Gtk
#
#----------------------------------------------------------------
from .pageview import PageView
+from ..actiongroup import ActionGroup
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
from gramps.gen.utils.db import navigation_label
@@ -265,7 +266,7 @@ class NavigationView(PageView):
"""
Define the bookmark menu actions.
"""
- self.book_action = Gtk.ActionGroup(name=self.title + '/Bookmark')
+ self.book_action = ActionGroup(name=self.title + '/Bookmark')
self.book_action.add_actions([
('AddBook', 'gramps-bookmark-new', _('_Add Bookmark'),
'd', None, self.add_bookmark),
@@ -285,29 +286,29 @@ class NavigationView(PageView):
Define the navigation menu actions.
"""
# add the Forward action group to handle the Forward button
- self.fwd_action = Gtk.ActionGroup(name=self.title + '/Forward')
+ self.fwd_action = ActionGroup(name=self.title + '/Forward')
self.fwd_action.add_actions([
- ('Forward', Gtk.STOCK_GO_FORWARD, _("_Forward"),
- "%sRight" % mod_key(), _("Go to the next object in the history"),
+ ('Forward', 'go-next', _("_Forward"),
+ "%sRight" % mod_key(), _("Go to the next object in the history"),
self.fwd_clicked)
])
# add the Backward action group to handle the Forward button
- self.back_action = Gtk.ActionGroup(name=self.title + '/Backward')
+ self.back_action = ActionGroup(name=self.title + '/Backward')
self.back_action.add_actions([
- ('Back', Gtk.STOCK_GO_BACK, _("_Back"),
- "%sLeft" % mod_key(), _("Go to the previous object in the history"),
+ ('Back', 'go-previous', _("_Back"),
+ "%sLeft" % mod_key(), _("Go to the previous object in the history"),
self.back_clicked)
])
- self._add_action('HomePerson', Gtk.STOCK_HOME, _("_Home"),
- accel="%sHome" % mod_key(),
+ self._add_action('HomePerson', 'go-home', _("_Home"),
+ accel="%sHome" % mod_key(),
tip=_("Go to the default person"), callback=self.home)
- self.other_action = Gtk.ActionGroup(name=self.title + '/PersonOther')
+ self.other_action = ActionGroup(name=self.title + '/PersonOther')
self.other_action.add_actions([
- ('SetActive', Gtk.STOCK_HOME, _("Set _Home Person"), None,
- None, self.set_default_person),
+ ('SetActive', 'go-home', _("Set _Home Person"), None,
+ None, self.set_default_person),
])
self._add_action_group(self.back_action)
@@ -356,8 +357,8 @@ class NavigationView(PageView):
text.set_activates_default(True)
hbox.pack_start(text, False, True, 0)
dialog.vbox.pack_start(hbox, False, True, 0)
- dialog.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
- Gtk.STOCK_JUMP_TO, Gtk.ResponseType.OK)
+ dialog.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
+ _('_Jump to'), Gtk.ResponseType.OK)
dialog.set_default_response(Gtk.ResponseType.OK)
dialog.vbox.show_all()
@@ -449,7 +450,7 @@ class NavigationView(PageView):
"%s%d" % (mod_key(), index), None,
make_callback(hobj.push, handle)))
- self.mru_action = Gtk.ActionGroup(name=self.title + '/MRU')
+ self.mru_action = ActionGroup(name=self.title + '/MRU')
self.mru_action.add_actions(data)
self.mru_enable()
diff --git a/gramps/gui/views/pageview.py b/gramps/gui/views/pageview.py
index 771cf1294..15dd311b6 100644
--- a/gramps/gui/views/pageview.py
+++ b/gramps/gui/views/pageview.py
@@ -50,6 +50,7 @@ from ..dbguielement import DbGUIElement
from ..widgets.grampletbar import GrampletBar
from ..configure import ConfigureDialog
from gramps.gen.config import config
+from ..actiongroup import ActionGroup
#------------------------------------------------------------------------------
#
@@ -350,14 +351,14 @@ class PageView(DbGUIElement):
Return image associated with the view category, which is used for the
icon for the button.
"""
- return Gtk.STOCK_MISSING_IMAGE
+ return 'image-missing'
def get_viewtype_stock(self):
"""
Return immage associated with the viewtype inside a view category, it
will be used for the icon on the button to select view in the category
"""
- return Gtk.STOCK_MISSING_IMAGE
+ return 'image-missing'
def get_title(self):
"""
@@ -414,26 +415,26 @@ class PageView(DbGUIElement):
and self.action_toggle_list. The user should define these in
self.define_actions
"""
- self.action_group = Gtk.ActionGroup(name=self.title)
+ self.action_group = ActionGroup(name=self.title)
if len(self.action_list) > 0:
self.action_group.add_actions(self.action_list)
if len(self.action_toggle_list) > 0:
self.action_group.add_toggle_actions(self.action_toggle_list)
- def _add_action(self, name, stock_icon, label, accel=None, tip=None,
+ def _add_action(self, name, icon_name, label, accel=None, tip=None,
callback=None):
"""
Add an action to the action list for the current view.
"""
- self.action_list.append((name, stock_icon, label, accel, tip,
+ self.action_list.append((name, icon_name, label, accel, tip,
callback))
- def _add_toggle_action(self, name, stock_icon, label, accel=None,
+ def _add_toggle_action(self, name, icon_name, label, accel=None,
tip=None, callback=None, value=False):
"""
Add a toggle action to the action list for the current view.
"""
- self.action_toggle_list.append((name, stock_icon, label, accel,
+ self.action_toggle_list.append((name, icon_name, label, accel,
tip, callback, value))
def _add_toolmenu_action(self, name, label, tooltip, callback,
diff --git a/gramps/gui/views/tags.py b/gramps/gui/views/tags.py
index 1485ce7cc..eeb8d097f 100644
--- a/gramps/gui/views/tags.py
+++ b/gramps/gui/views/tags.py
@@ -50,6 +50,7 @@ from gramps.gen.const import URL_MANUAL_PAGE
from ..display import display_help
from ..dialog import ErrorDialog, QuestionDialog2
import gramps.gui.widgets.progressdialog as progressdlg
+from ..actiongroup import ActionGroup
#-------------------------------------------------------------------------
#
@@ -203,7 +204,7 @@ class Tags(DbGUIElement):
if self.db is None:
self.tag_ui = ''
- self.tag_action = Gtk.ActionGroup(name='Tag')
+ self.tag_action = ActionGroup(name='Tag')
return
tag_menu = ''
@@ -224,7 +225,7 @@ class Tags(DbGUIElement):
actions.append(('TagButton', 'gramps-tag', _('Tag'), None,
_('Tag selected rows'), self.cb_tag_button))
- self.tag_action = Gtk.ActionGroup(name='Tag')
+ self.tag_action = ActionGroup(name='Tag')
self.tag_action.add_actions(actions)
def cb_tag_button(self, action):
@@ -404,18 +405,18 @@ class OrganizeTagsDialog(object):
bbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
bbox.set_layout(Gtk.ButtonBoxStyle.START)
bbox.set_spacing(6)
- up = Gtk.Button(stock=Gtk.STOCK_GO_UP)
- down = Gtk.Button(stock=Gtk.STOCK_GO_DOWN)
- add = Gtk.Button(stock=Gtk.STOCK_ADD)
- edit = Gtk.Button(stock=Gtk.STOCK_EDIT)
- remove = Gtk.Button(stock=Gtk.STOCK_REMOVE)
+ up = Gtk.Button.new_with_mnemonic(_('_Up'))
+ down = Gtk.Button.new_with_mnemonic(_('_Down'))
+ add = Gtk.Button.new_with_mnemonic(_('_Add'))
+ edit = Gtk.Button.new_with_mnemonic(_('_Edit'))
+ remove = Gtk.Button.new_with_mnemonic(_('_Remove'))
up.connect('clicked', self.cb_up_clicked)
down.connect('clicked', self.cb_down_clicked)
add.connect('clicked', self.cb_add_clicked, top)
edit.connect('clicked', self.cb_edit_clicked, top)
remove.connect('clicked', self.cb_remove_clicked, top)
- top.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
- top.add_button(Gtk.STOCK_HELP, Gtk.ResponseType.HELP)
+ top.add_button(_('_Close'), Gtk.ResponseType.CLOSE)
+ top.add_button(_('_Help'), Gtk.ResponseType.HELP)
bbox.add(up)
bbox.add(down)
bbox.add(add)
@@ -615,7 +616,7 @@ class EditTag(object):
hbox.pack_start(self.entry, True, True, 5)
hbox.pack_start(self.color, False, False, 5)
- top.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK)
- top.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
+ top.add_button(_('_OK'), Gtk.ResponseType.OK)
+ top.add_button(_('_Cancel'), Gtk.ResponseType.CANCEL)
top.show_all()
return top
diff --git a/gramps/gui/widgets/buttons.py b/gramps/gui/widgets/buttons.py
index 7297abf17..ed2cf74da 100644
--- a/gramps/gui/widgets/buttons.py
+++ b/gramps/gui/widgets/buttons.py
@@ -40,18 +40,6 @@ from gi.repository import GObject
from gi.repository import Gdk
from gi.repository import Gtk
-#-------------------------------------------------------------------------
-#
-# Constants
-#
-#-------------------------------------------------------------------------
-# STOCK_INFO was added only in Gtk 2.8
-try:
- INFO_ICON = Gtk.STOCK_INFO
-except AttributeError:
- INFO_ICON = Gtk.STOCK_DIALOG_INFO
-
-
#-------------------------------------------------------------------------
#
# IconButton class
@@ -59,11 +47,10 @@ except AttributeError:
#-------------------------------------------------------------------------
class IconButton(Gtk.Button):
- def __init__(self, func, handle, icon=Gtk.STOCK_EDIT,
- size=Gtk.IconSize.MENU):
+ def __init__(self, func, handle, icon='gtk-edit', size=Gtk.IconSize.MENU):
GObject.GObject.__init__(self)
image = Gtk.Image()
- image.set_from_stock(icon, size)
+ image.set_from_icon_name(icon, size)
image.show()
self.add(image)
self.set_relief(Gtk.ReliefStyle.NONE)
@@ -89,7 +76,7 @@ class WarnButton(Gtk.Button):
GObject.GObject.__init__(self)
image = Gtk.Image()
- image.set_from_stock(INFO_ICON, Gtk.IconSize.MENU)
+ image.set_from_icon_name('dialog-information', Gtk.IconSize.MENU)
image.show()
self.add(image)
@@ -123,7 +110,7 @@ class SimpleButton(Gtk.Button):
def __init__(self, image, func):
GObject.GObject.__init__(self)
self.set_relief(Gtk.ReliefStyle.NONE)
- self.add(Gtk.Image.new_from_stock(image, Gtk.IconSize.BUTTON))
+ self.add(Gtk.Image.new_from_icon_name(image, Gtk.IconSize.BUTTON))
self.connect('clicked', func)
self.show()
@@ -169,13 +156,11 @@ class PrivacyButton(object):
obj.remove(child)
image = Gtk.Image()
if obj.get_active():
-# image.set_from_icon_name('stock_lock', Gtk.IconSize.MENU)
- image.set_from_stock('gramps-lock', Gtk.IconSize.MENU)
+ image.set_from_icon_name('gramps-lock', Gtk.IconSize.MENU)
obj.set_tooltip_text(_('Record is private'))
self.obj.set_privacy(True)
else:
-# image.set_from_icon_name('stock_lock-open', Gtk.IconSize.MENU)
- image.set_from_stock('gramps-unlock', Gtk.IconSize.MENU)
+ image.set_from_icon_name('gramps-unlock', Gtk.IconSize.MENU)
obj.set_tooltip_text(_('Record is public'))
self.obj.set_privacy(False)
image.show()
diff --git a/gramps/gui/widgets/dateentry.py b/gramps/gui/widgets/dateentry.py
index 45cc3d723..92983a1cd 100644
--- a/gramps/gui/widgets/dateentry.py
+++ b/gramps/gui/widgets/dateentry.py
@@ -57,7 +57,7 @@ class DateEntry(Gtk.Box):
self.entry.set_width_chars(13)
self.pack_start(self.entry, True, True, 0)
image = Gtk.Image()
- image.set_from_stock('gramps-date-edit', Gtk.IconSize.BUTTON)
+ image.set_from_icon_name('gramps-date-edit', Gtk.IconSize.BUTTON)
button = Gtk.Button()
button.set_image(image)
button.set_relief(Gtk.ReliefStyle.NORMAL)
diff --git a/gramps/gui/widgets/fanchart.py b/gramps/gui/widgets/fanchart.py
index 6b87ed2b4..e03063c17 100644
--- a/gramps/gui/widgets/fanchart.py
+++ b/gramps/gui/widgets/fanchart.py
@@ -1595,7 +1595,7 @@ class FanChartGrampsGUI(object):
if not person:
return 0
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO,Gtk.IconSize.MENU)
+ go_image = Gtk.Image.new_from_icon_name('go-jump', Gtk.IconSize.MENU)
go_image.show()
go_item = Gtk.ImageMenuItem(name_displayer.display(person))
go_item.set_image(go_image)
@@ -1603,15 +1603,17 @@ class FanChartGrampsGUI(object):
go_item.show()
menu.append(go_item)
- edit_item = Gtk.ImageMenuItem.new_from_stock(stock_id=Gtk.STOCK_EDIT,
- accel_group=None)
+ edit_item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Edit'))
+ img = Gtk.Image.new_from_icon_name('gtk-edit', Gtk.IconSize.MENU)
+ edit_item.set_image(img)
edit_item.connect("activate", self.edit_person_cb, person_handle)
edit_item.show()
menu.append(edit_item)
if family_handle:
family = self.dbstate.db.get_family_from_handle(family_handle)
- edit_fam_item = Gtk.ImageMenuItem.new_from_stock(
- stock_id=Gtk.STOCK_EDIT, accel_group=None)
+ edit_fam_item = Gtk.ImageMenuItem()
+ img = Gtk.Image.new_from_icon_name('gtk-edit', Gtk.IconSize.MENU)
+ edit_fam_item.set_image(img)
edit_fam_item.set_label(_("Edit family"))
edit_fam_item.connect("activate", self.edit_fam_cb, family_handle)
edit_fam_item.show()
@@ -1627,15 +1629,19 @@ class FanChartGrampsGUI(object):
lenfams = len(partner.get_family_handle_list())
if lenfams in [0, 1]:
lenfams = len(partner.get_parent_family_handle_list())
- reord_fam_item = Gtk.ImageMenuItem.new_from_stock(
- stock_id=Gtk.STOCK_SORT_ASCENDING, accel_group=None)
+ reord_fam_item = Gtk.ImageMenuItem()
+ img = Gtk.Image.new_from_icon_name('view-sort-ascending',
+ Gtk.IconSize.MENU)
+ reord_fam_item.set_image(img)
reord_fam_item.set_label(_("Reorder families"))
reord_fam_item.connect("activate", self.reord_fam_cb, parth)
reord_fam_item.set_sensitive(lenfams > 1)
reord_fam_item.show()
menu.append(reord_fam_item)
- clipboard_item = Gtk.ImageMenuItem.new_from_stock(stock_id=Gtk.STOCK_COPY, accel_group=None)
+ clipboard_item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Copy'))
+ img = Gtk.Image.new_from_icon_name('edit-copy', Gtk.IconSize.MENU)
+ clipboard_item.set_image(img)
clipboard_item.connect("activate", self.copy_person_to_clipboard_cb,
person_handle)
clipboard_item.show()
@@ -1663,7 +1669,7 @@ class FanChartGrampsGUI(object):
item.set_submenu(Gtk.Menu())
sp_menu = item.get_submenu()
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO, Gtk.IconSize.MENU)
+ go_image = Gtk.Image.new_from_icon_name('go-jump', Gtk.IconSize.MENU)
go_image.show()
sp_item = Gtk.ImageMenuItem(name_displayer.display(spouse))
sp_item.set_image(go_image)
@@ -1703,9 +1709,9 @@ class FanChartGrampsGUI(object):
else:
label = Gtk.Label(label=escape(name_displayer.display(sib)))
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO, Gtk.IconSize.MENU)
+ go_image = Gtk.Image.new_from_icon_name('go-jump', Gtk.IconSize.MENU)
go_image.show()
- sib_item = Gtk.ImageMenuItem(None)
+ sib_item = Gtk.ImageMenuItem()
sib_item.set_image(go_image)
label.set_use_markup(True)
label.show()
@@ -1740,9 +1746,9 @@ class FanChartGrampsGUI(object):
else:
label = Gtk.Label(label=escape(name_displayer.display(child)))
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO, Gtk.IconSize.MENU)
+ go_image = Gtk.Image.new_from_icon_name('go-jump', Gtk.IconSize.MENU)
go_image.show()
- child_item = Gtk.ImageMenuItem(None)
+ child_item = Gtk.ImageMenuItem()
child_item.set_image(go_image)
label.set_use_markup(True)
label.show()
@@ -1777,9 +1783,9 @@ class FanChartGrampsGUI(object):
else:
label = Gtk.Label(label=escape(name_displayer.display(par)))
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO, Gtk.IconSize.MENU)
+ go_image = Gtk.Image.new_from_icon_name('go-jump', Gtk.IconSize.MENU)
go_image.show()
- par_item = Gtk.ImageMenuItem(None)
+ par_item = Gtk.ImageMenuItem()
par_item.set_image(go_image)
label.set_use_markup(True)
label.show()
@@ -1792,7 +1798,9 @@ class FanChartGrampsGUI(object):
if no_parents:
#show an add button
- add_item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_ADD, None)
+ add_item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Add'))
+ img = Gtk.Image.new_from_icon_name('list-add', Gtk.IconSize.MENU)
+ add_item.set_image(img)
add_item.connect("activate", self.on_add_parents, person_handle)
add_item.show()
par_menu.append(add_item)
@@ -1818,9 +1826,9 @@ class FanChartGrampsGUI(object):
label = Gtk.Label(label=escape(name_displayer.display(per)))
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO, Gtk.IconSize.MENU)
+ go_image = Gtk.Image.new_from_icon_name('go-jump', Gtk.IconSize.MENU)
go_image.show()
- per_item = Gtk.ImageMenuItem(None)
+ per_item = Gtk.ImageMenuItem()
per_item.set_image(go_image)
label.set_use_markup(True)
label.show()
@@ -1841,8 +1849,9 @@ class FanChartGrampsGUI(object):
add_menu = item.get_submenu()
if family_handle:
# allow to add a child to this family
- add_child_item = Gtk.ImageMenuItem.new_from_stock(
- stock_id=Gtk.STOCK_ADD, accel_group=None)
+ add_child_item = Gtk.ImageMenuItem()
+ img = Gtk.Image.new_from_icon_name('list-add', Gtk.IconSize.MENU)
+ add_child_item.set_image(img)
add_child_item.set_label(_("Add child to family"))
add_child_item.connect("activate", self.add_child_to_fam_cb,
family_handle)
@@ -1850,16 +1859,18 @@ class FanChartGrampsGUI(object):
add_menu.append(add_child_item)
elif person_handle:
#allow to add a partner to this person
- add_partner_item = Gtk.ImageMenuItem.new_from_stock(
- stock_id=Gtk.STOCK_ADD, accel_group=None)
+ add_partner_item = Gtk.ImageMenuItem()
+ img = Gtk.Image.new_from_icon_name('list-add', Gtk.IconSize.MENU)
+ add_partner_item.set_image(img)
add_partner_item.set_label(_("Add partner to person"))
add_partner_item.connect("activate", self.add_partner_to_pers_cb,
person_handle)
add_partner_item.show()
add_menu.append(add_partner_item)
- add_pers_item = Gtk.ImageMenuItem.new_from_stock(stock_id=Gtk.STOCK_ADD,
- accel_group=None)
+ add_pers_item = Gtk.ImageMenuItem()
+ img = Gtk.Image.new_from_icon_name('list-add', Gtk.IconSize.MENU)
+ add_pers_item.set_image(img)
add_pers_item.set_label(_("Add a person"))
add_pers_item.connect("activate", self.add_person_cb)
add_pers_item.show()
diff --git a/gramps/gui/widgets/grampletbar.py b/gramps/gui/widgets/grampletbar.py
index 649c88fcd..baca56b8e 100644
--- a/gramps/gui/widgets/grampletbar.py
+++ b/gramps/gui/widgets/grampletbar.py
@@ -612,13 +612,13 @@ class DetachedWindow(ManagedWindow):
self.title)
self.set_window(Gtk.Dialog("", gramplet.uistate.window,
Gtk.DialogFlags.DESTROY_WITH_PARENT,
- (Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)),
+ (_('_Close'), Gtk.ResponseType.CLOSE)),
None,
self.title)
self.window.move(x_pos, y_pos)
self.window.set_default_size(gramplet.detached_width,
gramplet.detached_height)
- self.window.add_button(Gtk.STOCK_HELP, Gtk.ResponseType.HELP)
+ self.window.add_button(_('_Help'), Gtk.ResponseType.HELP)
self.window.connect('response', self.handle_response)
self.notebook = Gtk.Notebook()
@@ -640,7 +640,7 @@ class DetachedWindow(ManagedWindow):
"""
Callback for taking care of button clicks.
"""
- if response in [Gtk.ResponseType.CLOSE, Gtk.STOCK_CLOSE]:
+ if response == Gtk.ResponseType.CLOSE:
self.close()
elif response == Gtk.ResponseType.HELP:
# translated name:
@@ -703,7 +703,7 @@ class TabLabel(Gtk.Box):
self.closebtn = Gtk.Button()
image = Gtk.Image()
- image.set_from_stock(Gtk.STOCK_CLOSE, Gtk.IconSize.MENU)
+ image.set_from_icon_name('window-close', Gtk.IconSize.MENU)
self.closebtn.connect("clicked", callback, gramplet)
self.closebtn.set_image(image)
self.closebtn.set_relief(Gtk.ReliefStyle.NONE)
diff --git a/gramps/gui/widgets/grampletpane.py b/gramps/gui/widgets/grampletpane.py
index e83fc8e71..d88042028 100644
--- a/gramps/gui/widgets/grampletpane.py
+++ b/gramps/gui/widgets/grampletpane.py
@@ -235,11 +235,11 @@ class GrampletWindow(ManagedWindow):
self.title)
self.set_window(Gtk.Dialog("", gramplet.uistate.window,
Gtk.DialogFlags.DESTROY_WITH_PARENT,
- (Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)),
+ (_('_Close'), Gtk.ResponseType.CLOSE)),
None, self.title)
self.window.set_size_request(gramplet.detached_width,
gramplet.detached_height)
- self.window.add_button(Gtk.STOCK_HELP, Gtk.ResponseType.HELP)
+ self.window.add_button(_('_Help'), Gtk.ResponseType.HELP)
# add gramplet:
if self.gramplet.pui:
self.gramplet.pui.active = True
@@ -260,7 +260,7 @@ class GrampletWindow(ManagedWindow):
"""
Callback for taking care of button clicks.
"""
- if response in [Gtk.ResponseType.CLOSE, Gtk.STOCK_CLOSE]:
+ if response == Gtk.ResponseType.CLOSE:
self.close()
elif response == Gtk.ResponseType.HELP:
# translated name:
@@ -572,7 +572,7 @@ class GuiGramplet(object):
label.set_alignment(1.0, 0.5)
labels.pack_start(label, True, True, 0)
options.pack_start(self.pui.option_dict[item][0], True, True, 0) # widget
- save_button = Gtk.Button(stock=Gtk.STOCK_SAVE)
+ save_button = Gtk.Button.new_with_mnemonic(_('_Save'))
topbox.pack_end(save_button, False, False, 0)
save_button.connect('clicked', self.pui.save_update_options)
frame.add(topbox)
@@ -775,11 +775,11 @@ class GridGramplet(GuiGramplet):
self.gvstate.connect('clicked', self.change_state)
self.gvproperties = self.xml.get_object('gvproperties')
self.gvproperties.connect('clicked', self.set_properties)
- self.xml.get_object('gvcloseimage').set_from_stock(Gtk.STOCK_CLOSE,
+ self.xml.get_object('gvcloseimage').set_from_icon_name('window-close',
Gtk.IconSize.MENU)
- self.xml.get_object('gvstateimage').set_from_stock(Gtk.STOCK_REMOVE,
+ self.xml.get_object('gvstateimage').set_from_icon_name('list-remove',
Gtk.IconSize.MENU)
- self.xml.get_object('gvpropertiesimage').set_from_stock(Gtk.STOCK_PROPERTIES,
+ self.xml.get_object('gvpropertiesimage').set_from_icon_name('document-properties',
Gtk.IconSize.MENU)
# source:
@@ -864,14 +864,14 @@ class GridGramplet(GuiGramplet):
self.gstate = state
if state == "minimized":
self.scrolledwindow.hide()
- self.xml.get_object('gvstateimage').set_from_stock(Gtk.STOCK_ADD,
+ self.xml.get_object('gvstateimage').set_from_icon_name('list-add',
Gtk.IconSize.MENU)
column = self.mainframe.get_parent() # column
expand, fill, padding, pack = column.query_child_packing(self.mainframe)
column.set_child_packing(self.mainframe, False, fill, padding, pack)
else:
self.scrolledwindow.show()
- self.xml.get_object('gvstateimage').set_from_stock(Gtk.STOCK_REMOVE,
+ self.xml.get_object('gvstateimage').set_from_icon_name('list-remove',
Gtk.IconSize.MENU)
column = self.mainframe.get_parent() # column
expand, fill, padding, pack = column.query_child_packing(self.mainframe)
diff --git a/gramps/gui/widgets/labels.py b/gramps/gui/widgets/labels.py
index fba1d0bf0..5a0a3f8bd 100644
--- a/gramps/gui/widgets/labels.py
+++ b/gramps/gui/widgets/labels.py
@@ -191,8 +191,8 @@ class EditLabel(Gtk.Box):
Gtk.Box.__init__(self)
label = BasicLabel(text)
self.pack_start(label, False, True, 0)
- self.pack_start(Gtk.Image.new_from_stock(Gtk.STOCK_EDIT,
- Gtk.IconSize.MENU), False)
+ self.pack_start(Gtk.Image.new_from_icon_name('gtk-edit',
+ Gtk.IconSize.MENU), False)
self.set_spacing(4)
self.show_all()
diff --git a/gramps/gui/widgets/monitoredwidgets.py b/gramps/gui/widgets/monitoredwidgets.py
index 7e096a20b..95a811d4a 100644
--- a/gramps/gui/widgets/monitoredwidgets.py
+++ b/gramps/gui/widgets/monitoredwidgets.py
@@ -620,7 +620,7 @@ class MonitoredDate(object):
self.button_obj = button
image = Gtk.Image()
- image.set_from_stock('gramps-date-edit', Gtk.IconSize.BUTTON)
+ image.set_from_icon_name('gramps-date-edit', Gtk.IconSize.BUTTON)
self.button_obj.set_image(image)
self.button_obj.set_relief(Gtk.ReliefStyle.NORMAL)
self.pixmap_obj = self.button_obj.get_child()
@@ -836,7 +836,7 @@ class MonitoredTagList(object):
self.label.set_alignment(0, 0.5)
self.label.set_ellipsize(Pango.EllipsizeMode.END)
image = Gtk.Image()
- image.set_from_stock('gramps-tag', Gtk.IconSize.MENU)
+ image.set_from_icon_name('gramps-tag', Gtk.IconSize.MENU)
button.set_image (image)
button.set_tooltip_text(_('Edit the tag list'))
button.connect('button-press-event', self.cb_edit)
diff --git a/gramps/gui/widgets/progressdialog.py b/gramps/gui/widgets/progressdialog.py
index 836d1fb54..7bfb2ddf7 100644
--- a/gramps/gui/widgets/progressdialog.py
+++ b/gramps/gui/widgets/progressdialog.py
@@ -435,7 +435,7 @@ class _GtkProgressBar(Gtk.Box):
# Only display the cancel button is the operation
# can be canceled.
if long_op_status.can_cancel():
- self._cancel = Gtk.Button(stock=Gtk.STOCK_CANCEL)
+ self._cancel = Gtk.Button.new_with_mnemonic(_('_Cancel'))
self._cancel.connect("clicked",
lambda x: long_op_status.cancel())
self._cancel.show()
diff --git a/gramps/gui/widgets/selectionwidget.py b/gramps/gui/widgets/selectionwidget.py
index 65e20ef36..37faff741 100644
--- a/gramps/gui/widgets/selectionwidget.py
+++ b/gramps/gui/widgets/selectionwidget.py
@@ -310,7 +310,7 @@ class SelectionWidget(Gtk.ScrolledWindow):
Displays a 'missing image' icon in the widget.
"""
self.pixbuf = None
- self.image.set_from_stock(Gtk.STOCK_MISSING_IMAGE, Gtk.IconSize.DIALOG)
+ self.image.set_from_icon_name('image-missing', Gtk.IconSize.DIALOG)
self.image.queue_draw()
# ======================================================
diff --git a/gramps/gui/widgets/styledtexteditor.py b/gramps/gui/widgets/styledtexteditor.py
index 8883ee097..43ca46cde 100644
--- a/gramps/gui/widgets/styledtexteditor.py
+++ b/gramps/gui/widgets/styledtexteditor.py
@@ -63,6 +63,7 @@ from ..display import display_url
from ..utils import SystemFonts, rgb_to_hex
from gramps.gen.config import config
from gramps.gen.constfunc import has_display
+from ..actiongroup import ActionGroup
#-------------------------------------------------------------------------
#
@@ -472,12 +473,12 @@ class StyledTextEditor(Gtk.TextView):
# define the actions...
# ...first the toggle actions, which have a ToggleToolButton as proxy
format_toggle_actions = [
- (str(StyledTextTagType.ITALIC), Gtk.STOCK_ITALIC, None, None,
+ (str(StyledTextTagType.ITALIC), 'format-text-italic', None, None,
_('Italic'), self._on_toggle_action_activate),
- (str(StyledTextTagType.BOLD), Gtk.STOCK_BOLD, None, None,
+ (str(StyledTextTagType.BOLD), 'format-text-bold', None, None,
_('Bold'), self._on_toggle_action_activate),
- (str(StyledTextTagType.UNDERLINE), Gtk.STOCK_UNDERLINE, None, None,
- _('Underline'), self._on_toggle_action_activate),
+ (str(StyledTextTagType.UNDERLINE), 'format-text-underline', None,
+ None, _('Underline'), self._on_toggle_action_activate),
]
self.toggle_actions = [action[0] for action in format_toggle_actions]
@@ -486,11 +487,11 @@ class StyledTextEditor(Gtk.TextView):
format_actions = [
(str(StyledTextTagType.FONTCOLOR), 'gramps-font-color', None, None,
_('Font Color'), self._on_action_activate),
- (str(StyledTextTagType.HIGHLIGHT), 'gramps-font-bgcolor', None, None,
- _('Background Color'), self._on_action_activate),
- (str(StyledTextTagType.LINK), Gtk.STOCK_JUMP_TO, None, None,
+ (str(StyledTextTagType.HIGHLIGHT), 'gramps-font-bgcolor', None,
+ None, _('Background Color'), self._on_action_activate),
+ (str(StyledTextTagType.LINK), 'go-jump', None, None,
_('Link'), self._on_link_activate),
- ('clear', Gtk.STOCK_CLEAR, None, None,
+ ('clear', 'edit-clear', None, None,
_('Clear Markup'), self._format_clear_cb),
]
@@ -529,14 +530,15 @@ class StyledTextEditor(Gtk.TextView):
}
# create the action group and insert all the actions
- self.action_group = Gtk.ActionGroup(name='Format')
+ self.action_group = ActionGroup(name='Format')
self.action_group.add_toggle_actions(format_toggle_actions)
self.undo_action = Gtk.Action(name="Undo", label=_('Undo'),
- tooltip=_('Undo'),
- stock_id=Gtk.STOCK_UNDO)
+ tooltip=_('Undo'))
+ self.undo_action.set_icon_name('edit-undo')
self.undo_action.connect('activate', self.undo)
- self.redo_action = Gtk.Action.new("Redo", _('Redo'), _('Redo'),
- Gtk.STOCK_REDO)
+ self.redo_action = Gtk.Action.new(name="Redo", label=_('Redo'),
+ tooltip=_('Redo'))
+ self.redo_action.set_icon_name('edit-redo')
self.redo_action.connect('activate', self.redo)
self.action_group.add_action(self.undo_action)
self.action_group.add_action(self.redo_action)
diff --git a/gramps/gui/widgets/validatedmaskedentry.py b/gramps/gui/widgets/validatedmaskedentry.py
index 02c6dbeb9..0099601ea 100644
--- a/gramps/gui/widgets/validatedmaskedentry.py
+++ b/gramps/gui/widgets/validatedmaskedentry.py
@@ -54,17 +54,6 @@ from gi.repository import Pango
from gramps.gen.errors import MaskError, ValidationError, WindowActiveError
from .undoableentry import UndoableEntry
-#-------------------------------------------------------------------------
-#
-# Constants
-#
-#-------------------------------------------------------------------------
-# STOCK_INFO was added only in Gtk 2.8
-try:
- INFO_ICON = Gtk.STOCK_INFO
-except AttributeError:
- INFO_ICON = Gtk.STOCK_DIALOG_INFO
-
#============================================================================
#
# MaskedEntry and ValidatableMaskedEntry copied and merged from the Kiwi
@@ -1021,8 +1010,8 @@ class MaskedEntry(UndoableEntry):
def set_pixbuf(self, pixbuf):
self.set_icon_from_pixbuf(Gtk.EntryIconPosition.SECONDARY, pixbuf)
- def set_stock(self, stock_name):
- self.set_icon_from_stock(Gtk.EntryIconPosition.SECONDARY, stock_name)
+ def set_stock(self, icon_name):
+ self.set_icon_from_icon_name(Gtk.EntryIconPosition.SECONDARY, icon_name)
def update_background(self, color, unset=False):
maxvalcol = 65535.
@@ -1100,8 +1089,8 @@ class MaskedEntry(UndoableEntry):
#number = (int, float, long)
VALIDATION_ICON_WIDTH = 16
-MANDATORY_ICON = INFO_ICON
-ERROR_ICON = Gtk.STOCK_STOP
+MANDATORY_ICON = 'dialog-information'
+ERROR_ICON = 'process-stop'
class ValidatableMaskedEntry(MaskedEntry):
"""
diff --git a/gramps/guiQML/views/dbman.py b/gramps/guiQML/views/dbman.py
index d01867e36..3f77a990f 100644
--- a/gramps/guiQML/views/dbman.py
+++ b/gramps/guiQML/views/dbman.py
@@ -70,7 +70,8 @@ OPENGL = True
#-------------------------------------------------------------------------
#open_icon = QtGui.QIcon.fromTheme('open')
-FAMTREE_ICONPATH = os.path.join(IMAGE_DIR, '22x22', 'gramps.png')
+FAMTREE_ICONPATH = os.path.join(IMAGE_DIR, 'hicolor', '22x22', 'actions',
+ 'gramps.png')
class FamTreeWrapper(QtCore.QObject):
"""
diff --git a/gramps/plugins/gramplet/notes.py b/gramps/plugins/gramplet/notes.py
index 49efdc812..efcf7e1d8 100644
--- a/gramps/plugins/gramplet/notes.py
+++ b/gramps/plugins/gramplet/notes.py
@@ -43,10 +43,10 @@ class Notes(Gramplet):
top = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
hbox = Gtk.Box()
- self.left = SimpleButton(Gtk.STOCK_GO_BACK, self.left_clicked)
+ self.left = SimpleButton('go-previous', self.left_clicked)
self.left.set_sensitive(False)
hbox.pack_start(self.left, False, False, 0)
- self.right = SimpleButton(Gtk.STOCK_GO_FORWARD, self.right_clicked)
+ self.right = SimpleButton('go-next', self.right_clicked)
self.right.set_sensitive(False)
hbox.pack_start(self.right, False, False, 0)
self.page = Gtk.Label()
diff --git a/gramps/plugins/gramplet/todo.py b/gramps/plugins/gramplet/todo.py
index 258cbc25a..1b735759c 100644
--- a/gramps/plugins/gramplet/todo.py
+++ b/gramps/plugins/gramplet/todo.py
@@ -43,19 +43,19 @@ class ToDo(Gramplet):
top = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
hbox = Gtk.Box()
- self.left = SimpleButton(Gtk.STOCK_GO_BACK, self.left_clicked)
+ self.left = SimpleButton('go-previous', self.left_clicked)
self.left.set_tooltip_text(_('Previous To Do note'))
self.left.set_sensitive(False)
hbox.pack_start(self.left, False, False, 0)
- self.right = SimpleButton(Gtk.STOCK_GO_FORWARD, self.right_clicked)
+ self.right = SimpleButton('go-next', self.right_clicked)
self.right.set_tooltip_text(_('Next To Do note'))
self.right.set_sensitive(False)
hbox.pack_start(self.right, False, False, 0)
- self.edit = SimpleButton(Gtk.STOCK_EDIT, self.edit_clicked)
+ self.edit = SimpleButton('gtk-edit' self.edit_clicked)
self.edit.set_tooltip_text(_('Edit the selected To Do note'))
self.edit.set_sensitive(False)
hbox.pack_start(self.edit, False, False, 0)
- self.new = SimpleButton(Gtk.STOCK_NEW, self.new_clicked)
+ self.new = SimpleButton('document-new', self.new_clicked)
self.new.set_tooltip_text(_('Add a new To Do note'))
hbox.pack_start(self.new, False, False, 0)
self.page = Gtk.Label()
diff --git a/gramps/plugins/gramplet/todogramplet.py b/gramps/plugins/gramplet/todogramplet.py
index 96aa60226..50aacc997 100644
--- a/gramps/plugins/gramplet/todogramplet.py
+++ b/gramps/plugins/gramplet/todogramplet.py
@@ -46,19 +46,19 @@ class ToDoGramplet(Gramplet):
top = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
hbox = Gtk.Box()
- self.left = SimpleButton(Gtk.STOCK_GO_BACK, self.left_clicked)
+ self.left = SimpleButton('go-previous', self.left_clicked)
self.left.set_tooltip_text(_('Previous To Do note'))
self.left.set_sensitive(False)
hbox.pack_start(self.left, False, False, 0)
- self.right = SimpleButton(Gtk.STOCK_GO_FORWARD, self.right_clicked)
+ self.right = SimpleButton('go-next', self.right_clicked)
self.right.set_tooltip_text(_('Next To Do note'))
self.right.set_sensitive(False)
hbox.pack_start(self.right, False, False, 0)
- self.edit = SimpleButton(Gtk.STOCK_EDIT, self.edit_clicked)
+ self.edit = SimpleButton('gtk-edit', self.edit_clicked)
self.edit.set_tooltip_text(_('Edit the selected To Do note'))
self.edit.set_sensitive(False)
hbox.pack_start(self.edit, False, False, 0)
- self.new = SimpleButton(Gtk.STOCK_NEW, self.new_clicked)
+ self.new = SimpleButton('document-new', self.new_clicked)
self.new.set_tooltip_text(_('Add a new To Do note'))
hbox.pack_start(self.new, False, False, 0)
self.page = Gtk.Label()
diff --git a/gramps/plugins/lib/libpersonview.py b/gramps/plugins/lib/libpersonview.py
index 443cf11ee..90f89ab9c 100644
--- a/gramps/plugins/lib/libpersonview.py
+++ b/gramps/plugins/lib/libpersonview.py
@@ -48,6 +48,7 @@ _LOG = logging.getLogger(".gui.personview")
from gramps.gen.lib import Person, Surname
from gramps.gen.db import DbTxn
from gramps.gui.views.listview import ListView, TEXT, MARKUP, ICON
+from gramps.gui.actiongroup import ActionGroup
from gramps.gen.utils.string import data_recover_msg
from gramps.gen.display.name import displayer as name_displayer
from gramps.gui.dialog import ErrorDialog, QuestionDialog
@@ -336,13 +337,13 @@ class BasePersonView(ListView):
ListView.define_actions(self)
- self.all_action = Gtk.ActionGroup(name=self.title + "/PersonAll")
- self.edit_action = Gtk.ActionGroup(name=self.title + "/PersonEdit")
+ self.all_action = ActionGroup(name=self.title + "/PersonAll")
+ self.edit_action = ActionGroup(name=self.title + "/PersonEdit")
self.all_action.add_actions([
('FilterEdit', None, _('Person Filter Editor'), None, None,
self.filter_editor),
- ('Edit', Gtk.STOCK_EDIT, _("action|_Edit..."),
+ ('Edit', 'gtk-edit', _("action|_Edit..."),
"Return", self.EDIT_MSG, self.edit),
('QuickReport', None, _("Quick View"), None, None, None),
('WebConnect', None, _("Web Connection"), None, None, None),
@@ -351,14 +352,14 @@ class BasePersonView(ListView):
self.edit_action.add_actions(
[
- ('Add', Gtk.STOCK_ADD, _("_Add..."), "Insert",
- self.ADD_MSG, self.add),
- ('Remove', Gtk.STOCK_REMOVE, _("_Remove"), "Delete",
+ ('Add', 'list-add', _("_Add..."), "Insert",
+ self.ADD_MSG, self.add),
+ ('Remove', 'list-remove', _("_Remove"), "Delete",
self.DEL_MSG, self.remove),
('Merge', 'gramps-merge', _('_Merge...'), None,
self.MERGE_MSG, self.merge),
('ExportTab', None, _('Export View...'), None, None,
- self.export),
+ self.export),
])
self._add_action_group(self.edit_action)
diff --git a/gramps/plugins/lib/libplaceview.py b/gramps/plugins/lib/libplaceview.py
index cfa8e98ae..a1f9bfae4 100644
--- a/gramps/plugins/lib/libplaceview.py
+++ b/gramps/plugins/lib/libplaceview.py
@@ -142,7 +142,7 @@ class PlaceBaseView(ListView):
"Service (OpenstreetMap, Google Maps, ...)"),
self.gotomap,
_('Select a Map Service'))
- self._add_action('GotoMap', Gtk.STOCK_JUMP_TO,
+ self._add_action('GotoMap', 'go-jump',
_('_Look up with Map Service'),
callback=self.gotomap,
tip=_("Attempt to see this location with a Map "
@@ -172,7 +172,8 @@ class PlaceBaseView(ListView):
ListView.change_page(self)
#menutoolbutton has to be made and added in correct place on toolbar
if not self.maptoolbtn:
- self.maptoolbtn = Gtk.MenuToolButton.new_from_stock(Gtk.STOCK_JUMP_TO)
+ self.maptoolbtn = Gtk.MenuToolButton()
+ self.maptoolbtn.set_icon_name('go-jump')
self.maptoolbtn.connect('clicked', self.gotomap)
self.mmenu = self.__create_maps_menu_actions()
self.maptoolbtn.set_menu(self.mmenu)
@@ -201,7 +202,7 @@ class PlaceBaseView(ListView):
lbl.show()
self.mapslistlabel.append(lbl)
widget.set_label_widget(self.mapslistlabel[-1])
- widget.set_stock_id(Gtk.STOCK_JUMP_TO)
+ widget.set_icon_name('go-jump')
if self.drag_info():
self.list.enable_model_drag_source(Gdk.ModifierType.BUTTON1_MASK,
[],
diff --git a/gramps/plugins/lib/maps/geography.py b/gramps/plugins/lib/maps/geography.py
index fd5a22a84..6e1917aff 100644
--- a/gramps/plugins/lib/maps/geography.py
+++ b/gramps/plugins/lib/maps/geography.py
@@ -153,16 +153,11 @@ class GeoGraphyView(OsmGps, NavigationView):
self.places_found = []
self.select_fct = None
self.geo_mainmap = None
- path = os.path.join(IMAGE_DIR, "48x48",
- ('gramps-geo-mainmap' + '.png' ))
- with open(path, 'rb') as fh: # this is to avoid bug with cairo 1.8.8
- self.geo_mainmap = cairo.ImageSurface.create_from_png(fh)
- #self.geo_mainmap = cairo.ImageSurface.create_from_png(path)
- path = os.path.join(IMAGE_DIR, "48x48",
- ('gramps-geo-altmap' + '.png' ))
- with open(path, 'rb') as fh: # this is to avoid bug with cairo 1.8.8
- self.geo_altmap = cairo.ImageSurface.create_from_png(fh)
- #self.geo_altmap = cairo.ImageSurface.create_from_png(path)
+ theme = Gtk.IconTheme.get_default()
+ self.geo_mainmap = theme.load_surface('gramps-geo-mainmap', 48, 1,
+ None, 0)
+ self.geo_altmap = theme.load_surface('gramps-geo-altmap', 48, 1,
+ None, 0)
if ( config.get('geography.map_service') in
( constants.OPENSTREETMAP,
constants.MAPS_FOR_FREE,
@@ -176,11 +171,8 @@ class GeoGraphyView(OsmGps, NavigationView):
for ident in ( EventType.BIRTH,
EventType.DEATH,
EventType.MARRIAGE ):
- path = os.path.join(IMAGE_DIR, "48x48",
- (constants.ICONS.get(int(ident), default_image) + '.png' ))
- with open(path, 'rb') as fh: # this is to avoid bug with cairo 1.8.8
- self.geo_othermap[ident] = cairo.ImageSurface.create_from_png(fh)
- #self.geo_othermap[ident] = cairo.ImageSurface.create_from_png(path)
+ icon = constants.ICONS.get(int(ident))
+ self.geo_othermap[ident] = theme.load_surface(icon, 48, 1, None, 0)
def add_bookmark(self, menu):
mlist = self.selected_handles()
@@ -281,9 +273,9 @@ class GeoGraphyView(OsmGps, NavigationView):
"""
Associate the print button to the PrintView action.
"""
- self._add_action('PrintView', Gtk.STOCK_PRINT, _("_Print..."),
- accel="P",
- tip=_("Print or save the Map"),
+ self._add_action('PrintView', 'document-print', _("_Print..."),
+ accel="P",
+ tip=_("Print or save the Map"),
callback=self.printview)
def config_connect(self):
@@ -944,8 +936,8 @@ class GeoGraphyView(OsmGps, NavigationView):
kml = Gtk.FileChooserDialog(
_("Select a kml file used to add places"),
action=Gtk.FileChooserAction.OPEN,
- buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
- Gtk.STOCK_APPLY, Gtk.ResponseType.OK))
+ buttons=(_('_Cancel'), Gtk.ResponseType.CANCEL,
+ _('_Apply'), Gtk.ResponseType.OK))
mpath = HOME_DIR
kml.set_current_folder(os.path.dirname(mpath))
kml.set_filter(filter)
@@ -1182,9 +1174,9 @@ class GeoGraphyView(OsmGps, NavigationView):
f = Gtk.FileChooserDialog(
_("Select tile cache directory for offline mode"),
action=Gtk.FileChooserAction.SELECT_FOLDER,
- buttons=(Gtk.STOCK_CANCEL,
+ buttons=(_('_Cancel'),
Gtk.ResponseType.CANCEL,
- Gtk.STOCK_APPLY,
+ _('_Apply'),
Gtk.ResponseType.OK))
mpath = config.get('geography.path')
if not mpath:
diff --git a/gramps/plugins/lib/maps/placeselection.py b/gramps/plugins/lib/maps/placeselection.py
index 45b5f0839..c57fbeca4 100644
--- a/gramps/plugins/lib/maps/placeselection.py
+++ b/gramps/plugins/lib/maps/placeselection.py
@@ -117,7 +117,7 @@ class PlaceSelection(ManagedWindow, OsmGps):
self.layer = layer
self.set_window(
Gtk.Dialog(_('Place Selection in a region'),
- buttons=(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)),
+ buttons=(_('_Close'), Gtk.ResponseType.CLOSE)),
None, _('Place Selection in a region'), None)
label = Gtk.Label(label=_('Choose the radius of the selection.\n'
'On the map you should see a circle or an'
diff --git a/gramps/plugins/sidebar/categorysidebar.py b/gramps/plugins/sidebar/categorysidebar.py
index b55cc5403..9990235a8 100644
--- a/gramps/plugins/sidebar/categorysidebar.py
+++ b/gramps/plugins/sidebar/categorysidebar.py
@@ -180,9 +180,9 @@ class CategorySidebar(BaseSidebar):
hbox.show()
image = Gtk.Image()
if use_text:
- image.set_from_stock(page_stock, Gtk.IconSize.BUTTON)
+ image.set_from_icon_name(page_stock, Gtk.IconSize.BUTTON)
else:
- image.set_from_stock(page_stock, Gtk.IconSize.DND)
+ image.set_from_icon_name(page_stock, Gtk.IconSize.DND)
image.show()
hbox.pack_start(image, False, False, 0)
hbox.set_spacing(4)
diff --git a/gramps/plugins/sidebar/dropdownsidebar.py b/gramps/plugins/sidebar/dropdownsidebar.py
index dd5edf58a..6df3e09a4 100644
--- a/gramps/plugins/sidebar/dropdownsidebar.py
+++ b/gramps/plugins/sidebar/dropdownsidebar.py
@@ -125,7 +125,7 @@ class DropdownSidebar(BaseSidebar):
self.menu = Gtk.Menu()
for item in self.views[cat_num]:
menuitem = Gtk.ImageMenuItem(label=item[1])
- image = Gtk.Image.new_from_stock(item[2], Gtk.IconSize.MENU)
+ image = Gtk.Image.new_from_icon_name(item[2], Gtk.IconSize.MENU)
image.show()
menuitem.set_image(image)
menuitem.connect("activate", self.cb_menu_clicked, cat_num, item[0])
@@ -175,9 +175,9 @@ class DropdownSidebar(BaseSidebar):
hbox.show()
image = Gtk.Image()
if use_text:
- image.set_from_stock(cat_icon, Gtk.IconSize.BUTTON)
+ image.set_from_icon_name(cat_icon, Gtk.IconSize.BUTTON)
else:
- image.set_from_stock(cat_icon, Gtk.IconSize.DND)
+ image.set_from_icon_name(cat_icon, Gtk.IconSize.DND)
image.show()
hbox.pack_start(image, False, False, 0)
hbox.set_spacing(4)
diff --git a/gramps/plugins/sidebar/expandersidebar.py b/gramps/plugins/sidebar/expandersidebar.py
index af538d0fd..63fc4712d 100644
--- a/gramps/plugins/sidebar/expandersidebar.py
+++ b/gramps/plugins/sidebar/expandersidebar.py
@@ -73,7 +73,7 @@ class ExpanderSidebar(BaseSidebar):
catbox = Gtk.Box()
image = Gtk.Image()
- image.set_from_stock(cat_icon, Gtk.IconSize.BUTTON)
+ image.set_from_icon_name(cat_icon, Gtk.IconSize.BUTTON)
catbox.pack_start(image, False, False, 4)
if use_text:
label = Gtk.Label(label=cat_name)
@@ -190,9 +190,9 @@ class ExpanderSidebar(BaseSidebar):
hbox.show()
image = Gtk.Image()
if use_text:
- image.set_from_stock(view_icon, Gtk.IconSize.BUTTON)
+ image.set_from_icon_name(view_icon, Gtk.IconSize.BUTTON)
else:
- image.set_from_stock(view_icon, Gtk.IconSize.DND)
+ image.set_from_icon_name(view_icon, Gtk.IconSize.DND)
image.show()
hbox.pack_start(image, False, False, 0)
hbox.set_spacing(4)
diff --git a/gramps/plugins/tool/check.py b/gramps/plugins/tool/check.py
index a8d99b651..9f20106b6 100644
--- a/gramps/plugins/tool/check.py
+++ b/gramps/plugins/tool/check.py
@@ -691,8 +691,8 @@ class CheckIntegrity(object):
logging.warning(' FAIL: references to missing file kept')
fs_top = Gtk.FileChooserDialog("%s - Gramps" % _("Select file"),
- buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
- Gtk.STOCK_OK, Gtk.ResponseType.OK)
+ buttons=(_('_Cancel'), Gtk.ResponseType.CANCEL,
+ _('_OK'), Gtk.ResponseType.OK)
)
fs_top.set_current_folder(self.last_img_dir)
response = fs_top.run()
diff --git a/gramps/plugins/tool/eventcmp.py b/gramps/plugins/tool/eventcmp.py
index 0dc74832d..555f169b6 100644
--- a/gramps/plugins/tool/eventcmp.py
+++ b/gramps/plugins/tool/eventcmp.py
@@ -392,9 +392,9 @@ class DisplayChart(ManagedWindow):
def on_write_table(self, obj):
f = Gtk.FileChooserDialog(_("Select filename"),
action=Gtk.FileChooserAction.SAVE,
- buttons=(Gtk.STOCK_CANCEL,
+ buttons=(_('_Cancel'),
Gtk.ResponseType.CANCEL,
- Gtk.STOCK_SAVE,
+ _('_Save'),
Gtk.ResponseType.OK))
f.set_current_folder(get_curr_dir())
diff --git a/gramps/plugins/tool/patchnames.py b/gramps/plugins/tool/patchnames.py
index 4e3646d1e..bc319cfae 100644
--- a/gramps/plugins/tool/patchnames.py
+++ b/gramps/plugins/tool/patchnames.py
@@ -114,7 +114,7 @@ class PatchNames(tool.BatchTool, ManagedWindow):
winprefix = Gtk.Dialog(_("Default prefix and connector settings"),
self.uistate.window,
Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT,
- (Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT))
+ (_('_OK'), Gtk.ResponseType.ACCEPT))
winprefix.vbox.set_spacing(5)
hboxpref = Gtk.Box()
diff --git a/gramps/plugins/tool/populatesources.py b/gramps/plugins/tool/populatesources.py
index 508bd9c7d..cf307f78a 100644
--- a/gramps/plugins/tool/populatesources.py
+++ b/gramps/plugins/tool/populatesources.py
@@ -84,8 +84,8 @@ class PopulateSources(tool.Tool, ManagedWindow):
dialog = Gtk.Dialog("Populate sources and citations tool",
self.uistate.window,
Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT,
- (Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT,
- Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT))
+ (_('_Cancel'), Gtk.ResponseType.REJECT,
+ _('_OK'), Gtk.ResponseType.ACCEPT))
label = Gtk.Label("Enter a valid number of sources and citations."
" This will create the requested number of sources,"
" and for each source, will create the requested"
diff --git a/gramps/plugins/tool/removeunused.py b/gramps/plugins/tool/removeunused.py
index cfdcec18d..66d556dca 100644
--- a/gramps/plugins/tool/removeunused.py
+++ b/gramps/plugins/tool/removeunused.py
@@ -95,37 +95,37 @@ class RemoveUnused(tool.Tool, ManagedWindow, UpdateCallback):
'remove' : self.db.remove_event,
'get_text': self.get_event_text,
'editor' : 'EditEvent',
- 'stock' : 'gramps-event',
+ 'icon' : 'gramps-event',
'name_ix' : 4},
'sources' : {'get_func': self.db.get_source_from_handle,
'remove' : self.db.remove_source,
'get_text': None,
'editor' : 'EditSource',
- 'stock' : 'gramps-source',
+ 'icon' : 'gramps-source',
'name_ix' : 2},
'places' : {'get_func': self.db.get_place_from_handle,
'remove' : self.db.remove_place,
'get_text': None,
'editor' : 'EditPlace',
- 'stock' : 'gramps-place',
+ 'icon' : 'gramps-place',
'name_ix' : 2},
'media' : {'get_func': self.db.get_object_from_handle,
'remove' : self.db.remove_object,
'get_text': None,
'editor' : 'EditMedia',
- 'stock' : 'gramps-media',
+ 'icon' : 'gramps-media',
'name_ix' : 4},
'repos' : {'get_func': self.db.get_repository_from_handle,
'remove' : self.db.remove_repository,
'get_text': None,
'editor' : 'EditRepository',
- 'stock' : 'gramps-repository',
+ 'icon' : 'gramps-repository',
'name_ix' : 3},
'notes' : {'get_func': self.db.get_note_from_handle,
'remove' : self.db.remove_note,
'get_text': self.get_note_text,
'editor' : 'EditNote',
- 'stock' : 'gramps-notes',
+ 'icon' : 'gramps-notes',
'name_ix' : 2},
}
@@ -352,8 +352,8 @@ class RemoveUnused(tool.Tool, ManagedWindow, UpdateCallback):
def get_image(self, column, cell, model, iter, user_data=None):
the_type = model.get_value(iter, RemoveUnused.OBJ_TYPE_COL)
- the_stock = self.tables[the_type]['stock']
- cell.set_property('stock-id', the_stock)
+ the_icon = self.tables[the_type]['icon']
+ cell.set_property('icon-name', the_icon)
def add_results(self, results):
(the_type, handle, data) = results
diff --git a/gramps/plugins/tool/testcasegenerator.py b/gramps/plugins/tool/testcasegenerator.py
index 7425fa6e7..1140c6a22 100644
--- a/gramps/plugins/tool/testcasegenerator.py
+++ b/gramps/plugins/tool/testcasegenerator.py
@@ -241,9 +241,9 @@ class TestcaseGenerator(tool.BatchTool):
self.on_dummy_data_clicked(self.check_persons)
self.top.vbox.pack_start(self.entry_count,0,0,5)
- self.top.add_button(Gtk.STOCK_CANCEL,Gtk.ResponseType.CANCEL)
- self.top.add_button(Gtk.STOCK_OK,Gtk.ResponseType.OK)
- self.top.add_button(Gtk.STOCK_HELP,Gtk.ResponseType.HELP)
+ self.top.add_button(_('_Cancel'), Gtk.ResponseType.CANCEL)
+ self.top.add_button(_('_OK'), Gtk.ResponseType.OK)
+ self.top.add_button(_('_Help'), Gtk.ResponseType.HELP)
self.top.show_all()
response = self.top.run()
diff --git a/gramps/plugins/tool/verify.py b/gramps/plugins/tool/verify.py
index fea88721e..122d18b7f 100644
--- a/gramps/plugins/tool/verify.py
+++ b/gramps/plugins/tool/verify.py
@@ -677,9 +677,9 @@ class VerifyResults(ManagedWindow):
def get_image(self, column, cell, model, iter, user_data=None):
the_type = model.get_value(iter, VerifyResults.OBJ_TYPE_COL)
if the_type == 'Person':
- cell.set_property('stock-id', 'gramps-person' )
+ cell.set_property('icon-name', 'gramps-person' )
elif the_type == 'Family':
- cell.set_property('stock-id', 'gramps-family' )
+ cell.set_property('icon-name', 'gramps-family' )
def add_results(self,results):
(msg,gramps_id, name,the_type,rule_id,severity, handle) = results
diff --git a/gramps/plugins/view/dashboardview.py b/gramps/plugins/view/dashboardview.py
index 1fbb04a2d..27af23efd 100644
--- a/gramps/plugins/view/dashboardview.py
+++ b/gramps/plugins/view/dashboardview.py
@@ -91,7 +91,7 @@ class DashboardView(PageView):
"""
Defines the UIManager actions.
"""
- self._add_action("AddGramplet", Gtk.STOCK_ADD, _("Add a gramplet"))
+ self._add_action("AddGramplet", 'list-add', _("Add a gramplet"))
self._add_action("RestoreGramplet", None, _("Restore a gramplet"))
def set_inactive(self):
diff --git a/gramps/plugins/view/familyview.py b/gramps/plugins/view/familyview.py
index f602fe889..47884d39f 100644
--- a/gramps/plugins/view/familyview.py
+++ b/gramps/plugins/view/familyview.py
@@ -202,9 +202,9 @@ class FamilyView(ListView):
self.all_action = Gtk.ActionGroup(name=self.title + "/FamilyAll")
self.all_action.add_actions([
- ('MakeFatherActive', Gtk.STOCK_APPLY, _("Make Father Active Person"),
+ ('MakeFatherActive', None, _("Make Father Active Person"),
None, None, self._make_father_active),
- ('MakeMotherActive', Gtk.STOCK_APPLY, _("Make Mother Active Person"),
+ ('MakeMotherActive', None, _("Make Mother Active Person"),
None, None, self._make_mother_active),
('QuickReport', None, _("Quick View"), None, None, None),
])
diff --git a/gramps/plugins/view/fanchartdescview.py b/gramps/plugins/view/fanchartdescview.py
index 1e1836ec9..978850b72 100644
--- a/gramps/plugins/view/fanchartdescview.py
+++ b/gramps/plugins/view/fanchartdescview.py
@@ -100,7 +100,7 @@ class FanChartDescView(fanchartdesc.FanChartDescGrampsGUI, NavigationView):
self.set_fan(fanchartdesc.FanChartDescWidget(self.dbstate, self.uistate,
self.on_popup))
self.scrolledwindow = Gtk.ScrolledWindow(hadjustment=None,
- vadjustment=None)
+ vadjustment=None)
self.scrolledwindow.set_policy(Gtk.PolicyType.AUTOMATIC,
Gtk.PolicyType.AUTOMATIC)
self.fan.show_all()
@@ -163,9 +163,9 @@ class FanChartDescView(fanchartdesc.FanChartDescGrampsGUI, NavigationView):
"""
NavigationView.define_actions(self)
- self._add_action('PrintView', Gtk.STOCK_PRINT, _("_Print..."),
- accel="P",
- tip=_("Print or save the Fan Chart View"),
+ self._add_action('PrintView', 'document-print', _("_Print..."),
+ accel="P",
+ tip=_("Print or save the Fan Chart View"),
callback=self.printview)
def build_tree(self):
"""
diff --git a/gramps/plugins/view/fanchartview.py b/gramps/plugins/view/fanchartview.py
index de57aac0f..fef8ef31c 100644
--- a/gramps/plugins/view/fanchartview.py
+++ b/gramps/plugins/view/fanchartview.py
@@ -98,7 +98,7 @@ class FanChartView(fanchart.FanChartGrampsGUI, NavigationView):
def build_widget(self):
self.set_fan(fanchart.FanChartWidget(self.dbstate, self.uistate, self.on_popup))
self.scrolledwindow = Gtk.ScrolledWindow(hadjustment=None,
- vadjustment=None)
+ vadjustment=None)
self.scrolledwindow.set_policy(Gtk.PolicyType.AUTOMATIC,
Gtk.PolicyType.AUTOMATIC)
self.fan.show_all()
@@ -161,9 +161,9 @@ class FanChartView(fanchart.FanChartGrampsGUI, NavigationView):
"""
NavigationView.define_actions(self)
- self._add_action('PrintView', Gtk.STOCK_PRINT, _("_Print..."),
- accel="P",
- tip=_("Print or save the Fan Chart View"),
+ self._add_action('PrintView', 'document-print', _("_Print..."),
+ accel="P",
+ tip=_("Print or save the Fan Chart View"),
callback=self.printview)
def build_tree(self):
"""
diff --git a/gramps/plugins/view/pedigreeview.py b/gramps/plugins/view/pedigreeview.py
index 89a4df048..a7ffd4b8b 100644
--- a/gramps/plugins/view/pedigreeview.py
+++ b/gramps/plugins/view/pedigreeview.py
@@ -1448,9 +1448,9 @@ class PedigreeView(NavigationView):
label.set_use_markup(True)
label.show()
label.set_alignment(0, 0)
- menuitem = Gtk.ImageMenuItem(None)
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO,
- Gtk.IconSize.MENU)
+ menuitem = Gtk.ImageMenuItem()
+ go_image = Gtk.Image.new_from_icon_name('go-jump',
+ Gtk.IconSize.MENU)
go_image.show()
menuitem.set_image(go_image)
menuitem.add(label)
@@ -1537,16 +1537,16 @@ class PedigreeView(NavigationView):
home_sensitivity = False
# bug 4884: need to translate the home label
entries = [
- (Gtk.STOCK_GO_BACK, self.back_clicked, not hobj.at_front()),
- (Gtk.STOCK_GO_FORWARD, self.fwd_clicked, not hobj.at_end()),
- (_("Home"), self.cb_home, home_sensitivity),
+ (_("Pre_vious"), 'go-previous', self.back_clicked, not hobj.at_front()),
+ (_("_Next"), 'go-next', self.fwd_clicked, not hobj.at_end()),
+ (_("_Home"), 'go-home', self.cb_home, home_sensitivity),
]
- for stock_id, callback, sensitivity in entries:
- item = Gtk.ImageMenuItem.new_from_stock(stock_id=stock_id, accel_group=None)
+ for label, icon_name, callback, sensitivity in entries:
+ item = Gtk.ImageMenuItem.new_with_mnemonic(label)
item.set_sensitive(sensitivity)
- if stock_id == _("Home"):
- im = Gtk.Image.new_from_stock(Gtk.STOCK_HOME, Gtk.IconSize.MENU)
+ if icon_name:
+ im = Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.MENU)
im.show()
item.set_image(im)
if callback:
@@ -1569,21 +1569,19 @@ class PedigreeView(NavigationView):
item.set_submenu(Gtk.Menu())
scroll_direction_menu = item.get_submenu()
- scroll_direction_image = Gtk.Image.new_from_stock(Gtk.STOCK_APPLY,
- Gtk.IconSize.MENU)
- scroll_direction_image.show()
-
- entry = Gtk.ImageMenuItem(label=_("Top <-> Bottom"))
+ entry = Gtk.CheckMenuItem(label=_("Top <-> Bottom"))
+ entry.set_draw_as_radio(True)
entry.connect("activate", self.cb_change_scroll_direction, False)
if self.scroll_direction == False:
- entry.set_image(scroll_direction_image)
+ entry.set_active(True)
entry.show()
scroll_direction_menu.append(entry)
- entry = Gtk.ImageMenuItem(_("Left <-> Right"))
+ entry = Gtk.CheckMenuItem(_("Left <-> Right"))
+ entry.set_draw_as_radio(True)
entry.connect("activate", self.cb_change_scroll_direction, True)
if self.scroll_direction == True:
- entry.set_image(scroll_direction_image)
+ entry.set_active(True)
entry.show()
scroll_direction_menu.append(entry)
@@ -1597,7 +1595,10 @@ class PedigreeView(NavigationView):
self.menu = Gtk.Menu()
self.menu.set_title(_('People Menu'))
- add_item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_ADD, None)
+ add_item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Add'))
+ img = Gtk.Image.new_from_icon_name('list-add', Gtk.IconSize.MENU)
+ img.show()
+ add_item.set_image(img)
add_item.connect("activate", self.cb_add_parents, person_handle,
family_handle)
add_item.show()
@@ -1627,8 +1628,7 @@ class PedigreeView(NavigationView):
if not person:
return 0
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO,
- Gtk.IconSize.MENU)
+ go_image = Gtk.Image.new_from_icon_name('go-jump', Gtk.IconSize.MENU)
go_image.show()
go_item = Gtk.ImageMenuItem(label=name_displayer.display(person))
go_item.set_image(go_image)
@@ -1636,12 +1636,18 @@ class PedigreeView(NavigationView):
go_item.show()
self.menu.append(go_item)
- edit_item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_EDIT, None)
+ edit_item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Edit'))
+ img = Gtk.Image.new_from_icon_name('gtk-edit', Gtk.IconSize.MENU)
+ img.show()
+ edit_item.set_image(img)
edit_item.connect("activate", self.cb_edit_person, person_handle)
edit_item.show()
self.menu.append(edit_item)
- clipboard_item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_COPY, None)
+ clipboard_item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Copy'))
+ img = Gtk.Image.new_from_icon_name('edit-copy', Gtk.IconSize.MENU)
+ img.show()
+ clipboard_item.set_image(img)
clipboard_item.connect("activate", self.cb_copy_person_to_clipboard,
person_handle)
clipboard_item.show()
@@ -1669,8 +1675,8 @@ class PedigreeView(NavigationView):
item.set_submenu(Gtk.Menu())
sp_menu = item.get_submenu()
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO,
- Gtk.IconSize.MENU)
+ go_image = Gtk.Image.new_from_icon_name('go-jump',
+ Gtk.IconSize.MENU)
go_image.show()
sp_item = Gtk.ImageMenuItem(label=name_displayer.display(spouse))
sp_item.set_image(go_image)
@@ -1711,8 +1717,8 @@ class PedigreeView(NavigationView):
else:
label = Gtk.Label(label=escape(name_displayer.display(sib)))
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO,
- Gtk.IconSize.MENU)
+ go_image = Gtk.Image.new_from_icon_name('go-jump',
+ Gtk.IconSize.MENU)
go_image.show()
sib_item = Gtk.ImageMenuItem()
sib_item.set_image(go_image)
@@ -1750,10 +1756,10 @@ class PedigreeView(NavigationView):
else:
label = Gtk.Label(label=escape(name_displayer.display(child)))
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO,
- Gtk.IconSize.MENU)
+ go_image = Gtk.Image.new_from_icon_name('go-jump',
+ Gtk.IconSize.MENU)
go_image.show()
- child_item = Gtk.ImageMenuItem(None)
+ child_item = Gtk.ImageMenuItem()
child_item.set_image(go_image)
label.set_use_markup(True)
label.show()
@@ -1790,8 +1796,8 @@ class PedigreeView(NavigationView):
else:
label = Gtk.Label(label=escape(name_displayer.display(par)))
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO,
- Gtk.IconSize.MENU)
+ go_image = Gtk.Image.new_from_icon_name('go-jump',
+ Gtk.IconSize.MENU)
go_image.show()
par_item = Gtk.ImageMenuItem()
par_item.set_image(go_image)
@@ -1836,8 +1842,8 @@ class PedigreeView(NavigationView):
label = Gtk.Label(label=escape(name_displayer.display(per)))
- go_image = Gtk.Image.new_from_stock(Gtk.STOCK_JUMP_TO,
- Gtk.IconSize.MENU)
+ go_image = Gtk.Image.new_from_icon_name('go-jump',
+ Gtk.IconSize.MENU)
go_image.show()
per_item = Gtk.ImageMenuItem()
per_item.set_image(go_image)
@@ -1874,12 +1880,18 @@ class PedigreeView(NavigationView):
if not family:
return 0
- edit_item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_EDIT, None)
+ edit_item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Edit'))
+ img = Gtk.Image.new_from_icon_name('gtk-edit', Gtk.IconSize.MENU)
+ img.show()
+ edit_item.set_image(img)
edit_item.connect("activate", self.cb_edit_family, family_handle)
edit_item.show()
self.menu.append(edit_item)
- clipboard_item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_COPY, None)
+ clipboard_item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Copy'))
+ img = Gtk.Image.new_from_icon_name('edit-copy', Gtk.IconSize.MENU)
+ img.show()
+ clipboard_item.set_image(img)
clipboard_item.connect("activate", self.cb_copy_family_to_clipboard,
family_handle)
clipboard_item.show()
diff --git a/gramps/plugins/view/relview.py b/gramps/plugins/view/relview.py
index 7ba2cf89d..55f817e48 100644
--- a/gramps/plugins/view/relview.py
+++ b/gramps/plugins/view/relview.py
@@ -60,6 +60,7 @@ from gramps.gen.lib import (ChildRef, EventRoleType, EventType, Family,
from gramps.gen.lib.date import Today
from gramps.gen.db import DbTxn
from gramps.gui.views.navigationview import NavigationView
+from gramps.gui.actiongroup import ActionGroup
from gramps.gui.editors import EditPerson, EditFamily
from gramps.gui.editors import FilterEditor
from gramps.gen.display.name import displayer as name_displayer
@@ -390,15 +391,15 @@ class RelationshipView(NavigationView):
def define_actions(self):
NavigationView.define_actions(self)
- self.order_action = Gtk.ActionGroup(name=self.title + '/ChangeOrder')
+ self.order_action = ActionGroup(name=self.title + '/ChangeOrder')
self.order_action.add_actions([
- ('ChangeOrder', Gtk.STOCK_SORT_ASCENDING, _('_Reorder'), None ,
+ ('ChangeOrder', 'view-sort-ascending', _('_Reorder'), None ,
_("Change order of parents and families"), self.reorder),
])
- self.family_action = Gtk.ActionGroup(name=self.title + '/Family')
+ self.family_action = ActionGroup(name=self.title + '/Family')
self.family_action.add_actions([
- ('Edit', Gtk.STOCK_EDIT, _('Edit...'), "Return",
+ ('Edit', 'gtk-edit', _('Edit...'), "Return",
_("Edit the active person"), self.edit_active),
('AddSpouse', 'gramps-spouse', _('Partner'), None ,
_("Add a new family with person as parent"), self.add_spouse),
@@ -804,28 +805,28 @@ class RelationshipView(NavigationView):
# Show edit-Buttons if toolbar is not visible
if self.reorder_sensitive:
add = widgets.IconButton(self.reorder_button_press, None,
- Gtk.STOCK_SORT_ASCENDING)
+ 'view-sort-ascending')
add.set_tooltip_text(ord_msg)
hbox.pack_start(add, False, True, 0)
- add = widgets.IconButton(call_fcn, None, Gtk.STOCK_ADD)
+ add = widgets.IconButton(call_fcn, None, 'list-add')
add.set_tooltip_text(add_msg)
hbox.pack_start(add, False, True, 0)
if is_parent:
add = widgets.IconButton(self.select_family, None,
- Gtk.STOCK_INDEX)
+ 'gtk-index')
add.set_tooltip_text(sel_msg)
hbox.pack_start(add, False, True, 0)
if family:
edit = widgets.IconButton(self.edit_family, family.handle,
- Gtk.STOCK_EDIT)
+ 'gtk-edit')
edit.set_tooltip_text(edit_msg)
hbox.pack_start(edit, False, True, 0)
if not self.dbstate.db.readonly:
delete = widgets.IconButton(del_fcn, family.handle,
- Gtk.STOCK_REMOVE)
+ 'list-remove')
delete.set_tooltip_text(del_msg)
hbox.pack_start(delete, False, True, 0)
@@ -938,11 +939,11 @@ class RelationshipView(NavigationView):
hbox = Gtk.Box()
addchild = widgets.IconButton(self.add_child_to_fam,
family.handle,
- Gtk.STOCK_ADD)
+ 'list-add')
addchild.set_tooltip_text(_('Add new child to family'))
selchild = widgets.IconButton(self.sel_child_to_fam,
family.handle,
- Gtk.STOCK_INDEX)
+ 'gtk-index')
selchild.set_tooltip_text(_('Add existing child to family'))
hbox.pack_start(addchild, False, True, 0)
hbox.pack_start(selchild, False, True, 0)
@@ -1270,7 +1271,7 @@ class RelationshipView(NavigationView):
name = name_displayer.display(person)
item = Gtk.ImageMenuItem(None)
- image = Gtk.Image.new_from_stock(Gtk.STOCK_EDIT, Gtk.IconSize.MENU)
+ image = Gtk.Image.new_from_icon_name('gtk-edit', Gtk.IconSize.MENU)
image.show()
label = Gtk.Label(label=_("Edit %s") % name)
label.show()
@@ -1435,11 +1436,11 @@ class RelationshipView(NavigationView):
hbox = Gtk.Box()
addchild = widgets.IconButton(self.add_child_to_fam,
family.handle,
- Gtk.STOCK_ADD)
+ 'list-add')
addchild.set_tooltip_text(_('Add new child to family'))
selchild = widgets.IconButton(self.sel_child_to_fam,
family.handle,
- Gtk.STOCK_INDEX)
+ 'gtk-index')
selchild.set_tooltip_text(_('Add existing child to family'))
hbox.pack_start(addchild, False, True, 0)
hbox.pack_start(selchild, False, True, 0)
diff --git a/images/16x16/geo-fixed-zoom.png b/images/hicolor/16x16/actions/geo-fixed-zoom.png
similarity index 100%
rename from images/16x16/geo-fixed-zoom.png
rename to images/hicolor/16x16/actions/geo-fixed-zoom.png
diff --git a/images/16x16/geo-free-zoom.png b/images/hicolor/16x16/actions/geo-free-zoom.png
similarity index 100%
rename from images/16x16/geo-free-zoom.png
rename to images/hicolor/16x16/actions/geo-free-zoom.png
diff --git a/images/16x16/geo-place-add.png b/images/hicolor/16x16/actions/geo-place-add.png
similarity index 100%
rename from images/16x16/geo-place-add.png
rename to images/hicolor/16x16/actions/geo-place-add.png
diff --git a/images/16x16/geo-place-link.png b/images/hicolor/16x16/actions/geo-place-link.png
similarity index 100%
rename from images/16x16/geo-place-link.png
rename to images/hicolor/16x16/actions/geo-place-link.png
diff --git a/images/16x16/geo-show-event.png b/images/hicolor/16x16/actions/geo-show-event.png
similarity index 100%
rename from images/16x16/geo-show-event.png
rename to images/hicolor/16x16/actions/geo-show-event.png
diff --git a/images/16x16/geo-show-family.png b/images/hicolor/16x16/actions/geo-show-family.png
similarity index 100%
rename from images/16x16/geo-show-family.png
rename to images/hicolor/16x16/actions/geo-show-family.png
diff --git a/images/16x16/geo-show-person.png b/images/hicolor/16x16/actions/geo-show-person.png
similarity index 100%
rename from images/16x16/geo-show-person.png
rename to images/hicolor/16x16/actions/geo-show-person.png
diff --git a/images/16x16/geo-show-place.png b/images/hicolor/16x16/actions/geo-show-place.png
similarity index 100%
rename from images/16x16/geo-show-place.png
rename to images/hicolor/16x16/actions/geo-show-place.png
diff --git a/images/16x16/gramps-address.png b/images/hicolor/16x16/actions/gramps-address.png
similarity index 100%
rename from images/16x16/gramps-address.png
rename to images/hicolor/16x16/actions/gramps-address.png
diff --git a/images/16x16/gramps-attribute.png b/images/hicolor/16x16/actions/gramps-attribute.png
similarity index 100%
rename from images/16x16/gramps-attribute.png
rename to images/hicolor/16x16/actions/gramps-attribute.png
diff --git a/images/16x16/gramps-bookmark-delete.png b/images/hicolor/16x16/actions/gramps-bookmark-delete.png
similarity index 100%
rename from images/16x16/gramps-bookmark-delete.png
rename to images/hicolor/16x16/actions/gramps-bookmark-delete.png
diff --git a/images/16x16/gramps-bookmark-edit.png b/images/hicolor/16x16/actions/gramps-bookmark-edit.png
similarity index 100%
rename from images/16x16/gramps-bookmark-edit.png
rename to images/hicolor/16x16/actions/gramps-bookmark-edit.png
diff --git a/images/16x16/gramps-bookmark-new.png b/images/hicolor/16x16/actions/gramps-bookmark-new.png
similarity index 100%
rename from images/16x16/gramps-bookmark-new.png
rename to images/hicolor/16x16/actions/gramps-bookmark-new.png
diff --git a/images/16x16/gramps-bookmark.png b/images/hicolor/16x16/actions/gramps-bookmark.png
similarity index 100%
rename from images/16x16/gramps-bookmark.png
rename to images/hicolor/16x16/actions/gramps-bookmark.png
diff --git a/images/16x16/gramps-citation.png b/images/hicolor/16x16/actions/gramps-citation.png
similarity index 100%
rename from images/16x16/gramps-citation.png
rename to images/hicolor/16x16/actions/gramps-citation.png
diff --git a/images/16x16/gramps-config.png b/images/hicolor/16x16/actions/gramps-config.png
similarity index 100%
rename from images/16x16/gramps-config.png
rename to images/hicolor/16x16/actions/gramps-config.png
diff --git a/images/16x16/gramps-date-edit.png b/images/hicolor/16x16/actions/gramps-date-edit.png
similarity index 100%
rename from images/16x16/gramps-date-edit.png
rename to images/hicolor/16x16/actions/gramps-date-edit.png
diff --git a/images/16x16/gramps-date.png b/images/hicolor/16x16/actions/gramps-date.png
similarity index 100%
rename from images/16x16/gramps-date.png
rename to images/hicolor/16x16/actions/gramps-date.png
diff --git a/images/16x16/gramps-event.png b/images/hicolor/16x16/actions/gramps-event.png
similarity index 100%
rename from images/16x16/gramps-event.png
rename to images/hicolor/16x16/actions/gramps-event.png
diff --git a/images/16x16/gramps-family.png b/images/hicolor/16x16/actions/gramps-family.png
similarity index 100%
rename from images/16x16/gramps-family.png
rename to images/hicolor/16x16/actions/gramps-family.png
diff --git a/images/16x16/gramps-fanchart.png b/images/hicolor/16x16/actions/gramps-fanchart.png
similarity index 100%
rename from images/16x16/gramps-fanchart.png
rename to images/hicolor/16x16/actions/gramps-fanchart.png
diff --git a/images/16x16/gramps-fanchartdesc.png b/images/hicolor/16x16/actions/gramps-fanchartdesc.png
similarity index 100%
rename from images/16x16/gramps-fanchartdesc.png
rename to images/hicolor/16x16/actions/gramps-fanchartdesc.png
diff --git a/images/16x16/gramps-font-bgcolor.png b/images/hicolor/16x16/actions/gramps-font-bgcolor.png
similarity index 100%
rename from images/16x16/gramps-font-bgcolor.png
rename to images/hicolor/16x16/actions/gramps-font-bgcolor.png
diff --git a/images/16x16/gramps-font-color.png b/images/hicolor/16x16/actions/gramps-font-color.png
similarity index 100%
rename from images/16x16/gramps-font-color.png
rename to images/hicolor/16x16/actions/gramps-font-color.png
diff --git a/images/16x16/gramps-font.png b/images/hicolor/16x16/actions/gramps-font.png
similarity index 100%
rename from images/16x16/gramps-font.png
rename to images/hicolor/16x16/actions/gramps-font.png
diff --git a/images/16x16/gramps-geo.png b/images/hicolor/16x16/actions/gramps-geo.png
similarity index 100%
rename from images/16x16/gramps-geo.png
rename to images/hicolor/16x16/actions/gramps-geo.png
diff --git a/images/16x16/gramps-gramplet.png b/images/hicolor/16x16/actions/gramps-gramplet.png
similarity index 100%
rename from images/16x16/gramps-gramplet.png
rename to images/hicolor/16x16/actions/gramps-gramplet.png
diff --git a/images/16x16/gramps-lock.png b/images/hicolor/16x16/actions/gramps-lock.png
similarity index 100%
rename from images/16x16/gramps-lock.png
rename to images/hicolor/16x16/actions/gramps-lock.png
diff --git a/images/16x16/gramps-media.png b/images/hicolor/16x16/actions/gramps-media.png
similarity index 100%
rename from images/16x16/gramps-media.png
rename to images/hicolor/16x16/actions/gramps-media.png
diff --git a/images/16x16/gramps-merge.png b/images/hicolor/16x16/actions/gramps-merge.png
similarity index 100%
rename from images/16x16/gramps-merge.png
rename to images/hicolor/16x16/actions/gramps-merge.png
diff --git a/images/16x16/gramps-notes.png b/images/hicolor/16x16/actions/gramps-notes.png
similarity index 100%
rename from images/16x16/gramps-notes.png
rename to images/hicolor/16x16/actions/gramps-notes.png
diff --git a/images/16x16/gramps-parents-add.png b/images/hicolor/16x16/actions/gramps-parents-add.png
similarity index 100%
rename from images/16x16/gramps-parents-add.png
rename to images/hicolor/16x16/actions/gramps-parents-add.png
diff --git a/images/16x16/gramps-parents-open.png b/images/hicolor/16x16/actions/gramps-parents-open.png
similarity index 100%
rename from images/16x16/gramps-parents-open.png
rename to images/hicolor/16x16/actions/gramps-parents-open.png
diff --git a/images/16x16/gramps-parents.png b/images/hicolor/16x16/actions/gramps-parents.png
similarity index 100%
rename from images/16x16/gramps-parents.png
rename to images/hicolor/16x16/actions/gramps-parents.png
diff --git a/images/16x16/gramps-pedigree.png b/images/hicolor/16x16/actions/gramps-pedigree.png
similarity index 100%
rename from images/16x16/gramps-pedigree.png
rename to images/hicolor/16x16/actions/gramps-pedigree.png
diff --git a/images/16x16/gramps-person.png b/images/hicolor/16x16/actions/gramps-person.png
similarity index 100%
rename from images/16x16/gramps-person.png
rename to images/hicolor/16x16/actions/gramps-person.png
diff --git a/images/16x16/gramps-place.png b/images/hicolor/16x16/actions/gramps-place.png
similarity index 100%
rename from images/16x16/gramps-place.png
rename to images/hicolor/16x16/actions/gramps-place.png
diff --git a/images/16x16/gramps-relation.png b/images/hicolor/16x16/actions/gramps-relation.png
similarity index 100%
rename from images/16x16/gramps-relation.png
rename to images/hicolor/16x16/actions/gramps-relation.png
diff --git a/images/16x16/gramps-reports.png b/images/hicolor/16x16/actions/gramps-reports.png
similarity index 100%
rename from images/16x16/gramps-reports.png
rename to images/hicolor/16x16/actions/gramps-reports.png
diff --git a/images/16x16/gramps-repository.png b/images/hicolor/16x16/actions/gramps-repository.png
similarity index 100%
rename from images/16x16/gramps-repository.png
rename to images/hicolor/16x16/actions/gramps-repository.png
diff --git a/images/16x16/gramps-source.png b/images/hicolor/16x16/actions/gramps-source.png
similarity index 100%
rename from images/16x16/gramps-source.png
rename to images/hicolor/16x16/actions/gramps-source.png
diff --git a/images/16x16/gramps-spouse.png b/images/hicolor/16x16/actions/gramps-spouse.png
similarity index 100%
rename from images/16x16/gramps-spouse.png
rename to images/hicolor/16x16/actions/gramps-spouse.png
diff --git a/images/16x16/gramps-tag-new.png b/images/hicolor/16x16/actions/gramps-tag-new.png
similarity index 100%
rename from images/16x16/gramps-tag-new.png
rename to images/hicolor/16x16/actions/gramps-tag-new.png
diff --git a/images/16x16/gramps-tag.png b/images/hicolor/16x16/actions/gramps-tag.png
similarity index 100%
rename from images/16x16/gramps-tag.png
rename to images/hicolor/16x16/actions/gramps-tag.png
diff --git a/images/16x16/gramps-tools.png b/images/hicolor/16x16/actions/gramps-tools.png
similarity index 100%
rename from images/16x16/gramps-tools.png
rename to images/hicolor/16x16/actions/gramps-tools.png
diff --git a/images/16x16/gramps-tree-group.png b/images/hicolor/16x16/actions/gramps-tree-group.png
similarity index 100%
rename from images/16x16/gramps-tree-group.png
rename to images/hicolor/16x16/actions/gramps-tree-group.png
diff --git a/images/16x16/gramps-tree-list.png b/images/hicolor/16x16/actions/gramps-tree-list.png
similarity index 100%
rename from images/16x16/gramps-tree-list.png
rename to images/hicolor/16x16/actions/gramps-tree-list.png
diff --git a/images/16x16/gramps-tree-select.png b/images/hicolor/16x16/actions/gramps-tree-select.png
similarity index 100%
rename from images/16x16/gramps-tree-select.png
rename to images/hicolor/16x16/actions/gramps-tree-select.png
diff --git a/images/16x16/gramps-unlock.png b/images/hicolor/16x16/actions/gramps-unlock.png
similarity index 100%
rename from images/16x16/gramps-unlock.png
rename to images/hicolor/16x16/actions/gramps-unlock.png
diff --git a/images/16x16/gramps-view.png b/images/hicolor/16x16/actions/gramps-view.png
similarity index 100%
rename from images/16x16/gramps-view.png
rename to images/hicolor/16x16/actions/gramps-view.png
diff --git a/images/16x16/gramps-viewmedia.png b/images/hicolor/16x16/actions/gramps-viewmedia.png
similarity index 100%
rename from images/16x16/gramps-viewmedia.png
rename to images/hicolor/16x16/actions/gramps-viewmedia.png
diff --git a/images/16x16/gramps-zoom-best-fit.png b/images/hicolor/16x16/actions/gramps-zoom-best-fit.png
similarity index 100%
rename from images/16x16/gramps-zoom-best-fit.png
rename to images/hicolor/16x16/actions/gramps-zoom-best-fit.png
diff --git a/images/16x16/gramps-zoom-fit-width.png b/images/hicolor/16x16/actions/gramps-zoom-fit-width.png
similarity index 100%
rename from images/16x16/gramps-zoom-fit-width.png
rename to images/hicolor/16x16/actions/gramps-zoom-fit-width.png
diff --git a/images/16x16/gramps-zoom-in.png b/images/hicolor/16x16/actions/gramps-zoom-in.png
similarity index 100%
rename from images/16x16/gramps-zoom-in.png
rename to images/hicolor/16x16/actions/gramps-zoom-in.png
diff --git a/images/16x16/gramps-zoom-out.png b/images/hicolor/16x16/actions/gramps-zoom-out.png
similarity index 100%
rename from images/16x16/gramps-zoom-out.png
rename to images/hicolor/16x16/actions/gramps-zoom-out.png
diff --git a/images/16x16/gramps.png b/images/hicolor/16x16/actions/gramps.png
similarity index 100%
rename from images/16x16/gramps.png
rename to images/hicolor/16x16/actions/gramps.png
diff --git a/images/16x16/source/gramps-geo.svg b/images/hicolor/16x16/source/gramps-geo.svg
similarity index 100%
rename from images/16x16/source/gramps-geo.svg
rename to images/hicolor/16x16/source/gramps-geo.svg
diff --git a/images/16x16/source/gramps-tree-group.svg b/images/hicolor/16x16/source/gramps-tree-group.svg
similarity index 100%
rename from images/16x16/source/gramps-tree-group.svg
rename to images/hicolor/16x16/source/gramps-tree-group.svg
diff --git a/images/16x16/source/gramps-tree-list.svg b/images/hicolor/16x16/source/gramps-tree-list.svg
similarity index 100%
rename from images/16x16/source/gramps-tree-list.svg
rename to images/hicolor/16x16/source/gramps-tree-list.svg
diff --git a/images/16x16/source/gramps-tree-select.svg b/images/hicolor/16x16/source/gramps-tree-select.svg
similarity index 100%
rename from images/16x16/source/gramps-tree-select.svg
rename to images/hicolor/16x16/source/gramps-tree-select.svg
diff --git a/images/22x22/geo-fixed-zoom.png b/images/hicolor/22x22/actions/geo-fixed-zoom.png
similarity index 100%
rename from images/22x22/geo-fixed-zoom.png
rename to images/hicolor/22x22/actions/geo-fixed-zoom.png
diff --git a/images/22x22/geo-free-zoom.png b/images/hicolor/22x22/actions/geo-free-zoom.png
similarity index 100%
rename from images/22x22/geo-free-zoom.png
rename to images/hicolor/22x22/actions/geo-free-zoom.png
diff --git a/images/22x22/geo-place-add.png b/images/hicolor/22x22/actions/geo-place-add.png
similarity index 100%
rename from images/22x22/geo-place-add.png
rename to images/hicolor/22x22/actions/geo-place-add.png
diff --git a/images/22x22/geo-place-link.png b/images/hicolor/22x22/actions/geo-place-link.png
similarity index 100%
rename from images/22x22/geo-place-link.png
rename to images/hicolor/22x22/actions/geo-place-link.png
diff --git a/images/22x22/geo-show-event.png b/images/hicolor/22x22/actions/geo-show-event.png
similarity index 100%
rename from images/22x22/geo-show-event.png
rename to images/hicolor/22x22/actions/geo-show-event.png
diff --git a/images/22x22/geo-show-family.png b/images/hicolor/22x22/actions/geo-show-family.png
similarity index 100%
rename from images/22x22/geo-show-family.png
rename to images/hicolor/22x22/actions/geo-show-family.png
diff --git a/images/22x22/geo-show-person.png b/images/hicolor/22x22/actions/geo-show-person.png
similarity index 100%
rename from images/22x22/geo-show-person.png
rename to images/hicolor/22x22/actions/geo-show-person.png
diff --git a/images/22x22/geo-show-place.png b/images/hicolor/22x22/actions/geo-show-place.png
similarity index 100%
rename from images/22x22/geo-show-place.png
rename to images/hicolor/22x22/actions/geo-show-place.png
diff --git a/images/22x22/gramps-address.png b/images/hicolor/22x22/actions/gramps-address.png
similarity index 100%
rename from images/22x22/gramps-address.png
rename to images/hicolor/22x22/actions/gramps-address.png
diff --git a/images/22x22/gramps-attribute.png b/images/hicolor/22x22/actions/gramps-attribute.png
similarity index 100%
rename from images/22x22/gramps-attribute.png
rename to images/hicolor/22x22/actions/gramps-attribute.png
diff --git a/images/22x22/gramps-bookmark-delete.png b/images/hicolor/22x22/actions/gramps-bookmark-delete.png
similarity index 100%
rename from images/22x22/gramps-bookmark-delete.png
rename to images/hicolor/22x22/actions/gramps-bookmark-delete.png
diff --git a/images/22x22/gramps-bookmark-edit.png b/images/hicolor/22x22/actions/gramps-bookmark-edit.png
similarity index 100%
rename from images/22x22/gramps-bookmark-edit.png
rename to images/hicolor/22x22/actions/gramps-bookmark-edit.png
diff --git a/images/22x22/gramps-bookmark-new.png b/images/hicolor/22x22/actions/gramps-bookmark-new.png
similarity index 100%
rename from images/22x22/gramps-bookmark-new.png
rename to images/hicolor/22x22/actions/gramps-bookmark-new.png
diff --git a/images/22x22/gramps-bookmark.png b/images/hicolor/22x22/actions/gramps-bookmark.png
similarity index 100%
rename from images/22x22/gramps-bookmark.png
rename to images/hicolor/22x22/actions/gramps-bookmark.png
diff --git a/images/22x22/gramps-citation.png b/images/hicolor/22x22/actions/gramps-citation.png
similarity index 100%
rename from images/22x22/gramps-citation.png
rename to images/hicolor/22x22/actions/gramps-citation.png
diff --git a/images/22x22/gramps-config.png b/images/hicolor/22x22/actions/gramps-config.png
similarity index 100%
rename from images/22x22/gramps-config.png
rename to images/hicolor/22x22/actions/gramps-config.png
diff --git a/images/22x22/gramps-date-edit.png b/images/hicolor/22x22/actions/gramps-date-edit.png
similarity index 100%
rename from images/22x22/gramps-date-edit.png
rename to images/hicolor/22x22/actions/gramps-date-edit.png
diff --git a/images/22x22/gramps-date.png b/images/hicolor/22x22/actions/gramps-date.png
similarity index 100%
rename from images/22x22/gramps-date.png
rename to images/hicolor/22x22/actions/gramps-date.png
diff --git a/images/22x22/gramps-event.png b/images/hicolor/22x22/actions/gramps-event.png
similarity index 100%
rename from images/22x22/gramps-event.png
rename to images/hicolor/22x22/actions/gramps-event.png
diff --git a/images/22x22/gramps-family.png b/images/hicolor/22x22/actions/gramps-family.png
similarity index 100%
rename from images/22x22/gramps-family.png
rename to images/hicolor/22x22/actions/gramps-family.png
diff --git a/images/22x22/gramps-fanchart.png b/images/hicolor/22x22/actions/gramps-fanchart.png
similarity index 100%
rename from images/22x22/gramps-fanchart.png
rename to images/hicolor/22x22/actions/gramps-fanchart.png
diff --git a/images/22x22/gramps-fanchartdesc.png b/images/hicolor/22x22/actions/gramps-fanchartdesc.png
similarity index 100%
rename from images/22x22/gramps-fanchartdesc.png
rename to images/hicolor/22x22/actions/gramps-fanchartdesc.png
diff --git a/images/22x22/gramps-font-bgcolor.png b/images/hicolor/22x22/actions/gramps-font-bgcolor.png
similarity index 100%
rename from images/22x22/gramps-font-bgcolor.png
rename to images/hicolor/22x22/actions/gramps-font-bgcolor.png
diff --git a/images/22x22/gramps-font-color.png b/images/hicolor/22x22/actions/gramps-font-color.png
similarity index 100%
rename from images/22x22/gramps-font-color.png
rename to images/hicolor/22x22/actions/gramps-font-color.png
diff --git a/images/22x22/gramps-font.png b/images/hicolor/22x22/actions/gramps-font.png
similarity index 100%
rename from images/22x22/gramps-font.png
rename to images/hicolor/22x22/actions/gramps-font.png
diff --git a/images/22x22/gramps-geo-altmap.png b/images/hicolor/22x22/actions/gramps-geo-altmap.png
similarity index 100%
rename from images/22x22/gramps-geo-altmap.png
rename to images/hicolor/22x22/actions/gramps-geo-altmap.png
diff --git a/images/22x22/gramps-geo-birth.png b/images/hicolor/22x22/actions/gramps-geo-birth.png
similarity index 100%
rename from images/22x22/gramps-geo-birth.png
rename to images/hicolor/22x22/actions/gramps-geo-birth.png
diff --git a/images/22x22/gramps-geo-death.png b/images/hicolor/22x22/actions/gramps-geo-death.png
similarity index 100%
rename from images/22x22/gramps-geo-death.png
rename to images/hicolor/22x22/actions/gramps-geo-death.png
diff --git a/images/22x22/gramps-geo-mainmap.png b/images/hicolor/22x22/actions/gramps-geo-mainmap.png
similarity index 100%
rename from images/22x22/gramps-geo-mainmap.png
rename to images/hicolor/22x22/actions/gramps-geo-mainmap.png
diff --git a/images/22x22/gramps-geo-marriage.png b/images/hicolor/22x22/actions/gramps-geo-marriage.png
similarity index 100%
rename from images/22x22/gramps-geo-marriage.png
rename to images/hicolor/22x22/actions/gramps-geo-marriage.png
diff --git a/images/22x22/gramps-geo.png b/images/hicolor/22x22/actions/gramps-geo.png
similarity index 100%
rename from images/22x22/gramps-geo.png
rename to images/hicolor/22x22/actions/gramps-geo.png
diff --git a/images/22x22/gramps-gramplet.png b/images/hicolor/22x22/actions/gramps-gramplet.png
similarity index 100%
rename from images/22x22/gramps-gramplet.png
rename to images/hicolor/22x22/actions/gramps-gramplet.png
diff --git a/images/22x22/gramps-lock.png b/images/hicolor/22x22/actions/gramps-lock.png
similarity index 100%
rename from images/22x22/gramps-lock.png
rename to images/hicolor/22x22/actions/gramps-lock.png
diff --git a/images/22x22/gramps-media.png b/images/hicolor/22x22/actions/gramps-media.png
similarity index 100%
rename from images/22x22/gramps-media.png
rename to images/hicolor/22x22/actions/gramps-media.png
diff --git a/images/22x22/gramps-merge.png b/images/hicolor/22x22/actions/gramps-merge.png
similarity index 100%
rename from images/22x22/gramps-merge.png
rename to images/hicolor/22x22/actions/gramps-merge.png
diff --git a/images/22x22/gramps-notes.png b/images/hicolor/22x22/actions/gramps-notes.png
similarity index 100%
rename from images/22x22/gramps-notes.png
rename to images/hicolor/22x22/actions/gramps-notes.png
diff --git a/images/22x22/gramps-parents-add.png b/images/hicolor/22x22/actions/gramps-parents-add.png
similarity index 100%
rename from images/22x22/gramps-parents-add.png
rename to images/hicolor/22x22/actions/gramps-parents-add.png
diff --git a/images/22x22/gramps-parents-open.png b/images/hicolor/22x22/actions/gramps-parents-open.png
similarity index 100%
rename from images/22x22/gramps-parents-open.png
rename to images/hicolor/22x22/actions/gramps-parents-open.png
diff --git a/images/22x22/gramps-parents.png b/images/hicolor/22x22/actions/gramps-parents.png
similarity index 100%
rename from images/22x22/gramps-parents.png
rename to images/hicolor/22x22/actions/gramps-parents.png
diff --git a/images/22x22/gramps-pedigree.png b/images/hicolor/22x22/actions/gramps-pedigree.png
similarity index 100%
rename from images/22x22/gramps-pedigree.png
rename to images/hicolor/22x22/actions/gramps-pedigree.png
diff --git a/images/22x22/gramps-person.png b/images/hicolor/22x22/actions/gramps-person.png
similarity index 100%
rename from images/22x22/gramps-person.png
rename to images/hicolor/22x22/actions/gramps-person.png
diff --git a/images/22x22/gramps-place.png b/images/hicolor/22x22/actions/gramps-place.png
similarity index 100%
rename from images/22x22/gramps-place.png
rename to images/hicolor/22x22/actions/gramps-place.png
diff --git a/images/22x22/gramps-relation.png b/images/hicolor/22x22/actions/gramps-relation.png
similarity index 100%
rename from images/22x22/gramps-relation.png
rename to images/hicolor/22x22/actions/gramps-relation.png
diff --git a/images/22x22/gramps-reports.png b/images/hicolor/22x22/actions/gramps-reports.png
similarity index 100%
rename from images/22x22/gramps-reports.png
rename to images/hicolor/22x22/actions/gramps-reports.png
diff --git a/images/22x22/gramps-repository.png b/images/hicolor/22x22/actions/gramps-repository.png
similarity index 100%
rename from images/22x22/gramps-repository.png
rename to images/hicolor/22x22/actions/gramps-repository.png
diff --git a/images/22x22/gramps-source.png b/images/hicolor/22x22/actions/gramps-source.png
similarity index 100%
rename from images/22x22/gramps-source.png
rename to images/hicolor/22x22/actions/gramps-source.png
diff --git a/images/22x22/gramps-spouse.png b/images/hicolor/22x22/actions/gramps-spouse.png
similarity index 100%
rename from images/22x22/gramps-spouse.png
rename to images/hicolor/22x22/actions/gramps-spouse.png
diff --git a/images/22x22/gramps-tag-new.png b/images/hicolor/22x22/actions/gramps-tag-new.png
similarity index 100%
rename from images/22x22/gramps-tag-new.png
rename to images/hicolor/22x22/actions/gramps-tag-new.png
diff --git a/images/22x22/gramps-tag.png b/images/hicolor/22x22/actions/gramps-tag.png
similarity index 100%
rename from images/22x22/gramps-tag.png
rename to images/hicolor/22x22/actions/gramps-tag.png
diff --git a/images/22x22/gramps-tools.png b/images/hicolor/22x22/actions/gramps-tools.png
similarity index 100%
rename from images/22x22/gramps-tools.png
rename to images/hicolor/22x22/actions/gramps-tools.png
diff --git a/images/22x22/gramps-tree-group.png b/images/hicolor/22x22/actions/gramps-tree-group.png
similarity index 100%
rename from images/22x22/gramps-tree-group.png
rename to images/hicolor/22x22/actions/gramps-tree-group.png
diff --git a/images/22x22/gramps-tree-list.png b/images/hicolor/22x22/actions/gramps-tree-list.png
similarity index 100%
rename from images/22x22/gramps-tree-list.png
rename to images/hicolor/22x22/actions/gramps-tree-list.png
diff --git a/images/22x22/gramps-tree-select.png b/images/hicolor/22x22/actions/gramps-tree-select.png
similarity index 100%
rename from images/22x22/gramps-tree-select.png
rename to images/hicolor/22x22/actions/gramps-tree-select.png
diff --git a/images/22x22/gramps-unlock.png b/images/hicolor/22x22/actions/gramps-unlock.png
similarity index 100%
rename from images/22x22/gramps-unlock.png
rename to images/hicolor/22x22/actions/gramps-unlock.png
diff --git a/images/22x22/gramps-view.png b/images/hicolor/22x22/actions/gramps-view.png
similarity index 100%
rename from images/22x22/gramps-view.png
rename to images/hicolor/22x22/actions/gramps-view.png
diff --git a/images/22x22/gramps-viewmedia.png b/images/hicolor/22x22/actions/gramps-viewmedia.png
similarity index 100%
rename from images/22x22/gramps-viewmedia.png
rename to images/hicolor/22x22/actions/gramps-viewmedia.png
diff --git a/images/22x22/gramps-zoom-best-fit.png b/images/hicolor/22x22/actions/gramps-zoom-best-fit.png
similarity index 100%
rename from images/22x22/gramps-zoom-best-fit.png
rename to images/hicolor/22x22/actions/gramps-zoom-best-fit.png
diff --git a/images/22x22/gramps-zoom-fit-width.png b/images/hicolor/22x22/actions/gramps-zoom-fit-width.png
similarity index 100%
rename from images/22x22/gramps-zoom-fit-width.png
rename to images/hicolor/22x22/actions/gramps-zoom-fit-width.png
diff --git a/images/22x22/gramps-zoom-in.png b/images/hicolor/22x22/actions/gramps-zoom-in.png
similarity index 100%
rename from images/22x22/gramps-zoom-in.png
rename to images/hicolor/22x22/actions/gramps-zoom-in.png
diff --git a/images/22x22/gramps-zoom-out.png b/images/hicolor/22x22/actions/gramps-zoom-out.png
similarity index 100%
rename from images/22x22/gramps-zoom-out.png
rename to images/hicolor/22x22/actions/gramps-zoom-out.png
diff --git a/images/22x22/gramps.png b/images/hicolor/22x22/actions/gramps.png
similarity index 100%
rename from images/22x22/gramps.png
rename to images/hicolor/22x22/actions/gramps.png
diff --git a/images/48x48/geo-fixed-zoom.png b/images/hicolor/48x48/actions/geo-fixed-zoom.png
similarity index 100%
rename from images/48x48/geo-fixed-zoom.png
rename to images/hicolor/48x48/actions/geo-fixed-zoom.png
diff --git a/images/48x48/geo-free-zoom.png b/images/hicolor/48x48/actions/geo-free-zoom.png
similarity index 100%
rename from images/48x48/geo-free-zoom.png
rename to images/hicolor/48x48/actions/geo-free-zoom.png
diff --git a/images/48x48/geo-place-add.png b/images/hicolor/48x48/actions/geo-place-add.png
similarity index 100%
rename from images/48x48/geo-place-add.png
rename to images/hicolor/48x48/actions/geo-place-add.png
diff --git a/images/48x48/geo-place-link.png b/images/hicolor/48x48/actions/geo-place-link.png
similarity index 100%
rename from images/48x48/geo-place-link.png
rename to images/hicolor/48x48/actions/geo-place-link.png
diff --git a/images/48x48/geo-show-event.png b/images/hicolor/48x48/actions/geo-show-event.png
similarity index 100%
rename from images/48x48/geo-show-event.png
rename to images/hicolor/48x48/actions/geo-show-event.png
diff --git a/images/48x48/geo-show-family.png b/images/hicolor/48x48/actions/geo-show-family.png
similarity index 100%
rename from images/48x48/geo-show-family.png
rename to images/hicolor/48x48/actions/geo-show-family.png
diff --git a/images/48x48/geo-show-person.png b/images/hicolor/48x48/actions/geo-show-person.png
similarity index 100%
rename from images/48x48/geo-show-person.png
rename to images/hicolor/48x48/actions/geo-show-person.png
diff --git a/images/48x48/geo-show-place.png b/images/hicolor/48x48/actions/geo-show-place.png
similarity index 100%
rename from images/48x48/geo-show-place.png
rename to images/hicolor/48x48/actions/geo-show-place.png
diff --git a/images/48x48/gramps-address.png b/images/hicolor/48x48/actions/gramps-address.png
similarity index 100%
rename from images/48x48/gramps-address.png
rename to images/hicolor/48x48/actions/gramps-address.png
diff --git a/images/48x48/gramps-attribute.png b/images/hicolor/48x48/actions/gramps-attribute.png
similarity index 100%
rename from images/48x48/gramps-attribute.png
rename to images/hicolor/48x48/actions/gramps-attribute.png
diff --git a/images/48x48/gramps-bookmark-delete.png b/images/hicolor/48x48/actions/gramps-bookmark-delete.png
similarity index 100%
rename from images/48x48/gramps-bookmark-delete.png
rename to images/hicolor/48x48/actions/gramps-bookmark-delete.png
diff --git a/images/48x48/gramps-bookmark-edit.png b/images/hicolor/48x48/actions/gramps-bookmark-edit.png
similarity index 100%
rename from images/48x48/gramps-bookmark-edit.png
rename to images/hicolor/48x48/actions/gramps-bookmark-edit.png
diff --git a/images/48x48/gramps-bookmark-new.png b/images/hicolor/48x48/actions/gramps-bookmark-new.png
similarity index 100%
rename from images/48x48/gramps-bookmark-new.png
rename to images/hicolor/48x48/actions/gramps-bookmark-new.png
diff --git a/images/48x48/gramps-bookmark.png b/images/hicolor/48x48/actions/gramps-bookmark.png
similarity index 100%
rename from images/48x48/gramps-bookmark.png
rename to images/hicolor/48x48/actions/gramps-bookmark.png
diff --git a/images/48x48/gramps-citation.png b/images/hicolor/48x48/actions/gramps-citation.png
similarity index 100%
rename from images/48x48/gramps-citation.png
rename to images/hicolor/48x48/actions/gramps-citation.png
diff --git a/images/48x48/gramps-config.png b/images/hicolor/48x48/actions/gramps-config.png
similarity index 100%
rename from images/48x48/gramps-config.png
rename to images/hicolor/48x48/actions/gramps-config.png
diff --git a/images/48x48/gramps-date-edit.png b/images/hicolor/48x48/actions/gramps-date-edit.png
similarity index 100%
rename from images/48x48/gramps-date-edit.png
rename to images/hicolor/48x48/actions/gramps-date-edit.png
diff --git a/images/48x48/gramps-date.png b/images/hicolor/48x48/actions/gramps-date.png
similarity index 100%
rename from images/48x48/gramps-date.png
rename to images/hicolor/48x48/actions/gramps-date.png
diff --git a/images/48x48/gramps-event.png b/images/hicolor/48x48/actions/gramps-event.png
similarity index 100%
rename from images/48x48/gramps-event.png
rename to images/hicolor/48x48/actions/gramps-event.png
diff --git a/images/48x48/gramps-family.png b/images/hicolor/48x48/actions/gramps-family.png
similarity index 100%
rename from images/48x48/gramps-family.png
rename to images/hicolor/48x48/actions/gramps-family.png
diff --git a/images/48x48/gramps-fanchart.png b/images/hicolor/48x48/actions/gramps-fanchart.png
similarity index 100%
rename from images/48x48/gramps-fanchart.png
rename to images/hicolor/48x48/actions/gramps-fanchart.png
diff --git a/images/48x48/gramps-fanchartdesc.png b/images/hicolor/48x48/actions/gramps-fanchartdesc.png
similarity index 100%
rename from images/48x48/gramps-fanchartdesc.png
rename to images/hicolor/48x48/actions/gramps-fanchartdesc.png
diff --git a/images/48x48/gramps-font-bgcolor.png b/images/hicolor/48x48/actions/gramps-font-bgcolor.png
similarity index 100%
rename from images/48x48/gramps-font-bgcolor.png
rename to images/hicolor/48x48/actions/gramps-font-bgcolor.png
diff --git a/images/48x48/gramps-font-color.png b/images/hicolor/48x48/actions/gramps-font-color.png
similarity index 100%
rename from images/48x48/gramps-font-color.png
rename to images/hicolor/48x48/actions/gramps-font-color.png
diff --git a/images/48x48/gramps-font.png b/images/hicolor/48x48/actions/gramps-font.png
similarity index 100%
rename from images/48x48/gramps-font.png
rename to images/hicolor/48x48/actions/gramps-font.png
diff --git a/images/48x48/gramps-geo-altmap.png b/images/hicolor/48x48/actions/gramps-geo-altmap.png
similarity index 100%
rename from images/48x48/gramps-geo-altmap.png
rename to images/hicolor/48x48/actions/gramps-geo-altmap.png
diff --git a/images/48x48/gramps-geo-birth.png b/images/hicolor/48x48/actions/gramps-geo-birth.png
similarity index 100%
rename from images/48x48/gramps-geo-birth.png
rename to images/hicolor/48x48/actions/gramps-geo-birth.png
diff --git a/images/48x48/gramps-geo-death.png b/images/hicolor/48x48/actions/gramps-geo-death.png
similarity index 100%
rename from images/48x48/gramps-geo-death.png
rename to images/hicolor/48x48/actions/gramps-geo-death.png
diff --git a/images/48x48/gramps-geo-mainmap.png b/images/hicolor/48x48/actions/gramps-geo-mainmap.png
similarity index 100%
rename from images/48x48/gramps-geo-mainmap.png
rename to images/hicolor/48x48/actions/gramps-geo-mainmap.png
diff --git a/images/48x48/gramps-geo-marriage.png b/images/hicolor/48x48/actions/gramps-geo-marriage.png
similarity index 100%
rename from images/48x48/gramps-geo-marriage.png
rename to images/hicolor/48x48/actions/gramps-geo-marriage.png
diff --git a/images/48x48/gramps-geo.png b/images/hicolor/48x48/actions/gramps-geo.png
similarity index 100%
rename from images/48x48/gramps-geo.png
rename to images/hicolor/48x48/actions/gramps-geo.png
diff --git a/images/48x48/gramps-gramplet.png b/images/hicolor/48x48/actions/gramps-gramplet.png
similarity index 100%
rename from images/48x48/gramps-gramplet.png
rename to images/hicolor/48x48/actions/gramps-gramplet.png
diff --git a/images/48x48/gramps-lock.png b/images/hicolor/48x48/actions/gramps-lock.png
similarity index 100%
rename from images/48x48/gramps-lock.png
rename to images/hicolor/48x48/actions/gramps-lock.png
diff --git a/images/48x48/gramps-media.png b/images/hicolor/48x48/actions/gramps-media.png
similarity index 100%
rename from images/48x48/gramps-media.png
rename to images/hicolor/48x48/actions/gramps-media.png
diff --git a/images/48x48/gramps-merge.png b/images/hicolor/48x48/actions/gramps-merge.png
similarity index 100%
rename from images/48x48/gramps-merge.png
rename to images/hicolor/48x48/actions/gramps-merge.png
diff --git a/images/48x48/gramps-notes.png b/images/hicolor/48x48/actions/gramps-notes.png
similarity index 100%
rename from images/48x48/gramps-notes.png
rename to images/hicolor/48x48/actions/gramps-notes.png
diff --git a/images/48x48/gramps-parents-add.png b/images/hicolor/48x48/actions/gramps-parents-add.png
similarity index 100%
rename from images/48x48/gramps-parents-add.png
rename to images/hicolor/48x48/actions/gramps-parents-add.png
diff --git a/images/48x48/gramps-parents-open.png b/images/hicolor/48x48/actions/gramps-parents-open.png
similarity index 100%
rename from images/48x48/gramps-parents-open.png
rename to images/hicolor/48x48/actions/gramps-parents-open.png
diff --git a/images/48x48/gramps-parents.png b/images/hicolor/48x48/actions/gramps-parents.png
similarity index 100%
rename from images/48x48/gramps-parents.png
rename to images/hicolor/48x48/actions/gramps-parents.png
diff --git a/images/48x48/gramps-pedigree.png b/images/hicolor/48x48/actions/gramps-pedigree.png
similarity index 100%
rename from images/48x48/gramps-pedigree.png
rename to images/hicolor/48x48/actions/gramps-pedigree.png
diff --git a/images/48x48/gramps-person.png b/images/hicolor/48x48/actions/gramps-person.png
similarity index 100%
rename from images/48x48/gramps-person.png
rename to images/hicolor/48x48/actions/gramps-person.png
diff --git a/images/48x48/gramps-place.png b/images/hicolor/48x48/actions/gramps-place.png
similarity index 100%
rename from images/48x48/gramps-place.png
rename to images/hicolor/48x48/actions/gramps-place.png
diff --git a/images/48x48/gramps-relation.png b/images/hicolor/48x48/actions/gramps-relation.png
similarity index 100%
rename from images/48x48/gramps-relation.png
rename to images/hicolor/48x48/actions/gramps-relation.png
diff --git a/images/48x48/gramps-reports.png b/images/hicolor/48x48/actions/gramps-reports.png
similarity index 100%
rename from images/48x48/gramps-reports.png
rename to images/hicolor/48x48/actions/gramps-reports.png
diff --git a/images/48x48/gramps-repository.png b/images/hicolor/48x48/actions/gramps-repository.png
similarity index 100%
rename from images/48x48/gramps-repository.png
rename to images/hicolor/48x48/actions/gramps-repository.png
diff --git a/images/48x48/gramps-source.png b/images/hicolor/48x48/actions/gramps-source.png
similarity index 100%
rename from images/48x48/gramps-source.png
rename to images/hicolor/48x48/actions/gramps-source.png
diff --git a/images/48x48/gramps-spouse.png b/images/hicolor/48x48/actions/gramps-spouse.png
similarity index 100%
rename from images/48x48/gramps-spouse.png
rename to images/hicolor/48x48/actions/gramps-spouse.png
diff --git a/images/48x48/gramps-tag-new.png b/images/hicolor/48x48/actions/gramps-tag-new.png
similarity index 100%
rename from images/48x48/gramps-tag-new.png
rename to images/hicolor/48x48/actions/gramps-tag-new.png
diff --git a/images/48x48/gramps-tag.png b/images/hicolor/48x48/actions/gramps-tag.png
similarity index 100%
rename from images/48x48/gramps-tag.png
rename to images/hicolor/48x48/actions/gramps-tag.png
diff --git a/images/48x48/gramps-tools.png b/images/hicolor/48x48/actions/gramps-tools.png
similarity index 100%
rename from images/48x48/gramps-tools.png
rename to images/hicolor/48x48/actions/gramps-tools.png
diff --git a/images/48x48/gramps-tree-group.png b/images/hicolor/48x48/actions/gramps-tree-group.png
similarity index 100%
rename from images/48x48/gramps-tree-group.png
rename to images/hicolor/48x48/actions/gramps-tree-group.png
diff --git a/images/48x48/gramps-tree-list.png b/images/hicolor/48x48/actions/gramps-tree-list.png
similarity index 100%
rename from images/48x48/gramps-tree-list.png
rename to images/hicolor/48x48/actions/gramps-tree-list.png
diff --git a/images/48x48/gramps-tree-select.png b/images/hicolor/48x48/actions/gramps-tree-select.png
similarity index 100%
rename from images/48x48/gramps-tree-select.png
rename to images/hicolor/48x48/actions/gramps-tree-select.png
diff --git a/images/48x48/gramps-unlock.png b/images/hicolor/48x48/actions/gramps-unlock.png
similarity index 100%
rename from images/48x48/gramps-unlock.png
rename to images/hicolor/48x48/actions/gramps-unlock.png
diff --git a/images/48x48/gramps-view.png b/images/hicolor/48x48/actions/gramps-view.png
similarity index 100%
rename from images/48x48/gramps-view.png
rename to images/hicolor/48x48/actions/gramps-view.png
diff --git a/images/48x48/gramps-viewmedia.png b/images/hicolor/48x48/actions/gramps-viewmedia.png
similarity index 100%
rename from images/48x48/gramps-viewmedia.png
rename to images/hicolor/48x48/actions/gramps-viewmedia.png
diff --git a/images/48x48/gramps-zoom-best-fit.png b/images/hicolor/48x48/actions/gramps-zoom-best-fit.png
similarity index 100%
rename from images/48x48/gramps-zoom-best-fit.png
rename to images/hicolor/48x48/actions/gramps-zoom-best-fit.png
diff --git a/images/48x48/gramps-zoom-fit-width.png b/images/hicolor/48x48/actions/gramps-zoom-fit-width.png
similarity index 100%
rename from images/48x48/gramps-zoom-fit-width.png
rename to images/hicolor/48x48/actions/gramps-zoom-fit-width.png
diff --git a/images/48x48/gramps-zoom-in.png b/images/hicolor/48x48/actions/gramps-zoom-in.png
similarity index 100%
rename from images/48x48/gramps-zoom-in.png
rename to images/hicolor/48x48/actions/gramps-zoom-in.png
diff --git a/images/48x48/gramps-zoom-out.png b/images/hicolor/48x48/actions/gramps-zoom-out.png
similarity index 100%
rename from images/48x48/gramps-zoom-out.png
rename to images/hicolor/48x48/actions/gramps-zoom-out.png
diff --git a/images/48x48/gramps.png b/images/hicolor/48x48/actions/gramps.png
similarity index 100%
rename from images/48x48/gramps.png
rename to images/hicolor/48x48/actions/gramps.png
diff --git a/images/scalable/add-parent-existing-family.svg b/images/hicolor/scalable/actions/add-parent-existing-family.svg
similarity index 100%
rename from images/scalable/add-parent-existing-family.svg
rename to images/hicolor/scalable/actions/add-parent-existing-family.svg
diff --git a/images/scalable/geo-fixed-zoom.svg b/images/hicolor/scalable/actions/geo-fixed-zoom.svg
similarity index 100%
rename from images/scalable/geo-fixed-zoom.svg
rename to images/hicolor/scalable/actions/geo-fixed-zoom.svg
diff --git a/images/scalable/geo-free-zoom.svg b/images/hicolor/scalable/actions/geo-free-zoom.svg
similarity index 100%
rename from images/scalable/geo-free-zoom.svg
rename to images/hicolor/scalable/actions/geo-free-zoom.svg
diff --git a/images/scalable/geo-place-add.svg b/images/hicolor/scalable/actions/geo-place-add.svg
similarity index 100%
rename from images/scalable/geo-place-add.svg
rename to images/hicolor/scalable/actions/geo-place-add.svg
diff --git a/images/scalable/geo-place-link.svg b/images/hicolor/scalable/actions/geo-place-link.svg
similarity index 100%
rename from images/scalable/geo-place-link.svg
rename to images/hicolor/scalable/actions/geo-place-link.svg
diff --git a/images/scalable/geo-show-event.svg b/images/hicolor/scalable/actions/geo-show-event.svg
similarity index 100%
rename from images/scalable/geo-show-event.svg
rename to images/hicolor/scalable/actions/geo-show-event.svg
diff --git a/images/scalable/geo-show-family.svg b/images/hicolor/scalable/actions/geo-show-family.svg
similarity index 100%
rename from images/scalable/geo-show-family.svg
rename to images/hicolor/scalable/actions/geo-show-family.svg
diff --git a/images/scalable/geo-show-person.svg b/images/hicolor/scalable/actions/geo-show-person.svg
similarity index 100%
rename from images/scalable/geo-show-person.svg
rename to images/hicolor/scalable/actions/geo-show-person.svg
diff --git a/images/scalable/geo-show-place.svg b/images/hicolor/scalable/actions/geo-show-place.svg
similarity index 100%
rename from images/scalable/geo-show-place.svg
rename to images/hicolor/scalable/actions/geo-show-place.svg
diff --git a/images/scalable/gramps-address.svg b/images/hicolor/scalable/actions/gramps-address.svg
similarity index 100%
rename from images/scalable/gramps-address.svg
rename to images/hicolor/scalable/actions/gramps-address.svg
diff --git a/images/scalable/gramps-attribute.svg b/images/hicolor/scalable/actions/gramps-attribute.svg
similarity index 100%
rename from images/scalable/gramps-attribute.svg
rename to images/hicolor/scalable/actions/gramps-attribute.svg
diff --git a/images/scalable/gramps-bookmark-delete.svg b/images/hicolor/scalable/actions/gramps-bookmark-delete.svg
similarity index 100%
rename from images/scalable/gramps-bookmark-delete.svg
rename to images/hicolor/scalable/actions/gramps-bookmark-delete.svg
diff --git a/images/scalable/gramps-bookmark-edit.svg b/images/hicolor/scalable/actions/gramps-bookmark-edit.svg
similarity index 100%
rename from images/scalable/gramps-bookmark-edit.svg
rename to images/hicolor/scalable/actions/gramps-bookmark-edit.svg
diff --git a/images/scalable/gramps-bookmark-new.svg b/images/hicolor/scalable/actions/gramps-bookmark-new.svg
similarity index 100%
rename from images/scalable/gramps-bookmark-new.svg
rename to images/hicolor/scalable/actions/gramps-bookmark-new.svg
diff --git a/images/scalable/gramps-bookmark.svg b/images/hicolor/scalable/actions/gramps-bookmark.svg
similarity index 100%
rename from images/scalable/gramps-bookmark.svg
rename to images/hicolor/scalable/actions/gramps-bookmark.svg
diff --git a/images/scalable/gramps-citation.svg b/images/hicolor/scalable/actions/gramps-citation.svg
similarity index 100%
rename from images/scalable/gramps-citation.svg
rename to images/hicolor/scalable/actions/gramps-citation.svg
diff --git a/images/scalable/gramps-config.svg b/images/hicolor/scalable/actions/gramps-config.svg
similarity index 100%
rename from images/scalable/gramps-config.svg
rename to images/hicolor/scalable/actions/gramps-config.svg
diff --git a/images/scalable/gramps-date-edit.svg b/images/hicolor/scalable/actions/gramps-date-edit.svg
similarity index 100%
rename from images/scalable/gramps-date-edit.svg
rename to images/hicolor/scalable/actions/gramps-date-edit.svg
diff --git a/images/scalable/gramps-date.svg b/images/hicolor/scalable/actions/gramps-date.svg
similarity index 100%
rename from images/scalable/gramps-date.svg
rename to images/hicolor/scalable/actions/gramps-date.svg
diff --git a/images/scalable/gramps-event.svg b/images/hicolor/scalable/actions/gramps-event.svg
similarity index 100%
rename from images/scalable/gramps-event.svg
rename to images/hicolor/scalable/actions/gramps-event.svg
diff --git a/images/scalable/gramps-family.svg b/images/hicolor/scalable/actions/gramps-family.svg
similarity index 100%
rename from images/scalable/gramps-family.svg
rename to images/hicolor/scalable/actions/gramps-family.svg
diff --git a/images/scalable/gramps-fanchart.svg b/images/hicolor/scalable/actions/gramps-fanchart.svg
similarity index 100%
rename from images/scalable/gramps-fanchart.svg
rename to images/hicolor/scalable/actions/gramps-fanchart.svg
diff --git a/images/scalable/gramps-fanchartdesc.svg b/images/hicolor/scalable/actions/gramps-fanchartdesc.svg
similarity index 100%
rename from images/scalable/gramps-fanchartdesc.svg
rename to images/hicolor/scalable/actions/gramps-fanchartdesc.svg
diff --git a/images/scalable/gramps-font-bgcolor.svg b/images/hicolor/scalable/actions/gramps-font-bgcolor.svg
similarity index 100%
rename from images/scalable/gramps-font-bgcolor.svg
rename to images/hicolor/scalable/actions/gramps-font-bgcolor.svg
diff --git a/images/scalable/gramps-font-color.svg b/images/hicolor/scalable/actions/gramps-font-color.svg
similarity index 100%
rename from images/scalable/gramps-font-color.svg
rename to images/hicolor/scalable/actions/gramps-font-color.svg
diff --git a/images/scalable/gramps-font.svg b/images/hicolor/scalable/actions/gramps-font.svg
similarity index 100%
rename from images/scalable/gramps-font.svg
rename to images/hicolor/scalable/actions/gramps-font.svg
diff --git a/images/scalable/gramps-geo-altmap.svg b/images/hicolor/scalable/actions/gramps-geo-altmap.svg
similarity index 100%
rename from images/scalable/gramps-geo-altmap.svg
rename to images/hicolor/scalable/actions/gramps-geo-altmap.svg
diff --git a/images/scalable/gramps-geo-birth.svg b/images/hicolor/scalable/actions/gramps-geo-birth.svg
similarity index 100%
rename from images/scalable/gramps-geo-birth.svg
rename to images/hicolor/scalable/actions/gramps-geo-birth.svg
diff --git a/images/scalable/gramps-geo-death.svg b/images/hicolor/scalable/actions/gramps-geo-death.svg
similarity index 100%
rename from images/scalable/gramps-geo-death.svg
rename to images/hicolor/scalable/actions/gramps-geo-death.svg
diff --git a/images/scalable/gramps-geo-mainmap.svg b/images/hicolor/scalable/actions/gramps-geo-mainmap.svg
similarity index 100%
rename from images/scalable/gramps-geo-mainmap.svg
rename to images/hicolor/scalable/actions/gramps-geo-mainmap.svg
diff --git a/images/scalable/gramps-geo-marriage.svg b/images/hicolor/scalable/actions/gramps-geo-marriage.svg
similarity index 100%
rename from images/scalable/gramps-geo-marriage.svg
rename to images/hicolor/scalable/actions/gramps-geo-marriage.svg
diff --git a/images/scalable/gramps-geo.svg b/images/hicolor/scalable/actions/gramps-geo.svg
similarity index 100%
rename from images/scalable/gramps-geo.svg
rename to images/hicolor/scalable/actions/gramps-geo.svg
diff --git a/images/scalable/gramps-gramplet.svg b/images/hicolor/scalable/actions/gramps-gramplet.svg
similarity index 100%
rename from images/scalable/gramps-gramplet.svg
rename to images/hicolor/scalable/actions/gramps-gramplet.svg
diff --git a/images/scalable/gramps-lock.svg b/images/hicolor/scalable/actions/gramps-lock.svg
similarity index 100%
rename from images/scalable/gramps-lock.svg
rename to images/hicolor/scalable/actions/gramps-lock.svg
diff --git a/images/scalable/gramps-media.svg b/images/hicolor/scalable/actions/gramps-media.svg
similarity index 100%
rename from images/scalable/gramps-media.svg
rename to images/hicolor/scalable/actions/gramps-media.svg
diff --git a/images/scalable/gramps-merge.svg b/images/hicolor/scalable/actions/gramps-merge.svg
similarity index 100%
rename from images/scalable/gramps-merge.svg
rename to images/hicolor/scalable/actions/gramps-merge.svg
diff --git a/images/scalable/gramps-notes.svg b/images/hicolor/scalable/actions/gramps-notes.svg
similarity index 100%
rename from images/scalable/gramps-notes.svg
rename to images/hicolor/scalable/actions/gramps-notes.svg
diff --git a/images/scalable/gramps-parents-add.svg b/images/hicolor/scalable/actions/gramps-parents-add.svg
similarity index 100%
rename from images/scalable/gramps-parents-add.svg
rename to images/hicolor/scalable/actions/gramps-parents-add.svg
diff --git a/images/scalable/gramps-parents-open.svg b/images/hicolor/scalable/actions/gramps-parents-open.svg
similarity index 100%
rename from images/scalable/gramps-parents-open.svg
rename to images/hicolor/scalable/actions/gramps-parents-open.svg
diff --git a/images/scalable/gramps-parents.svg b/images/hicolor/scalable/actions/gramps-parents.svg
similarity index 100%
rename from images/scalable/gramps-parents.svg
rename to images/hicolor/scalable/actions/gramps-parents.svg
diff --git a/images/scalable/gramps-pedigree.svg b/images/hicolor/scalable/actions/gramps-pedigree.svg
similarity index 100%
rename from images/scalable/gramps-pedigree.svg
rename to images/hicolor/scalable/actions/gramps-pedigree.svg
diff --git a/images/scalable/gramps-person.svg b/images/hicolor/scalable/actions/gramps-person.svg
similarity index 100%
rename from images/scalable/gramps-person.svg
rename to images/hicolor/scalable/actions/gramps-person.svg
diff --git a/images/scalable/gramps-place.svg b/images/hicolor/scalable/actions/gramps-place.svg
similarity index 100%
rename from images/scalable/gramps-place.svg
rename to images/hicolor/scalable/actions/gramps-place.svg
diff --git a/images/scalable/gramps-relation.svg b/images/hicolor/scalable/actions/gramps-relation.svg
similarity index 100%
rename from images/scalable/gramps-relation.svg
rename to images/hicolor/scalable/actions/gramps-relation.svg
diff --git a/images/scalable/gramps-reports.svg b/images/hicolor/scalable/actions/gramps-reports.svg
similarity index 100%
rename from images/scalable/gramps-reports.svg
rename to images/hicolor/scalable/actions/gramps-reports.svg
diff --git a/images/scalable/gramps-repository.svg b/images/hicolor/scalable/actions/gramps-repository.svg
similarity index 100%
rename from images/scalable/gramps-repository.svg
rename to images/hicolor/scalable/actions/gramps-repository.svg
diff --git a/images/scalable/gramps-source.svg b/images/hicolor/scalable/actions/gramps-source.svg
similarity index 100%
rename from images/scalable/gramps-source.svg
rename to images/hicolor/scalable/actions/gramps-source.svg
diff --git a/images/scalable/gramps-spouse.svg b/images/hicolor/scalable/actions/gramps-spouse.svg
similarity index 100%
rename from images/scalable/gramps-spouse.svg
rename to images/hicolor/scalable/actions/gramps-spouse.svg
diff --git a/images/scalable/gramps-tag-new.svg b/images/hicolor/scalable/actions/gramps-tag-new.svg
similarity index 100%
rename from images/scalable/gramps-tag-new.svg
rename to images/hicolor/scalable/actions/gramps-tag-new.svg
diff --git a/images/scalable/gramps-tag.svg b/images/hicolor/scalable/actions/gramps-tag.svg
similarity index 100%
rename from images/scalable/gramps-tag.svg
rename to images/hicolor/scalable/actions/gramps-tag.svg
diff --git a/images/scalable/gramps-tools.svg b/images/hicolor/scalable/actions/gramps-tools.svg
similarity index 100%
rename from images/scalable/gramps-tools.svg
rename to images/hicolor/scalable/actions/gramps-tools.svg
diff --git a/images/scalable/gramps-tree-group.svg b/images/hicolor/scalable/actions/gramps-tree-group.svg
similarity index 100%
rename from images/scalable/gramps-tree-group.svg
rename to images/hicolor/scalable/actions/gramps-tree-group.svg
diff --git a/images/scalable/gramps-tree-list.svg b/images/hicolor/scalable/actions/gramps-tree-list.svg
similarity index 100%
rename from images/scalable/gramps-tree-list.svg
rename to images/hicolor/scalable/actions/gramps-tree-list.svg
diff --git a/images/scalable/gramps-tree-select.svg b/images/hicolor/scalable/actions/gramps-tree-select.svg
similarity index 100%
rename from images/scalable/gramps-tree-select.svg
rename to images/hicolor/scalable/actions/gramps-tree-select.svg
diff --git a/images/scalable/gramps-unlock.svg b/images/hicolor/scalable/actions/gramps-unlock.svg
similarity index 100%
rename from images/scalable/gramps-unlock.svg
rename to images/hicolor/scalable/actions/gramps-unlock.svg
diff --git a/images/scalable/gramps-view.svg b/images/hicolor/scalable/actions/gramps-view.svg
similarity index 100%
rename from images/scalable/gramps-view.svg
rename to images/hicolor/scalable/actions/gramps-view.svg
diff --git a/images/scalable/gramps-viewmedia.svg b/images/hicolor/scalable/actions/gramps-viewmedia.svg
similarity index 100%
rename from images/scalable/gramps-viewmedia.svg
rename to images/hicolor/scalable/actions/gramps-viewmedia.svg
diff --git a/images/scalable/gramps-zoom-best-fit.svg b/images/hicolor/scalable/actions/gramps-zoom-best-fit.svg
similarity index 100%
rename from images/scalable/gramps-zoom-best-fit.svg
rename to images/hicolor/scalable/actions/gramps-zoom-best-fit.svg
diff --git a/images/scalable/gramps-zoom-fit-width.svg b/images/hicolor/scalable/actions/gramps-zoom-fit-width.svg
similarity index 100%
rename from images/scalable/gramps-zoom-fit-width.svg
rename to images/hicolor/scalable/actions/gramps-zoom-fit-width.svg
diff --git a/images/scalable/gramps-zoom-in.svg b/images/hicolor/scalable/actions/gramps-zoom-in.svg
similarity index 100%
rename from images/scalable/gramps-zoom-in.svg
rename to images/hicolor/scalable/actions/gramps-zoom-in.svg
diff --git a/images/scalable/gramps-zoom-out.svg b/images/hicolor/scalable/actions/gramps-zoom-out.svg
similarity index 100%
rename from images/scalable/gramps-zoom-out.svg
rename to images/hicolor/scalable/actions/gramps-zoom-out.svg
diff --git a/images/scalable/gramps.svg b/images/hicolor/scalable/actions/gramps.svg
similarity index 100%
rename from images/scalable/gramps.svg
rename to images/hicolor/scalable/actions/gramps.svg
diff --git a/setup.py b/setup.py
index d96b9e8c1..ebfa14afd 100644
--- a/setup.py
+++ b/setup.py
@@ -417,15 +417,16 @@ data_files_core.append(('share/gramps', XML_FILES))
data_files_gui = []
IMAGE_FILES = glob.glob(os.path.join('images', '*.*'))
-IMAGE_16 = glob.glob(os.path.join('images', '16x16', '*.png'))
-IMAGE_22 = glob.glob(os.path.join('images', '22x22', '*.png'))
-IMAGE_48 = glob.glob(os.path.join('images', '48x48', '*.png'))
-IMAGE_SC = glob.glob(os.path.join('images', 'scalable', '*.svg'))
+THEME = os.path.join('images', 'hicolor')
+ICON_16 = glob.glob(os.path.join(THEME, '16x16', 'actions', '*.png'))
+ICON_22 = glob.glob(os.path.join(THEME, '22x22', 'actions', '*.png'))
+ICON_48 = glob.glob(os.path.join(THEME, '48x48', 'actions', '*.png'))
+ICON_SC = glob.glob(os.path.join(THEME, 'scalable', 'actions', '*.svg'))
data_files_gui.append(('share/gramps/images', IMAGE_FILES))
-data_files_gui.append(('share/gramps/images/16x16', IMAGE_16))
-data_files_gui.append(('share/gramps/images/22x22', IMAGE_22))
-data_files_gui.append(('share/gramps/images/48x48', IMAGE_48))
-data_files_gui.append(('share/gramps/images/scalable', IMAGE_SC))
+data_files_gui.append(('share/gramps/images/hicolor/16x16/actions', ICON_16))
+data_files_gui.append(('share/gramps/images/hicolor/22x22/actions', ICON_22))
+data_files_gui.append(('share/gramps/images/hicolor/48x48/actions', ICON_48))
+data_files_gui.append(('share/gramps/images/hicolor/scalable/actions', ICON_SC))
data_files_webapp = []
TEMPLATE_FILES = glob.glob(os.path.join('data/templates', '*.html'))