diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-07-01 02:03:38 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-07-01 02:03:38 +0000 |
| commit | 0d5bb885dee83f041830dc950d3be6f21a37f08b (patch) | |
| tree | 88a0ae7a15ed496ddad1f83f43547783b88843ac /src/live_effects/parameter | |
| parent | Bug fixes (diff) | |
| parent | Add Mac CI build config (diff) | |
| download | inkscape-0d5bb885dee83f041830dc950d3be6f21a37f08b.tar.gz inkscape-0d5bb885dee83f041830dc950d3be6f21a37f08b.zip | |
update to trunk
Diffstat (limited to 'src/live_effects/parameter')
| -rw-r--r-- | src/live_effects/parameter/bool.cpp | 1 | ||||
| -rw-r--r-- | src/live_effects/parameter/item.cpp | 4 | ||||
| -rw-r--r-- | src/live_effects/parameter/originalitem.cpp | 7 | ||||
| -rw-r--r-- | src/live_effects/parameter/originalpath.cpp | 7 | ||||
| -rw-r--r-- | src/live_effects/parameter/originalpatharray.cpp | 13 | ||||
| -rw-r--r-- | src/live_effects/parameter/path.cpp | 15 | ||||
| -rw-r--r-- | src/live_effects/parameter/point.cpp | 1 | ||||
| -rw-r--r-- | src/live_effects/parameter/text.cpp | 1 | ||||
| -rw-r--r-- | src/live_effects/parameter/togglebutton.cpp | 12 | ||||
| -rw-r--r-- | src/live_effects/parameter/togglebutton.h | 4 |
10 files changed, 34 insertions, 31 deletions
diff --git a/src/live_effects/parameter/bool.cpp b/src/live_effects/parameter/bool.cpp index 954947cf4..f291a8104 100644 --- a/src/live_effects/parameter/bool.cpp +++ b/src/live_effects/parameter/bool.cpp @@ -9,7 +9,6 @@ #include "live_effects/effect.h" #include "svg/svg.h" #include "svg/stringstream.h" -#include "widgets/icon.h" #include "inkscape.h" #include "verbs.h" #include "helper-fns.h" diff --git a/src/live_effects/parameter/item.cpp b/src/live_effects/parameter/item.cpp index 7b40f4540..71134b118 100644 --- a/src/live_effects/parameter/item.cpp +++ b/src/live_effects/parameter/item.cpp @@ -18,7 +18,6 @@ #include "live_effects/effect.h" #include "svg/svg.h" -#include "widgets/icon.h" #include "selection-chemistry.h" #include "xml/repr.h" #include "desktop.h" @@ -109,7 +108,8 @@ Gtk::Widget * ItemParam::param_newWidget() { Gtk::HBox * _widget = Gtk::manage(new Gtk::HBox()); - Gtk::Widget* pIcon = Gtk::manage( sp_icon_get_icon( INKSCAPE_ICON("edit-clone"), Inkscape::ICON_SIZE_BUTTON) ); + Gtk::Image* pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name("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 053062128..81ab41c56 100644 --- a/src/live_effects/parameter/originalitem.cpp +++ b/src/live_effects/parameter/originalitem.cpp @@ -11,7 +11,6 @@ #include <gtkmm/box.h> #include "live_effects/parameter/originalitem.h" -#include "widgets/icon.h" #include <glibmm/i18n.h> #include <gtkmm/button.h> #include <gtkmm/label.h> @@ -55,7 +54,8 @@ OriginalItemParam::param_newWidget() } { // Paste item to link button - Gtk::Widget *pIcon = Gtk::manage( sp_icon_get_icon( INKSCAPE_ICON("edit-paste"), Inkscape::ICON_SIZE_BUTTON) ); + Gtk::Image *pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name("edit-paste", Gtk::ICON_SIZE_BUTTON); Gtk::Button *pButton = Gtk::manage(new Gtk::Button()); pButton->set_relief(Gtk::RELIEF_NONE); pIcon->show(); @@ -67,7 +67,8 @@ OriginalItemParam::param_newWidget() } { // Select original button - Gtk::Widget *pIcon = Gtk::manage( sp_icon_get_icon("edit-select-original", Inkscape::ICON_SIZE_BUTTON) ); + Gtk::Image *pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name("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/originalpath.cpp b/src/live_effects/parameter/originalpath.cpp index 1e78f7fe1..62483d7fb 100644 --- a/src/live_effects/parameter/originalpath.cpp +++ b/src/live_effects/parameter/originalpath.cpp @@ -11,7 +11,6 @@ #include <gtkmm/box.h> #include "live_effects/parameter/originalpath.h" -#include "widgets/icon.h" #include <glibmm/i18n.h> #include <gtkmm/button.h> #include <gtkmm/label.h> @@ -56,7 +55,8 @@ OriginalPathParam::param_newWidget() } { // Paste path to link button - Gtk::Widget *pIcon = Gtk::manage( sp_icon_get_icon( INKSCAPE_ICON("edit-clone"), Inkscape::ICON_SIZE_BUTTON) ); + Gtk::Image *pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name("edit-clone", Gtk::ICON_SIZE_BUTTON); Gtk::Button *pButton = Gtk::manage(new Gtk::Button()); pButton->set_relief(Gtk::RELIEF_NONE); pIcon->show(); @@ -68,7 +68,8 @@ OriginalPathParam::param_newWidget() } { // Select original button - Gtk::Widget *pIcon = Gtk::manage( sp_icon_get_icon("edit-select-original", Inkscape::ICON_SIZE_BUTTON) ); + Gtk::Image *pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name("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/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp index 693821ed2..92859de05 100644 --- a/src/live_effects/parameter/originalpatharray.cpp +++ b/src/live_effects/parameter/originalpatharray.cpp @@ -20,7 +20,6 @@ #include "inkscape.h" #include "icon-size.h" -#include "widgets/icon.h" #include "ui/clipboard.h" #include "svg/svg.h" #include "svg/stringstream.h" @@ -144,7 +143,8 @@ Gtk::Widget* OriginalPathArrayParam::param_newWidget() { // Paste path to link button - Gtk::Widget *pIcon = Gtk::manage( sp_icon_get_icon("edit-clone", Inkscape::ICON_SIZE_BUTTON) ); + Gtk::Image *pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name("edit-clone", Gtk::ICON_SIZE_BUTTON); Gtk::Button *pButton = Gtk::manage(new Gtk::Button()); pButton->set_relief(Gtk::RELIEF_NONE); pIcon->show(); @@ -156,7 +156,8 @@ Gtk::Widget* OriginalPathArrayParam::param_newWidget() } { // Remove linked path - Gtk::Widget *pIcon = Gtk::manage( sp_icon_get_icon("gtk-remove", Inkscape::ICON_SIZE_BUTTON) ); + Gtk::Image *pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name("gtk-remove", Gtk::ICON_SIZE_BUTTON); Gtk::Button *pButton = Gtk::manage(new Gtk::Button()); pButton->set_relief(Gtk::RELIEF_NONE); pIcon->show(); @@ -168,7 +169,8 @@ Gtk::Widget* OriginalPathArrayParam::param_newWidget() } { // Move Down - Gtk::Widget *pIcon = Gtk::manage( sp_icon_get_icon( "gtk-go-down", Inkscape::ICON_SIZE_BUTTON) ); + Gtk::Image *pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name( "gtk-go-down", Gtk::ICON_SIZE_BUTTON); Gtk::Button *pButton = Gtk::manage(new Gtk::Button()); pButton->set_relief(Gtk::RELIEF_NONE); pIcon->show(); @@ -180,7 +182,8 @@ Gtk::Widget* OriginalPathArrayParam::param_newWidget() } { // Move Down - Gtk::Widget *pIcon = Gtk::manage( sp_icon_get_icon( "gtk-go-up", Inkscape::ICON_SIZE_BUTTON) ); + Gtk::Image *pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name( "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 54f5d93e8..ec011b855 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -22,7 +22,6 @@ #include <2geom/pathvector.h> #include <2geom/d2.h> -#include "widgets/icon.h" #include "selection-chemistry.h" #include "xml/repr.h" #include "desktop.h" @@ -187,10 +186,11 @@ PathParam::param_newWidget() Gtk::Label* pLabel = Gtk::manage(new Gtk::Label(param_label)); static_cast<Gtk::HBox*>(_widget)->pack_start(*pLabel, true, true); pLabel->set_tooltip_text(param_tooltip); - Gtk::Widget * pIcon = NULL; + Gtk::Image * pIcon = NULL; Gtk::Button * pButton = NULL; if (_edit_button) { - pIcon = Gtk::manage( sp_icon_get_icon( INKSCAPE_ICON("tool-node-editor"), Inkscape::ICON_SIZE_BUTTON) ); + pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name( INKSCAPE_ICON("tool-node-editor"), Gtk::ICON_SIZE_BUTTON); pButton = Gtk::manage(new Gtk::Button()); pButton->set_relief(Gtk::RELIEF_NONE); pIcon->show(); @@ -202,7 +202,8 @@ PathParam::param_newWidget() } if (_copy_button) { - pIcon = Gtk::manage( sp_icon_get_icon( INKSCAPE_ICON("edit-copy"), Inkscape::ICON_SIZE_BUTTON) ); + pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name( INKSCAPE_ICON("edit-copy"), Gtk::ICON_SIZE_BUTTON); pButton = Gtk::manage(new Gtk::Button()); pButton->set_relief(Gtk::RELIEF_NONE); pIcon->show(); @@ -214,7 +215,8 @@ PathParam::param_newWidget() } if (_paste_button) { - pIcon = Gtk::manage( sp_icon_get_icon( INKSCAPE_ICON("edit-paste"), Inkscape::ICON_SIZE_BUTTON) ); + pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name( INKSCAPE_ICON("edit-paste"), Gtk::ICON_SIZE_BUTTON); pButton = Gtk::manage(new Gtk::Button()); pButton->set_relief(Gtk::RELIEF_NONE); pIcon->show(); @@ -225,7 +227,8 @@ PathParam::param_newWidget() pButton->set_tooltip_text(_("Paste path")); } if (_link_button) { - pIcon = Gtk::manage( sp_icon_get_icon( INKSCAPE_ICON("edit-clone"), Inkscape::ICON_SIZE_BUTTON) ); + pIcon = Gtk::manage(new Gtk::Image()); + pIcon->set_from_icon_name( 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/point.cpp b/src/live_effects/parameter/point.cpp index 4ca88a6b8..331a86f81 100644 --- a/src/live_effects/parameter/point.cpp +++ b/src/live_effects/parameter/point.cpp @@ -9,7 +9,6 @@ #include "svg/svg.h" #include "svg/stringstream.h" #include "ui/widget/point.h" -#include "widgets/icon.h" #include "inkscape.h" #include "verbs.h" #include "knotholder.h" diff --git a/src/live_effects/parameter/text.cpp b/src/live_effects/parameter/text.cpp index d633666aa..f40708917 100644 --- a/src/live_effects/parameter/text.cpp +++ b/src/live_effects/parameter/text.cpp @@ -15,7 +15,6 @@ #include "live_effects/effect.h" #include "svg/svg.h" #include "svg/stringstream.h" -#include "widgets/icon.h" #include "inkscape.h" #include "verbs.h" #include "display/canvas-text.h" diff --git a/src/live_effects/parameter/togglebutton.cpp b/src/live_effects/parameter/togglebutton.cpp index eb40a7e41..6aad8b3a6 100644 --- a/src/live_effects/parameter/togglebutton.cpp +++ b/src/live_effects/parameter/togglebutton.cpp @@ -13,7 +13,6 @@ #include "svg/svg.h" #include "svg/stringstream.h" #include "selection.h" -#include "widgets/icon.h" #include "inkscape.h" #include "verbs.h" #include "helper-fns.h" @@ -26,7 +25,7 @@ ToggleButtonParam::ToggleButtonParam( const Glib::ustring& label, const Glib::us const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr, Effect* effect, bool default_value, const Glib::ustring& inactive_label, char const * _icon_active, char const * _icon_inactive, - Inkscape::IconSize _icon_size) + GtkIconSize _icon_size) : Parameter(label, tip, key, wr, effect), value(default_value), defvalue(default_value), inactive_label(inactive_label), _icon_active(_icon_active), _icon_inactive(_icon_inactive), _icon_size(_icon_size) { @@ -105,9 +104,9 @@ ToggleButtonParam::param_newWidget() gtk_widget_show(box_button); GtkWidget *icon_button = NULL; if(!value){ - icon_button = sp_icon_new(_icon_size, _icon_inactive); + icon_button = gtk_image_new_from_icon_name(_icon_inactive, _icon_size); } else { - icon_button = sp_icon_new(_icon_size, _icon_active); + icon_button = gtk_image_new_from_icon_name(_icon_active, _icon_size); } gtk_widget_show(icon_button); gtk_box_pack_start (GTK_BOX(box_button), icon_button, false, false, 1); @@ -153,11 +152,10 @@ ToggleButtonParam::refresh_button() if ( _icon_active ) { GdkPixbuf * icon_pixbuf = NULL; if(!value){ - icon_pixbuf = sp_pixbuf_new( _icon_size, _icon_inactive ); + gtk_image_set_from_icon_name (GTK_IMAGE(g_list_nth_data(childs, 0)), _icon_inactive, _icon_size); } else { - icon_pixbuf = sp_pixbuf_new( _icon_size, _icon_active ); + gtk_image_set_from_icon_name (GTK_IMAGE(g_list_nth_data(childs, 0)), _icon_active, _icon_size); } - gtk_image_set_from_pixbuf (GTK_IMAGE(g_list_nth_data(childs, 0)), icon_pixbuf); } } diff --git a/src/live_effects/parameter/togglebutton.h b/src/live_effects/parameter/togglebutton.h index d6ca15e75..02b9d5127 100644 --- a/src/live_effects/parameter/togglebutton.h +++ b/src/live_effects/parameter/togglebutton.h @@ -34,7 +34,7 @@ public: const Glib::ustring& inactive_label = "", char const * icon_active = NULL, char const * icon_inactive = NULL, - Inkscape::IconSize icon_size = Inkscape::ICON_SIZE_SMALL_TOOLBAR); + GtkIconSize icon_size = GTK_ICON_SIZE_SMALL_TOOLBAR); virtual ~ToggleButtonParam(); virtual Gtk::Widget * param_newWidget(); @@ -64,7 +64,7 @@ private: const Glib::ustring inactive_label; const char * _icon_active; const char * _icon_inactive; - Inkscape::IconSize _icon_size; + GtkIconSize _icon_size; Inkscape::UI::Widget::RegisteredToggleButton * checkwdg; sigc::signal<void> _signal_toggled; |
