diff options
Diffstat (limited to 'src/live_effects')
| -rw-r--r-- | src/live_effects/parameter/item.cpp | 9 | ||||
| -rw-r--r-- | src/live_effects/parameter/originalitem.cpp | 7 | ||||
| -rw-r--r-- | src/live_effects/parameter/originalitemarray.cpp | 19 | ||||
| -rw-r--r-- | src/live_effects/parameter/originalpatharray.cpp | 14 | ||||
| -rw-r--r-- | src/live_effects/parameter/path.cpp | 22 | ||||
| -rw-r--r-- | src/live_effects/parameter/togglebutton.cpp | 23 |
6 files changed, 42 insertions, 52 deletions
diff --git a/src/live_effects/parameter/item.cpp b/src/live_effects/parameter/item.cpp index 8a8b12307..5da934da6 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<Gtk::HBox*>(_widget)->pack_start(*pLabel, true, true); diff --git a/src/live_effects/parameter/originalitem.cpp b/src/live_effects/parameter/originalitem.cpp index b415dd52a..c42db4ce9 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 23d9f96cd..22193b215 100644 --- a/src/live_effects/parameter/originalitemarray.cpp +++ b/src/live_effects/parameter/originalitemarray.cpp @@ -18,11 +18,12 @@ #include <glibmm/i18n.h> +#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 cc4408218..474f6c1bf 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 52e1b62a6..af553a029 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 535e43dcf..be75555db 100644 --- a/src/live_effects/parameter/togglebutton.cpp +++ b/src/live_effects/parameter/togglebutton.cpp @@ -10,14 +10,15 @@ #include <utility> -#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<Gtk::Image*>(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); } } } |
