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/widgets/button.cpp | |
| 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/widgets/button.cpp')
| -rw-r--r-- | src/widgets/button.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
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 <glibmm.h> -#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; } |
