summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2016-04-13 15:44:26 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2016-04-13 15:44:26 +0000
commit90c039450593f045361112648e4ec2dfcff91f0e (patch)
tree2e41a8cec5a5a9d014a9ca6b7fbaad780f2a4027 /src
parentusing cpp limits values (diff)
downloadinkscape-90c039450593f045361112648e4ec2dfcff91f0e.tar.gz
inkscape-90c039450593f045361112648e4ec2dfcff91f0e.zip
Rm shrink_wrap_button - Not needed & uses deprecated GtkStyle features #Hackfest2016
(bzr r14837)
Diffstat (limited to 'src')
-rw-r--r--src/ui/widget/layer-selector.cpp3
-rw-r--r--src/widgets/CMakeLists.txt2
-rw-r--r--src/widgets/Makefile_insert2
-rw-r--r--src/widgets/shrink-wrap-button.cpp65
-rw-r--r--src/widgets/shrink-wrap-button.h35
5 files changed, 0 insertions, 107 deletions
diff --git a/src/ui/widget/layer-selector.cpp b/src/ui/widget/layer-selector.cpp
index dc89d233f..2a1fa352b 100644
--- a/src/ui/widget/layer-selector.cpp
+++ b/src/ui/widget/layer-selector.cpp
@@ -32,7 +32,6 @@
#include "util/reverse-list.h"
#include "verbs.h"
#include "widgets/icon.h"
-#include "widgets/shrink-wrap-button.h"
#include "xml/node-event-vector.h"
#include "widgets/gradient-vector.h"
@@ -114,7 +113,6 @@ LayerSelector::LayerSelector(SPDesktop *desktop)
);
_visibility_toggle.set_relief(Gtk::RELIEF_NONE);
- shrink_wrap_button(_visibility_toggle);
_visibility_toggle.set_tooltip_text(_("Toggle current layer visibility"));
pack_start(_visibility_toggle, Gtk::PACK_EXPAND_PADDING);
@@ -135,7 +133,6 @@ LayerSelector::LayerSelector(SPDesktop *desktop)
);
_lock_toggle.set_relief(Gtk::RELIEF_NONE);
- shrink_wrap_button(_lock_toggle);
_lock_toggle.set_tooltip_text(_("Lock or unlock current layer"));
pack_start(_lock_toggle, Gtk::PACK_EXPAND_PADDING);
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
index 8cb6e947f..225afe317 100644
--- a/src/widgets/CMakeLists.txt
+++ b/src/widgets/CMakeLists.txt
@@ -38,7 +38,6 @@ set(widgets_SRC
paint-selector.cpp
ruler.cpp
select-toolbar.cpp
- shrink-wrap-button.cpp
sp-attribute-widget.cpp
sp-color-selector.cpp
sp-widget.cpp
@@ -94,7 +93,6 @@ set(widgets_SRC
paint-selector.h
ruler.h
select-toolbar.h
- shrink-wrap-button.h
sp-attribute-widget.h
sp-color-selector.h
sp-widget.h
diff --git a/src/widgets/Makefile_insert b/src/widgets/Makefile_insert
index 2ee0f7002..c9f04de14 100644
--- a/src/widgets/Makefile_insert
+++ b/src/widgets/Makefile_insert
@@ -72,8 +72,6 @@ ink_common_sources += \
widgets/ruler.h \
widgets/select-toolbar.cpp \
widgets/select-toolbar.h \
- widgets/shrink-wrap-button.cpp \
- widgets/shrink-wrap-button.h \
widgets/spray-toolbar.cpp \
widgets/spray-toolbar.h \
widgets/spiral-toolbar.cpp \
diff --git a/src/widgets/shrink-wrap-button.cpp b/src/widgets/shrink-wrap-button.cpp
deleted file mode 100644
index 941a0466c..000000000
--- a/src/widgets/shrink-wrap-button.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Inkscape::Widgets::shrink_wrap_button - shrink a button to minimum size
- *
- * Authors:
- * MenTaLguY <mental@rydia.net>
- *
- * Copyright (C) 2004 MenTaLguY
- *
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gtkmm/button.h>
-#include <gtk/gtk.h>
-
-#include "shrink-wrap-button.h"
-
-namespace Inkscape {
-namespace Widgets {
-
-void shrink_wrap_button(Gtk::Button &button) {
- button.set_border_width(0);
- button.set_can_focus(false);
- button.set_can_default(false);
-
- Gtk::Widget* child = button.get_child();
- Gtk::Requisition req_min;
-
- if (child) {
-#if WITH_GTKMM_3_0
- Gtk::Requisition req_nat;
- child->get_preferred_size(req_min, req_nat);
-#else
- req_min = child->size_request();
-#endif
- } else {
- req_min.width = 0;
- req_min.height = 0;
- }
-
- // TODO: Use Gtk::StyleContext instead
- GtkStyle* style = gtk_widget_get_style(GTK_WIDGET(button.gobj()));
-
- req_min.width += 2 + 2 * std::max(2, style->xthickness);
- req_min.height += 2 + 2 * std::max(2, style->ythickness);
-
- button.set_size_request(req_min.width, req_min.height);
-}
-
-}
-}
-
-/*
- 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:fileencoding=utf-8:textwidth=99 :
diff --git a/src/widgets/shrink-wrap-button.h b/src/widgets/shrink-wrap-button.h
deleted file mode 100644
index ca9153aea..000000000
--- a/src/widgets/shrink-wrap-button.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Inkscape::Widgets::shrink_wrap_button - shrink a button to minimum size
- *
- * Authors:
- * MenTaLguY <mental@rydia.net>
- *
- * Copyright (C) 2004 MenTaLguY
- *
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-#ifndef SEEN_INKSCAPE_WIDGETS_SHRINK_WRAP_BUTTON_H
-#define SEEN_INKSCAPE_WIDGETS_SHRINK_WRAP_BUTTON_H
-
-namespace Gtk { class Button; }
-
-namespace Inkscape {
-namespace Widgets {
-
-void shrink_wrap_button(Gtk::Button &button);
-
-}
-}
-
-#endif
-/*
- 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:fileencoding=utf-8:textwidth=99 :