~doctormo/inkscape/align-handles

« back to all changes in this revision

Viewing changes to src/ui/widget/dock.cpp

  • Committer: Alex Valavanis
  • Date: 2013-07-06 10:19:17 UTC
  • Revision ID: valavanisalex@gmail.com-20130706101917-98zhjtjtf1t7ch78
Fix build failure with GDL >= 3.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
 
50
50
Dock::Dock(Gtk::Orientation orientation)
51
 
    : _gdl_dock (GDL_DOCK (gdl_dock_new())),
52
 
      _gdl_dock_bar (GDL_DOCK_BAR (gdl_dock_bar_new(GDL_DOCK(_gdl_dock)))),
 
51
    : _gdl_dock(gdl_dock_new()),
 
52
#if WITH_GDL_3_6
 
53
      _gdl_dock_bar(GDL_DOCK_BAR(gdl_dock_bar_new(G_OBJECT(_gdl_dock)))),
 
54
#else
 
55
      _gdl_dock_bar(GDL_DOCK_BAR(gdl_dock_bar_new(GDL_DOCK(_gdl_dock)))),
 
56
#endif
53
57
      _scrolled_window (Gtk::manage(new Gtk::ScrolledWindow))
54
58
{
55
 
    gdl_dock_bar_set_orientation(_gdl_dock_bar, static_cast<GtkOrientation>(orientation));
 
59
#if WITH_GDL_3_6
 
60
    gtk_orientable_set_orientation(GTK_ORIENTABLE(_gdl_dock_bar),
 
61
                                   static_cast<GtkOrientation>(orientation));
 
62
#else
 
63
    gdl_dock_bar_set_orientation(_gdl_dock_bar,
 
64
                                 static_cast<GtkOrientation>(orientation));
 
65
#endif
56
66
 
57
67
#if WITH_GTKMM_3_0
58
68
    switch(orientation) {
127
137
void Dock::addItem(DockItem& item, DockItem::Placement placement)
128
138
{
129
139
    _dock_items.push_back(&item);
130
 
    gdl_dock_add_item(_gdl_dock, GDL_DOCK_ITEM(item.gobj()), (GdlDockPlacement)placement);
 
140
    gdl_dock_add_item(GDL_DOCK(_gdl_dock),
 
141
                      GDL_DOCK_ITEM(item.gobj()),
 
142
                      (GdlDockPlacement)placement);
131
143
 
132
144
    // FIXME: This is a hack to prevent the dock from expanding the main window, this can't be done
133
145
    // initially as the paned doesn't exist.