summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-07-17 05:13:49 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-07-17 05:13:49 +0000
commitdd59aa3bb2cab030296a4622e5166f0e3f8d5445 (patch)
treea86612c94d3ddce3edf696ea17fefb58b0accccf /src/ui/widget
parentTemporary fixes/kludges. (diff)
parentShape calculations. re-introduce grid of a smaller size. (http://article.gman... (diff)
downloadinkscape-dd59aa3bb2cab030296a4622e5166f0e3f8d5445.tar.gz
inkscape-dd59aa3bb2cab030296a4622e5166f0e3f8d5445.zip
Merge from trunk.
(bzr r12380.1.17)
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/dock.cpp20
-rw-r--r--src/ui/widget/dock.h10
-rw-r--r--src/ui/widget/page-sizer.cpp3
-rw-r--r--src/ui/widget/style-swatch.cpp3
4 files changed, 25 insertions, 11 deletions
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 611c10f46..33e60b836 100644
--- a/src/ui/widget/dock.h
+++ b/src/ui/widget/dock.h
@@ -74,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/page-sizer.cpp b/src/ui/widget/page-sizer.cpp
index 14e280f6d..73b75090b 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 "util/units.h"
#include "inkscape.h"
#include "sp-namedview.h"
@@ -616,7 +617,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/style-swatch.cpp b/src/ui/widget/style-swatch.cpp
index a89f42575..aedab3fa5 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;
}