diff --git a/share/icons/hicolor/scalable/actions/swatches.svg b/share/icons/hicolor/scalable/actions/swatches.svg
index da80b32d7e2a6c9754f55bb6fed9a24cebee8c9b..30e426bdcf2e2cb30b52af91e5c3eca3cf528472 100644
--- a/share/icons/hicolor/scalable/actions/swatches.svg
+++ b/share/icons/hicolor/scalable/actions/swatches.svg
@@ -28,25 +28,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/helper/CMakeLists.txt b/src/helper/CMakeLists.txt
index bcd9f7c58a89aafd7a58224e0fc29380c2d76330..7b6b548b9f276abedcc0422eb043bc941c1db950 100644
--- a/src/helper/CMakeLists.txt
+++ b/src/helper/CMakeLists.txt
@@ -17,6 +17,7 @@ set(helper_SRC
geom-pathvectorsatellites.cpp
geom-satellite.cpp
gettext.cpp
+ icon-loader.cpp
pixbuf-ops.cpp
png-write.cpp
stock-items.cpp
@@ -38,6 +39,7 @@ set(helper_SRC
geom-satellite.h
geom.h
gettext.h
+ icon-loader.h
mathfns.h
pixbuf-ops.h
png-write.h
diff --git a/src/helper/action.cpp b/src/helper/action.cpp
index 6e44487f96e682468516d33226bcddf8c57a7ac8..6d14037f08f170d4ea7d579a2257b0c5ce8c1ee9 100644
--- a/src/helper/action.cpp
+++ b/src/helper/action.cpp
@@ -10,6 +10,7 @@
*/
#include "helper/action.h"
+#include "helper/icon-loader.h"
#include
@@ -236,8 +237,9 @@ SPAction::create_toolbutton_for_verb(unsigned int verb_code,
auto icon_name = verb->get_image();
// Create a button with the required display properties
- auto button = Gtk::manage(new Gtk::ToolButton(verb->get_name()));
- button->set_icon_name(icon_name);
+ auto button = Gtk::manage(new Gtk::ToolButton(verb->get_tip()));
+ auto icon_widget = sp_get_icon_image(icon_name, "/toolbox/small");
+ button->set_icon_widget(*icon_widget);
button->set_tooltip_text(verb->get_tip());
// Hook up signal handler
diff --git a/src/helper/icon-loader.cpp b/src/helper/icon-loader.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a8aa663c0ae98f5cc6a0b53c4425acaef507f36a
--- /dev/null
+++ b/src/helper/icon-loader.cpp
@@ -0,0 +1,133 @@
+/*
+ * Icon Loader
+ *
+ * Icon Loader management code
+ *
+ * Authors:
+ * Jabiertxo Arraiza
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "icon-loader.h"
+#include "inkscape.h"
+#include "io/resource.h"
+#include "preferences.h"
+#include "svg/svg-color.h"
+#include "widgets/toolbox.h"
+#include
+#include
+
+Glib::RefPtr sp_get_icon_pixbuf(Glib::ustring icon_name, gint size)
+{
+ using namespace Inkscape::IO::Resource;
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ if (prefs->getString("/theme/themeName") == "") {
+ prefs->setString("/theme/themeName", "hicolor");
+ }
+ // TODO: remove this fixed value by a theme setting in prefs or wereeber might to be
+ prefs->setBool("/theme/symbolicIcons", false);
+ prefs->setString("/theme/symbolicIcons", "hicolor");
+ prefs->setInt("/theme/symbolicColor", 0x000000ff);
+ // end of remove
+ auto iconTheme = Gtk::IconTheme::create();
+ iconTheme->set_custom_theme(prefs->getString("/theme/themeName"));
+ iconTheme->append_search_path(get_path_ustring(SYSTEM, ICONS));
+ iconTheme->append_search_path(get_path_ustring(USER, ICONS));
+#ifdef INKSCAPE_THEMEDIR
+ iconTheme->append_search_path(get_path_ustring(SYSTEM, THEMES));
+ iconTheme->append_search_path(get_path_ustring(USER, THEMES));
+#endif
+ Glib::RefPtr _icon_pixbuf;
+ try {
+ // if (prefs->getBool("/theme/symbolicIcons", false)) {
+ // gchar colornamed[64];
+ // sp_svg_write_color(colornamed, sizeof(colornamed), prefs->getInt("/theme/symbolicColor",
+ // 0x000000ff)); Gdk::RGBA color; color.set(colornamed); Gtk::IconInfo iconinfo =
+ // iconTheme->lookup_icon(icon_name + Glib::ustring("-symbolic"), size,
+ // Gtk::ICON_LOOKUP_FORCE_SIZE);
+ // if (bool(iconinfo)) {
+ // // TODO: view if we need parametrice other colors
+ // bool was_symbolic = false;
+ // _icon_pixbuf = iconinfo.load_symbolic(color, color, color, color, was_symbolic);
+ // }
+ // else {
+ // _icon_pixbuf = iconTheme->load_icon(icon_name, size, Gtk::ICON_LOOKUP_FORCE_SIZE);
+ // }
+ // }
+ // else {
+ _icon_pixbuf = iconTheme->load_icon(icon_name, size, Gtk::ICON_LOOKUP_FORCE_SIZE);
+ // }
+ }
+ catch (const Gtk::IconThemeError &e) {
+ std::cout << "Icon Loader: " << e.what() << std::endl;
+ }
+ return _icon_pixbuf;
+}
+
+Glib::RefPtr sp_get_icon_pixbuf(Glib::ustring icon_name, Gtk::BuiltinIconSize icon_size)
+{
+ int width, height;
+ Gtk::IconSize::lookup(Gtk::IconSize(icon_size), width, height);
+ return sp_get_icon_pixbuf(icon_name, width);
+}
+
+Glib::RefPtr sp_get_icon_pixbuf(Glib::ustring icon_name, GtkIconSize icon_size)
+{
+ gint width, height;
+ gtk_icon_size_lookup(icon_size, &width, &height);
+ return sp_get_icon_pixbuf(icon_name, width);
+}
+
+Glib::RefPtr sp_get_icon_pixbuf(Glib::ustring icon_name, gchar const *prefs_size)
+{
+ // Load icon based in preference size defined allowed values are:
+ //"/toolbox/tools/small" Toolbox icon size
+ //"/toolbox/small" Control bar icon size
+ //"/toolbox/secondary" Secondary toolbar icon size
+ GtkIconSize icon_size = Inkscape::UI::ToolboxFactory::prefToSize(prefs_size);
+ return sp_get_icon_pixbuf(icon_name, icon_size);
+}
+
+Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, gint size)
+{
+ auto icon = sp_get_icon_pixbuf(icon_name, size);
+ Gtk::Image *image = new Gtk::Image(icon);
+ return image;
+}
+
+Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, Gtk::BuiltinIconSize icon_size)
+{
+ auto icon = sp_get_icon_pixbuf(icon_name, icon_size);
+ Gtk::Image *image = new Gtk::Image(icon);
+ return image;
+}
+
+Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, GtkIconSize icon_size)
+{
+ auto icon = sp_get_icon_pixbuf(icon_name, icon_size);
+ Gtk::Image *image = new Gtk::Image(icon);
+ return image;
+}
+
+Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, gchar const *prefs_size)
+{
+ auto icon = sp_get_icon_pixbuf(icon_name, prefs_size);
+ Gtk::Image *image = new Gtk::Image(icon);
+ return image;
+}
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
diff --git a/src/helper/icon-loader.h b/src/helper/icon-loader.h
new file mode 100644
index 0000000000000000000000000000000000000000..5b6af546f16b0c0e4c8e81417b69425ed3634238
--- /dev/null
+++ b/src/helper/icon-loader.h
@@ -0,0 +1,25 @@
+#ifndef SEEN_INK_ICON_LOADER_H
+#define SEEN_INK_ICON_LOADER_H
+
+/*
+ * Icon Loader
+ *
+ *
+ * Authors:
+ * Jabiertxo Arraiza
+ *
+ *
+ */
+#include
+#include
+
+Glib::RefPtr sp_get_icon_pixbuf(Glib::ustring icon_name, gint size);
+Glib::RefPtr sp_get_icon_pixbuf(Glib::ustring icon_name, Gtk::BuiltinIconSize icon_size);
+Glib::RefPtr sp_get_icon_pixbuf(Glib::ustring icon_name, GtkIconSize icon_size);
+Glib::RefPtr sp_get_icon_pixbuf(Glib::ustring icon_name, gchar const *prefs_sice);
+Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, gint size);
+Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, Gtk::BuiltinIconSize icon_sice);
+Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, GtkIconSize icon_sice);
+Gtk::Image *sp_get_icon_image(Glib::ustring icon_name, gchar const *prefs_sice);
+
+#endif // SEEN_INK_STOCK_ITEMS_H
diff --git a/src/live_effects/parameter/item.cpp b/src/live_effects/parameter/item.cpp
index 8a8b12307370bfb3b9d9b5e922b0c1878dddffbd..5da934da62cb1a89420a3a8bfbd768d40b9295cf 100644
--- a/src/live_effects/parameter/item.cpp
+++ b/src/live_effects/parameter/item.cpp
@@ -18,12 +18,12 @@
#include "live_effects/effect.h"
#include "svg/svg.h"
-#include "selection-chemistry.h"
-#include "xml/repr.h"
#include "desktop.h"
+#include "helper/icon-loader.h"
#include "inkscape.h"
#include "message-stack.h"
-
+#include "selection-chemistry.h"
+#include "xml/repr.h"
// clipboard support
#include "ui/clipboard.h"
// required for linking to other paths
@@ -118,8 +118,7 @@ Gtk::Widget *
ItemParam::param_newWidget()
{
Gtk::HBox * _widget = Gtk::manage(new Gtk::HBox());
- Gtk::Image* pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name("edit-clone", Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *pIcon = Gtk::manage(sp_get_icon_image("edit-clone", Gtk::ICON_SIZE_BUTTON));
Gtk::Button * pButton = Gtk::manage(new Gtk::Button());
Gtk::Label* pLabel = Gtk::manage(new Gtk::Label(param_label));
static_cast(_widget)->pack_start(*pLabel, true, true);
diff --git a/src/live_effects/parameter/originalitem.cpp b/src/live_effects/parameter/originalitem.cpp
index b415dd52a6b0899be3463ad89320222507bea121..c42db4ce904e13c538099e600326e78e118d4562 100644
--- a/src/live_effects/parameter/originalitem.cpp
+++ b/src/live_effects/parameter/originalitem.cpp
@@ -24,6 +24,7 @@
#include "object/uri.h"
+#include "helper/icon-loader.h"
#include "ui/icon-names.h"
namespace Inkscape {
@@ -52,8 +53,7 @@ OriginalItemParam::param_newWidget()
}
{ // Paste item to link button
- Gtk::Image *pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name("edit-paste", Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *pIcon = Gtk::manage(sp_get_icon_image("edit-paste", Gtk::ICON_SIZE_BUTTON));
Gtk::Button *pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
@@ -65,8 +65,7 @@ OriginalItemParam::param_newWidget()
}
{ // Select original button
- Gtk::Image *pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name("edit-select-original", Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *pIcon = Gtk::manage(sp_get_icon_image("edit-select-original", Gtk::ICON_SIZE_BUTTON));
Gtk::Button *pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
diff --git a/src/live_effects/parameter/originalitemarray.cpp b/src/live_effects/parameter/originalitemarray.cpp
index 23d9f96cd2227af50145b908fbeaf6bb7c9bea5d..22193b2151c6666867d242127139e7a55e14b8d3 100644
--- a/src/live_effects/parameter/originalitemarray.cpp
+++ b/src/live_effects/parameter/originalitemarray.cpp
@@ -18,11 +18,12 @@
#include
+#include "helper/icon-loader.h"
#include "inkscape.h"
-#include "ui/clipboard.h"
-#include "svg/svg.h"
-#include "svg/stringstream.h"
#include "originalitem.h"
+#include "svg/stringstream.h"
+#include "svg/svg.h"
+#include "ui/clipboard.h"
#include "object/uri.h"
@@ -137,8 +138,7 @@ Gtk::Widget* OriginalItemArrayParam::param_newWidget()
{ // Paste item to link button
- Gtk::Image *pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name("edit-clone", Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *pIcon = Gtk::manage(sp_get_icon_image("edit-clone", Gtk::ICON_SIZE_BUTTON));
Gtk::Button *pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
@@ -150,8 +150,7 @@ Gtk::Widget* OriginalItemArrayParam::param_newWidget()
}
{ // Remove linked item
- Gtk::Image *pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name("gtk-remove", Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *pIcon = Gtk::manage(sp_get_icon_image("gtk-remove", Gtk::ICON_SIZE_BUTTON));
Gtk::Button *pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
@@ -163,8 +162,7 @@ Gtk::Widget* OriginalItemArrayParam::param_newWidget()
}
{ // Move Down
- Gtk::Image *pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name( "gtk-go-down", Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *pIcon = Gtk::manage(sp_get_icon_image("gtk-go-down", Gtk::ICON_SIZE_BUTTON));
Gtk::Button *pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
@@ -176,8 +174,7 @@ Gtk::Widget* OriginalItemArrayParam::param_newWidget()
}
{ // Move Down
- Gtk::Image *pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name( "gtk-go-up", Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *pIcon = Gtk::manage(sp_get_icon_image("gtk-go-up", Gtk::ICON_SIZE_BUTTON));
Gtk::Button *pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
diff --git a/src/live_effects/parameter/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp
index cc4408218c8cdaf17a2da55184b4f1d8dc9a5c4c..474f6c1bf563797138cca14b453157842d2cfaeb 100644
--- a/src/live_effects/parameter/originalpatharray.cpp
+++ b/src/live_effects/parameter/originalpatharray.cpp
@@ -32,6 +32,8 @@
#include <2geom/coord.h>
#include <2geom/point.h>
+#include "helper/icon-loader.h"
+
#include "object/sp-shape.h"
#include "object/sp-text.h"
#include "object/uri.h"
@@ -177,8 +179,7 @@ Gtk::Widget* OriginalPathArrayParam::param_newWidget()
{ // Paste path to link button
- Gtk::Image *pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name("edit-clone", Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *pIcon = Gtk::manage(sp_get_icon_image("edit-clone", Gtk::ICON_SIZE_BUTTON));
Gtk::Button *pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
@@ -190,8 +191,7 @@ Gtk::Widget* OriginalPathArrayParam::param_newWidget()
}
{ // Remove linked path
- Gtk::Image *pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name("gtk-remove", Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *pIcon = Gtk::manage(sp_get_icon_image("gtk-remove", Gtk::ICON_SIZE_BUTTON));
Gtk::Button *pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
@@ -203,8 +203,7 @@ Gtk::Widget* OriginalPathArrayParam::param_newWidget()
}
{ // Move Down
- Gtk::Image *pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name( "gtk-go-down", Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *pIcon = Gtk::manage(sp_get_icon_image("gtk-go-down", Gtk::ICON_SIZE_BUTTON));
Gtk::Button *pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
@@ -216,8 +215,7 @@ Gtk::Widget* OriginalPathArrayParam::param_newWidget()
}
{ // Move Down
- Gtk::Image *pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name( "gtk-go-up", Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *pIcon = Gtk::manage(sp_get_icon_image("gtk-go-up", Gtk::ICON_SIZE_BUTTON));
Gtk::Button *pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index 52e1b62a6712189ea4ad165916c992295a3a3974..af553a0293582e524554cb497834196793ff0a6e 100644
--- a/src/live_effects/parameter/path.cpp
+++ b/src/live_effects/parameter/path.cpp
@@ -22,15 +22,15 @@
#include <2geom/pathvector.h>
#include <2geom/d2.h>
-#include "selection-chemistry.h"
-#include "xml/repr.h"
#include "desktop.h"
+#include "document-undo.h"
+#include "document.h"
+#include "helper/icon-loader.h"
#include "inkscape.h"
#include "message-stack.h"
+#include "selection-chemistry.h"
#include "verbs.h"
-#include "document.h"
-#include "document-undo.h"
-
+#include "xml/repr.h"
// needed for on-canvas editing:
#include "ui/tools-switch.h"
#include "ui/shape-editor.h"
@@ -201,8 +201,7 @@ PathParam::param_newWidget()
Gtk::Image * pIcon = nullptr;
Gtk::Button * pButton = nullptr;
if (_edit_button) {
- pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name( INKSCAPE_ICON("tool-node-editor"), Gtk::ICON_SIZE_BUTTON);
+ pIcon = Gtk::manage(sp_get_icon_image(INKSCAPE_ICON("tool-node-editor"), Gtk::ICON_SIZE_BUTTON));
pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
@@ -214,8 +213,7 @@ PathParam::param_newWidget()
}
if (_copy_button) {
- pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name( INKSCAPE_ICON("edit-copy"), Gtk::ICON_SIZE_BUTTON);
+ pIcon = Gtk::manage(sp_get_icon_image(INKSCAPE_ICON("edit-copy"), Gtk::ICON_SIZE_BUTTON));
pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
@@ -227,8 +225,7 @@ PathParam::param_newWidget()
}
if (_paste_button) {
- pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name( INKSCAPE_ICON("edit-paste"), Gtk::ICON_SIZE_BUTTON);
+ pIcon = Gtk::manage(sp_get_icon_image(INKSCAPE_ICON("edit-paste"), Gtk::ICON_SIZE_BUTTON));
pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
@@ -239,8 +236,7 @@ PathParam::param_newWidget()
pButton->set_tooltip_text(_("Paste path"));
}
if (_link_button) {
- pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name( INKSCAPE_ICON("edit-clone"), Gtk::ICON_SIZE_BUTTON);
+ pIcon = Gtk::manage(sp_get_icon_image(INKSCAPE_ICON("edit-clone"), Gtk::ICON_SIZE_BUTTON));
pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
diff --git a/src/live_effects/parameter/togglebutton.cpp b/src/live_effects/parameter/togglebutton.cpp
index 535e43dcf9735c349a54710ef2d40fcd10d57058..c92e1c437baa58535b383514ae53c43408ee88e9 100644
--- a/src/live_effects/parameter/togglebutton.cpp
+++ b/src/live_effects/parameter/togglebutton.cpp
@@ -10,14 +10,15 @@
#include
-#include "live_effects/parameter/togglebutton.h"
+#include "helper-fns.h"
+#include "helper/icon-loader.h"
+#include "inkscape.h"
#include "live_effects/effect.h"
-#include "svg/svg.h"
-#include "svg/stringstream.h"
+#include "live_effects/parameter/togglebutton.h"
#include "selection.h"
-#include "inkscape.h"
+#include "svg/stringstream.h"
+#include "svg/svg.h"
#include "verbs.h"
-#include "helper-fns.h"
namespace Inkscape {
@@ -110,10 +111,10 @@ ToggleButtonParam::param_newWidget()
}
gtk_widget_show(box_button);
GtkWidget *icon_button = nullptr;
- if(!value){
- icon_button = gtk_image_new_from_icon_name(_icon_inactive, _icon_size);
+ if (!value) {
+ icon_button = GTK_WIDGET(sp_get_icon_image(_icon_inactive, _icon_size));
} else {
- icon_button = gtk_image_new_from_icon_name(_icon_active, _icon_size);
+ icon_button = GTK_WIDGET(sp_get_icon_image(_icon_active, _icon_size));
}
gtk_widget_show(icon_button);
gtk_box_pack_start (GTK_BOX(box_button), icon_button, false, false, 1);
@@ -162,10 +163,10 @@ ToggleButtonParam::refresh_button()
Gtk::Image *im = dynamic_cast(children[0]);
Gtk::IconSize is(_icon_size);
if (!im) return;
- if(!value){
- im->set_from_icon_name(_icon_inactive, is);
+ if (!value) {
+ im = sp_get_icon_image(_icon_inactive, is);
} else {
- im->set_from_icon_name(_icon_active, is);
+ im = sp_get_icon_image(_icon_active, is);
}
}
}
diff --git a/src/svg-view-slideshow.cpp b/src/svg-view-slideshow.cpp
index 3bb80029215b65de3b8e4aa6821853c6a0500aa3..f5f8c41cac64baf5116a8cdc16c5a576133cd15d 100644
--- a/src/svg-view-slideshow.cpp
+++ b/src/svg-view-slideshow.cpp
@@ -38,6 +38,7 @@
#include
#include "document.h"
+#include "helper/icon-loader.h"
#include "ui/icon-names.h"
#include "ui/monitor.h"
#include "util/units.h"
@@ -100,29 +101,27 @@ void SPSlideShow::control_show()
_ctrlwin->add(*t);
auto btn_go_first = Gtk::manage(new Gtk::Button());
- auto img_go_first = Gtk::manage(new Gtk::Image());
- img_go_first->set_from_icon_name(INKSCAPE_ICON("go-first"), Gtk::ICON_SIZE_BUTTON);
+ auto img_go_first = Gtk::manage(sp_get_icon_image(INKSCAPE_ICON("go-first"), Gtk::ICON_SIZE_BUTTON));
btn_go_first->set_image(*img_go_first);
t->add(*btn_go_first);
btn_go_first->signal_clicked().connect(sigc::mem_fun(*this, &SPSlideShow::goto_first));
auto btn_go_prev = Gtk::manage(new Gtk::Button());
- auto img_go_prev = Gtk::manage(new Gtk::Image());
- img_go_prev->set_from_icon_name(INKSCAPE_ICON("go-previous"), Gtk::ICON_SIZE_BUTTON);
+ auto img_go_prev = Gtk::manage(sp_get_icon_image(INKSCAPE_ICON("go-previous"), Gtk::ICON_SIZE_BUTTON));
+
btn_go_prev->set_image(*img_go_prev);
t->add(*btn_go_prev);
btn_go_prev->signal_clicked().connect(sigc::mem_fun(*this, &SPSlideShow::show_prev));
auto btn_go_next = Gtk::manage(new Gtk::Button());
- auto img_go_next = Gtk::manage(new Gtk::Image());
- img_go_next->set_from_icon_name(INKSCAPE_ICON("go-next"), Gtk::ICON_SIZE_BUTTON);
+ auto img_go_next = Gtk::manage(sp_get_icon_image(INKSCAPE_ICON("go-next"), Gtk::ICON_SIZE_BUTTON));
+
btn_go_next->set_image(*img_go_next);
t->add(*btn_go_next);
btn_go_next->signal_clicked().connect(sigc::mem_fun(*this, &SPSlideShow::show_next));
auto btn_go_last = Gtk::manage(new Gtk::Button());
- auto img_go_last = Gtk::manage(new Gtk::Image());
- img_go_last->set_from_icon_name(INKSCAPE_ICON("go-last"), Gtk::ICON_SIZE_BUTTON);
+ auto img_go_last = Gtk::manage(sp_get_icon_image(INKSCAPE_ICON("go-last"), Gtk::ICON_SIZE_BUTTON));
btn_go_last->set_image(*img_go_last);
t->add(*btn_go_last);
btn_go_last->signal_clicked().connect(sigc::mem_fun(*this, &SPSlideShow::goto_last));
diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp
index 3d9a53951b684d2ae659d78dc15c0cb3722a403e..7ad8a5e185d95c42da0ced487829620106bfb31f 100644
--- a/src/ui/dialog/align-and-distribute.cpp
+++ b/src/ui/dialog/align-and-distribute.cpp
@@ -45,6 +45,7 @@
#include "object/sp-root.h"
#include "object/sp-text.h"
+#include "helper/icon-loader.h"
#include "ui/icon-names.h"
#include "ui/tool/control-point-selection.h"
#include "ui/tool/multi-path-manipulator.h"
@@ -68,7 +69,7 @@ Action::Action(Glib::ustring id,
_parent(parent)
{
Gtk::Image* pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name( _id, Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ pIcon = sp_get_icon_image(_id, Gtk::ICON_SIZE_LARGE_TOOLBAR);
Gtk::Button * pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp
index 9a4cd92ab09bb654f227ed2c5486bf49d9db1034..3cec380227152c7a98cd898a4c8e10ae57ba5838 100644
--- a/src/ui/dialog/clonetiler.cpp
+++ b/src/ui/dialog/clonetiler.cpp
@@ -43,6 +43,7 @@
#include "display/drawing-context.h"
#include "display/drawing.h"
+#include "helper/icon-loader.h"
#include "helper/window.h"
#include "object/sp-item.h"
@@ -2683,28 +2684,28 @@ GtkWidget * CloneTiler::table_x_y_rand(int values)
auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
- GtkWidget *i = gtk_image_new_from_icon_name (INKSCAPE_ICON("object-rows"), GTK_ICON_SIZE_MENU);
- gtk_box_pack_start (GTK_BOX (hb), i, FALSE, FALSE, 2);
+ GtkWidget *i = GTK_WIDGET(sp_get_icon_image(INKSCAPE_ICON("object-rows"), GTK_ICON_SIZE_MENU)->gobj());
+ gtk_box_pack_start(GTK_BOX(hb), i, FALSE, FALSE, 2);
- GtkWidget *l = gtk_label_new ("");
- gtk_label_set_markup (GTK_LABEL(l), _("Per row:"));
- gtk_box_pack_start (GTK_BOX (hb), l, FALSE, FALSE, 2);
+ GtkWidget *l = gtk_label_new("");
+ gtk_label_set_markup(GTK_LABEL(l), _("Per row:"));
+ gtk_box_pack_start(GTK_BOX(hb), l, FALSE, FALSE, 2);
- table_attach (table, hb, 0, 1, 2);
+ table_attach(table, hb, 0, 1, 2);
}
{
auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
- GtkWidget *i = gtk_image_new_from_icon_name (INKSCAPE_ICON("object-columns"), GTK_ICON_SIZE_MENU);
- gtk_box_pack_start (GTK_BOX (hb), i, FALSE, FALSE, 2);
+ GtkWidget *i = GTK_WIDGET(sp_get_icon_image(INKSCAPE_ICON("object-columns"), GTK_ICON_SIZE_MENU)->gobj());
+ gtk_box_pack_start(GTK_BOX(hb), i, FALSE, FALSE, 2);
- GtkWidget *l = gtk_label_new ("");
- gtk_label_set_markup (GTK_LABEL(l), _("Per column:"));
- gtk_box_pack_start (GTK_BOX (hb), l, FALSE, FALSE, 2);
+ GtkWidget *l = gtk_label_new("");
+ gtk_label_set_markup(GTK_LABEL(l), _("Per column:"));
+ gtk_box_pack_start(GTK_BOX(hb), l, FALSE, FALSE, 2);
- table_attach (table, hb, 0, 1, 3);
+ table_attach(table, hb, 0, 1, 3);
}
{
diff --git a/src/ui/dialog/cssdialog.cpp b/src/ui/dialog/cssdialog.cpp
index aa0198f2721d25392023df6c9f9cfba3c264a08d..901bcf36cc614123f03b32c0dbbb03f0d692e9df 100644
--- a/src/ui/dialog/cssdialog.cpp
+++ b/src/ui/dialog/cssdialog.cpp
@@ -16,6 +16,7 @@
#include "verbs.h"
#include "selection.h"
+#include "helper/icon-loader.h"
#include "ui/widget/addtoicon.h"
#include "xml/attribute-record.h"
@@ -123,7 +124,7 @@ void CssDialog::setDesktop(SPDesktop* desktop)
void CssDialog::_styleButton(Gtk::Button& btn, char const* iconName,
char const* tooltip)
{
- GtkWidget *child = gtk_image_new_from_icon_name(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ GtkWidget *child = GTK_WIDGET(sp_get_icon_image(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_widget_show(child);
btn.add(*manage(Glib::wrap(child)));
btn.set_relief(Gtk::RELIEF_NONE);
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 0b47f9bac74460ee2e91664a742976d0b0a1936e..39993bc0981e299e4227c6eb916c813fbb053fde 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -34,6 +34,7 @@
#include "object/sp-script.h"
#include "style.h"
+#include "helper/icon-loader.h"
#include "ui/dialog/filedialog.h"
#include "ui/icon-names.h"
#include "ui/shape-editor.h"
@@ -75,7 +76,7 @@ static Inkscape::XML::NodeEventVector const _repr_events = {
static void docprops_style_button(Gtk::Button& btn, char const* iconName)
{
- GtkWidget *child = gtk_image_new_from_icon_name(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ GtkWidget *child = GTK_WIDGET(sp_get_icon_image(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_widget_show( child );
btn.add(*Gtk::manage(Glib::wrap(child)));
btn.set_relief(Gtk::RELIEF_NONE);
@@ -1511,8 +1512,7 @@ DocumentProperties::_createPageTabLabel(const Glib::ustring& label, const char *
Gtk::HBox *_tab_label_box = Gtk::manage(new Gtk::HBox(false, 0));
_tab_label_box->set_spacing(4);
- auto img = Gtk::manage(new Gtk::Image());
- img->set_from_icon_name(label_image, Gtk::ICON_SIZE_MENU);
+ auto img = Gtk::manage(sp_get_icon_image(label_image, Gtk::ICON_SIZE_MENU));
_tab_label_box->pack_start(*img);
Gtk::Label *_tab_label = Gtk::manage(new Gtk::Label(label, true));
diff --git a/src/ui/dialog/fill-and-stroke.cpp b/src/ui/dialog/fill-and-stroke.cpp
index dd387c37e77b0cce45838bfd56e0ee293e044dd5..067749fa0629e532f4657fe365118f2905241217 100644
--- a/src/ui/dialog/fill-and-stroke.cpp
+++ b/src/ui/dialog/fill-and-stroke.cpp
@@ -26,6 +26,7 @@
#include "svg/css-ostringstream.h"
+#include "helper/icon-loader.h"
#include "ui/icon-names.h"
#include "ui/view/view-widget.h"
#include "ui/widget/notebook-page.h"
@@ -177,8 +178,7 @@ FillAndStroke::_createPageTabLabel(const Glib::ustring& label, const char *label
{
Gtk::HBox *_tab_label_box = Gtk::manage(new Gtk::HBox(false, 4));
- auto img = Gtk::manage(new Gtk::Image());
- img->set_from_icon_name(label_image, Gtk::ICON_SIZE_MENU);
+ auto img = Gtk::manage(sp_get_icon_image(label_image, Gtk::ICON_SIZE_MENU));
_tab_label_box->pack_start(*img);
Gtk::Label *_tab_label = Gtk::manage(new Gtk::Label(label, true));
diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp
index fe528d34d7fd9b61f1bc13f547b981e89b02a61d..bfd0e05e31da22781d5beeb32a598b6bf47cbb69 100644
--- a/src/ui/dialog/layers.cpp
+++ b/src/ui/dialog/layers.cpp
@@ -30,11 +30,13 @@
#include "verbs.h"
#include "helper/action.h"
+#include "helper/icon-loader.h"
#include "object/sp-root.h"
#include "svg/css-ostringstream.h"
+#include "helper/icon-loader.h"
#include "ui/icon-names.h"
#include "ui/tools/tool-base.h"
#include "ui/widget/imagetoggler.h"
@@ -85,7 +87,7 @@ void LayersPanel::_styleButton( Gtk::Button& btn, SPDesktop *desktop, unsigned i
bool set = false;
if ( iconName ) {
- GtkWidget *child = gtk_image_new_from_icon_name( iconName, GTK_ICON_SIZE_SMALL_TOOLBAR );
+ GtkWidget *child = GTK_WIDGET(sp_get_icon_image(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_widget_show( child );
btn.add( *Gtk::manage(Glib::wrap(child)) );
btn.set_relief(Gtk::RELIEF_NONE);
@@ -97,7 +99,7 @@ void LayersPanel::_styleButton( Gtk::Button& btn, SPDesktop *desktop, unsigned i
if ( verb ) {
SPAction *action = verb->get_action(Inkscape::ActionContext(desktop));
if ( !set && action && action->image ) {
- GtkWidget *child = gtk_image_new_from_icon_name( action->image, GTK_ICON_SIZE_SMALL_TOOLBAR );
+ GtkWidget *child = GTK_WIDGET(sp_get_icon_image(action->image, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_widget_show( child );
btn.add( *Gtk::manage(Glib::wrap(child)) );
set = true;
@@ -121,8 +123,7 @@ Gtk::MenuItem& LayersPanel::_addPopupItem( SPDesktop *desktop, unsigned int code
const char* label = nullptr;
if ( iconName ) {
- iconWidget = Gtk::manage(new Gtk::Image());
- iconWidget->set_from_icon_name( iconName, Gtk::ICON_SIZE_MENU );
+ iconWidget = Gtk::manage(sp_get_icon_image(iconName, Gtk::ICON_SIZE_MENU));
}
if ( desktop ) {
@@ -130,8 +131,7 @@ Gtk::MenuItem& LayersPanel::_addPopupItem( SPDesktop *desktop, unsigned int code
if ( verb ) {
SPAction *action = verb->get_action(Inkscape::ActionContext(desktop));
if ( !iconWidget && action && action->image ) {
- iconWidget = Gtk::manage(new Gtk::Image());
- iconWidget->set_from_icon_name( action->image, Gtk::ICON_SIZE_MENU );
+ iconWidget = Gtk::manage(sp_get_icon_image(action->image, Gtk::ICON_SIZE_MENU));
}
if ( action ) {
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp
index dd019cfbad284d0bbb1994718e49c5a75a0f77de..ccd71a171fb5b9cca4d5a2ef02b2c0a8f1d0401f 100644
--- a/src/ui/dialog/livepatheffect-editor.cpp
+++ b/src/ui/dialog/livepatheffect-editor.cpp
@@ -30,6 +30,7 @@
#include "verbs.h"
#include "helper/action.h"
+#include "helper/icon-loader.h"
#include "live_effects/effect.h"
#include "live_effects/lpeobject-reference.h"
@@ -73,7 +74,7 @@ void lpeeditor_selection_modified (Inkscape::Selection * selection, guint /*flag
static void lpe_style_button(Gtk::Button& btn, char const* iconName)
{
- GtkWidget *child = gtk_image_new_from_icon_name(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ GtkWidget *child = GTK_WIDGET(sp_get_icon_image(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_widget_show( child );
btn.add(*Gtk::manage(Glib::wrap(child)));
btn.set_relief(Gtk::RELIEF_NONE);
diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp
index 397f5690e4855e3489ffcc5fcd3c87abc89d2a86..2bcde597ffae23df73382630f379ba4402c3ff52 100644
--- a/src/ui/dialog/objects.cpp
+++ b/src/ui/dialog/objects.cpp
@@ -33,6 +33,7 @@
#include "verbs.h"
#include "helper/action.h"
+#include "helper/icon-loader.h"
#include "object/filters/blend.h"
#include "object/filters/gaussian-blur.h"
@@ -230,7 +231,7 @@ public:
*/
void ObjectsPanel::_styleButton(Gtk::Button& btn, char const* iconName, char const* tooltip)
{
- GtkWidget *child = gtk_image_new_from_icon_name( iconName, GTK_ICON_SIZE_SMALL_TOOLBAR );
+ GtkWidget *child = GTK_WIDGET(sp_get_icon_image(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_widget_show( child );
btn.add( *Gtk::manage(Glib::wrap(child)) );
btn.set_relief(Gtk::RELIEF_NONE);
@@ -252,8 +253,7 @@ Gtk::MenuItem& ObjectsPanel::_addPopupItem( SPDesktop *desktop, unsigned int cod
const char* label = nullptr;
if ( iconName ) {
- iconWidget = Gtk::manage(new Gtk::Image());
- iconWidget->set_from_icon_name( iconName, Gtk::ICON_SIZE_MENU );
+ iconWidget = Gtk::manage(sp_get_icon_image(iconName, Gtk::ICON_SIZE_MENU));
}
if ( desktop ) {
@@ -261,8 +261,7 @@ Gtk::MenuItem& ObjectsPanel::_addPopupItem( SPDesktop *desktop, unsigned int cod
if ( verb ) {
SPAction *action = verb->get_action(Inkscape::ActionContext(desktop));
if ( !iconWidget && action && action->image ) {
- iconWidget = Gtk::manage(new Gtk::Image());
- iconWidget->set_from_icon_name( action->image, Gtk::ICON_SIZE_MENU );
+ iconWidget = Gtk::manage(sp_get_icon_image(action->image, Gtk::ICON_SIZE_MENU));
}
if ( action ) {
diff --git a/src/ui/dialog/ocaldialogs.cpp b/src/ui/dialog/ocaldialogs.cpp
index 2c457b6d05b6586fdb628b4de06dec3a6ff46c87..ffa535b78e00cfc406e59aa2f802efef7a723b8e 100644
--- a/src/ui/dialog/ocaldialogs.cpp
+++ b/src/ui/dialog/ocaldialogs.cpp
@@ -18,12 +18,13 @@
#include "ocaldialogs.h"
-#include "path-prefix.h"
#include "filedialogimpl-gtkmm.h"
-#include "ui/interface.h"
+#include "helper/icon-loader.h"
#include "inkgc/gc-core.h"
#include "io/sys.h"
+#include "path-prefix.h"
#include "preferences.h"
+#include "ui/interface.h"
#include
#include
@@ -462,8 +463,7 @@ bool PreviewWidget::_on_draw(const Cairo::RefPtr& cr)
StatusWidget::StatusWidget() : Gtk::HBox(false, 6)
{
- image = new Gtk::Image();
- image->set_from_icon_name("dialog-error", Gtk::ICON_SIZE_MENU);
+ image = sp_get_icon_image("dialog-error", Gtk::ICON_SIZE_MENU);
spinner = new Gtk::Spinner();
label = new Gtk::Label();
@@ -488,7 +488,7 @@ void StatusWidget::set_info(Glib::ustring text)
spinner->hide();
image->show();
label->show();
- image->set_from_icon_name("dialog-information", Gtk::ICON_SIZE_MENU);
+ image = sp_get_icon_image("dialog-information", Gtk::ICON_SIZE_MENU);
label->set_text(text);
}
@@ -497,7 +497,7 @@ void StatusWidget::set_error(Glib::ustring text)
spinner->hide();
image->show();
label->show();
- image->set_from_icon_name("dialog-error", Gtk::ICON_SIZE_MENU);
+ image = sp_get_icon_image("dialog-error", Gtk::ICON_SIZE_MENU);
label->set_text(text);
}
diff --git a/src/ui/dialog/styledialog.cpp b/src/ui/dialog/styledialog.cpp
index 9171dd9cec94ee49ae684df147cb5142a80474e7..e978667efcf75b0cf6196af04f15fa2efb24da5f 100644
--- a/src/ui/dialog/styledialog.cpp
+++ b/src/ui/dialog/styledialog.cpp
@@ -18,7 +18,7 @@
#include "inkscape.h"
#include "document-undo.h"
-
+#include "helper/icon-loader.h"
#include "ui/widget/addtoicon.h"
#include "xml/attribute-record.h"
@@ -1518,7 +1518,7 @@ bool StyleDialog::_delProperty(GdkEventButton *event)
void StyleDialog::_styleButton(Gtk::Button& btn, char const* iconName,
char const* tooltip)
{
- GtkWidget *child = gtk_image_new_from_icon_name(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ GtkWidget *child = GTK_WIDGET(sp_get_icon_image(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_widget_show(child);
btn.add(*manage(Glib::wrap(child)));
btn.set_relief(Gtk::RELIEF_NONE);
diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp
index 578562a79b9720fdad7c6c285cf26c4a94d4594f..cc5434318f3cffd3ac139f37b07352c6bd1dc06c 100644
--- a/src/ui/dialog/symbols.cpp
+++ b/src/ui/dialog/symbols.cpp
@@ -28,6 +28,7 @@
#include "io/resource.h"
#include "display/cairo-utils.h"
+#include "helper/icon-loader.h"
#include "ui/cache/svg_preview_cache.h"
#include "ui/clipboard.h"
#include "ui/icon-names.h"
@@ -272,8 +273,7 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
scroller->set_hexpand();
table->attach(*Gtk::manage(tools),0,row,2,1);
- auto add_symbol_image = Gtk::manage(new Gtk::Image());
- add_symbol_image->set_from_icon_name("symbol-add", Gtk::ICON_SIZE_SMALL_TOOLBAR);
+ auto add_symbol_image = Gtk::manage(sp_get_icon_image("symbol-add", Gtk::ICON_SIZE_SMALL_TOOLBAR));
add_symbol = Gtk::manage(new Gtk::Button());
add_symbol->add(*add_symbol_image);
@@ -283,8 +283,7 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
add_symbol->signal_clicked().connect(sigc::mem_fun(*this, &SymbolsDialog::insertSymbol));
tools->pack_start(* add_symbol, Gtk::PACK_SHRINK);
- auto remove_symbolImage = Gtk::manage(new Gtk::Image());
- remove_symbolImage->set_from_icon_name("symbol-remove", Gtk::ICON_SIZE_SMALL_TOOLBAR);
+ auto remove_symbolImage = Gtk::manage(sp_get_icon_image("symbol-remove", Gtk::ICON_SIZE_SMALL_TOOLBAR));
remove_symbol = Gtk::manage(new Gtk::Button());
remove_symbol->add(*remove_symbolImage);
@@ -300,8 +299,7 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
// Pack size (controls display area)
pack_size = 2; // Default 32px
- auto packMoreImage = Gtk::manage(new Gtk::Image());
- packMoreImage->set_from_icon_name("pack-more", Gtk::ICON_SIZE_SMALL_TOOLBAR);
+ auto packMoreImage = Gtk::manage(sp_get_icon_image("pack-more", Gtk::ICON_SIZE_SMALL_TOOLBAR));
more = Gtk::manage(new Gtk::Button());
more->add(*packMoreImage);
@@ -311,8 +309,7 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
more->signal_clicked().connect(sigc::mem_fun(*this, &SymbolsDialog::packmore));
tools->pack_start(* more, Gtk::PACK_SHRINK);
- auto packLessImage = Gtk::manage(new Gtk::Image());
- packLessImage->set_from_icon_name("pack-less", Gtk::ICON_SIZE_SMALL_TOOLBAR);
+ auto packLessImage = Gtk::manage(sp_get_icon_image("pack-less", Gtk::ICON_SIZE_SMALL_TOOLBAR));
fewer = Gtk::manage(new Gtk::Button());
fewer->add(*packLessImage);
@@ -323,8 +320,7 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
tools->pack_start(* fewer, Gtk::PACK_SHRINK);
// Toggle scale to fit on/off
- auto fit_symbolImage = Gtk::manage(new Gtk::Image());
- fit_symbolImage->set_from_icon_name("symbol-fit", Gtk::ICON_SIZE_SMALL_TOOLBAR);
+ auto fit_symbolImage = Gtk::manage(sp_get_icon_image("symbol-fit", Gtk::ICON_SIZE_SMALL_TOOLBAR));
fit_symbol = Gtk::manage(new Gtk::ToggleButton());
fit_symbol->add(*fit_symbolImage);
@@ -337,8 +333,7 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
// Render size (scales symbols within display area)
scale_factor = 0; // Default 1:1 * pack_size/pack_size default
- auto zoom_outImage = Gtk::manage(new Gtk::Image());
- zoom_outImage->set_from_icon_name("symbol-smaller", Gtk::ICON_SIZE_SMALL_TOOLBAR);
+ auto zoom_outImage = Gtk::manage(sp_get_icon_image("symbol-smaller", Gtk::ICON_SIZE_SMALL_TOOLBAR));
zoom_out = Gtk::manage(new Gtk::Button());
zoom_out->add(*zoom_outImage);
@@ -349,8 +344,7 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
zoom_out->signal_clicked().connect(sigc::mem_fun(*this, &SymbolsDialog::zoomout));
tools->pack_start(* zoom_out, Gtk::PACK_SHRINK);
- auto zoom_inImage = Gtk::manage(new Gtk::Image());
- zoom_inImage->set_from_icon_name("symbol-bigger", Gtk::ICON_SIZE_SMALL_TOOLBAR);
+ auto zoom_inImage = Gtk::manage(sp_get_icon_image("symbol-bigger", Gtk::ICON_SIZE_SMALL_TOOLBAR));
zoom_in = Gtk::manage(new Gtk::Button());
zoom_in->add(*zoom_inImage);
@@ -471,20 +465,24 @@ void SymbolsDialog::rebuild() {
void SymbolsDialog::showOverlay() {
#if GTKMM_CHECK_VERSION(3,14,0)
Glib::ustring current = Glib::Markup::escape_text(symbol_set->get_active_text());
- overlay_icon->set_from_icon_name("none", iconsize);
+ overlay_icon = sp_get_icon_image("none", iconsize);
if (current == ALLDOCS && !l.size())
{
if (!all_docs_processed ) {
- overlay_icon->set_from_icon_name("searching", iconsize);
- overlay_title->set_markup(Glib::ustring("") + Glib::ustring(_("Search in all symbol sets...")) + Glib::ustring(""));
- overlay_desc->set_markup(Glib::ustring("") + Glib::ustring(_("First search can be slow.")) + Glib::ustring(""));
+ overlay_icon = sp_get_icon_image("searching", iconsize);
+ overlay_title->set_markup(Glib::ustring("") +
+ Glib::ustring(_("Search in all symbol sets...")) + Glib::ustring(""));
+ overlay_desc->set_markup(Glib::ustring("") +
+ Glib::ustring(_("First search can be slow.")) + Glib::ustring(""));
} else if (!icons_found && !search_str.empty()) {
overlay_title->set_markup(Glib::ustring("") + Glib::ustring(_("No results found")) + Glib::ustring(""));
overlay_desc->set_markup(Glib::ustring("") + Glib::ustring(_("Try a different search term.")) + Glib::ustring(""));
} else {
- overlay_icon->set_from_icon_name("searching", iconsize);
- overlay_title->set_markup(Glib::ustring("") + Glib::ustring(_("Search in all symbol sets...")) + Glib::ustring(""));
- overlay_desc->set_markup(Glib::ustring("") + Glib::ustring(""));
+ overlay_icon = sp_get_icon_image("searching", iconsize);
+ overlay_title->set_markup(Glib::ustring("") +
+ Glib::ustring(_("Search in all symbol sets...")) + Glib::ustring(""));
+ overlay_desc->set_markup(Glib::ustring("") +
+ Glib::ustring(""));
}
} else if (!number_symbols && (current != CURRENTDOC || !search_str.empty())) {
overlay_title->set_markup(Glib::ustring("") + Glib::ustring(_("No results found")) + Glib::ustring(""));
diff --git a/src/ui/dialog/tags.cpp b/src/ui/dialog/tags.cpp
index ed8c00c611f151594f002673818b0a6aa54e4edb..d27a320a775124963304eafc45a0e953f6a53d8a 100644
--- a/src/ui/dialog/tags.cpp
+++ b/src/ui/dialog/tags.cpp
@@ -18,21 +18,23 @@
#include
#include
-#include "desktop.h"
#include "desktop-style.h"
-#include "document.h"
+#include "desktop.h"
#include "document-undo.h"
+#include "document.h"
#include "helper/action.h"
+#include "helper/icon-loader.h"
#include "inkscape.h"
#include "layer-fns.h"
#include "layer-manager.h"
+#include "helper/icon-loader.h"
#include "svg/css-ostringstream.h"
-#include "ui/widget/layertypeicon.h"
+#include "ui/tools/tool-base.h" //"event-context.h"
#include "ui/widget/addtoicon.h"
+#include "ui/widget/layertypeicon.h"
#include "verbs.h"
#include "xml/node-observer.h"
-#include "ui/tools/tool-base.h" //"event-context.h"
//#include "dialogs/dialog-events.h"
#include "ui/widget/color-notebook.h"
#include "filter-chemistry.h"
@@ -125,7 +127,7 @@ public:
void TagsPanel::_styleButton(Gtk::Button& btn, char const* iconName, char const* tooltip)
{
- GtkWidget *child = gtk_image_new_from_icon_name(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ GtkWidget *child = GTK_WIDGET(sp_get_icon_image(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_widget_show(child);
btn.add(*manage(Glib::wrap(child)));
btn.set_relief(Gtk::RELIEF_NONE);
@@ -139,7 +141,7 @@ Gtk::MenuItem& TagsPanel::_addPopupItem( SPDesktop *desktop, unsigned int code,
const char* label = nullptr;
if ( iconName ) {
- iconWidget = gtk_image_new_from_icon_name( iconName, GTK_ICON_SIZE_MENU );
+ iconWidget = GTK_WIDGET(sp_get_icon_image(iconName, GTK_ICON_SIZE_MENU)->gobj());
}
if ( desktop ) {
@@ -147,7 +149,7 @@ Gtk::MenuItem& TagsPanel::_addPopupItem( SPDesktop *desktop, unsigned int code,
if ( verb ) {
SPAction *action = verb->get_action(desktop);
if ( !iconWidget && action && action->image ) {
- iconWidget = gtk_image_new_from_icon_name( action->image, GTK_ICON_SIZE_MENU );
+ iconWidget = GTK_WIDGET(sp_get_icon_image(action->image, GTK_ICON_SIZE_MENU)->gobj());
}
if ( action ) {
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp
index 9a0e4ddf4076d03ab2801a70b4bb5d945e2eeab2..14ddc90440e468229ba825854d1dce5e0347a1c9 100644
--- a/src/ui/dialog/transformation.cpp
+++ b/src/ui/dialog/transformation.cpp
@@ -29,6 +29,7 @@
#include "transformation.h"
#include "verbs.h"
+#include "helper/icon-loader.h"
#include "object/sp-item-transform.h"
#include "object/sp-namedview.h"
@@ -280,16 +281,14 @@ void Transformation::layoutPageRotate()
_scalar_rotate.setDigits(3);
_scalar_rotate.setIncrements(0.1, 1.0);
- auto object_rotate_left_icon = Gtk::manage(new Gtk::Image());
- object_rotate_left_icon->set_from_icon_name("object-rotate-left", Gtk::ICON_SIZE_SMALL_TOOLBAR);
+ auto object_rotate_left_icon = Gtk::manage(sp_get_icon_image("object-rotate-left", Gtk::ICON_SIZE_SMALL_TOOLBAR));
_counterclockwise_rotate.add(*object_rotate_left_icon);
_counterclockwise_rotate.set_mode(false);
_counterclockwise_rotate.set_relief(Gtk::RELIEF_NONE);
_counterclockwise_rotate.set_tooltip_text(_("Rotate in a counterclockwise direction"));
- auto object_rotate_right_icon = Gtk::manage(new Gtk::Image());
- object_rotate_right_icon->set_from_icon_name("object-rotate-right", Gtk::ICON_SIZE_SMALL_TOOLBAR);
+ auto object_rotate_right_icon = Gtk::manage(sp_get_icon_image("object-rotate-right", Gtk::ICON_SIZE_SMALL_TOOLBAR));
_clockwise_rotate.add(*object_rotate_right_icon);
_clockwise_rotate.set_mode(false);
diff --git a/src/ui/dialog/undo-history.cpp b/src/ui/dialog/undo-history.cpp
index e95724435236f01a4106821848cc41f83921a629..c480624fd6314e8bbde1a31e78f631d0311fb071 100644
--- a/src/ui/dialog/undo-history.cpp
+++ b/src/ui/dialog/undo-history.cpp
@@ -17,14 +17,14 @@
#include "undo-history.h"
-#include "document.h"
#include "document-undo.h"
+#include "document.h"
+#include "helper/icon-loader.h"
#include "inkscape.h"
-
#include "util/signal-blocker.h"
#include "desktop.h"
-#include
+
namespace Inkscape {
namespace UI {
@@ -45,14 +45,13 @@ void CellRendererSPIcon::render_vfunc(const Cairo::RefPtr& cr,
Glib::ustring image_name = Inkscape::Verb::get(_property_event_type)->get_image();
Gtk::Image* icon = Gtk::manage(new Gtk::Image());
- icon->set_from_icon_name(image_name, Gtk::ICON_SIZE_MENU);
+ icon = sp_get_icon_image(image_name, Gtk::ICON_SIZE_MENU);
if (icon) {
// check icon type (inkscape, gtk, none)
if ( GTK_IS_IMAGE(icon->gobj()) ) {
- auto icon_theme = Gtk::IconTheme::get_default();
- _property_icon = icon_theme->load_icon(image_name, 16);
+ _property_icon = sp_get_icon_pixbuf(image_name, 16);
} else {
delete icon;
return;
diff --git a/src/ui/dialog/xml-tree.cpp b/src/ui/dialog/xml-tree.cpp
index c7c5424ebcbbba3ef3165011aa9ff5fb6e3197ac..647e0beedb2ab818562b24c6d7852ff8640b2781 100644
--- a/src/ui/dialog/xml-tree.cpp
+++ b/src/ui/dialog/xml-tree.cpp
@@ -35,6 +35,7 @@
#include "object/sp-root.h"
#include "object/sp-string.h"
+#include "helper/icon-loader.h"
#include "ui/dialog-events.h"
#include "ui/icon-names.h"
#include "ui/interface.h"
@@ -113,24 +114,21 @@ XmlTree::XmlTree() :
tree_toolbar.set_toolbar_style(Gtk::TOOLBAR_ICONS);
- auto xml_element_new_icon = Gtk::manage(new Gtk::Image());
- xml_element_new_icon->set_from_icon_name("xml-element-new", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ auto xml_element_new_icon = Gtk::manage(sp_get_icon_image("xml-element-new", Gtk::ICON_SIZE_LARGE_TOOLBAR));
xml_element_new_button.set_icon_widget(*xml_element_new_icon);
xml_element_new_button.set_tooltip_text(_("New element node"));
xml_element_new_button.set_sensitive(false);
tree_toolbar.add(xml_element_new_button);
- auto xml_text_new_icon = Gtk::manage(new Gtk::Image());
- xml_text_new_icon->set_from_icon_name("xml-text-new", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ auto xml_text_new_icon = Gtk::manage(sp_get_icon_image("xml-text-new", Gtk::ICON_SIZE_LARGE_TOOLBAR));
xml_text_new_button.set_icon_widget(*xml_text_new_icon);
xml_text_new_button.set_tooltip_text(_("New text node"));
xml_text_new_button.set_sensitive(false);
tree_toolbar.add(xml_text_new_button);
- auto xml_node_duplicate_icon = Gtk::manage(new Gtk::Image());
- xml_node_duplicate_icon->set_from_icon_name("xml-node-duplicate", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ auto xml_node_duplicate_icon = Gtk::manage(sp_get_icon_image("xml-node-duplicate", Gtk::ICON_SIZE_LARGE_TOOLBAR));
xml_node_duplicate_button.set_icon_widget(*xml_node_duplicate_icon);
xml_node_duplicate_button.set_tooltip_text(_("Duplicate node"));
@@ -139,8 +137,7 @@ XmlTree::XmlTree() :
tree_toolbar.add(separator);
- auto xml_node_delete_icon = Gtk::manage(new Gtk::Image());
- xml_node_delete_icon->set_from_icon_name("xml-node-delete", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ auto xml_node_delete_icon = Gtk::manage(sp_get_icon_image("xml-node-delete", Gtk::ICON_SIZE_LARGE_TOOLBAR));
xml_node_delete_button.set_icon_widget(*xml_node_delete_icon);
xml_node_delete_button.set_tooltip_text(Q_("nodeAsInXMLdialogTooltip|Delete node"));
@@ -149,8 +146,7 @@ XmlTree::XmlTree() :
tree_toolbar.add(separator2);
- auto format_indent_less_icon = Gtk::manage(new Gtk::Image());
- format_indent_less_icon->set_from_icon_name("format-indent-less", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ auto format_indent_less_icon = Gtk::manage(sp_get_icon_image("format-indent-less", Gtk::ICON_SIZE_LARGE_TOOLBAR));
unindent_node_button.set_icon_widget(*format_indent_less_icon);
unindent_node_button.set_label(_("Unindent node"));
@@ -158,8 +154,7 @@ XmlTree::XmlTree() :
unindent_node_button.set_sensitive(false);
tree_toolbar.add(unindent_node_button);
- auto format_indent_more_icon = Gtk::manage(new Gtk::Image());
- format_indent_more_icon->set_from_icon_name("format-indent-more", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ auto format_indent_more_icon = Gtk::manage(sp_get_icon_image("format-indent-more", Gtk::ICON_SIZE_LARGE_TOOLBAR));
indent_node_button.set_icon_widget(*format_indent_more_icon);
indent_node_button.set_label(_("Indent node"));
@@ -167,8 +162,7 @@ XmlTree::XmlTree() :
indent_node_button.set_sensitive(false);
tree_toolbar.add(indent_node_button);
- auto go_up_icon = Gtk::manage(new Gtk::Image());
- go_up_icon->set_from_icon_name("go-up", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ auto go_up_icon = Gtk::manage(sp_get_icon_image("go-up", Gtk::ICON_SIZE_LARGE_TOOLBAR));
raise_node_button.set_icon_widget(*go_up_icon);
raise_node_button.set_label(_("Raise node"));
@@ -176,8 +170,7 @@ XmlTree::XmlTree() :
raise_node_button.set_sensitive(false);
tree_toolbar.add(raise_node_button);
- auto go_down_icon = Gtk::manage(new Gtk::Image());
- go_down_icon->set_from_icon_name("go-down", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ auto go_down_icon = Gtk::manage(sp_get_icon_image("go-down", Gtk::ICON_SIZE_LARGE_TOOLBAR));
lower_node_button.set_icon_widget(*go_down_icon);
lower_node_button.set_label(_("Lower node"));
@@ -204,8 +197,8 @@ XmlTree::XmlTree() :
attr_toolbar.set_toolbar_style(Gtk::TOOLBAR_ICONS);
- auto xml_attribute_delete_icon = Gtk::manage(new Gtk::Image());
- xml_attribute_delete_icon->set_from_icon_name("xml-attribute-delete", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ auto xml_attribute_delete_icon =
+ Gtk::manage(sp_get_icon_image("xml-attribute-delete", Gtk::ICON_SIZE_LARGE_TOOLBAR));
xml_attribute_delete_button.set_icon_widget(*xml_attribute_delete_icon);
xml_attribute_delete_button.set_tooltip_text(_("Delete attribute"));
xml_attribute_delete_button.set_sensitive(false);
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index 7e64e876bcfc83e34225c9879aaf13c8d3b37938..edfc02823dc97117064c44bdf9a55497c34f2d62 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -51,6 +51,7 @@
#include "extension/input.h"
#include "helper/action.h"
+#include "helper/icon-loader.h"
#include "helper/window.h"
#include "io/sys.h"
diff --git a/src/ui/widget/addtoicon.cpp b/src/ui/widget/addtoicon.cpp
index e5119fc609a4985f7cba59111036f2dd055971f0..4542333b59e6f944a74a225976a34e6ad29ef990 100644
--- a/src/ui/widget/addtoicon.cpp
+++ b/src/ui/widget/addtoicon.cpp
@@ -14,11 +14,10 @@
#include "ui/widget/addtoicon.h"
-#include
-
-#include "widgets/toolbox.h"
-#include "ui/icon-names.h"
+#include "helper/icon-loader.h"
#include "layertypeicon.h"
+#include "ui/icon-names.h"
+#include "widgets/toolbox.h"
namespace Inkscape {
namespace UI {
@@ -33,9 +32,6 @@ AddToIcon::AddToIcon() :
{
property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
- gint width, height;
- gtk_icon_size_lookup(GTK_ICON_SIZE_BUTTON, &width, &height);
- phys = width; // Assumes that we have a square icon?
// Glib::RefPtr icon_theme = Gtk::IconTheme::get_default();
//
@@ -103,11 +99,7 @@ bool AddToIcon::activate_vfunc(GdkEvent* /*event*/,
void AddToIcon::set_pixbuf()
{
bool active = property_active().get_value();
-
- auto icon_theme = Gtk::IconTheme::get_default();
-
- property_pixbuf() = icon_theme->load_icon(active ? "list-add" : "edit-delete",
- phys);
+ property_pixbuf() = sp_get_icon_pixbuf((active ? "list-add" : "edit-delete"), GTK_ICON_SIZE_BUTTON);
}
diff --git a/src/ui/widget/addtoicon.h b/src/ui/widget/addtoicon.h
index 60c773e84814b41940f60dc95656eaa2756ac5a1..c17ae907a155f02c88dbd5a805b3e8f45c3dd99a 100644
--- a/src/ui/widget/addtoicon.h
+++ b/src/ui/widget/addtoicon.h
@@ -54,7 +54,6 @@ protected:
private:
- int phys; ///< Physical size of the icon (px)
// Glib::ustring _pixAddName;
diff --git a/src/ui/widget/alignment-selector.cpp b/src/ui/widget/alignment-selector.cpp
index c6c95f097b25711ccf7b8b917a2c7f2ae2665eb6..9256a08bd02c3a6b2719b2d4934fa793e2db4216 100644
--- a/src/ui/widget/alignment-selector.cpp
+++ b/src/ui/widget/alignment-selector.cpp
@@ -5,6 +5,7 @@
*/
#include "ui/widget/alignment-selector.h"
+#include "helper/icon-loader.h"
#include "ui/icon-names.h"
#include
@@ -14,8 +15,7 @@ namespace UI {
namespace Widget {
void AlignmentSelector::setupButton(const Glib::ustring& icon, Gtk::Button& button) {
- Gtk::Image* buttonIcon = Gtk::manage(new Gtk::Image());
- buttonIcon->set_from_icon_name(icon, Gtk::ICON_SIZE_SMALL_TOOLBAR);
+ Gtk::Image *buttonIcon = Gtk::manage(sp_get_icon_image(icon, Gtk::ICON_SIZE_SMALL_TOOLBAR));
buttonIcon->show();
button.set_relief(Gtk::RELIEF_NONE);
diff --git a/src/ui/widget/anchor-selector.cpp b/src/ui/widget/anchor-selector.cpp
index 52768b7f1503a85fe40dd9dd265101237d77cb47..cecc571ab14e8249ecbd72cfa7b21a4122b86016 100644
--- a/src/ui/widget/anchor-selector.cpp
+++ b/src/ui/widget/anchor-selector.cpp
@@ -6,8 +6,8 @@
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
-
#include "ui/widget/anchor-selector.h"
+#include "helper/icon-loader.h"
#include "ui/icon-names.h"
#include
@@ -17,14 +17,13 @@ namespace UI {
namespace Widget {
void AnchorSelector::setupButton(const Glib::ustring& icon, Gtk::ToggleButton& button) {
- Gtk::Image* buttonIcon = Gtk::manage(new Gtk::Image());
- buttonIcon->set_from_icon_name(icon, Gtk::ICON_SIZE_SMALL_TOOLBAR);
- buttonIcon->show();
+ Gtk::Image *buttonIcon = Gtk::manage(sp_get_icon_image(icon, Gtk::ICON_SIZE_SMALL_TOOLBAR));
+ buttonIcon->show();
- button.set_relief(Gtk::RELIEF_NONE);
- button.show();
- button.add(*buttonIcon);
- button.set_can_focus(false);
+ button.set_relief(Gtk::RELIEF_NONE);
+ button.show();
+ button.add(*buttonIcon);
+ button.set_can_focus(false);
}
AnchorSelector::AnchorSelector()
diff --git a/src/ui/widget/clipmaskicon.cpp b/src/ui/widget/clipmaskicon.cpp
index 509e218a99c6d6a399135f921fa507d77d1e5cee..704b5c653c1d9d05525a1c51584d673e094f2bbf 100644
--- a/src/ui/widget/clipmaskicon.cpp
+++ b/src/ui/widget/clipmaskicon.cpp
@@ -13,11 +13,10 @@
#include "ui/widget/clipmaskicon.h"
-#include
-
-#include "widgets/toolbox.h"
-#include "ui/icon-names.h"
+#include "helper/icon-loader.h"
#include "layertypeicon.h"
+#include "ui/icon-names.h"
+#include "widgets/toolbox.h"
namespace Inkscape {
namespace UI {
@@ -37,14 +36,9 @@ ClipMaskIcon::ClipMaskIcon() :
property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
- gint width, height;
- gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
- phys = width;
-
- Glib::RefPtr icon_theme = Gtk::IconTheme::get_default();
- _property_pixbuf_clip = icon_theme->load_icon(_pixClipName, phys, (Gtk::IconLookupFlags)0);
- _property_pixbuf_mask = icon_theme->load_icon(_pixMaskName, phys, (Gtk::IconLookupFlags)0);
- _property_pixbuf_both = icon_theme->load_icon(_pixBothName, phys, (Gtk::IconLookupFlags)0);
+ _property_pixbuf_clip = sp_get_icon_pixbuf(_pixClipName, GTK_ICON_SIZE_MENU);
+ _property_pixbuf_mask = sp_get_icon_pixbuf(_pixMaskName, GTK_ICON_SIZE_MENU);
+ _property_pixbuf_both = sp_get_icon_pixbuf(_pixBothName, GTK_ICON_SIZE_MENU);
property_pixbuf() = Glib::RefPtr(nullptr);
}
diff --git a/src/ui/widget/color-notebook.cpp b/src/ui/widget/color-notebook.cpp
index 5b0f12e51a16f8b4f9d801d4a7ec65f48acaceaa..2d8dcc310577d898b2347ef9dc0f97b1952e9779 100644
--- a/src/ui/widget/color-notebook.cpp
+++ b/src/ui/widget/color-notebook.cpp
@@ -30,6 +30,7 @@
#include "preferences.h"
#include "profile-manager.h"
+#include "helper/icon-loader.h"
#include "object/color-profile.h"
#include "svg/svg-icc-color.h"
@@ -159,21 +160,22 @@ void ColorNotebook::_initUI()
#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
/* Create color management icons */
_box_colormanaged = gtk_event_box_new();
- GtkWidget *colormanaged = gtk_image_new_from_icon_name("color-management-icon", GTK_ICON_SIZE_SMALL_TOOLBAR);
+ GtkWidget *colormanaged =
+ GTK_WIDGET(sp_get_icon_image("color-management-icon", GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_container_add(GTK_CONTAINER(_box_colormanaged), colormanaged);
gtk_widget_set_tooltip_text(_box_colormanaged, _("Color Managed"));
gtk_widget_set_sensitive(_box_colormanaged, false);
gtk_box_pack_start(GTK_BOX(rgbabox), _box_colormanaged, FALSE, FALSE, 2);
_box_outofgamut = gtk_event_box_new();
- GtkWidget *outofgamut = gtk_image_new_from_icon_name("out-of-gamut-icon", GTK_ICON_SIZE_SMALL_TOOLBAR);
+ GtkWidget *outofgamut = GTK_WIDGET(sp_get_icon_image("out-of-gamut-icon", GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_container_add(GTK_CONTAINER(_box_outofgamut), outofgamut);
gtk_widget_set_tooltip_text(_box_outofgamut, _("Out of gamut!"));
gtk_widget_set_sensitive(_box_outofgamut, false);
gtk_box_pack_start(GTK_BOX(rgbabox), _box_outofgamut, FALSE, FALSE, 2);
_box_toomuchink = gtk_event_box_new();
- GtkWidget *toomuchink = gtk_image_new_from_icon_name("too-much-ink-icon", GTK_ICON_SIZE_SMALL_TOOLBAR);
+ GtkWidget *toomuchink = GTK_WIDGET(sp_get_icon_image("too-much-ink-icon", GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_container_add(GTK_CONTAINER(_box_toomuchink), toomuchink);
gtk_widget_set_tooltip_text(_box_toomuchink, _("Too much ink!"));
gtk_widget_set_sensitive(_box_toomuchink, false);
@@ -182,7 +184,7 @@ void ColorNotebook::_initUI()
/* Color picker */
- GtkWidget *picker = gtk_image_new_from_icon_name("color-picker", GTK_ICON_SIZE_SMALL_TOOLBAR);
+ GtkWidget *picker = GTK_WIDGET(sp_get_icon_image("color-picker", GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
_btn_picker = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(_btn_picker), GTK_RELIEF_NONE);
gtk_container_add(GTK_CONTAINER(_btn_picker), picker);
diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp
index 7cd841d882c749f6f11b89329293e1215fe6a164..c85abd6de8b28ab7be4e1996cde9b7fe93fea6fd 100644
--- a/src/ui/widget/dock-item.cpp
+++ b/src/ui/widget/dock-item.cpp
@@ -10,11 +10,11 @@
#include "ui/widget/dock.h"
#include "desktop.h"
+#include "helper/icon-loader.h"
#include "inkscape.h"
#include "ui/icon-names.h"
-
-#include
#include
+#include
namespace Inkscape {
namespace UI {
@@ -31,6 +31,7 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l
_grab_focus_on_realize(false),
_gdl_dock_item(nullptr)
{
+
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
GdlDockItemBehavior gdl_dock_behavior =
(prefs->getBool("/options/dock/cancenterdock", true) ?
@@ -39,17 +40,7 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l
if (!icon_name.empty()) {
- Glib::RefPtr iconTheme = Gtk::IconTheme::get_default();
-
- int width = 0;
- int height = 0;
- Gtk::IconSize::lookup(Gtk::ICON_SIZE_MENU, width, height);
- try {
- _icon_pixbuf = iconTheme->load_icon(icon_name, width);
- }
- catch (const Gtk::IconThemeError& e) {
- std::cerr << "DocItem::DocItem(): " << e.what() << std::endl;
- }
+ _icon_pixbuf = sp_get_icon_pixbuf(icon_name, "/toolbox/secondary");
}
if ( _icon_pixbuf ) {
diff --git a/src/ui/widget/imagetoggler.cpp b/src/ui/widget/imagetoggler.cpp
index 1200144f120e3d3c1212a8a3d2fe5038ca2efc8f..76b48fbbe1500eaab073e2eed03161bbe3685667 100644
--- a/src/ui/widget/imagetoggler.cpp
+++ b/src/ui/widget/imagetoggler.cpp
@@ -11,10 +11,9 @@
#include "ui/widget/imagetoggler.h"
-#include
-
-#include "widgets/toolbox.h"
+#include "helper/icon-loader.h"
#include "ui/icon-names.h"
+#include "widgets/toolbox.h"
#include
@@ -34,18 +33,8 @@ ImageToggler::ImageToggler( char const* on, char const* off) :
{
property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
- gint width, height;
- gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
- int phys = width;
-
- Glib::RefPtr icon_theme = Gtk::IconTheme::get_default();
- try {
- _property_pixbuf_on = icon_theme->load_icon(_pixOnName, phys, (Gtk::IconLookupFlags)0);
- _property_pixbuf_off = icon_theme->load_icon(_pixOffName, phys, (Gtk::IconLookupFlags)0);
- }
- catch (const Gtk::IconThemeError& e) {
- std::cerr << "ImageToggler::ImageToggler(): " << e.what() << std::endl;
- }
+ _property_pixbuf_on = sp_get_icon_pixbuf(_pixOnName, GTK_ICON_SIZE_MENU);
+ _property_pixbuf_off = sp_get_icon_pixbuf(_pixOffName, GTK_ICON_SIZE_MENU);
property_pixbuf() = _property_pixbuf_off.get_value();
}
diff --git a/src/ui/widget/insertordericon.cpp b/src/ui/widget/insertordericon.cpp
index d402aca37fc5d4653494fff8d04635c018b74bb5..1343786a128e7a6ec6b21fb358f367961efa1103 100644
--- a/src/ui/widget/insertordericon.cpp
+++ b/src/ui/widget/insertordericon.cpp
@@ -8,12 +8,11 @@
*/
#include "ui/widget/insertordericon.h"
-
-#include
-#include "widgets/toolbox.h"
-#include "ui/icon-names.h"
+#include "helper/icon-loader.h"
#include "layertypeicon.h"
+#include "ui/icon-names.h"
+#include "widgets/toolbox.h"
namespace Inkscape {
namespace UI {
@@ -31,13 +30,8 @@ InsertOrderIcon::InsertOrderIcon() :
property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
- gint width, height;
- gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
- phys=width;
-
- Glib::RefPtr icon_theme = Gtk::IconTheme::get_default();
- _property_pixbuf_top = icon_theme->load_icon(_pixTopName, phys, (Gtk::IconLookupFlags)0);
- _property_pixbuf_bottom = icon_theme->load_icon(_pixBottomName, phys, (Gtk::IconLookupFlags)0);
+ _property_pixbuf_top = sp_get_icon_pixbuf(_pixTopName, GTK_ICON_SIZE_MENU);
+ _property_pixbuf_bottom = sp_get_icon_pixbuf(_pixBottomName, GTK_ICON_SIZE_MENU);
property_pixbuf() = Glib::RefPtr(nullptr);
}
diff --git a/src/ui/widget/labelled.cpp b/src/ui/widget/labelled.cpp
index 2e98400358e3c29782175d9a015fc8b54c22970e..6ee2b752f75472daf816b3bddad3e4ceca1b81de 100644
--- a/src/ui/widget/labelled.cpp
+++ b/src/ui/widget/labelled.cpp
@@ -12,8 +12,8 @@
# include
#endif
+#include "helper/icon-loader.h"
#include "labelled.h"
-
#include
#include
@@ -32,8 +32,7 @@ Labelled::Labelled(Glib::ustring const &label, Glib::ustring const &tooltip,
{
g_assert(g_utf8_validate(icon.c_str(), -1, nullptr));
if (icon != "") {
- _icon = Gtk::manage(new Gtk::Image());
- _icon->set_from_icon_name(icon, Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ _icon = Gtk::manage(sp_get_icon_image(icon, Gtk::ICON_SIZE_LARGE_TOOLBAR));
pack_start(*_icon, Gtk::PACK_SHRINK);
}
pack_start(*Gtk::manage(_label), Gtk::PACK_EXPAND_WIDGET, 6);
diff --git a/src/ui/widget/layer-selector.cpp b/src/ui/widget/layer-selector.cpp
index b862224043e10e20a43f0d6384b4b976c296516f..c8aefa656656296be0ea1ce9521f165d0c0a7cbc 100644
--- a/src/ui/widget/layer-selector.cpp
+++ b/src/ui/widget/layer-selector.cpp
@@ -17,10 +17,11 @@
#include
#include
+#include "helper/icon-loader.h"
#include "ui/dialog/layer-properties.h"
-#include
#include
#include
+#include
#include "desktop.h"
@@ -46,14 +47,12 @@ public:
{
set_name("AlternateIcons");
if (!a.empty()) {
- _a = Gtk::manage(new Gtk::Image());
- _a->set_from_icon_name(a, size);
+ _a = Gtk::manage(sp_get_icon_image(a, size));
_a->set_no_show_all(true);
add(*_a);
}
if (!b.empty()) {
- _b = Gtk::manage(new Gtk::Image());
- _b->set_from_icon_name(b, size);
+ _b = Gtk::manage(sp_get_icon_image(b, size));
_b->set_no_show_all(true);
add(*_b);
}
diff --git a/src/ui/widget/layertypeicon.cpp b/src/ui/widget/layertypeicon.cpp
index 278bd317b1c4142745f5f0f63fae560a736af362..356531620b54b17896faf4b1a3edce24d7ea5ac6 100644
--- a/src/ui/widget/layertypeicon.cpp
+++ b/src/ui/widget/layertypeicon.cpp
@@ -13,10 +13,9 @@
#include "ui/widget/layertypeicon.h"
-#include
-
-#include "widgets/toolbox.h"
+#include "helper/icon-loader.h"
#include "ui/icon-names.h"
+#include "widgets/toolbox.h"
namespace Inkscape {
namespace UI {
@@ -36,14 +35,10 @@ LayerTypeIcon::LayerTypeIcon() :
{
property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
- gint width, height;
- gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
- int phys = width;
-
- Glib::RefPtr icon_theme = Gtk::IconTheme::get_default();
- _property_pixbuf_layer = icon_theme->load_icon(_pixLayerName, phys, (Gtk::IconLookupFlags)0);
- _property_pixbuf_group = icon_theme->load_icon(_pixGroupName, phys, (Gtk::IconLookupFlags)0);
- _property_pixbuf_path = icon_theme->load_icon(_pixPathName, phys, (Gtk::IconLookupFlags)0);
+
+ _property_pixbuf_layer = sp_get_icon_pixbuf(_pixLayerName, GTK_ICON_SIZE_MENU);
+ _property_pixbuf_group = sp_get_icon_pixbuf(_pixGroupName, GTK_ICON_SIZE_MENU);
+ _property_pixbuf_path = sp_get_icon_pixbuf(_pixPathName, GTK_ICON_SIZE_MENU);
property_pixbuf() = _property_pixbuf_path.get_value();
}
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp
index fee3926323192a78fc225f45097aa8a83b60b8b8..3127434985de7d35486f21eab2ea0ebbfcda2bb3 100644
--- a/src/ui/widget/preferences-widget.cpp
+++ b/src/ui/widget/preferences-widget.cpp
@@ -34,6 +34,7 @@
#include "io/sys.h"
+#include "helper/icon-loader.h"
#include "ui/dialog/filedialog.h"
#include "ui/widget/preferences-widget.h"
@@ -705,9 +706,7 @@ void PrefEntryFileButtonHBox::init(Glib::ustring const &prefs_path,
relatedButton = new Gtk::Button();
Gtk::HBox* pixlabel = new Gtk::HBox(false, 3);
- Gtk::Image *im = new Gtk::Image();
- im->set_from_icon_name("applications-graphics",
- Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *im = sp_get_icon_image("applications-graphics", Gtk::ICON_SIZE_BUTTON);
pixlabel->pack_start(*im);
Gtk::Label *l = new Gtk::Label();
l->set_markup_with_mnemonic(_("_Browse..."));
diff --git a/src/ui/widget/random.cpp b/src/ui/widget/random.cpp
index 237144c7ce855c6b98ba946f1ac786545713dba3..3bda641d7aea8206d09feb47811d1bfe695fbb7e 100644
--- a/src/ui/widget/random.cpp
+++ b/src/ui/widget/random.cpp
@@ -14,8 +14,8 @@
#endif
+#include "helper/icon-loader.h"
#include "random.h"
-
#include
#include
@@ -70,8 +70,7 @@ void Random::setStartSeed(long newseed)
void Random::addReseedButton()
{
- Gtk::Image* pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name( "randomize", Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *pIcon = Gtk::manage(sp_get_icon_image("randomize", Gtk::ICON_SIZE_BUTTON));
Gtk::Button * pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();
diff --git a/src/verbs.cpp b/src/verbs.cpp
index f859f672ba6ca4cb3050abcb69dc464ab0e20ead..0bbfeb1fbe9f33febc1291c1e1f5704e1e99f563 100644
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
@@ -2603,48 +2603,50 @@ Verb *Verb::_base_verbs[] = {
// File
new FileVerb(SP_VERB_FILE_NEW, "FileNew", N_("_New"), N_("Create new document from the default template"),
INKSCAPE_ICON("document-new")),
- new FileVerb(SP_VERB_FILE_OPEN, "FileOpen", N_("_Open..."),
- N_("Open an existing document"), INKSCAPE_ICON("document-open")),
+ new FileVerb(SP_VERB_FILE_OPEN, "FileOpen", N_("_Open..."), N_("Open an existing document"),
+ INKSCAPE_ICON("document-open")),
new FileVerb(SP_VERB_FILE_REVERT, "FileRevert", N_("Re_vert"),
- N_("Revert to the last saved version of document (changes will be lost)"), INKSCAPE_ICON("document-revert")),
- new FileVerb(SP_VERB_FILE_SAVE, "FileSave", N_("_Save"), N_("Save document"),
- INKSCAPE_ICON("document-save")),
- new FileVerb(SP_VERB_FILE_SAVE_AS, "FileSaveAs", N_("Save _As..."),
- N_("Save document under a new name"), INKSCAPE_ICON("document-save-as")),
+ N_("Revert to the last saved version of document (changes will be lost)"),
+ INKSCAPE_ICON("document-revert")),
+ new FileVerb(SP_VERB_FILE_SAVE, "FileSave", N_("_Save"), N_("Save document"), INKSCAPE_ICON("document-save")),
+ new FileVerb(SP_VERB_FILE_SAVE_AS, "FileSaveAs", N_("Save _As..."), N_("Save document under a new name"),
+ INKSCAPE_ICON("document-save-as")),
new FileVerb(SP_VERB_FILE_SAVE_A_COPY, "FileSaveACopy", N_("Save a Cop_y..."),
- N_("Save a copy of the document under a new name"), nullptr ),
+ N_("Save a copy of the document under a new name"), nullptr),
new FileVerb(SP_VERB_FILE_SAVE_TEMPLATE, "FileSaveTemplate", N_("Save template ..."),
- N_("Save a copy of the document as template"), nullptr ),
+ N_("Save a copy of the document as template"), nullptr),
new FileVerb(SP_VERB_FILE_PRINT, "FilePrint", N_("_Print..."), N_("Print document"),
INKSCAPE_ICON("document-print")),
// TRANSLATORS: "Vacuum Defs" means "Clean up defs" (so as to remove unused definitions)
- new FileVerb(SP_VERB_FILE_VACUUM, "FileVacuum", N_("Clean _up document"), N_("Remove unused definitions (such as gradients or clipping paths) from the <defs> of the document"),
- INKSCAPE_ICON("document-cleanup") ),
+ new FileVerb(
+ SP_VERB_FILE_VACUUM, "FileVacuum", N_("Clean _up document"),
+ N_("Remove unused definitions (such as gradients or clipping paths) from the <defs> of the document"),
+ INKSCAPE_ICON("document-cleanup")),
new FileVerb(SP_VERB_FILE_IMPORT, "FileImport", N_("_Import..."),
N_("Import a bitmap or SVG image into this document"), INKSCAPE_ICON("document-import")),
-// new FileVerb(SP_VERB_FILE_EXPORT, "FileExport", N_("_Export Bitmap..."), N_("Export this document or a selection as a bitmap image"), INKSCAPE_ICON("document-export")),
+ // new FileVerb(SP_VERB_FILE_EXPORT, "FileExport", N_("_Export Bitmap..."), N_("Export this document or a
+ // selection as a bitmap image"), INKSCAPE_ICON("document-export")),
new FileVerb(SP_VERB_FILE_IMPORT_FROM_OCAL, "FileImportFromOCAL", N_("Import Clip Art..."),
- N_("Import clipart from Open Clip Art Library"), INKSCAPE_ICON("document-import-ocal")),
-// new FileVerb(SP_VERB_FILE_EXPORT_TO_OCAL, "FileExportToOCAL", N_("Export To Open Clip Art Library"), N_("Export this document to Open Clip Art Library"), INKSCAPE_ICON_DOCUMENT_EXPORT_OCAL),
- new FileVerb(SP_VERB_FILE_NEXT_DESKTOP, "NextWindow", N_("N_ext Window"),
- N_("Switch to the next document window"), INKSCAPE_ICON("window-next")),
+ N_("Import clipart from Open Clip Art Library"), INKSCAPE_ICON("document-import-ocal")),
+ // new FileVerb(SP_VERB_FILE_EXPORT_TO_OCAL, "FileExportToOCAL", N_("Export To Open Clip Art Library"),
+ // N_("Export this document to Open Clip Art Library"), INKSCAPE_ICON_DOCUMENT_EXPORT_OCAL),
+ new FileVerb(SP_VERB_FILE_NEXT_DESKTOP, "NextWindow", N_("N_ext Window"), N_("Switch to the next document window"),
+ INKSCAPE_ICON("window-next")),
new FileVerb(SP_VERB_FILE_PREV_DESKTOP, "PrevWindow", N_("P_revious Window"),
N_("Switch to the previous document window"), INKSCAPE_ICON("window-previous")),
- new FileVerb(SP_VERB_FILE_CLOSE_VIEW, "FileClose", N_("_Close"),
- N_("Close this document window"), INKSCAPE_ICON("window-close")),
+ new FileVerb(SP_VERB_FILE_CLOSE_VIEW, "FileClose", N_("_Close"), N_("Close this document window"),
+ INKSCAPE_ICON("window-close")),
new FileVerb(SP_VERB_FILE_QUIT, "FileQuit", N_("_Quit"), N_("Quit Inkscape"), INKSCAPE_ICON("application-exit")),
new FileVerb(SP_VERB_FILE_TEMPLATES, "FileTemplates", N_("New from _Template..."),
- N_("Create new project from template"), INKSCAPE_ICON("dialog-templates")),
+ N_("Create new project from template"), INKSCAPE_ICON("dialog-templates")),
// Edit
- new EditVerb(SP_VERB_EDIT_UNDO, "EditUndo", N_("_Undo"), N_("Undo last action"),
- INKSCAPE_ICON("edit-undo")),
- new EditVerb(SP_VERB_EDIT_REDO, "EditRedo", N_("_Redo"),
- N_("Do again the last undone action"), INKSCAPE_ICON("edit-redo")),
- new EditVerb(SP_VERB_EDIT_CUT, "EditCut", N_("Cu_t"),
- N_("Cut selection to clipboard"), INKSCAPE_ICON("edit-cut")),
- new EditVerb(SP_VERB_EDIT_COPY, "EditCopy", N_("_Copy"),
- N_("Copy selection to clipboard"), INKSCAPE_ICON("edit-copy")),
+ new EditVerb(SP_VERB_EDIT_UNDO, "EditUndo", N_("_Undo"), N_("Undo last action"), INKSCAPE_ICON("edit-undo")),
+ new EditVerb(SP_VERB_EDIT_REDO, "EditRedo", N_("_Redo"), N_("Do again the last undone action"),
+ INKSCAPE_ICON("edit-redo")),
+ new EditVerb(SP_VERB_EDIT_CUT, "EditCut", N_("Cu_t"), N_("Cut selection to clipboard"), INKSCAPE_ICON("edit-cut")),
+ new EditVerb(SP_VERB_EDIT_COPY, "EditCopy", N_("_Copy"), N_("Copy selection to clipboard"),
+ INKSCAPE_ICON("edit-copy")),
new EditVerb(SP_VERB_EDIT_PASTE, "EditPaste", N_("_Paste"),
N_("Paste objects from clipboard to mouse point, or paste text"), INKSCAPE_ICON("edit-paste")),
new EditVerb(SP_VERB_EDIT_PASTE_STYLE, "EditPasteStyle", N_("Paste _Style"),
@@ -2669,16 +2671,18 @@ Verb *Verb::_base_verbs[] = {
N_("Remove any path effects from selected objects"), nullptr),
new EditVerb(SP_VERB_EDIT_REMOVE_FILTER, "RemoveFilter", N_("_Remove Filters"),
N_("Remove any filters from selected objects"), nullptr),
- new EditVerb(SP_VERB_EDIT_DELETE, "EditDelete", N_("_Delete"),
- N_("Delete selection"), INKSCAPE_ICON("edit-delete")),
- new EditVerb(SP_VERB_EDIT_DUPLICATE, "EditDuplicate", N_("Duplic_ate"),
- N_("Duplicate selected objects"), INKSCAPE_ICON("edit-duplicate")),
+ new EditVerb(SP_VERB_EDIT_DELETE, "EditDelete", N_("_Delete"), N_("Delete selection"),
+ INKSCAPE_ICON("edit-delete")),
+ new EditVerb(SP_VERB_EDIT_DUPLICATE, "EditDuplicate", N_("Duplic_ate"), N_("Duplicate selected objects"),
+ INKSCAPE_ICON("edit-duplicate")),
new EditVerb(SP_VERB_EDIT_CLONE, "EditClone", N_("Create Clo_ne"),
N_("Create a clone (a copy linked to the original) of selected object"), INKSCAPE_ICON("edit-clone")),
new EditVerb(SP_VERB_EDIT_UNLINK_CLONE, "EditUnlinkClone", N_("Unlin_k Clone"),
- N_("Cut the selected clones' links to the originals, turning them into standalone objects"), INKSCAPE_ICON("edit-clone-unlink")),
+ N_("Cut the selected clones' links to the originals, turning them into standalone objects"),
+ INKSCAPE_ICON("edit-clone-unlink")),
new EditVerb(SP_VERB_EDIT_UNLINK_CLONE_RECURSIVE, "EditUnlinkCloneRecursive", N_("Unlink Clones _recursively"),
- N_("Unlink all clones in the selection, even if they are in groups."), INKSCAPE_ICON("edit-clone-unlink")),
+ N_("Unlink all clones in the selection, even if they are in groups."),
+ INKSCAPE_ICON("edit-clone-unlink")),
new EditVerb(SP_VERB_EDIT_RELINK_CLONE, "EditRelinkClone", N_("Relink to Copied"),
N_("Relink the selected clones to the object currently on the clipboard"), nullptr),
new EditVerb(SP_VERB_EDIT_CLONE_SELECT_ORIGINAL, "EditCloneSelectOriginal", N_("Select _Original"),
@@ -2693,55 +2697,63 @@ Verb *Verb::_base_verbs[] = {
N_("Convert selection to a rectangle with tiled pattern fill"), nullptr),
new EditVerb(SP_VERB_EDIT_UNTILE, "ObjectsFromPattern", N_("Pattern to _Objects"),
N_("Extract objects from a tiled pattern fill"), nullptr),
- new EditVerb(SP_VERB_EDIT_SYMBOL, "ObjectsToSymbol", N_("Group to Symbol"),
- N_("Convert group to a symbol"), nullptr),
- new EditVerb(SP_VERB_EDIT_UNSYMBOL, "ObjectsFromSymbol", N_("Symbol to Group"),
- N_("Extract group from a symbol"), nullptr),
- new EditVerb(SP_VERB_EDIT_CLEAR_ALL, "EditClearAll", N_("Clea_r All"),
- N_("Delete all objects from document"), nullptr),
- new EditVerb(SP_VERB_EDIT_SELECT_ALL, "EditSelectAll", N_("Select Al_l"),
- N_("Select all objects or all nodes"), INKSCAPE_ICON("edit-select-all")),
+ new EditVerb(SP_VERB_EDIT_SYMBOL, "ObjectsToSymbol", N_("Group to Symbol"), N_("Convert group to a symbol"),
+ nullptr),
+ new EditVerb(SP_VERB_EDIT_UNSYMBOL, "ObjectsFromSymbol", N_("Symbol to Group"), N_("Extract group from a symbol"),
+ nullptr),
+ new EditVerb(SP_VERB_EDIT_CLEAR_ALL, "EditClearAll", N_("Clea_r All"), N_("Delete all objects from document"),
+ nullptr),
+ new EditVerb(SP_VERB_EDIT_SELECT_ALL, "EditSelectAll", N_("Select Al_l"), N_("Select all objects or all nodes"),
+ INKSCAPE_ICON("edit-select-all")),
new EditVerb(SP_VERB_EDIT_SELECT_ALL_IN_ALL_LAYERS, "EditSelectAllInAllLayers", N_("Select All in All La_yers"),
N_("Select all objects in all visible and unlocked layers"), INKSCAPE_ICON("edit-select-all-layers")),
new EditVerb(SP_VERB_EDIT_SELECT_SAME_FILL_STROKE, "EditSelectSameFillStroke", N_("Fill _and Stroke"),
- N_("Select all objects with the same fill and stroke as the selected objects"), INKSCAPE_ICON("edit-select-all")),
+ N_("Select all objects with the same fill and stroke as the selected objects"),
+ INKSCAPE_ICON("edit-select-all")),
new EditVerb(SP_VERB_EDIT_SELECT_SAME_FILL_COLOR, "EditSelectSameFillColor", N_("_Fill Color"),
- N_("Select all objects with the same fill as the selected objects"), INKSCAPE_ICON("edit-select-all")),
+ N_("Select all objects with the same fill as the selected objects"), INKSCAPE_ICON("edit-select-all")),
new EditVerb(SP_VERB_EDIT_SELECT_SAME_STROKE_COLOR, "EditSelectSameStrokeColor", N_("_Stroke Color"),
- N_("Select all objects with the same stroke as the selected objects"), INKSCAPE_ICON("edit-select-all")),
+ N_("Select all objects with the same stroke as the selected objects"),
+ INKSCAPE_ICON("edit-select-all")),
new EditVerb(SP_VERB_EDIT_SELECT_SAME_STROKE_STYLE, "EditSelectSameStrokeStyle", N_("Stroke St_yle"),
- N_("Select all objects with the same stroke style (width, dash, markers) as the selected objects"), INKSCAPE_ICON("edit-select-all")),
- new EditVerb(SP_VERB_EDIT_SELECT_SAME_OBJECT_TYPE, "EditSelectSameObjectType", N_("_Object Type"),
- N_("Select all objects with the same object type (rect, arc, text, path, bitmap etc) as the selected objects"), INKSCAPE_ICON("edit-select-all")),
+ N_("Select all objects with the same stroke style (width, dash, markers) as the selected objects"),
+ INKSCAPE_ICON("edit-select-all")),
+ new EditVerb(
+ SP_VERB_EDIT_SELECT_SAME_OBJECT_TYPE, "EditSelectSameObjectType", N_("_Object Type"),
+ N_("Select all objects with the same object type (rect, arc, text, path, bitmap etc) as the selected objects"),
+ INKSCAPE_ICON("edit-select-all")),
new EditVerb(SP_VERB_EDIT_INVERT, "EditInvert", N_("In_vert Selection"),
- N_("Invert selection (unselect what is selected and select everything else)"), INKSCAPE_ICON("edit-select-invert")),
+ N_("Invert selection (unselect what is selected and select everything else)"),
+ INKSCAPE_ICON("edit-select-invert")),
new EditVerb(SP_VERB_EDIT_INVERT_IN_ALL_LAYERS, "EditInvertInAllLayers", N_("Invert in All Layers"),
N_("Invert selection in all visible and unlocked layers"), nullptr),
- new EditVerb(SP_VERB_EDIT_SELECT_NEXT, "EditSelectNext", N_("Select Next"),
- N_("Select next object or node"), nullptr),
+ new EditVerb(SP_VERB_EDIT_SELECT_NEXT, "EditSelectNext", N_("Select Next"), N_("Select next object or node"),
+ nullptr),
new EditVerb(SP_VERB_EDIT_SELECT_PREV, "EditSelectPrev", N_("Select Previous"),
N_("Select previous object or node"), nullptr),
- new EditVerb(SP_VERB_EDIT_DESELECT, "EditDeselect", N_("D_eselect"),
- N_("Deselect any selected objects or nodes"), INKSCAPE_ICON("edit-select-none")),
+ new EditVerb(SP_VERB_EDIT_DESELECT, "EditDeselect", N_("D_eselect"), N_("Deselect any selected objects or nodes"),
+ INKSCAPE_ICON("edit-select-none")),
new EditVerb(SP_VERB_EDIT_DELETE_ALL_GUIDES, "EditRemoveAllGuides", N_("Delete All Guides"),
N_("Delete all the guides in the document"), nullptr),
- new EditVerb(SP_VERB_EDIT_GUIDES_TOGGLE_LOCK, "EditGuidesToggleLock", N_("Lock All Guides"), N_("Toggle lock of all guides in the document"), nullptr),
+ new EditVerb(SP_VERB_EDIT_GUIDES_TOGGLE_LOCK, "EditGuidesToggleLock", N_("Lock All Guides"),
+ N_("Toggle lock of all guides in the document"), nullptr),
new EditVerb(SP_VERB_EDIT_GUIDES_AROUND_PAGE, "EditGuidesAroundPage", N_("Create _Guides Around the Page"),
N_("Create four guides aligned with the page borders"), nullptr),
- new EditVerb(SP_VERB_EDIT_NEXT_PATHEFFECT_PARAMETER, "EditNextPathEffectParameter", N_("Next path effect parameter"),
- N_("Show next editable path effect parameter"), INKSCAPE_ICON("path-effect-parameter-next")),
+ new EditVerb(SP_VERB_EDIT_NEXT_PATHEFFECT_PARAMETER, "EditNextPathEffectParameter",
+ N_("Next path effect parameter"), N_("Show next editable path effect parameter"),
+ INKSCAPE_ICON("path-effect-parameter-next")),
new EditVerb(SP_VERB_EDIT_SWAP_FILL_STROKE, "EditSwapFillStroke", N_("Swap fill and stroke"),
N_("Swap fill and stroke of an object"), nullptr),
// Selection
- new SelectionVerb(SP_VERB_SELECTION_TO_FRONT, "SelectionToFront", N_("Raise to _Top"),
- N_("Raise selection to top"), INKSCAPE_ICON("selection-top")),
+ new SelectionVerb(SP_VERB_SELECTION_TO_FRONT, "SelectionToFront", N_("Raise to _Top"), N_("Raise selection to top"),
+ INKSCAPE_ICON("selection-top")),
new SelectionVerb(SP_VERB_SELECTION_TO_BACK, "SelectionToBack", N_("Lower to _Bottom"),
N_("Lower selection to bottom"), INKSCAPE_ICON("selection-bottom")),
- new SelectionVerb(SP_VERB_SELECTION_RAISE, "SelectionRaise", N_("_Raise"),
- N_("Raise selection one step"), INKSCAPE_ICON("selection-raise")),
- new SelectionVerb(SP_VERB_SELECTION_LOWER, "SelectionLower", N_("_Lower"),
- N_("Lower selection one step"), INKSCAPE_ICON("selection-lower")),
+ new SelectionVerb(SP_VERB_SELECTION_RAISE, "SelectionRaise", N_("_Raise"), N_("Raise selection one step"),
+ INKSCAPE_ICON("selection-raise")),
+ new SelectionVerb(SP_VERB_SELECTION_LOWER, "SelectionLower", N_("_Lower"), N_("Lower selection one step"),
+ INKSCAPE_ICON("selection-lower")),
new SelectionVerb(SP_VERB_SELECTION_STACK_UP, "SelectionStackUp", N_("_Stack up"),
@@ -2750,44 +2762,47 @@ Verb *Verb::_base_verbs[] = {
N_("Stack selection one step down"), INKSCAPE_ICON("layer-lower")),
- new SelectionVerb(SP_VERB_SELECTION_GROUP, "SelectionGroup", N_("_Group"),
- N_("Group selected objects"), INKSCAPE_ICON("object-group")),
- new SelectionVerb(SP_VERB_SELECTION_UNGROUP, "SelectionUnGroup", N_("_Ungroup"),
- N_("Ungroup selected groups"), INKSCAPE_ICON("object-ungroup")),
- new SelectionVerb(SP_VERB_SELECTION_UNGROUP_POP_SELECTION, "SelectionUnGroupPopSelection", N_("_Pop selected objects out of group"),
- N_("Pop selected objects out of group"), INKSCAPE_ICON("object-ungroup-pop-selection")),
+ new SelectionVerb(SP_VERB_SELECTION_GROUP, "SelectionGroup", N_("_Group"), N_("Group selected objects"),
+ INKSCAPE_ICON("object-group")),
+ new SelectionVerb(SP_VERB_SELECTION_UNGROUP, "SelectionUnGroup", N_("_Ungroup"), N_("Ungroup selected groups"),
+ INKSCAPE_ICON("object-ungroup")),
+ new SelectionVerb(SP_VERB_SELECTION_UNGROUP_POP_SELECTION, "SelectionUnGroupPopSelection",
+ N_("_Pop selected objects out of group"), N_("Pop selected objects out of group"),
+ INKSCAPE_ICON("object-ungroup-pop-selection")),
- new SelectionVerb(SP_VERB_SELECTION_TEXTTOPATH, "SelectionTextToPath", N_("_Put on Path"),
- N_("Put text on path"), INKSCAPE_ICON("text-put-on-path")),
+ new SelectionVerb(SP_VERB_SELECTION_TEXTTOPATH, "SelectionTextToPath", N_("_Put on Path"), N_("Put text on path"),
+ INKSCAPE_ICON("text-put-on-path")),
new SelectionVerb(SP_VERB_SELECTION_TEXTFROMPATH, "SelectionTextFromPath", N_("_Remove from Path"),
N_("Remove text from path"), INKSCAPE_ICON("text-remove-from-path")),
new SelectionVerb(SP_VERB_SELECTION_REMOVE_KERNS, "SelectionTextRemoveKerns", N_("Remove Manual _Kerns"),
// TRANSLATORS: "glyph": An image used in the visual representation of characters;
// roughly speaking, how a character looks. A font is a set of glyphs.
- N_("Remove all manual kerns and glyph rotations from a text object"), INKSCAPE_ICON("text-unkern")),
+ N_("Remove all manual kerns and glyph rotations from a text object"),
+ INKSCAPE_ICON("text-unkern")),
- new SelectionVerb(SP_VERB_SELECTION_UNION, "SelectionUnion", N_("_Union"),
- N_("Create union of selected paths"), INKSCAPE_ICON("path-union")),
+ new SelectionVerb(SP_VERB_SELECTION_UNION, "SelectionUnion", N_("_Union"), N_("Create union of selected paths"),
+ INKSCAPE_ICON("path-union")),
new SelectionVerb(SP_VERB_SELECTION_INTERSECT, "SelectionIntersect", N_("_Intersection"),
N_("Create intersection of selected paths"), INKSCAPE_ICON("path-intersection")),
new SelectionVerb(SP_VERB_SELECTION_DIFF, "SelectionDiff", N_("_Difference"),
N_("Create difference of selected paths (bottom minus top)"), INKSCAPE_ICON("path-difference")),
new SelectionVerb(SP_VERB_SELECTION_SYMDIFF, "SelectionSymDiff", N_("E_xclusion"),
- N_("Create exclusive OR of selected paths (those parts that belong to only one path)"), INKSCAPE_ICON("path-exclusion")),
- new SelectionVerb(SP_VERB_SELECTION_CUT, "SelectionDivide", N_("Di_vision"),
- N_("Cut the bottom path into pieces"), INKSCAPE_ICON("path-division")),
+ N_("Create exclusive OR of selected paths (those parts that belong to only one path)"),
+ INKSCAPE_ICON("path-exclusion")),
+ new SelectionVerb(SP_VERB_SELECTION_CUT, "SelectionDivide", N_("Di_vision"), N_("Cut the bottom path into pieces"),
+ INKSCAPE_ICON("path-division")),
// TRANSLATORS: "to cut a path" is not the same as "to break a path apart" - see the
// Advanced tutorial for more info
new SelectionVerb(SP_VERB_SELECTION_SLICE, "SelectionCutPath", N_("Cut _Path"),
N_("Cut the bottom path's stroke into pieces, removing fill"), INKSCAPE_ICON("path-cut")),
- new SelectionVerb(SP_VERB_SELECTION_GROW, "SelectionGrow", N_("_Grow"),
- N_("Make selected objects bigger"), INKSCAPE_ICON("selection-grow")),
+ new SelectionVerb(SP_VERB_SELECTION_GROW, "SelectionGrow", N_("_Grow"), N_("Make selected objects bigger"),
+ INKSCAPE_ICON("selection-grow")),
new SelectionVerb(SP_VERB_SELECTION_GROW_SCREEN, "SelectionGrowScreen", N_("_Grow on screen"),
N_("Make selected objects bigger relative to screen"), INKSCAPE_ICON("selection-grow-screen")),
new SelectionVerb(SP_VERB_SELECTION_GROW_DOUBLE, "SelectionGrowDouble", N_("_Double size"),
N_("Double the size of selected objects"), INKSCAPE_ICON("selection-grow-double")),
- new SelectionVerb(SP_VERB_SELECTION_SHRINK, "SelectionShrink", N_("_Shrink"),
- N_("Make selected objects smaller"), INKSCAPE_ICON("selection-shrink")),
+ new SelectionVerb(SP_VERB_SELECTION_SHRINK, "SelectionShrink", N_("_Shrink"), N_("Make selected objects smaller"),
+ INKSCAPE_ICON("selection-shrink")),
new SelectionVerb(SP_VERB_SELECTION_SHRINK_SCREEN, "SelectionShrinkScreen", N_("_Shrink on screen"),
N_("Make selected objects smaller relative to screen"), INKSCAPE_ICON("selection-shrink-screen")),
new SelectionVerb(SP_VERB_SELECTION_SHRINK_HALVE, "SelectionShrinkHalve", N_("_Halve size"),
@@ -2795,29 +2810,24 @@ Verb *Verb::_base_verbs[] = {
// TRANSLATORS: "outset": expand a shape by offsetting the object's path,
// i.e. by displacing it perpendicular to the path in each point.
// See also the Advanced Tutorial for explanation.
- new SelectionVerb(SP_VERB_SELECTION_OFFSET, "SelectionOffset", N_("Outs_et"),
- N_("Outset selected paths"), INKSCAPE_ICON("path-outset")),
- new SelectionVerb(SP_VERB_SELECTION_OFFSET_SCREEN, "SelectionOffsetScreen",
- N_("O_utset Path by 1 px"),
+ new SelectionVerb(SP_VERB_SELECTION_OFFSET, "SelectionOffset", N_("Outs_et"), N_("Outset selected paths"),
+ INKSCAPE_ICON("path-outset")),
+ new SelectionVerb(SP_VERB_SELECTION_OFFSET_SCREEN, "SelectionOffsetScreen", N_("O_utset Path by 1 px"),
N_("Outset selected paths by 1 px"), nullptr),
- new SelectionVerb(SP_VERB_SELECTION_OFFSET_SCREEN_10, "SelectionOffsetScreen10",
- N_("O_utset Path by 10 px"),
+ new SelectionVerb(SP_VERB_SELECTION_OFFSET_SCREEN_10, "SelectionOffsetScreen10", N_("O_utset Path by 10 px"),
N_("Outset selected paths by 10 px"), nullptr),
// TRANSLATORS: "inset": contract a shape by offsetting the object's path,
// i.e. by displacing it perpendicular to the path in each point.
// See also the Advanced Tutorial for explanation.
- new SelectionVerb(SP_VERB_SELECTION_INSET, "SelectionInset", N_("I_nset"),
- N_("Inset selected paths"), INKSCAPE_ICON("path-inset")),
- new SelectionVerb(SP_VERB_SELECTION_INSET_SCREEN, "SelectionInsetScreen",
- N_("I_nset Path by 1 px"),
+ new SelectionVerb(SP_VERB_SELECTION_INSET, "SelectionInset", N_("I_nset"), N_("Inset selected paths"),
+ INKSCAPE_ICON("path-inset")),
+ new SelectionVerb(SP_VERB_SELECTION_INSET_SCREEN, "SelectionInsetScreen", N_("I_nset Path by 1 px"),
N_("Inset selected paths by 1 px"), nullptr),
- new SelectionVerb(SP_VERB_SELECTION_INSET_SCREEN_10, "SelectionInsetScreen10",
- N_("I_nset Path by 10 px"),
+ new SelectionVerb(SP_VERB_SELECTION_INSET_SCREEN_10, "SelectionInsetScreen10", N_("I_nset Path by 10 px"),
N_("Inset selected paths by 10 px"), nullptr),
- new SelectionVerb(SP_VERB_SELECTION_DYNAMIC_OFFSET, "SelectionDynOffset",
- N_("D_ynamic Offset"), N_("Create a dynamic offset object"), INKSCAPE_ICON("path-offset-dynamic")),
- new SelectionVerb(SP_VERB_SELECTION_LINKED_OFFSET, "SelectionLinkedOffset",
- N_("_Linked Offset"),
+ new SelectionVerb(SP_VERB_SELECTION_DYNAMIC_OFFSET, "SelectionDynOffset", N_("D_ynamic Offset"),
+ N_("Create a dynamic offset object"), INKSCAPE_ICON("path-offset-dynamic")),
+ new SelectionVerb(SP_VERB_SELECTION_LINKED_OFFSET, "SelectionLinkedOffset", N_("_Linked Offset"),
N_("Create a dynamic offset object linked to the original path"),
INKSCAPE_ICON("path-offset-linked")),
new SelectionVerb(SP_VERB_SELECTION_OUTLINE, "StrokeToPath", N_("_Stroke to Path"),
@@ -2827,7 +2837,8 @@ Verb *Verb::_base_verbs[] = {
new SelectionVerb(SP_VERB_SELECTION_SIMPLIFY, "SelectionSimplify", N_("Si_mplify"),
N_("Simplify selected paths (remove extra nodes)"), INKSCAPE_ICON("path-simplify")),
new SelectionVerb(SP_VERB_SELECTION_REVERSE, "SelectionReverse", N_("_Reverse"),
- N_("Reverse the direction of selected paths (useful for flipping markers)"), INKSCAPE_ICON("path-reverse")),
+ N_("Reverse the direction of selected paths (useful for flipping markers)"),
+ INKSCAPE_ICON("path-reverse")),
#if HAVE_POTRACE
// TRANSLATORS: "to trace" means "to convert a bitmap to vector graphics" (to vectorize)
@@ -2836,9 +2847,11 @@ Verb *Verb::_base_verbs[] = {
#endif
new SelectionVerb(SP_VERB_SELECTION_PIXEL_ART, "SelectionPixelArt", N_("Trace Pixel Art..."),
- N_("Create paths using Kopf-Lischinski algorithm to vectorize pixel art"), INKSCAPE_ICON("pixelart-trace")),
+ N_("Create paths using Kopf-Lischinski algorithm to vectorize pixel art"),
+ INKSCAPE_ICON("pixelart-trace")),
new SelectionVerb(SP_VERB_SELECTION_CREATE_BITMAP, "SelectionCreateBitmap", N_("Make a _Bitmap Copy"),
- N_("Export selection to a bitmap and insert it into document"), INKSCAPE_ICON("selection-make-bitmap-copy") ),
+ N_("Export selection to a bitmap and insert it into document"),
+ INKSCAPE_ICON("selection-make-bitmap-copy")),
new SelectionVerb(SP_VERB_SELECTION_COMBINE, "SelectionCombine", N_("_Combine"),
N_("Combine several paths into one"), INKSCAPE_ICON("path-combine")),
// TRANSLATORS: "to cut a path" is not the same as "to break a path apart" - see the
@@ -2848,10 +2861,10 @@ Verb *Verb::_base_verbs[] = {
new SelectionVerb(SP_VERB_SELECTION_ARRANGE, "DialogArrange", N_("_Arrange..."),
N_("Arrange selected objects in a table or circle"), INKSCAPE_ICON("dialog-rows-and-columns")),
// Layer
- new LayerVerb(SP_VERB_LAYER_NEW, "LayerNew", N_("_Add Layer..."),
- N_("Create a new layer"), INKSCAPE_ICON("layer-new")),
- new LayerVerb(SP_VERB_LAYER_RENAME, "LayerRename", N_("Re_name Layer..."),
- N_("Rename the current layer"), INKSCAPE_ICON("layer-rename")),
+ new LayerVerb(SP_VERB_LAYER_NEW, "LayerNew", N_("_Add Layer..."), N_("Create a new layer"),
+ INKSCAPE_ICON("layer-new")),
+ new LayerVerb(SP_VERB_LAYER_RENAME, "LayerRename", N_("Re_name Layer..."), N_("Rename the current layer"),
+ INKSCAPE_ICON("layer-rename")),
new LayerVerb(SP_VERB_LAYER_NEXT, "LayerNext", N_("Switch to Layer Abov_e"),
N_("Switch to the layer above the current"), INKSCAPE_ICON("layer-previous")),
new LayerVerb(SP_VERB_LAYER_PREV, "LayerPrev", N_("Switch to Layer Belo_w"),
@@ -2860,32 +2873,29 @@ Verb *Verb::_base_verbs[] = {
N_("Move selection to the layer above the current"), INKSCAPE_ICON("selection-move-to-layer-above")),
new LayerVerb(SP_VERB_LAYER_MOVE_TO_PREV, "LayerMoveToPrev", N_("Move Selection to Layer Bel_ow"),
N_("Move selection to the layer below the current"), INKSCAPE_ICON("selection-move-to-layer-below")),
- new LayerVerb(SP_VERB_LAYER_MOVE_TO, "LayerMoveTo", N_("Move Selection to Layer..."),
- N_("Move selection to layer"), INKSCAPE_ICON("layer-rename")),
- new LayerVerb(SP_VERB_LAYER_TO_TOP, "LayerToTop", N_("Layer to _Top"),
- N_("Raise the current layer to the top"), INKSCAPE_ICON("layer-top")),
+ new LayerVerb(SP_VERB_LAYER_MOVE_TO, "LayerMoveTo", N_("Move Selection to Layer..."), N_("Move selection to layer"),
+ INKSCAPE_ICON("layer-rename")),
+ new LayerVerb(SP_VERB_LAYER_TO_TOP, "LayerToTop", N_("Layer to _Top"), N_("Raise the current layer to the top"),
+ INKSCAPE_ICON("layer-top")),
new LayerVerb(SP_VERB_LAYER_TO_BOTTOM, "LayerToBottom", N_("Layer to _Bottom"),
N_("Lower the current layer to the bottom"), INKSCAPE_ICON("layer-bottom")),
- new LayerVerb(SP_VERB_LAYER_RAISE, "LayerRaise", N_("_Raise Layer"),
- N_("Raise the current layer"), INKSCAPE_ICON("layer-raise")),
- new LayerVerb(SP_VERB_LAYER_LOWER, "LayerLower", N_("_Lower Layer"),
- N_("Lower the current layer"), INKSCAPE_ICON("layer-lower")),
+ new LayerVerb(SP_VERB_LAYER_RAISE, "LayerRaise", N_("_Raise Layer"), N_("Raise the current layer"),
+ INKSCAPE_ICON("layer-raise")),
+ new LayerVerb(SP_VERB_LAYER_LOWER, "LayerLower", N_("_Lower Layer"), N_("Lower the current layer"),
+ INKSCAPE_ICON("layer-lower")),
new LayerVerb(SP_VERB_LAYER_DUPLICATE, "LayerDuplicate", N_("D_uplicate Current Layer"),
N_("Duplicate an existing layer"), INKSCAPE_ICON("layer-duplicate")),
- new LayerVerb(SP_VERB_LAYER_DELETE, "LayerDelete", N_("_Delete Current Layer"),
- N_("Delete the current layer"), INKSCAPE_ICON("layer-delete")),
- new LayerVerb(SP_VERB_LAYER_SOLO, "LayerSolo", N_("_Show/hide other layers"),
- N_("Solo the current layer"), nullptr),
- new LayerVerb(SP_VERB_LAYER_SHOW_ALL, "LayerShowAll", N_("_Show all layers"),
- N_("Show all the layers"), nullptr),
- new LayerVerb(SP_VERB_LAYER_HIDE_ALL, "LayerHideAll", N_("_Hide all layers"),
- N_("Hide all the layers"), nullptr),
- new LayerVerb(SP_VERB_LAYER_LOCK_ALL, "LayerLockAll", N_("_Lock all layers"),
- N_("Lock all the layers"), nullptr),
+ new LayerVerb(SP_VERB_LAYER_DELETE, "LayerDelete", N_("_Delete Current Layer"), N_("Delete the current layer"),
+ INKSCAPE_ICON("layer-delete")),
+ new LayerVerb(SP_VERB_LAYER_SOLO, "LayerSolo", N_("_Show/hide other layers"), N_("Solo the current layer"),
+ nullptr),
+ new LayerVerb(SP_VERB_LAYER_SHOW_ALL, "LayerShowAll", N_("_Show all layers"), N_("Show all the layers"), nullptr),
+ new LayerVerb(SP_VERB_LAYER_HIDE_ALL, "LayerHideAll", N_("_Hide all layers"), N_("Hide all the layers"), nullptr),
+ new LayerVerb(SP_VERB_LAYER_LOCK_ALL, "LayerLockAll", N_("_Lock all layers"), N_("Lock all the layers"), nullptr),
new LayerVerb(SP_VERB_LAYER_LOCK_OTHERS, "LayerLockOthers", N_("Lock/Unlock _other layers"),
- N_("Lock all the other layers"), nullptr),
- new LayerVerb(SP_VERB_LAYER_UNLOCK_ALL, "LayerUnlockAll", N_("_Unlock all layers"),
- N_("Unlock all the layers"), nullptr),
+ N_("Lock all the other layers"), nullptr),
+ new LayerVerb(SP_VERB_LAYER_UNLOCK_ALL, "LayerUnlockAll", N_("_Unlock all layers"), N_("Unlock all the layers"),
+ nullptr),
new LayerVerb(SP_VERB_LAYER_TOGGLE_LOCK, "LayerToggleLock", N_("_Lock/Unlock Current Layer"),
N_("Toggle lock on current layer"), nullptr),
new LayerVerb(SP_VERB_LAYER_TOGGLE_HIDE, "LayerToggleHide", N_("_Show/hide Current Layer"),
@@ -2905,75 +2915,74 @@ Verb *Verb::_base_verbs[] = {
new ObjectVerb(SP_VERB_OBJECT_TO_CURVE, "ObjectToPath", N_("_Object to Path"),
N_("Convert selected object to path"), INKSCAPE_ICON("object-to-path")),
new ObjectVerb(SP_VERB_OBJECT_FLOW_TEXT, "ObjectFlowText", N_("_Flow into Frame"),
- N_("Put text into a frame (path or shape), creating a flowed text linked to the frame object"), "text-flow-into-frame"),
+ N_("Put text into a frame (path or shape), creating a flowed text linked to the frame object"),
+ "text-flow-into-frame"),
new ObjectVerb(SP_VERB_OBJECT_UNFLOW_TEXT, "ObjectUnFlowText", N_("_Unflow"),
N_("Remove text from frame (creates a single-line text object)"), INKSCAPE_ICON("text-unflow")),
new ObjectVerb(SP_VERB_OBJECT_FLOWTEXT_TO_TEXT, "ObjectFlowtextToText", N_("_Convert to Text"),
- N_("Convert flowed text to regular text object (preserves appearance)"), INKSCAPE_ICON("text-convert-to-regular")),
- new ObjectVerb(SP_VERB_OBJECT_FLIP_HORIZONTAL, "ObjectFlipHorizontally",
- N_("Flip _Horizontal"), N_("Flip selected objects horizontally"),
- INKSCAPE_ICON("object-flip-horizontal")),
- new ObjectVerb(SP_VERB_OBJECT_FLIP_VERTICAL, "ObjectFlipVertically",
- N_("Flip _Vertical"), N_("Flip selected objects vertically"),
- INKSCAPE_ICON("object-flip-vertical")),
+ N_("Convert flowed text to regular text object (preserves appearance)"),
+ INKSCAPE_ICON("text-convert-to-regular")),
+ new ObjectVerb(SP_VERB_OBJECT_FLIP_HORIZONTAL, "ObjectFlipHorizontally", N_("Flip _Horizontal"),
+ N_("Flip selected objects horizontally"), INKSCAPE_ICON("object-flip-horizontal")),
+ new ObjectVerb(SP_VERB_OBJECT_FLIP_VERTICAL, "ObjectFlipVertically", N_("Flip _Vertical"),
+ N_("Flip selected objects vertically"), INKSCAPE_ICON("object-flip-vertical")),
new ObjectVerb(SP_VERB_OBJECT_SET_MASK, "ObjectSetMask", N_("_Set"),
- N_("Apply mask to selection (using the topmost object as mask)"), nullptr),
+ N_("Apply mask to selection (using the topmost object as mask)"), nullptr),
new ObjectVerb(SP_VERB_OBJECT_SET_INVERSE_MASK, "ObjectSetInverseMask", N_("_Set Inverse (LPE)"),
- N_("Apply inverse mask to selection (using the topmost object as mask)"), nullptr),
- new ObjectVerb(SP_VERB_OBJECT_EDIT_MASK, "ObjectEditMask", N_("_Edit"),
- N_("Edit mask"), INKSCAPE_ICON("path-mask-edit")),
- new ObjectVerb(SP_VERB_OBJECT_UNSET_MASK, "ObjectUnSetMask", N_("_Release"),
- N_("Remove mask from selection"), nullptr),
+ N_("Apply inverse mask to selection (using the topmost object as mask)"), nullptr),
+ new ObjectVerb(SP_VERB_OBJECT_EDIT_MASK, "ObjectEditMask", N_("_Edit"), N_("Edit mask"),
+ INKSCAPE_ICON("path-mask-edit")),
+ new ObjectVerb(SP_VERB_OBJECT_UNSET_MASK, "ObjectUnSetMask", N_("_Release"), N_("Remove mask from selection"),
+ nullptr),
new ObjectVerb(SP_VERB_OBJECT_SET_CLIPPATH, "ObjectSetClipPath", N_("_Set"),
- N_("Apply clipping path to selection (using the topmost object as clipping path)"), nullptr),
+ N_("Apply clipping path to selection (using the topmost object as clipping path)"), nullptr),
new ObjectVerb(SP_VERB_OBJECT_SET_INVERSE_CLIPPATH, "ObjectSetInverseClipPath", N_("_Set Inverse (LPE)"),
- N_("Apply inverse clipping path to selection (using the topmost object as clipping path)"), nullptr),
+ N_("Apply inverse clipping path to selection (using the topmost object as clipping path)"), nullptr),
new ObjectVerb(SP_VERB_OBJECT_CREATE_CLIP_GROUP, "ObjectCreateClipGroup", N_("Create Cl_ip Group"),
- N_("Creates a clip group using the selected objects as a base"), nullptr),
- new ObjectVerb(SP_VERB_OBJECT_EDIT_CLIPPATH, "ObjectEditClipPath", N_("_Edit"),
- N_("Edit clipping path"), INKSCAPE_ICON("path-clip-edit")),
+ N_("Creates a clip group using the selected objects as a base"), nullptr),
+ new ObjectVerb(SP_VERB_OBJECT_EDIT_CLIPPATH, "ObjectEditClipPath", N_("_Edit"), N_("Edit clipping path"),
+ INKSCAPE_ICON("path-clip-edit")),
new ObjectVerb(SP_VERB_OBJECT_UNSET_CLIPPATH, "ObjectUnSetClipPath", N_("_Release"),
- N_("Remove clipping path from selection"), nullptr),
+ N_("Remove clipping path from selection"), nullptr),
// Tag
- new TagVerb(SP_VERB_TAG_NEW, "TagNew", N_("_New"),
- N_("Create new selection set"), nullptr),
+ new TagVerb(SP_VERB_TAG_NEW, "TagNew", N_("_New"), N_("Create new selection set"), nullptr),
// Tools
new ContextVerb(SP_VERB_CONTEXT_SELECT, "ToolSelector", NC_("ContextVerb", "Select"),
N_("Select and transform objects"), INKSCAPE_ICON("tool-pointer")),
- new ContextVerb(SP_VERB_CONTEXT_NODE, "ToolNode", NC_("ContextVerb", "Node Edit"),
- N_("Edit paths by nodes"), INKSCAPE_ICON("tool-node-editor")),
+ new ContextVerb(SP_VERB_CONTEXT_NODE, "ToolNode", NC_("ContextVerb", "Node Edit"), N_("Edit paths by nodes"),
+ INKSCAPE_ICON("tool-node-editor")),
new ContextVerb(SP_VERB_CONTEXT_TWEAK, "ToolTweak", NC_("ContextVerb", "Tweak"),
N_("Tweak objects by sculpting or painting"), INKSCAPE_ICON("tool-tweak")),
new ContextVerb(SP_VERB_CONTEXT_SPRAY, "ToolSpray", NC_("ContextVerb", "Spray"),
N_("Spray objects by sculpting or painting"), INKSCAPE_ICON("tool-spray")),
new ContextVerb(SP_VERB_CONTEXT_RECT, "ToolRect", NC_("ContextVerb", "Rectangle"),
N_("Create rectangles and squares"), INKSCAPE_ICON("draw-rectangle")),
- new ContextVerb(SP_VERB_CONTEXT_3DBOX, "Tool3DBox", NC_("ContextVerb", "3D Box"),
- N_("Create 3D boxes"), INKSCAPE_ICON("draw-cuboid")),
+ new ContextVerb(SP_VERB_CONTEXT_3DBOX, "Tool3DBox", NC_("ContextVerb", "3D Box"), N_("Create 3D boxes"),
+ INKSCAPE_ICON("draw-cuboid")),
new ContextVerb(SP_VERB_CONTEXT_ARC, "ToolArc", NC_("ContextVerb", "Ellipse"),
N_("Create circles, ellipses, and arcs"), INKSCAPE_ICON("draw-ellipse")),
- new ContextVerb(SP_VERB_CONTEXT_STAR, "ToolStar", NC_("ContextVerb", "Star"),
- N_("Create stars and polygons"), INKSCAPE_ICON("draw-polygon-star")),
- new ContextVerb(SP_VERB_CONTEXT_SPIRAL, "ToolSpiral", NC_("ContextVerb", "Spiral"),
- N_("Create spirals"), INKSCAPE_ICON("draw-spiral")),
- new ContextVerb(SP_VERB_CONTEXT_PENCIL, "ToolPencil", NC_("ContextVerb", "Pencil"),
- N_("Draw freehand lines"), INKSCAPE_ICON("draw-freehand")),
+ new ContextVerb(SP_VERB_CONTEXT_STAR, "ToolStar", NC_("ContextVerb", "Star"), N_("Create stars and polygons"),
+ INKSCAPE_ICON("draw-polygon-star")),
+ new ContextVerb(SP_VERB_CONTEXT_SPIRAL, "ToolSpiral", NC_("ContextVerb", "Spiral"), N_("Create spirals"),
+ INKSCAPE_ICON("draw-spiral")),
+ new ContextVerb(SP_VERB_CONTEXT_PENCIL, "ToolPencil", NC_("ContextVerb", "Pencil"), N_("Draw freehand lines"),
+ INKSCAPE_ICON("draw-freehand")),
new ContextVerb(SP_VERB_CONTEXT_PEN, "ToolPen", NC_("ContextVerb", "Pen"),
N_("Draw Bezier curves and straight lines"), INKSCAPE_ICON("draw-path")),
new ContextVerb(SP_VERB_CONTEXT_CALLIGRAPHIC, "ToolCalligraphic", NC_("ContextVerb", "Calligraphy"),
N_("Draw calligraphic or brush strokes"), INKSCAPE_ICON("draw-calligraphic")),
- new ContextVerb(SP_VERB_CONTEXT_TEXT, "ToolText", NC_("ContextVerb", "Text"),
- N_("Create and edit text objects"), INKSCAPE_ICON("draw-text")),
- new ContextVerb(SP_VERB_CONTEXT_GRADIENT, "ToolGradient", NC_("ContextVerb", "Gradient"),
+ new ContextVerb(SP_VERB_CONTEXT_TEXT, "ToolText", NC_("ContextVerb", "Text"), N_("Create and edit text objects"),
+ INKSCAPE_ICON("draw-text")),
+ new ContextVerb(SP_VERB_CONTEXT_GRADIENT, "ToolGradient", NC_("ContextVerb", "Gradient"),
N_("Create and edit gradients"), INKSCAPE_ICON("color-gradient")),
- new ContextVerb(SP_VERB_CONTEXT_MESH, "ToolMesh", NC_("ContextVerb", "Mesh"),
- N_("Create and edit meshes"), INKSCAPE_ICON("mesh-gradient")),
- new ContextVerb(SP_VERB_CONTEXT_ZOOM, "ToolZoom", NC_("ContextVerb", "Zoom"),
- N_("Zoom in or out"), INKSCAPE_ICON("zoom")),
- new ContextVerb(SP_VERB_CONTEXT_MEASURE, "ToolMeasure", NC_("ContextVerb", "Measure"),
- N_("Measurement tool"), INKSCAPE_ICON("tool-measure")),
- new ContextVerb(SP_VERB_CONTEXT_DROPPER, "ToolDropper", NC_("ContextVerb", "Dropper"),
- N_("Pick colors from image"), INKSCAPE_ICON("color-picker")),
+ new ContextVerb(SP_VERB_CONTEXT_MESH, "ToolMesh", NC_("ContextVerb", "Mesh"), N_("Create and edit meshes"),
+ INKSCAPE_ICON("mesh-gradient")),
+ new ContextVerb(SP_VERB_CONTEXT_ZOOM, "ToolZoom", NC_("ContextVerb", "Zoom"), N_("Zoom in or out"),
+ INKSCAPE_ICON("zoom")),
+ new ContextVerb(SP_VERB_CONTEXT_MEASURE, "ToolMeasure", NC_("ContextVerb", "Measure"), N_("Measurement tool"),
+ INKSCAPE_ICON("tool-measure")),
+ new ContextVerb(SP_VERB_CONTEXT_DROPPER, "ToolDropper", NC_("ContextVerb", "Dropper"), N_("Pick colors from image"),
+ INKSCAPE_ICON("color-picker")),
new ContextVerb(SP_VERB_CONTEXT_CONNECTOR, "ToolConnector", NC_("ContextVerb", "Connector"),
N_("Create diagram connectors"), INKSCAPE_ICON("draw-connector")),
@@ -2982,10 +2991,10 @@ Verb *Verb::_base_verbs[] = {
N_("Fill bounded areas"), INKSCAPE_ICON("color-fill")),
#endif
- new ContextVerb(SP_VERB_CONTEXT_LPE, "ToolLPE", NC_("ContextVerb", "LPE Edit"),
- N_("Edit Path Effect parameters"), nullptr),
- new ContextVerb(SP_VERB_CONTEXT_ERASER, "ToolEraser", NC_("ContextVerb", "Eraser"),
- N_("Erase existing paths"), INKSCAPE_ICON("draw-eraser")),
+ new ContextVerb(SP_VERB_CONTEXT_LPE, "ToolLPE", NC_("ContextVerb", "LPE Edit"), N_("Edit Path Effect parameters"),
+ nullptr),
+ new ContextVerb(SP_VERB_CONTEXT_ERASER, "ToolEraser", NC_("ContextVerb", "Eraser"), N_("Erase existing paths"),
+ INKSCAPE_ICON("draw-eraser")),
new ContextVerb(SP_VERB_CONTEXT_LPETOOL, "ToolLPETool", NC_("ContextVerb", "LPE Tool"),
N_("Do geometric constructions"), "draw-geometry"),
// Tool prefs
@@ -3045,58 +3054,67 @@ Verb *Verb::_base_verbs[] = {
INKSCAPE_ICON("zoom-next")),
new ZoomVerb(SP_VERB_ZOOM_PREV, "ZoomPrev", N_("Pre_vious Zoom"), N_("Previous zoom (from the history of zooms)"),
INKSCAPE_ICON("zoom-previous")),
- new ZoomVerb(SP_VERB_ZOOM_1_1, "Zoom1:0", N_("Zoom 1:_1"), N_("Zoom to 1:1"),
- INKSCAPE_ICON("zoom-original")),
- new ZoomVerb(SP_VERB_ZOOM_1_2, "Zoom1:2", N_("Zoom 1:_2"), N_("Zoom to 1:2"),
- INKSCAPE_ICON("zoom-half-size")),
- new ZoomVerb(SP_VERB_ZOOM_2_1, "Zoom2:1", N_("_Zoom 2:1"), N_("Zoom to 2:1"),
- INKSCAPE_ICON("zoom-double-size")),
- new ZoomVerb(SP_VERB_ZOOM_PAGE, "ZoomPage", N_("_Page"),
- N_("Zoom to fit page in window"), INKSCAPE_ICON("zoom-fit-page")),
- new ZoomVerb(SP_VERB_ZOOM_PAGE_WIDTH, "ZoomPageWidth", N_("Page _Width"),
- N_("Zoom to fit page width in window"), INKSCAPE_ICON("zoom-fit-width")),
- new ZoomVerb(SP_VERB_ZOOM_DRAWING, "ZoomDrawing", N_("_Drawing"),
- N_("Zoom to fit drawing in window"), INKSCAPE_ICON("zoom-fit-drawing")),
- new ZoomVerb(SP_VERB_ZOOM_SELECTION, "ZoomSelection", N_("_Selection"),
- N_("Zoom to fit selection in window"), INKSCAPE_ICON("zoom-fit-selection")),
-
- new ZoomVerb(SP_VERB_ROTATE_CW, "RotateClockwise", N_("Rotate Clockwise"), N_("Rotate canvas clockwise"), nullptr),
- new ZoomVerb(SP_VERB_ROTATE_CCW, "RotateCounterClockwise", N_("Rotate Counter-Clockwise"), N_("Rotate canvas counter-clockwise"), nullptr),
- new ZoomVerb(SP_VERB_ROTATE_ZERO, "RotateZero", N_("Reset Rotation"), N_("Reset canvas rotation to zero"), nullptr),
-
- new ZoomVerb(SP_VERB_FLIP_HORIZONTAL, "FlipHorizontal", N_("Flip Horizontally"), N_("Flip canvas horizontally"), INKSCAPE_ICON("object-flip-horizontal")),
- new ZoomVerb(SP_VERB_FLIP_VERTICAL, "FlipVertical", N_("Flip Vertically"), N_("Flip canvas vertically"), INKSCAPE_ICON("object-flip-vertical")),
- new ZoomVerb(SP_VERB_FLIP_NONE, "FlipNone", N_("Reset Flip"), N_("Undo any flip"), nullptr),
-
-
-// WHY ARE THE FOLLOWING ZoomVerbs???
+ new ZoomVerb(SP_VERB_ZOOM_1_1, "Zoom1:0", N_("Zoom 1:_1"), N_("Zoom to 1:1"), INKSCAPE_ICON("zoom-original")),
+ new ZoomVerb(SP_VERB_ZOOM_1_2, "Zoom1:2", N_("Zoom 1:_2"), N_("Zoom to 1:2"), INKSCAPE_ICON("zoom-half-size")),
+ new ZoomVerb(SP_VERB_ZOOM_2_1, "Zoom2:1", N_("_Zoom 2:1"), N_("Zoom to 2:1"), INKSCAPE_ICON("zoom-double-size")),
+ new ZoomVerb(SP_VERB_ZOOM_PAGE, "ZoomPage", N_("_Page"), N_("Zoom to fit page in window"),
+ INKSCAPE_ICON("zoom-fit-page")),
+ new ZoomVerb(SP_VERB_ZOOM_PAGE_WIDTH, "ZoomPageWidth", N_("Page _Width"), N_("Zoom to fit page width in window"),
+ INKSCAPE_ICON("zoom-fit-width")),
+ new ZoomVerb(SP_VERB_ZOOM_DRAWING, "ZoomDrawing", N_("_Drawing"), N_("Zoom to fit drawing in window"),
+ INKSCAPE_ICON("zoom-fit-drawing")),
+ new ZoomVerb(SP_VERB_ZOOM_SELECTION, "ZoomSelection", N_("_Selection"), N_("Zoom to fit selection in window"),
+ INKSCAPE_ICON("zoom-fit-selection")),
+
+ new ZoomVerb(SP_VERB_ROTATE_CW, "RotateClockwise", N_("Rotate Clockwise"), N_("Rotate canvas clockwise"), nullptr),
+ new ZoomVerb(SP_VERB_ROTATE_CCW, "RotateCounterClockwise", N_("Rotate Counter-Clockwise"),
+ N_("Rotate canvas counter-clockwise"), nullptr),
+ new ZoomVerb(SP_VERB_ROTATE_ZERO, "RotateZero", N_("Reset Rotation"), N_("Reset canvas rotation to zero"), nullptr),
+
+ new ZoomVerb(SP_VERB_FLIP_HORIZONTAL, "FlipHorizontal", N_("Flip Horizontally"), N_("Flip canvas horizontally"),
+ INKSCAPE_ICON("object-flip-horizontal")),
+ new ZoomVerb(SP_VERB_FLIP_VERTICAL, "FlipVertical", N_("Flip Vertically"), N_("Flip canvas vertically"),
+ INKSCAPE_ICON("object-flip-vertical")),
+ new ZoomVerb(SP_VERB_FLIP_NONE, "FlipNone", N_("Reset Flip"), N_("Undo any flip"), nullptr),
+
+
+ // WHY ARE THE FOLLOWING ZoomVerbs???
// View
new ZoomVerb(SP_VERB_TOGGLE_RULERS, "ToggleRulers", N_("_Rulers"), N_("Show or hide the canvas rulers"), nullptr),
- new ZoomVerb(SP_VERB_TOGGLE_SCROLLBARS, "ToggleScrollbars", N_("Scroll_bars"), N_("Show or hide the canvas scrollbars"), nullptr),
- new ZoomVerb(SP_VERB_TOGGLE_GRID, "ToggleGrid", N_("Page _Grid"), N_("Show or hide the page grid"), INKSCAPE_ICON("show-grid")),
- new ZoomVerb(SP_VERB_TOGGLE_GUIDES, "ToggleGuides", N_("G_uides"), N_("Show or hide guides (drag from a ruler to create a guide)"), INKSCAPE_ICON("show-guides")),
+ new ZoomVerb(SP_VERB_TOGGLE_SCROLLBARS, "ToggleScrollbars", N_("Scroll_bars"),
+ N_("Show or hide the canvas scrollbars"), nullptr),
+ new ZoomVerb(SP_VERB_TOGGLE_GRID, "ToggleGrid", N_("Page _Grid"), N_("Show or hide the page grid"),
+ INKSCAPE_ICON("show-grid")),
+ new ZoomVerb(SP_VERB_TOGGLE_GUIDES, "ToggleGuides", N_("G_uides"),
+ N_("Show or hide guides (drag from a ruler to create a guide)"), INKSCAPE_ICON("show-guides")),
new ZoomVerb(SP_VERB_TOGGLE_SNAPPING, "ToggleSnapGlobal", N_("Snap"), N_("Enable snapping"), INKSCAPE_ICON("snap")),
- new ZoomVerb(SP_VERB_TOGGLE_COMMANDS_TOOLBAR, "ToggleCommandsToolbar", N_("_Commands Bar"), N_("Show or hide the Commands bar (under the menu)"), nullptr),
- new ZoomVerb(SP_VERB_TOGGLE_SNAP_TOOLBAR, "ToggleSnapToolbar", N_("Sn_ap Controls Bar"), N_("Show or hide the snapping controls"), nullptr),
- new ZoomVerb(SP_VERB_TOGGLE_TOOL_TOOLBAR, "ToggleToolToolbar", N_("T_ool Controls Bar"), N_("Show or hide the Tool Controls bar"), nullptr),
- new ZoomVerb(SP_VERB_TOGGLE_TOOLBOX, "ToggleToolbox", N_("_Toolbox"), N_("Show or hide the main toolbox (on the left)"), nullptr),
- new ZoomVerb(SP_VERB_TOGGLE_PALETTE, "TogglePalette", N_("_Palette"), N_("Show or hide the color palette"), nullptr),
- new ZoomVerb(SP_VERB_TOGGLE_STATUSBAR, "ToggleStatusbar", N_("_Statusbar"), N_("Show or hide the statusbar (at the bottom of the window)"), nullptr),
+ new ZoomVerb(SP_VERB_TOGGLE_COMMANDS_TOOLBAR, "ToggleCommandsToolbar", N_("_Commands Bar"),
+ N_("Show or hide the Commands bar (under the menu)"), nullptr),
+ new ZoomVerb(SP_VERB_TOGGLE_SNAP_TOOLBAR, "ToggleSnapToolbar", N_("Sn_ap Controls Bar"),
+ N_("Show or hide the snapping controls"), nullptr),
+ new ZoomVerb(SP_VERB_TOGGLE_TOOL_TOOLBAR, "ToggleToolToolbar", N_("T_ool Controls Bar"),
+ N_("Show or hide the Tool Controls bar"), nullptr),
+ new ZoomVerb(SP_VERB_TOGGLE_TOOLBOX, "ToggleToolbox", N_("_Toolbox"),
+ N_("Show or hide the main toolbox (on the left)"), nullptr),
+ new ZoomVerb(SP_VERB_TOGGLE_PALETTE, "TogglePalette", N_("_Palette"), N_("Show or hide the color palette"),
+ nullptr),
+ new ZoomVerb(SP_VERB_TOGGLE_STATUSBAR, "ToggleStatusbar", N_("_Statusbar"),
+ N_("Show or hide the statusbar (at the bottom of the window)"), nullptr),
new ZoomVerb(SP_VERB_FULLSCREEN, "FullScreen", N_("_Fullscreen"), N_("Stretch this document window to full screen"),
INKSCAPE_ICON("view-fullscreen")),
- new ZoomVerb(SP_VERB_FULLSCREENFOCUS, "FullScreenFocus", N_("Fullscreen & Focus Mode"), N_("Stretch this document window to full screen"),
- INKSCAPE_ICON("view-fullscreen")),
- new ZoomVerb(SP_VERB_FOCUSTOGGLE, "FocusToggle", N_("Toggle _Focus Mode"), N_("Remove excess toolbars to focus on drawing"),
- nullptr),
+ new ZoomVerb(SP_VERB_FULLSCREENFOCUS, "FullScreenFocus", N_("Fullscreen & Focus Mode"),
+ N_("Stretch this document window to full screen"), INKSCAPE_ICON("view-fullscreen")),
+ new ZoomVerb(SP_VERB_FOCUSTOGGLE, "FocusToggle", N_("Toggle _Focus Mode"),
+ N_("Remove excess toolbars to focus on drawing"), nullptr),
new ZoomVerb(SP_VERB_VIEW_NEW, "ViewNew", N_("Duplic_ate Window"), N_("Open a new window with the same document"),
INKSCAPE_ICON("window-new")),
- new ZoomVerb(SP_VERB_VIEW_NEW_PREVIEW, "ViewNewPreview", N_("_New View Preview"),
- N_("New View Preview"), nullptr/*"view_new_preview"*/),
+ new ZoomVerb(SP_VERB_VIEW_NEW_PREVIEW, "ViewNewPreview", N_("_New View Preview"), N_("New View Preview"),
+ nullptr /*"view_new_preview"*/),
- new ZoomVerb(SP_VERB_VIEW_MODE_NORMAL, "ViewModeNormal", N_("_Normal"),
- N_("Switch to normal display mode"), nullptr),
+ new ZoomVerb(SP_VERB_VIEW_MODE_NORMAL, "ViewModeNormal", N_("_Normal"), N_("Switch to normal display mode"),
+ nullptr),
new ZoomVerb(SP_VERB_VIEW_MODE_NO_FILTERS, "ViewModeNoFilters", N_("No _Filters"),
N_("Switch to normal display without filters"), nullptr),
new ZoomVerb(SP_VERB_VIEW_MODE_OUTLINE, "ViewModeOutline", N_("_Outline"),
@@ -3105,38 +3123,43 @@ Verb *Verb::_base_verbs[] = {
N_("Toggle between normal and outline display modes"), nullptr),
new ZoomVerb(SP_VERB_VIEW_COLOR_MODE_NORMAL, "ViewColorModeNormal", N_("_Normal"),
N_("Switch to normal color display mode"), nullptr),
- new ZoomVerb(SP_VERB_VIEW_COLOR_MODE_GRAYSCALE, "ViewColorModeGrayscale", N_("_Grayscale"),
+ new ZoomVerb(SP_VERB_VIEW_COLOR_MODE_GRAYSCALE, "ViewColorModeGrayscale", N_("_Grayscale"),
N_("Switch to grayscale display mode"), nullptr),
-// new ZoomVerb(SP_VERB_VIEW_COLOR_MODE_PRINT_COLORS_PREVIEW, "ViewColorModePrintColorsPreview", N_("_Print Colors Preview"),
-// N_("Switch to print colors preview mode"), NULL),
- new ZoomVerb(SP_VERB_VIEW_COLOR_MODE_TOGGLE, "ViewColorModeToggle", N_("_Toggle"),
+ // new ZoomVerb(SP_VERB_VIEW_COLOR_MODE_PRINT_COLORS_PREVIEW, "ViewColorModePrintColorsPreview", N_("_Print
+ // Colors Preview"),
+ // N_("Switch to print colors preview mode"), NULL),
+ new ZoomVerb(SP_VERB_VIEW_COLOR_MODE_TOGGLE, "ViewColorModeToggle", N_("_Toggle"),
N_("Toggle between normal and grayscale color display modes"), nullptr),
new ZoomVerb(SP_VERB_VIEW_CMS_TOGGLE, "ViewCmsToggle", N_("Color-managed view"),
N_("Toggle color-managed display for this document window"), INKSCAPE_ICON("color-management")),
new ZoomVerb(SP_VERB_VIEW_ICON_PREVIEW, "ViewIconPreview", N_("Ico_n Preview..."),
- N_("Open a window to preview objects at different icon resolutions"), INKSCAPE_ICON("dialog-icon-preview")),
+ N_("Open a window to preview objects at different icon resolutions"),
+ INKSCAPE_ICON("dialog-icon-preview")),
// Dialogs
- new DialogVerb(SP_VERB_DIALOG_PROTOTYPE, "DialogPrototype", N_("Prototype..."),
- N_("Prototype Dialog"), INKSCAPE_ICON("gtk-preferences")),
+ new DialogVerb(SP_VERB_DIALOG_PROTOTYPE, "DialogPrototype", N_("Prototype..."), N_("Prototype Dialog"),
+ INKSCAPE_ICON("gtk-preferences")),
new DialogVerb(SP_VERB_DIALOG_DISPLAY, "DialogPreferences", N_("P_references..."),
N_("Edit global Inkscape preferences"), INKSCAPE_ICON("gtk-preferences")),
new DialogVerb(SP_VERB_DIALOG_NAMEDVIEW, "DialogDocumentProperties", N_("_Document Properties..."),
- N_("Edit properties of this document (to be saved with the document)"), INKSCAPE_ICON("document-properties")),
+ N_("Edit properties of this document (to be saved with the document)"),
+ INKSCAPE_ICON("document-properties")),
new DialogVerb(SP_VERB_DIALOG_METADATA, "DialogMetadata", N_("Document _Metadata..."),
- N_("Edit document metadata (to be saved with the document)"), INKSCAPE_ICON("document-metadata") ),
+ N_("Edit document metadata (to be saved with the document)"), INKSCAPE_ICON("document-metadata")),
new DialogVerb(SP_VERB_DIALOG_FILL_STROKE, "DialogFillStroke", N_("_Fill and Stroke..."),
- N_("Edit objects' colors, gradients, arrowheads, and other fill and stroke properties..."), INKSCAPE_ICON("dialog-fill-and-stroke")),
+ N_("Edit objects' colors, gradients, arrowheads, and other fill and stroke properties..."),
+ INKSCAPE_ICON("dialog-fill-and-stroke")),
// FIXME: Probably better to either use something from the icon naming spec or ship our own "select-font" icon
- // Technically what we show are unicode code points and not glyphs. The actual glyphs shown are determined by the shaping engines.
+ // Technically what we show are unicode code points and not glyphs. The actual glyphs shown are determined by the
+ // shaping engines.
new DialogVerb(SP_VERB_DIALOG_GLYPHS, "DialogGlyphs", N_("_Unicode Characters..."),
N_("Select Unicode characters from a palette"), INKSCAPE_ICON("gtk-select-font")),
// FIXME: Probably better to either use something from the icon naming spec or ship our own "select-color" icon
// TRANSLATORS: "Swatches" means: color samples
new DialogVerb(SP_VERB_DIALOG_SWATCHES, "DialogSwatches", N_("S_watches..."),
- N_("Select colors from a swatches palette"), INKSCAPE_ICON("gtk-select-color")),
+ N_("Select colors from a swatches palette"), INKSCAPE_ICON("swatches")),
new DialogVerb(SP_VERB_DIALOG_SYMBOLS, "DialogSymbols", N_("S_ymbols..."),
N_("Select symbol from a symbols palette"), INKSCAPE_ICON("symbols")),
new DialogVerb(SP_VERB_DIALOG_TRANSFORM, "DialogTransform", N_("Transfor_m..."),
@@ -3145,74 +3168,75 @@ Verb *Verb::_base_verbs[] = {
N_("Align and distribute objects"), INKSCAPE_ICON("dialog-align-and-distribute")),
new DialogVerb(SP_VERB_DIALOG_SPRAY_OPTION, "DialogSprayOption", N_("_Spray options..."),
N_("Some options for the spray"), INKSCAPE_ICON("dialog-spray-options")),
- new DialogVerb(SP_VERB_DIALOG_UNDO_HISTORY, "DialogUndoHistory", N_("Undo _History..."),
- N_("Undo History"), INKSCAPE_ICON("edit-undo-history")),
+ new DialogVerb(SP_VERB_DIALOG_UNDO_HISTORY, "DialogUndoHistory", N_("Undo _History..."), N_("Undo History"),
+ INKSCAPE_ICON("edit-undo-history")),
new DialogVerb(SP_VERB_DIALOG_TEXT, "DialogText", N_("_Text and Font..."),
- N_("View and select font family, font size and other text properties"), INKSCAPE_ICON("dialog-text-and-font")),
+ N_("View and select font family, font size and other text properties"),
+ INKSCAPE_ICON("dialog-text-and-font")),
new DialogVerb(SP_VERB_DIALOG_XML_EDITOR, "DialogXMLEditor", N_("_XML Editor..."),
N_("View and edit the XML tree of the document"), INKSCAPE_ICON("dialog-xml-editor")),
- new DialogVerb(SP_VERB_DIALOG_FIND, "DialogFind", N_("_Find/Replace..."),
- N_("Find objects in document"), INKSCAPE_ICON("edit-find")),
+ new DialogVerb(SP_VERB_DIALOG_FIND, "DialogFind", N_("_Find/Replace..."), N_("Find objects in document"),
+ INKSCAPE_ICON("edit-find")),
new DialogVerb(SP_VERB_DIALOG_FINDREPLACE, "DialogFindReplace", N_("Find and _Replace Text..."),
N_("Find and replace text in document"), INKSCAPE_ICON("edit-find-replace")),
new DialogVerb(SP_VERB_DIALOG_SPELLCHECK, "DialogSpellcheck", N_("Check Spellin_g..."),
N_("Check spelling of text in document"), INKSCAPE_ICON("tools-check-spelling")),
- new DialogVerb(SP_VERB_DIALOG_DEBUG, "DialogDebug", N_("_Messages..."),
- N_("View debug messages"), INKSCAPE_ICON("dialog-messages")),
+ new DialogVerb(SP_VERB_DIALOG_DEBUG, "DialogDebug", N_("_Messages..."), N_("View debug messages"),
+ INKSCAPE_ICON("dialog-messages")),
new DialogVerb(SP_VERB_DIALOG_TOGGLE, "DialogsToggle", N_("Show/Hide D_ialogs"),
N_("Show or hide all open dialogs"), INKSCAPE_ICON("show-dialogs")),
new DialogVerb(SP_VERB_DIALOG_CLONETILER, "DialogClonetiler", N_("Create Tiled Clones..."),
- N_("Create multiple clones of selected object, arranging them into a pattern or scattering"), INKSCAPE_ICON("dialog-tile-clones")),
+ N_("Create multiple clones of selected object, arranging them into a pattern or scattering"),
+ INKSCAPE_ICON("dialog-tile-clones")),
new DialogVerb(SP_VERB_DIALOG_ATTR, "DialogObjectAttributes", N_("_Object attributes..."),
N_("Edit the object attributes..."), INKSCAPE_ICON("dialog-object-properties")),
new DialogVerb(SP_VERB_DIALOG_ITEM, "DialogObjectProperties", N_("_Object Properties..."),
- N_("Edit the ID, locked and visible status, and other object properties"), INKSCAPE_ICON("dialog-object-properties")),
+ N_("Edit the ID, locked and visible status, and other object properties"),
+ INKSCAPE_ICON("dialog-object-properties")),
new DialogVerb(SP_VERB_DIALOG_INPUT, "DialogInput", N_("_Input Devices..."),
- N_("Configure extended input devices, such as a graphics tablet"), INKSCAPE_ICON("dialog-input-devices")),
+ N_("Configure extended input devices, such as a graphics tablet"),
+ INKSCAPE_ICON("dialog-input-devices")),
new DialogVerb(SP_VERB_DIALOG_EXTENSIONEDITOR, "org.inkscape.dialogs.extensioneditor", N_("_Extensions..."),
N_("Query information about extensions"), nullptr),
- new DialogVerb(SP_VERB_DIALOG_LAYERS, "DialogLayers", N_("Layer_s..."),
- N_("View Layers"), INKSCAPE_ICON("dialog-layers")),
- new DialogVerb(SP_VERB_DIALOG_OBJECTS, "DialogObjects", N_("Object_s..."),
- N_("View Objects"), INKSCAPE_ICON("dialog-layers")),
- new DialogVerb(SP_VERB_DIALOG_TAGS, "DialogTags", N_("Selection se_ts..."),
- N_("View Tags"), INKSCAPE_ICON("edit-select-all-layers")),
- new DialogVerb(SP_VERB_DIALOG_STYLE, "DialogStyle", N_("Style Dialog..."),
- N_("View Style Dialog"), nullptr),
- new DialogVerb(SP_VERB_DIALOG_CSS, "DialogCss", N_("Css Dialog..."),
- N_("View Css Dialog"), nullptr),
+ new DialogVerb(SP_VERB_DIALOG_LAYERS, "DialogLayers", N_("Layer_s..."), N_("View Layers"),
+ INKSCAPE_ICON("dialog-layers")),
+ new DialogVerb(SP_VERB_DIALOG_OBJECTS, "DialogObjects", N_("Object_s..."), N_("View Objects"),
+ INKSCAPE_ICON("dialog-layers")),
+ new DialogVerb(SP_VERB_DIALOG_TAGS, "DialogTags", N_("Selection se_ts..."), N_("View Tags"),
+ INKSCAPE_ICON("edit-select-all-layers")),
+ new DialogVerb(SP_VERB_DIALOG_STYLE, "DialogStyle", N_("Style Dialog..."), N_("View Style Dialog"), nullptr),
+ new DialogVerb(SP_VERB_DIALOG_CSS, "DialogCss", N_("Css Dialog..."), N_("View Css Dialog"), nullptr),
new DialogVerb(SP_VERB_DIALOG_LIVE_PATH_EFFECT, "DialogLivePathEffect", N_("Path E_ffects ..."),
N_("Manage, edit, and apply path effects"), INKSCAPE_ICON("dialog-path-effects")),
new DialogVerb(SP_VERB_DIALOG_FILTER_EFFECTS, "DialogFilterEffects", N_("Filter _Editor..."),
N_("Manage, edit, and apply SVG filters"), INKSCAPE_ICON("dialog-filters")),
- new DialogVerb(SP_VERB_DIALOG_SVG_FONTS, "DialogSVGFonts", N_("SVG Font Editor..."),
- N_("Edit SVG fonts"), nullptr),
+ new DialogVerb(SP_VERB_DIALOG_SVG_FONTS, "DialogSVGFonts", N_("SVG Font Editor..."), N_("Edit SVG fonts"), nullptr),
new DialogVerb(SP_VERB_DIALOG_PRINT_COLORS_PREVIEW, "DialogPrintColorsPreview", N_("Print Colors..."),
N_("Select which color separations to render in Print Colors Preview rendermode"), nullptr),
new DialogVerb(SP_VERB_DIALOG_EXPORT, "DialogExport", N_("_Export PNG Image..."),
- N_("Export this document or a selection as a PNG image"), INKSCAPE_ICON("document-export")),
+ N_("Export this document or a selection as a PNG image"), INKSCAPE_ICON("document-export")),
// Help
new HelpVerb(SP_VERB_HELP_ABOUT_EXTENSIONS, "HelpAboutExtensions", N_("About E_xtensions"),
N_("Information on Inkscape extensions"), nullptr),
- new HelpVerb(SP_VERB_HELP_MEMORY, "HelpAboutMemory", N_("About _Memory"),
- N_("Memory usage information"), INKSCAPE_ICON("dialog-memory")),
- new HelpVerb(SP_VERB_HELP_ABOUT, "HelpAbout", N_("_About Inkscape"),
- N_("Inkscape version, authors, license"), INKSCAPE_ICON("inkscape-logo")),
- //new HelpVerb(SP_VERB_SHOW_LICENSE, "ShowLicense", N_("_License"),
+ new HelpVerb(SP_VERB_HELP_MEMORY, "HelpAboutMemory", N_("About _Memory"), N_("Memory usage information"),
+ INKSCAPE_ICON("dialog-memory")),
+ new HelpVerb(SP_VERB_HELP_ABOUT, "HelpAbout", N_("_About Inkscape"), N_("Inkscape version, authors, license"),
+ INKSCAPE_ICON("inkscape-logo")),
+ // new HelpVerb(SP_VERB_SHOW_LICENSE, "ShowLicense", N_("_License"),
// N_("Distribution terms"), /*"show_license"*/"inkscape_options"),
// Tutorials
new TutorialVerb(SP_VERB_TUTORIAL_BASIC, "TutorialsBasic", N_("Inkscape: _Basic"),
- N_("Getting started with Inkscape"), nullptr/*"tutorial_basic"*/),
+ N_("Getting started with Inkscape"), nullptr /*"tutorial_basic"*/),
new TutorialVerb(SP_VERB_TUTORIAL_SHAPES, "TutorialsShapes", N_("Inkscape: _Shapes"),
N_("Using shape tools to create and edit shapes"), nullptr),
new TutorialVerb(SP_VERB_TUTORIAL_ADVANCED, "TutorialsAdvanced", N_("Inkscape: _Advanced"),
- N_("Advanced Inkscape topics"), nullptr/*"tutorial_advanced"*/),
+ N_("Advanced Inkscape topics"), nullptr /*"tutorial_advanced"*/),
#if HAVE_POTRACE
// TRANSLATORS: "to trace" means "to convert a bitmap to vector graphics" (to vectorize)
- new TutorialVerb(SP_VERB_TUTORIAL_TRACING, "TutorialsTracing", N_("Inkscape: T_racing"),
- N_("Using bitmap tracing"), nullptr/*"tutorial_tracing"*/),
+ new TutorialVerb(SP_VERB_TUTORIAL_TRACING, "TutorialsTracing", N_("Inkscape: T_racing"), N_("Using bitmap tracing"),
+ nullptr /*"tutorial_tracing"*/),
#endif
new TutorialVerb(SP_VERB_TUTORIAL_TRACING_PIXELART, "TutorialsTracingPixelArt", N_("Inkscape: Tracing Pixel Art"),
@@ -3220,11 +3244,11 @@ Verb *Verb::_base_verbs[] = {
new TutorialVerb(SP_VERB_TUTORIAL_CALLIGRAPHY, "TutorialsCalligraphy", N_("Inkscape: _Calligraphy"),
N_("Using the Calligraphy pen tool"), nullptr),
new TutorialVerb(SP_VERB_TUTORIAL_INTERPOLATE, "TutorialsInterpolate", N_("Inkscape: _Interpolate"),
- N_("Using the interpolate extension"), nullptr/*"tutorial_interpolate"*/),
+ N_("Using the interpolate extension"), nullptr /*"tutorial_interpolate"*/),
new TutorialVerb(SP_VERB_TUTORIAL_DESIGN, "TutorialsDesign", N_("_Elements of Design"),
- N_("Principles of design in the tutorial form"), nullptr/*"tutorial_design"*/),
+ N_("Principles of design in the tutorial form"), nullptr /*"tutorial_design"*/),
new TutorialVerb(SP_VERB_TUTORIAL_TIPS, "TutorialsTips", N_("_Tips and Tricks"),
- N_("Miscellaneous tips and tricks"), nullptr/*"tutorial_tips"*/),
+ N_("Miscellaneous tips and tricks"), nullptr /*"tutorial_tips"*/),
// Effect -- renamed Extension
new EffectLastVerb(SP_VERB_EFFECT_LAST, "EffectLast", N_("Previous Exte_nsion"),
@@ -3234,59 +3258,69 @@ Verb *Verb::_base_verbs[] = {
// Fit Page
new FitCanvasVerb(SP_VERB_FIT_CANVAS_TO_SELECTION, "FitCanvasToSelection", N_("Fit Page to Selection"),
- N_("Fit the page to the current selection"), nullptr),
+ N_("Fit the page to the current selection"), nullptr),
new FitCanvasVerb(SP_VERB_FIT_CANVAS_TO_DRAWING, "FitCanvasToDrawing", N_("Fit Page to Drawing"),
- N_("Fit the page to the drawing"), nullptr),
- new FitCanvasVerb(SP_VERB_FIT_CANVAS_TO_SELECTION_OR_DRAWING, "FitCanvasToSelectionOrDrawing", N_("_Resize Page to Selection"),
- N_("Fit the page to the current selection or the drawing if there is no selection"), nullptr),
+ N_("Fit the page to the drawing"), nullptr),
+ new FitCanvasVerb(SP_VERB_FIT_CANVAS_TO_SELECTION_OR_DRAWING, "FitCanvasToSelectionOrDrawing",
+ N_("_Resize Page to Selection"),
+ N_("Fit the page to the current selection or the drawing if there is no selection"), nullptr),
// LockAndHide
new LockAndHideVerb(SP_VERB_UNLOCK_ALL, "UnlockAll", N_("Unlock All"),
- N_("Unlock all objects in the current layer"), nullptr),
+ N_("Unlock all objects in the current layer"), nullptr),
new LockAndHideVerb(SP_VERB_UNLOCK_ALL_IN_ALL_LAYERS, "UnlockAllInAllLayers", N_("Unlock All in All Layers"),
- N_("Unlock all objects in all layers"), nullptr),
+ N_("Unlock all objects in all layers"), nullptr),
new LockAndHideVerb(SP_VERB_UNHIDE_ALL, "UnhideAll", N_("Unhide All"),
- N_("Unhide all objects in the current layer"), nullptr),
+ N_("Unhide all objects in the current layer"), nullptr),
new LockAndHideVerb(SP_VERB_UNHIDE_ALL_IN_ALL_LAYERS, "UnhideAllInAllLayers", N_("Unhide All in All Layers"),
- N_("Unhide all objects in all layers"), nullptr),
+ N_("Unhide all objects in all layers"), nullptr),
// Color Management
new EditVerb(SP_VERB_EDIT_LINK_COLOR_PROFILE, "LinkColorProfile", N_("Link Color Profile"),
N_("Link an ICC color profile"), nullptr),
new EditVerb(SP_VERB_EDIT_REMOVE_COLOR_PROFILE, "RemoveColorProfile", N_("Remove Color Profile"),
N_("Remove a linked ICC color profile"), nullptr),
// Scripting
- new ContextVerb(SP_VERB_EDIT_ADD_EXTERNAL_SCRIPT, "AddExternalScript",
- N_("Add External Script"), N_("Add an external script"), nullptr),
- new ContextVerb(SP_VERB_EDIT_ADD_EMBEDDED_SCRIPT, "AddEmbeddedScript",
- N_("Add Embedded Script"), N_("Add an embedded script"), nullptr),
- new ContextVerb(SP_VERB_EDIT_EMBEDDED_SCRIPT, "EditEmbeddedScript",
- N_("Edit Embedded Script"), N_("Edit an embedded script"), nullptr),
- new ContextVerb(SP_VERB_EDIT_REMOVE_EXTERNAL_SCRIPT, "RemoveExternalScript",
- N_("Remove External Script"), N_("Remove an external script"), nullptr),
- new ContextVerb(SP_VERB_EDIT_REMOVE_EMBEDDED_SCRIPT, "RemoveEmbeddedScript",
- N_("Remove Embedded Script"), N_("Remove an embedded script"), nullptr),
- // Align
- new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_RIGHT_TO_ANCHOR, "AlignHorizontalRightToAnchor", N_("Align right edges of objects to the left edge of the anchor"),
- N_("Align right edges of objects to the left edge of the anchor"), INKSCAPE_ICON("align-horizontal-right-to-anchor")),
- new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_LEFT, "AlignHorizontalLeft", N_("Align left edges"),
- N_("Align left edges"), INKSCAPE_ICON("align-horizontal-left")),
- new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_CENTER, "AlignHorizontalCenter", N_("Center on vertical axis"),
- N_("Center on vertical axis"), INKSCAPE_ICON("align-horizontal-center")),
- new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_RIGHT, "AlignHorizontalRight", N_("Align right sides"),
- N_("Align right sides"), INKSCAPE_ICON("align-horizontal-right")),
- new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_LEFT_TO_ANCHOR, "AlignHorizontalLeftToAnchor", N_("Align left edges of objects to the right edge of the anchor"),
- N_("Align left edges of objects to the right edge of the anchor"), INKSCAPE_ICON("align-horizontal-left-to-anchor")),
- new ContextVerb(SP_VERB_ALIGN_VERTICAL_BOTTOM_TO_ANCHOR, "AlignVerticalBottomToAnchor", N_("Align bottom edges of objects to the top edge of the anchor"),
- N_("Align bottom edges of objects to the top edge of the anchor"), INKSCAPE_ICON("align-vertical-bottom-to-anchor")),
- new ContextVerb(SP_VERB_ALIGN_VERTICAL_TOP, "AlignVerticalTop", N_("Align top edges"),
- N_("Align top edges"), INKSCAPE_ICON("align-vertical-top")),
- new ContextVerb(SP_VERB_ALIGN_VERTICAL_CENTER, "AlignVerticalCenter", N_("Center on horizontal axis"),
- N_("Center on horizontal axis"), INKSCAPE_ICON("align-vertical-center")),
- new ContextVerb(SP_VERB_ALIGN_VERTICAL_BOTTOM, "AlignVerticalBottom", N_("Align bottom edges"),
- N_("Align bottom edges"), INKSCAPE_ICON("align-vertical-bottom")),
- new ContextVerb(SP_VERB_ALIGN_VERTICAL_TOP_TO_ANCHOR, "AlignVerticalTopToAnchor", N_("Align top edges of objects to the bottom edge of the anchor"),
- N_("Align top edges of objects to the bottom edge of the anchor"), INKSCAPE_ICON("align-vertical-top-to-anchor")),
- new ContextVerb(SP_VERB_ALIGN_VERTICAL_HORIZONTAL_CENTER, "AlignVerticalHorizontalCenter", N_("Center on horizontal and vertical axis"),
- N_("Center on horizontal and vertical axis"), INKSCAPE_ICON("align-vertical-center")),
+ new ContextVerb(SP_VERB_EDIT_ADD_EXTERNAL_SCRIPT, "AddExternalScript", N_("Add External Script"),
+ N_("Add an external script"), nullptr),
+ new ContextVerb(SP_VERB_EDIT_ADD_EMBEDDED_SCRIPT, "AddEmbeddedScript", N_("Add Embedded Script"),
+ N_("Add an embedded script"), nullptr),
+ new ContextVerb(SP_VERB_EDIT_EMBEDDED_SCRIPT, "EditEmbeddedScript", N_("Edit Embedded Script"),
+ N_("Edit an embedded script"), nullptr),
+ new ContextVerb(SP_VERB_EDIT_REMOVE_EXTERNAL_SCRIPT, "RemoveExternalScript", N_("Remove External Script"),
+ N_("Remove an external script"), nullptr),
+ new ContextVerb(SP_VERB_EDIT_REMOVE_EMBEDDED_SCRIPT, "RemoveEmbeddedScript", N_("Remove Embedded Script"),
+ N_("Remove an embedded script"), nullptr),
+ // Align
+ new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_RIGHT_TO_ANCHOR, "AlignHorizontalRightToAnchor",
+ N_("Align right edges of objects to the left edge of the anchor"),
+ N_("Align right edges of objects to the left edge of the anchor"),
+ INKSCAPE_ICON("align-horizontal-right-to-anchor")),
+ new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_LEFT, "AlignHorizontalLeft", N_("Align left edges"),
+ N_("Align left edges"), INKSCAPE_ICON("align-horizontal-left")),
+ new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_CENTER, "AlignHorizontalCenter", N_("Center on vertical axis"),
+ N_("Center on vertical axis"), INKSCAPE_ICON("align-horizontal-center")),
+ new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_RIGHT, "AlignHorizontalRight", N_("Align right sides"),
+ N_("Align right sides"), INKSCAPE_ICON("align-horizontal-right")),
+ new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_LEFT_TO_ANCHOR, "AlignHorizontalLeftToAnchor",
+ N_("Align left edges of objects to the right edge of the anchor"),
+ N_("Align left edges of objects to the right edge of the anchor"),
+ INKSCAPE_ICON("align-horizontal-left-to-anchor")),
+ new ContextVerb(SP_VERB_ALIGN_VERTICAL_BOTTOM_TO_ANCHOR, "AlignVerticalBottomToAnchor",
+ N_("Align bottom edges of objects to the top edge of the anchor"),
+ N_("Align bottom edges of objects to the top edge of the anchor"),
+ INKSCAPE_ICON("align-vertical-bottom-to-anchor")),
+ new ContextVerb(SP_VERB_ALIGN_VERTICAL_TOP, "AlignVerticalTop", N_("Align top edges"), N_("Align top edges"),
+ INKSCAPE_ICON("align-vertical-top")),
+ new ContextVerb(SP_VERB_ALIGN_VERTICAL_CENTER, "AlignVerticalCenter", N_("Center on horizontal axis"),
+ N_("Center on horizontal axis"), INKSCAPE_ICON("align-vertical-center")),
+ new ContextVerb(SP_VERB_ALIGN_VERTICAL_BOTTOM, "AlignVerticalBottom", N_("Align bottom edges"),
+ N_("Align bottom edges"), INKSCAPE_ICON("align-vertical-bottom")),
+ new ContextVerb(SP_VERB_ALIGN_VERTICAL_TOP_TO_ANCHOR, "AlignVerticalTopToAnchor",
+ N_("Align top edges of objects to the bottom edge of the anchor"),
+ N_("Align top edges of objects to the bottom edge of the anchor"),
+ INKSCAPE_ICON("align-vertical-top-to-anchor")),
+ new ContextVerb(SP_VERB_ALIGN_VERTICAL_HORIZONTAL_CENTER, "AlignVerticalHorizontalCenter",
+ N_("Center on horizontal and vertical axis"), N_("Center on horizontal and vertical axis"),
+ INKSCAPE_ICON("align-vertical-center")),
// Footer
diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp
index 19443716cec682492e44f9953c1de67636db7e95..83094c1566ab5ceb55aeb604ea47f5024e63c6ec 100644
--- a/src/widgets/button.cpp
+++ b/src/widgets/button.cpp
@@ -15,9 +15,10 @@
#include "button.h"
#include "helper/action-context.h"
-#include "ui/interface.h"
-#include "shortcuts.h"
#include "helper/action.h"
+#include "helper/icon-loader.h"
+#include "shortcuts.h"
+#include "ui/interface.h"
static void sp_button_dispose(GObject *object);
static void sp_button_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width);
@@ -211,7 +212,7 @@ static void sp_button_set_action(SPButton *button, SPAction *action)
button->c_set_sensitive = action->signal_set_sensitive.connect(
sigc::bind<0>(sigc::ptr_fun(>k_widget_set_sensitive), GTK_WIDGET(button)));
if (action->image) {
- child = gtk_image_new_from_icon_name(action->image, button->lsize);
+ child = GTK_WIDGET(sp_get_icon_image(action->image, "/toolbox/tools/small")->gobj());
gtk_widget_show(child);
gtk_container_add(GTK_CONTAINER(button), child);
}
diff --git a/src/widgets/ege-adjustment-action.cpp b/src/widgets/ege-adjustment-action.cpp
index 5b71110b2211f7d26231fca343ef63e8bddd52a9..927b6aec0fd8b383a40a007bce3c471f9141b14f 100644
--- a/src/widgets/ege-adjustment-action.cpp
+++ b/src/widgets/ege-adjustment-action.cpp
@@ -50,9 +50,10 @@
#include
#include
-#include "widgets/ege-adjustment-action.h"
+#include "helper/icon-loader.h"
#include "ui/icon-names.h"
#include "ui/widget/ink-spinscale.h"
+#include "widgets/ege-adjustment-action.h"
static void ege_adjustment_action_finalize( GObject* object );
static void ege_adjustment_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec );
@@ -864,7 +865,8 @@ static GtkWidget* create_tool_item( GtkAction* action )
/* Use an icon if available or use short-label */
if ( act->private_data->iconId && strcmp( act->private_data->iconId, "" ) != 0 ) {
- GtkWidget* icon = gtk_image_new_from_icon_name( act->private_data->iconId, act->private_data->iconSize );
+ GtkWidget *icon =
+ GTK_WIDGET(sp_get_icon_image(act->private_data->iconId, act->private_data->iconSize)->gobj());
gtk_box_pack_start( GTK_BOX(hb), icon, FALSE, FALSE, 0 );
} else {
GtkWidget* lbl = gtk_label_new( g_value_get_string( &value ) ? g_value_get_string( &value ) : "wwww" );
diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp
index 230282e6d42fe8810464a13644bab0ca430d50b9..10b1ecf04e3c1cd8c95ff8224647e3563b230140 100644
--- a/src/widgets/gradient-selector.cpp
+++ b/src/widgets/gradient-selector.cpp
@@ -35,6 +35,7 @@
#include "style.h"
#include "helper/action.h"
+#include "helper/icon-loader.h"
#include "ui/icon-names.h"
@@ -98,7 +99,7 @@ static void sp_gradient_selector_class_init(SPGradientSelectorClass *klass)
static void gradsel_style_button(GtkWidget *gtkbtn, char const *iconName)
{
Gtk::Button *btn = Glib::wrap(GTK_BUTTON(gtkbtn));
- GtkWidget *child = gtk_image_new_from_icon_name(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ GtkWidget *child = GTK_WIDGET(sp_get_icon_image(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj());
gtk_widget_show(child);
btn->add(*manage(Glib::wrap(child)));
btn->set_relief(Gtk::RELIEF_NONE);
diff --git a/src/widgets/ink-action.cpp b/src/widgets/ink-action.cpp
index 5adb69ac67c1b443d344ec52963f0f72ea462c19..ee64784034851157ce6ae614b45742dd9444a1fe 100644
--- a/src/widgets/ink-action.cpp
+++ b/src/widgets/ink-action.cpp
@@ -1,5 +1,5 @@
#include "ink-action.h"
-
+#include "helper/icon-loader.h"
#include
static void ink_action_finalize( GObject* obj );
@@ -161,7 +161,8 @@ static GtkWidget* ink_action_create_tool_item( GtkAction* action )
if ( GTK_IS_TOOL_BUTTON(item) ) {
GtkToolButton* button = GTK_TOOL_BUTTON(item);
- GtkWidget* child = gtk_image_new_from_icon_name( act->private_data->iconId, act->private_data->iconSize );
+ GtkWidget *child =
+ GTK_WIDGET(sp_get_icon_image(act->private_data->iconId, act->private_data->iconSize)->gobj());
gtk_tool_button_set_icon_widget( button, child );
} else {
// For now trigger a warning but don't do anything else
diff --git a/src/widgets/ink-radio-action.cpp b/src/widgets/ink-radio-action.cpp
index 611e0c6248a14e24d7a50b3feee120edbfb4874e..d0bff12718813b33d14b5510242a880b5a9e80d0 100644
--- a/src/widgets/ink-radio-action.cpp
+++ b/src/widgets/ink-radio-action.cpp
@@ -1,4 +1,5 @@
#include "ink-radio-action.h"
+#include "helper/icon-loader.h"
static void ink_radio_action_finalize( GObject* obj );
static void ink_radio_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec );
@@ -157,9 +158,10 @@ static GtkWidget* ink_radio_action_create_tool_item( GtkAction* action )
if ( GTK_IS_TOOL_BUTTON(item) ) {
GtkToolButton* button = GTK_TOOL_BUTTON(item);
- GtkWidget* child = gtk_image_new_from_icon_name( act->private_data->iconId, act->private_data->iconSize );
- gtk_widget_set_hexpand(child, FALSE);
- gtk_widget_set_vexpand(child, FALSE);
+ GtkWidget *child =
+ GTK_WIDGET(sp_get_icon_image(act->private_data->iconId, act->private_data->iconSize)->gobj());
+ gtk_widget_set_hexpand(child, FALSE);
+ gtk_widget_set_vexpand(child, FALSE);
gtk_tool_button_set_icon_widget(button, child);
} else {
// For now trigger a warning but don't do anything else
diff --git a/src/widgets/ink-toggle-action.cpp b/src/widgets/ink-toggle-action.cpp
index 467f0f24c5bd914ef3ce812b389f1319c07c960f..77dc39c3d66a05ff4eb72f50ac34c741e6a6ce83 100644
--- a/src/widgets/ink-toggle-action.cpp
+++ b/src/widgets/ink-toggle-action.cpp
@@ -1,4 +1,5 @@
#include "ink-toggle-action.h"
+#include "helper/icon-loader.h"
static void ink_toggle_action_finalize( GObject* obj );
static void ink_toggle_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec );
@@ -163,11 +164,12 @@ static GtkWidget* ink_toggle_action_create_tool_item( GtkAction* action )
if ( GTK_IS_TOOL_BUTTON(item) ) {
GtkToolButton* button = GTK_TOOL_BUTTON(item);
if ( act->private_data->iconId ) {
- GtkWidget* child = gtk_image_new_from_icon_name( act->private_data->iconId, act->private_data->iconSize );
+ GtkWidget *child =
+ GTK_WIDGET(sp_get_icon_image(act->private_data->iconId, act->private_data->iconSize)->gobj());
- gtk_widget_set_hexpand(child, FALSE);
- gtk_widget_set_vexpand(child, FALSE);
- gtk_tool_button_set_icon_widget(button, child);
+ gtk_widget_set_hexpand(child, FALSE);
+ gtk_widget_set_vexpand(child, FALSE);
+ gtk_tool_button_set_icon_widget(button, child);
} else {
gchar *label = nullptr;
g_object_get( G_OBJECT(action), "short_label", &label, NULL );
@@ -195,11 +197,12 @@ static void ink_toggle_action_update_icon( InkToggleAction* action )
if ( GTK_IS_TOOL_BUTTON(proxies->data) ) {
GtkToolButton* button = GTK_TOOL_BUTTON(proxies->data);
- GtkWidget* child = gtk_image_new_from_icon_name( action->private_data->iconId, action->private_data->iconSize );
- gtk_widget_set_hexpand(child, FALSE);
- gtk_widget_set_vexpand(child, FALSE);
- gtk_widget_show_all(child);
- gtk_tool_button_set_icon_widget(button, child);
+ GtkWidget *child = GTK_WIDGET(
+ sp_get_icon_image(action->private_data->iconId, action->private_data->iconSize)->gobj());
+ gtk_widget_set_hexpand(child, FALSE);
+ gtk_widget_set_vexpand(child, FALSE);
+ gtk_widget_show_all(child);
+ gtk_tool_button_set_icon_widget(button, child);
}
}
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp
index 3fcd40bdf9294f1e140ee9d3a54f15f1012165c2..3b93f20f5b9e1a9637262500e2ceada617bbb178 100644
--- a/src/widgets/paint-selector.cpp
+++ b/src/widgets/paint-selector.cpp
@@ -34,6 +34,7 @@
#include "paint-selector.h"
#include "path-prefix.h"
+#include "helper/icon-loader.h"
#include "helper/stock-items.h"
#include "style.h"
@@ -243,7 +244,7 @@ sp_paint_selector_init(SPPaintSelector *psel)
// TRANSLATORS: for info, see http://www.w3.org/TR/2000/CR-SVG-20000802/painting.html#FillRuleProperty
gtk_widget_set_tooltip_text(psel->evenodd, _("Any path self-intersections or subpaths create holes in the fill (fill-rule: evenodd)"));
g_object_set_data(G_OBJECT(psel->evenodd), "mode", GUINT_TO_POINTER(SPPaintSelector::FILLRULE_EVENODD));
- w = gtk_image_new_from_icon_name("fill-rule-even-odd", GTK_ICON_SIZE_MENU);
+ w = GTK_WIDGET(sp_get_icon_image("fill-rule-even-odd", GTK_ICON_SIZE_MENU)->gobj());
gtk_container_add(GTK_CONTAINER(psel->evenodd), w);
gtk_box_pack_start(GTK_BOX(psel->fillrulebox), psel->evenodd, FALSE, FALSE, 0);
g_signal_connect(G_OBJECT(psel->evenodd), "toggled", G_CALLBACK(sp_paint_selector_fillrule_toggled), psel);
@@ -254,7 +255,7 @@ sp_paint_selector_init(SPPaintSelector *psel)
// TRANSLATORS: for info, see http://www.w3.org/TR/2000/CR-SVG-20000802/painting.html#FillRuleProperty
gtk_widget_set_tooltip_text(psel->nonzero, _("Fill is solid unless a subpath is counterdirectional (fill-rule: nonzero)"));
g_object_set_data(G_OBJECT(psel->nonzero), "mode", GUINT_TO_POINTER(SPPaintSelector::FILLRULE_NONZERO));
- w = gtk_image_new_from_icon_name("fill-rule-nonzero", GTK_ICON_SIZE_MENU);
+ w = GTK_WIDGET(sp_get_icon_image("fill-rule-nonzero", GTK_ICON_SIZE_MENU)->gobj());
gtk_container_add(GTK_CONTAINER(psel->nonzero), w);
gtk_box_pack_start(GTK_BOX(psel->fillrulebox), psel->nonzero, FALSE, FALSE, 0);
g_signal_connect(G_OBJECT(psel->nonzero), "toggled", G_CALLBACK(sp_paint_selector_fillrule_toggled), psel);
@@ -323,8 +324,7 @@ static GtkWidget *sp_paint_selector_style_button_add(SPPaintSelector *psel,
gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(b), FALSE);
g_object_set_data(G_OBJECT(b), "mode", GUINT_TO_POINTER(mode));
- w = gtk_image_new_from_icon_name(pixmap, GTK_ICON_SIZE_BUTTON);
- gtk_widget_show(w);
+ w = GTK_WIDGET(sp_get_icon_image(pixmap, GTK_ICON_SIZE_BUTTON)->gobj());
gtk_container_add(GTK_CONTAINER(b), w);
gtk_box_pack_start(GTK_BOX(psel->style), b, FALSE, FALSE, 0);
diff --git a/src/widgets/stroke-marker-selector.cpp b/src/widgets/stroke-marker-selector.cpp
index 191d215f30d000be4d0ce8bdcc1d5ec19b248274..dfa8614a1dc40e0aeea2c46499610534e5964c78 100644
--- a/src/widgets/stroke-marker-selector.cpp
+++ b/src/widgets/stroke-marker-selector.cpp
@@ -25,6 +25,7 @@
#include "path-prefix.h"
#include "stroke-style.h"
+#include "helper/icon-loader.h"
#include "helper/stock-items.h"
#include "io/sys.h"
@@ -55,8 +56,7 @@ MarkerComboBox::MarkerComboBox(gchar const *id, int l) :
set_cell_data_func(image_renderer, sigc::mem_fun(*this, &MarkerComboBox::prepareImageRenderer));
gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(gobj()), MarkerComboBox::separator_cb, nullptr, nullptr);
- empty_image = new Gtk::Image();
- empty_image->set_from_icon_name("no-marker", Gtk::ICON_SIZE_SMALL_TOOLBAR);
+ empty_image = sp_get_icon_image("no-marker", Gtk::ICON_SIZE_SMALL_TOOLBAR);
sandbox = ink_markers_preview_doc ();
desktop = SP_ACTIVE_DESKTOP;
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index 9f702a3c4c5c36affd71cff866e0adce8485dc8b..3a5abbca43f0e9be77d2ac3796c9467815717d7e 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -28,6 +28,7 @@
#include "svg/svg-color.h"
+#include "helper/icon-loader.h"
#include "ui/widget/unit-menu.h"
#include "widgets/style-utils.h"
@@ -120,8 +121,7 @@ StrokeStyle::StrokeStyleButton::StrokeStyleButton(Gtk::RadioButtonGroup &grp,
show();
set_mode(false);
- auto px = Gtk::manage(new Gtk::Image());
- px->set_from_icon_name(icon, Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ auto px = Gtk::manage(sp_get_icon_image(icon, Gtk::ICON_SIZE_LARGE_TOOLBAR));
g_assert(px != nullptr);
px->show();
add(*px);