summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-01-14 22:05:12 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-01-14 22:05:12 +0000
commit562a5689443f9f8416b3ae2451c2c172e8b714af (patch)
treeaae4e6c4dfa1303cab76beeae2cf5b2d3929d9c9 /src
parentEnable tangential and perpendicular snapping to paths (in the node-tool, pen-... (diff)
downloadinkscape-562a5689443f9f8416b3ae2451c2c172e8b714af.tar.gz
inkscape-562a5689443f9f8416b3ae2451c2c172e8b714af.zip
More GSEAL stuff
(bzr r10887)
Diffstat (limited to 'src')
-rw-r--r--src/ui/tool/event-utils.cpp4
-rw-r--r--src/ui/widget/dock-item.cpp4
-rw-r--r--src/ui/widget/selected-style.cpp13
-rw-r--r--src/widgets/font-selector.cpp2
4 files changed, 14 insertions, 9 deletions
diff --git a/src/ui/tool/event-utils.cpp b/src/ui/tool/event-utils.cpp
index ef2d27653..f71f0ab12 100644
--- a/src/ui/tool/event-utils.cpp
+++ b/src/ui/tool/event-utils.cpp
@@ -76,7 +76,11 @@ unsigned combine_motion_events(SPCanvas *canvas, GdkEventMotion &event, gint mas
event.x_root = next.x_root;
event.y_root = next.y_root;
if (event.axes && next.axes) {
+#if GTK_CHECK_VERSION(2,22,0)
+ memcpy(event.axes, next.axes, gdk_device_get_n_axes(event.device));
+#else
memcpy(event.axes, next.axes, event.device->num_axes);
+#endif
}
}
diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp
index e5001ccde..093a456d7 100644
--- a/src/ui/widget/dock-item.cpp
+++ b/src/ui/widget/dock-item.cpp
@@ -243,10 +243,10 @@ DockItem::present()
// tabbed
else if (getPlacement() == CENTER) {
- int i = gtk_notebook_page_num (GTK_NOTEBOOK (_gdl_dock_item->parent),
+ int i = gtk_notebook_page_num(GTK_NOTEBOOK(gtk_widget_get_parent(_gdl_dock_item)),
GTK_WIDGET (_gdl_dock_item));
if (i >= 0)
- gtk_notebook_set_current_page (GTK_NOTEBOOK (_gdl_dock_item->parent), i);
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(gtk_widget_get_parent(_gdl_dock_item)), i);
}
// always grab focus, even if we're already present
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 40dbbc962..3d3cd4bb8 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -455,10 +455,10 @@ void SelectedStyle::dragDataReceived( GtkWidget */*widget*/,
case SS_FILL:
case SS_STROKE:
{
- if ( data->length == 8 ) {
+ if (gtk_selection_data_get_length(data) == 8 ) {
gchar c[64];
// Careful about endian issues.
- guint16* dataVals = (guint16*)data->data;
+ guint16* dataVals = (guint16*)gtk_selection_data_get_data(data);
sp_svg_write_color( c, sizeof(c),
SP_RGBA32_U_COMPOSE(
0x0ff & (dataVals[0] >> 8),
@@ -1252,13 +1252,14 @@ RotateableSwatch::do_motion(double by, guint modifier) {
sp_cursor_bitmap_and_mask_from_xpm(&bitmap, &mask, cursor_adj_h_xpm);
}
if ((bitmap != NULL) && (mask != NULL)) {
+ GtkStyle *style = gtk_widget_get_style(w);
cr = gdk_cursor_new_from_pixmap(bitmap, mask,
- &w->style->black,
- &w->style->white,
+ &style->black,
+ &style->white,
16, 16);
g_object_unref (bitmap);
g_object_unref (mask);
- gdk_window_set_cursor(w->window, cr);
+ gdk_window_set_cursor(gtk_widget_get_window(w), cr);
gdk_cursor_unref(cr);
cr_set = true;
}
@@ -1312,7 +1313,7 @@ RotateableSwatch::do_release(double by, guint modifier) {
if (cr_set) {
GtkWidget *w = GTK_WIDGET(gobj());
- gdk_window_set_cursor(w->window, NULL);
+ gdk_window_set_cursor(gtk_widget_get_window(w), NULL);
if (cr) {
gdk_cursor_unref (cr);
cr = NULL;
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp
index a9340a291..08f79f9e2 100644
--- a/src/widgets/font-selector.cpp
+++ b/src/widgets/font-selector.cpp
@@ -484,7 +484,7 @@ void sp_font_selector_set_font (SPFontSelector *fsel, font_instance *font, doubl
{
gchar s[8];
g_snprintf (s, 8, "%.5g", size); // UI, so printf is ok
- gtk_entry_set_text (GTK_ENTRY (GTK_BIN(fsel->size)->child), s);
+ gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(fsel->size))), s);
fsel->fontsize = size;
}
}