diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-07-14 21:09:41 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-07-14 21:09:41 +0000 |
| commit | d32efb61f1c2c18d1018e510bbe9bafc04a03905 (patch) | |
| tree | b447bf9856baf1cf485e38c4ce55edb27285129e /src/ui/widget | |
| parent | Merged from trunk (r12305) (diff) | |
| parent | Minor C++ish refactoring pass. (diff) | |
| download | inkscape-d32efb61f1c2c18d1018e510bbe9bafc04a03905.tar.gz inkscape-d32efb61f1c2c18d1018e510bbe9bafc04a03905.zip | |
Merged from trunk (r12419).
(bzr r11608.1.107)
Diffstat (limited to 'src/ui/widget')
30 files changed, 197 insertions, 12 deletions
diff --git a/src/ui/widget/button.h b/src/ui/widget/button.h index efadfad07..a214dd881 100644 --- a/src/ui/widget/button.h +++ b/src/ui/widget/button.h @@ -10,6 +10,14 @@ #ifndef INKSCAPE_UI_WIDGET_BUTTON_H #define INKSCAPE_UI_WIDGET_BUTTON_H +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/checkbutton.h> #include <gtkmm/radiobutton.h> diff --git a/src/ui/widget/color-picker.h b/src/ui/widget/color-picker.h index e20212615..b4da5dbf2 100644 --- a/src/ui/widget/color-picker.h +++ b/src/ui/widget/color-picker.h @@ -13,7 +13,16 @@ #ifndef __COLOR_PICKER_H__ #define __COLOR_PICKER_H__ +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + #include <stddef.h> + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/dialog.h> #include <gtkmm/button.h> #include <sigc++/sigc++.h> diff --git a/src/ui/widget/color-preview.h b/src/ui/widget/color-preview.h index caddfb9a2..959b5e09b 100644 --- a/src/ui/widget/color-preview.h +++ b/src/ui/widget/color-preview.h @@ -15,6 +15,10 @@ # include <config.h> #endif +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/widget.h> namespace Inkscape { diff --git a/src/ui/widget/dock-item.h b/src/ui/widget/dock-item.h index 608badb62..cc0c13eea 100644 --- a/src/ui/widget/dock-item.h +++ b/src/ui/widget/dock-item.h @@ -11,6 +11,14 @@ #ifndef INKSCAPE_UI_WIGET_DOCK_ITEM_H #define INKSCAPE_UI_WIGET_DOCK_ITEM_H +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> #include <gtkmm/frame.h> #include <gtkmm/window.h> diff --git a/src/ui/widget/dock.cpp b/src/ui/widget/dock.cpp index 2bfc7e0df..52e9ea605 100644 --- a/src/ui/widget/dock.cpp +++ b/src/ui/widget/dock.cpp @@ -48,11 +48,21 @@ const int Dock::_default_dock_bar_width = 36; Dock::Dock(Gtk::Orientation orientation) - : _gdl_dock (GDL_DOCK (gdl_dock_new())), - _gdl_dock_bar (GDL_DOCK_BAR (gdl_dock_bar_new(GDL_DOCK(_gdl_dock)))), + : _gdl_dock(gdl_dock_new()), +#if WITH_GDL_3_6 + _gdl_dock_bar(GDL_DOCK_BAR(gdl_dock_bar_new(G_OBJECT(_gdl_dock)))), +#else + _gdl_dock_bar(GDL_DOCK_BAR(gdl_dock_bar_new(GDL_DOCK(_gdl_dock)))), +#endif _scrolled_window (Gtk::manage(new Gtk::ScrolledWindow)) { - gdl_dock_bar_set_orientation(_gdl_dock_bar, static_cast<GtkOrientation>(orientation)); +#if WITH_GDL_3_6 + gtk_orientable_set_orientation(GTK_ORIENTABLE(_gdl_dock_bar), + static_cast<GtkOrientation>(orientation)); +#else + gdl_dock_bar_set_orientation(_gdl_dock_bar, + static_cast<GtkOrientation>(orientation)); +#endif #if WITH_GTKMM_3_0 switch(orientation) { @@ -127,7 +137,9 @@ Dock::~Dock() void Dock::addItem(DockItem& item, DockItem::Placement placement) { _dock_items.push_back(&item); - gdl_dock_add_item(_gdl_dock, GDL_DOCK_ITEM(item.gobj()), (GdlDockPlacement)placement); + gdl_dock_add_item(GDL_DOCK(_gdl_dock), + GDL_DOCK_ITEM(item.gobj()), + (GdlDockPlacement)placement); // FIXME: This is a hack to prevent the dock from expanding the main window, this can't be done // initially as the paned doesn't exist. diff --git a/src/ui/widget/dock.h b/src/ui/widget/dock.h index 28ab42740..33e60b836 100644 --- a/src/ui/widget/dock.h +++ b/src/ui/widget/dock.h @@ -12,6 +12,14 @@ #ifndef INKSCAPE_UI_WIDGET_DOCK_H #define INKSCAPE_UI_WIDGET_DOCK_H +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> #include <list> #include "ui/widget/dock-item.h" @@ -66,11 +74,11 @@ protected: /** Interface widgets, will be packed like * _scrolled_window -> (_dock_box -> (_paned -> (_dock -> _filler) | _dock_bar)) */ - Gtk::Box *_dock_box; - Gtk::Paned* _paned; - GdlDock *_gdl_dock; - GdlDockBar *_gdl_dock_bar; - Gtk::VBox _filler; + Gtk::Box *_dock_box; + Gtk::Paned *_paned; + GtkWidget *_gdl_dock; + GdlDockBar *_gdl_dock_bar; + Gtk::VBox _filler; Gtk::ScrolledWindow *_scrolled_window; /** Internal signal handlers */ diff --git a/src/ui/widget/entity-entry.cpp b/src/ui/widget/entity-entry.cpp index c622796b2..0f526f77a 100644 --- a/src/ui/widget/entity-entry.cpp +++ b/src/ui/widget/entity-entry.cpp @@ -17,6 +17,10 @@ # include <config.h> #endif +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/scrolledwindow.h> #include <gtkmm/entry.h> diff --git a/src/ui/widget/filter-effect-chooser.h b/src/ui/widget/filter-effect-chooser.h index ae3ec07c4..6f0c2f26e 100644 --- a/src/ui/widget/filter-effect-chooser.h +++ b/src/ui/widget/filter-effect-chooser.h @@ -12,6 +12,14 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> #include <gtkmm/combobox.h> diff --git a/src/ui/widget/frame.h b/src/ui/widget/frame.h index a04666651..55638ad40 100644 --- a/src/ui/widget/frame.h +++ b/src/ui/widget/frame.h @@ -10,6 +10,14 @@ #ifndef INKSCAPE_UI_WIDGET_FRAME_H #define INKSCAPE_UI_WIDGET_FRAME_H +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/alignment.h> #include <gtkmm/frame.h> #include <gtkmm/label.h> diff --git a/src/ui/widget/imageicon.h b/src/ui/widget/imageicon.h index 2ea8b8533..8faf13cb1 100644 --- a/src/ui/widget/imageicon.h +++ b/src/ui/widget/imageicon.h @@ -12,6 +12,14 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> #include <glibmm/ustring.h> diff --git a/src/ui/widget/imagetoggler.h b/src/ui/widget/imagetoggler.h index 7b02fa4dc..df6eb7ded 100644 --- a/src/ui/widget/imagetoggler.h +++ b/src/ui/widget/imagetoggler.h @@ -14,6 +14,10 @@ #include "config.h" #endif +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/cellrendererpixbuf.h> #include <gtkmm/widget.h> #include <glibmm/property.h> diff --git a/src/ui/widget/labelled.h b/src/ui/widget/labelled.h index 88eb3ce19..5334454bc 100644 --- a/src/ui/widget/labelled.h +++ b/src/ui/widget/labelled.h @@ -11,6 +11,14 @@ #ifndef INKSCAPE_UI_WIDGET_LABELLED_H #define INKSCAPE_UI_WIDGET_LABELLED_H +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> namespace Gtk { diff --git a/src/ui/widget/licensor.h b/src/ui/widget/licensor.h index ab6abd0a4..0ac3e5ab8 100644 --- a/src/ui/widget/licensor.h +++ b/src/ui/widget/licensor.h @@ -10,6 +10,14 @@ #ifndef INKSCAPE_UI_WIDGET_LICENSOR_H #define INKSCAPE_UI_WIDGET_LICENSOR_H +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> class SPDocument; diff --git a/src/ui/widget/notebook-page.h b/src/ui/widget/notebook-page.h index d8b8fb0c4..38ae9e054 100644 --- a/src/ui/widget/notebook-page.h +++ b/src/ui/widget/notebook-page.h @@ -14,6 +14,10 @@ # include <config.h> #endif +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> namespace Gtk { diff --git a/src/ui/widget/object-composite-settings.h b/src/ui/widget/object-composite-settings.h index bee9f09b9..19a6cb2a5 100644 --- a/src/ui/widget/object-composite-settings.h +++ b/src/ui/widget/object-composite-settings.h @@ -11,6 +11,14 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> #include <gtkmm/alignment.h> #include <gtkmm/adjustment.h> diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index fa3f8e3a1..988c4e5de 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -36,6 +36,7 @@ #include "document.h" #include "desktop.h" #include "helper/action.h" +#include "helper/action-context.h" #include "helper/units.h" #include "inkscape.h" #include "sp-namedview.h" @@ -619,7 +620,7 @@ PageSizer::fire_fit_canvas_to_selection_or_drawing() Verb *verb = Verb::get( SP_VERB_FIT_CANVAS_TO_SELECTION_OR_DRAWING ); if (verb) { - SPAction *action = verb->get_action(dt); + SPAction *action = verb->get_action(Inkscape::ActionContext(dt)); if (action) { sp_action_perform(action, NULL); } diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index 7eb114d0a..d60eeefe0 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -15,6 +15,10 @@ # include <config.h> #endif +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/dialog.h> // for Gtk::RESPONSE_* #include <gtkmm/menu.h> #include <gtkmm/stock.h> diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h index 5bb054577..0c3d822b8 100644 --- a/src/ui/widget/panel.h +++ b/src/ui/widget/panel.h @@ -17,6 +17,10 @@ # include <config.h> #endif +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> #include <gtkmm/arrow.h> #include <gtkmm/button.h> diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp index d32de6871..567f29f91 100644 --- a/src/ui/widget/preferences-widget.cpp +++ b/src/ui/widget/preferences-widget.cpp @@ -18,6 +18,10 @@ #include <windows.h> #endif +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> #include <gtkmm/frame.h> #include <gtkmm/alignment.h> diff --git a/src/ui/widget/preferences-widget.h b/src/ui/widget/preferences-widget.h index e3968045d..cb4ce17d1 100644 --- a/src/ui/widget/preferences-widget.h +++ b/src/ui/widget/preferences-widget.h @@ -15,8 +15,17 @@ #ifndef INKSCAPE_UI_WIDGET_INKSCAPE_PREFERENCES_H #define INKSCAPE_UI_WIDGET_INKSCAPE_PREFERENCES_H +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + #include <iostream> #include <vector> + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/filechooserbutton.h> #include "ui/widget/spinbutton.h" #include <stddef.h> diff --git a/src/ui/widget/rotateable.cpp b/src/ui/widget/rotateable.cpp index 1d91515e5..18d53bf5c 100644 --- a/src/ui/widget/rotateable.cpp +++ b/src/ui/widget/rotateable.cpp @@ -7,6 +7,14 @@ * Released under GNU GPL. Read the file 'COPYING' for more information. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> #include <gtkmm/eventbox.h> #include <glibmm/i18n.h> diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h index 9b78cb17f..e5bc4f883 100644 --- a/src/ui/widget/selected-style.h +++ b/src/ui/widget/selected-style.h @@ -15,6 +15,10 @@ # include "config.h" #endif +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> #if WITH_GTKMM_3_0 diff --git a/src/ui/widget/spin-scale.cpp b/src/ui/widget/spin-scale.cpp index 548e9a6a6..ade3d1e60 100644 --- a/src/ui/widget/spin-scale.cpp +++ b/src/ui/widget/spin-scale.cpp @@ -6,11 +6,12 @@ * Released under GNU GPL. Read the file 'COPYING' for more information. */ +#include "spin-scale.h" + #include <gtkmm/adjustment.h> #include <glibmm/i18n.h> #include <glibmm/stringutils.h> -#include "spin-scale.h" #include "ui/widget/gimpspinscale.h" namespace Inkscape { diff --git a/src/ui/widget/spin-scale.h b/src/ui/widget/spin-scale.h index a8403307f..5fec8b1d8 100644 --- a/src/ui/widget/spin-scale.h +++ b/src/ui/widget/spin-scale.h @@ -9,6 +9,14 @@ #ifndef INKSCAPE_UI_WIDGET_SPIN_SCALE_H #define INKSCAPE_UI_WIDGET_SPIN_SCALE_H +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/adjustment.h> #include <gtkmm/box.h> #include <gtkmm/scale.h> diff --git a/src/ui/widget/spin-slider.h b/src/ui/widget/spin-slider.h index 8a45299e5..5f86fd15a 100644 --- a/src/ui/widget/spin-slider.h +++ b/src/ui/widget/spin-slider.h @@ -10,6 +10,14 @@ #ifndef INKSCAPE_UI_WIDGET_SPIN_SLIDER_H #define INKSCAPE_UI_WIDGET_SPIN_SLIDER_H +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/adjustment.h> #include <gtkmm/box.h> #include <gtkmm/scale.h> diff --git a/src/ui/widget/spinbutton.h b/src/ui/widget/spinbutton.h index 57c48369e..fe5d699e7 100644 --- a/src/ui/widget/spinbutton.h +++ b/src/ui/widget/spinbutton.h @@ -10,6 +10,14 @@ #ifndef INKSCAPE_UI_WIDGET_SPINBUTTON_H #define INKSCAPE_UI_WIDGET_SPINBUTTON_H +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/spinbutton.h> namespace Inkscape { diff --git a/src/ui/widget/style-swatch.cpp b/src/ui/widget/style-swatch.cpp index 2880961be..7ab47cb2e 100644 --- a/src/ui/widget/style-swatch.cpp +++ b/src/ui/widget/style-swatch.cpp @@ -28,6 +28,7 @@ #include "widgets/widget-sizes.h" #include "helper/units.h" #include "helper/action.h" +#include "helper/action-context.h" #include "preferences.h" #include "inkscape.h" #include "verbs.h" @@ -200,7 +201,7 @@ StyleSwatch::on_click(GdkEventButton */*event*/) { if (this->_desktop && this->_verb_t != SP_VERB_NONE) { Inkscape::Verb *verb = Inkscape::Verb::get(this->_verb_t); - SPAction *action = verb->get_action((Inkscape::UI::View::View *) this->_desktop); + SPAction *action = verb->get_action(Inkscape::ActionContext((Inkscape::UI::View::View *) this->_desktop)); sp_action_perform (action, NULL); return true; } diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h index d7bab3732..6bdb5e248 100644 --- a/src/ui/widget/style-swatch.h +++ b/src/ui/widget/style-swatch.h @@ -17,6 +17,10 @@ # include "config.h" #endif +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> #include <gtkmm/label.h> #include <gtkmm/eventbox.h> diff --git a/src/ui/widget/tolerance-slider.cpp b/src/ui/widget/tolerance-slider.cpp index f92a08d0a..d166e3831 100644 --- a/src/ui/widget/tolerance-slider.cpp +++ b/src/ui/widget/tolerance-slider.cpp @@ -12,6 +12,10 @@ # include <config.h> #endif +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/adjustment.h> #include <gtkmm/box.h> #include <gtkmm/label.h> diff --git a/src/ui/widget/unit-menu.h b/src/ui/widget/unit-menu.h index 142b11186..3104d5aef 100644 --- a/src/ui/widget/unit-menu.h +++ b/src/ui/widget/unit-menu.h @@ -10,6 +10,14 @@ #ifndef INKSCAPE_UI_WIDGET_UNIT_H #define INKSCAPE_UI_WIDGET_UNIT_H +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/comboboxtext.h> #include "util/units.h" |
