From 22d06152d0fabc7fe50bb6829f00b2bac4ed1796 Mon Sep 17 00:00:00 2001 From: Alexander Valavanis Date: Thu, 29 Jun 2017 13:43:56 +0200 Subject: Remove old icon handling code --- src/widgets/button.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/widgets/button.cpp') diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp index 485300a25..7dcfc9771 100644 --- a/src/widgets/button.cpp +++ b/src/widgets/button.cpp @@ -12,7 +12,6 @@ */ #include -#include "icon.h" #include "button.h" #include "helper/action-context.h" @@ -155,12 +154,12 @@ static void sp_button_perform_action(SPButton *button, gpointer /*data*/) } } -GtkWidget *sp_button_new(Inkscape::IconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action) +GtkWidget *sp_button_new(GtkIconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action) { SPButton *button = SP_BUTTON(g_object_new(SP_TYPE_BUTTON, NULL)); button->type = type; - button->lsize = CLAMP(size, Inkscape::ICON_SIZE_MENU, Inkscape::ICON_SIZE_DECORATION); + button->lsize = CLAMP(size, GTK_ICON_SIZE_MENU, GTK_ICON_SIZE_DIALOG); sp_button_set_action(button, action); if (doubleclick_action) @@ -212,7 +211,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 = sp_icon_new(button->lsize, action->image); + child = gtk_image_new_from_icon_name(action->image, button->lsize); gtk_widget_show(child); gtk_container_add(GTK_CONTAINER(button), child); } @@ -256,12 +255,11 @@ static void sp_button_set_composed_tooltip(GtkWidget *widget, SPAction *action) } } -GtkWidget *sp_button_new_from_data(Inkscape::IconSize size, SPButtonType type, Inkscape::UI::View::View *view, +GtkWidget *sp_button_new_from_data(GtkIconSize size, SPButtonType type, Inkscape::UI::View::View *view, const gchar *name, const gchar *tip) { - GtkWidget *button; SPAction *action = sp_action_new(Inkscape::ActionContext(view), name, name, tip, name, 0); - button = sp_button_new(size, type, action, NULL); + GtkWidget *button = sp_button_new(size, type, action, NULL); g_object_unref(action); return button; } -- cgit v1.2.3