[mousetweaks] Compile with -DGSEAL_ENABLED. Bumps gtk+ to 2.18. Fixes bug 612492.
- From: Andre Klapper <aklapper src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mousetweaks] Compile with -DGSEAL_ENABLED. Bumps gtk+ to 2.18. Fixes bug 612492.
- Date: Mon, 12 Apr 2010 20:44:24 +0000 (UTC)
commit 0f2e0615055d09832c845a4efc27dcae0731fbc5
Author: Andre Klapper <a9016009 gmx de>
Date: Mon Apr 12 21:23:03 2010 +0200
Compile with -DGSEAL_ENABLED. Bumps gtk+ to 2.18. Fixes bug 612492.
configure.ac | 2 +-
src/dwell-click-applet.c | 19 ++++++++++++-------
src/mt-main.c | 4 +++-
src/pointer-capture-applet.c | 8 +++++---
4 files changed, 21 insertions(+), 12 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9a5d684..8daa3a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,7 +38,7 @@ GNOME_DOC_INIT
dnl *** dependencies ***
PKG_CHECK_MODULES(DEPENDENCIES,
- gtk+-2.0 >= 2.16
+ gtk+-2.0 >= 2.18
gconf-2.0 >= 2.16.0
dbus-glib-1 >= 0.7
cspi-1.0
diff --git a/src/dwell-click-applet.c b/src/dwell-click-applet.c
index 563a898..35be737 100644
--- a/src/dwell-click-applet.c
+++ b/src/dwell-click-applet.c
@@ -171,18 +171,23 @@ enable_dwell_exposed (GtkWidget *widget,
GdkColor c;
gdouble x, y, w, h;
gint fwidth, fpad;
+ GtkAllocation allocation;
+ GtkStyle *style;
- c = widget->style->bg[GTK_STATE_SELECTED];
+ style = gtk_widget_get_style (widget);
+ c = style->bg[GTK_STATE_SELECTED];
gtk_widget_style_get (widget,
"focus-line-width", &fwidth,
"focus-padding", &fpad,
NULL);
- x = widget->allocation.x + fwidth + fpad;
- y = widget->allocation.y + fwidth + fpad;
- w = widget->allocation.width - (fwidth + fpad) * 2;
- h = widget->allocation.height - (fwidth + fpad) * 2;
- cr = gdk_cairo_create (widget->window);
+ gtk_widget_get_allocation (widget, &allocation);
+ x = allocation.x + fwidth + fpad;
+ y = allocation.y + fwidth + fpad;
+ w = allocation.width - (fwidth + fpad) * 2;
+ h = allocation.height - (fwidth + fpad) * 2;
+
+ cr = gdk_cairo_create (gtk_widget_get_window (widget));
cairo_set_source_rgba (cr,
c.red / 65535.,
c.green / 65535.,
@@ -292,7 +297,7 @@ applet_orient_changed (PanelApplet *applet, guint orient, gpointer data)
break;
}
- if (dd->box->parent)
+ if (gtk_widget_get_parent (dd->box))
gtk_widget_reparent (dd->box, GTK_WIDGET (applet));
else {
gtk_container_add (GTK_CONTAINER (applet), dd->box);
diff --git a/src/mt-main.c b/src/mt-main.c
index 85cffce..449eada 100644
--- a/src/mt-main.c
+++ b/src/mt-main.c
@@ -547,6 +547,7 @@ cursor_overlay_time (MtData *mt,
{
GtkWidget *ctw;
GdkColor c;
+ GtkStyle *style;
cairo_surface_t *surface;
cairo_t *cr;
gdouble target;
@@ -565,7 +566,8 @@ cursor_overlay_time (MtData *mt,
}
ctw = mt_ctw_get_window (mt);
- c = ctw->style->bg[GTK_STATE_SELECTED];
+ style = gtk_widget_get_style (ctw);
+ c = style->bg[GTK_STATE_SELECTED];
target = mt_timer_get_target (timer);
cairo_set_operator (cr, CAIRO_OPERATOR_ATOP);
diff --git a/src/pointer-capture-applet.c b/src/pointer-capture-applet.c
index 3a7503c..49cf382 100644
--- a/src/pointer-capture-applet.c
+++ b/src/pointer-capture-applet.c
@@ -251,13 +251,15 @@ static gboolean
area_exposed (GtkWidget *widget, GdkEventExpose *eev, gpointer data)
{
CaptureData *cd = data;
+ GtkAllocation allocation;
cairo_t *cr;
gdouble w, h;
- w = widget->allocation.width;
- h = widget->allocation.height;
+ gtk_widget_get_allocation (widget, &allocation);
+ w = allocation.width;
+ h = allocation.height;
- cr = gdk_cairo_create (widget->window);
+ cr = gdk_cairo_create (gtk_widget_get_window (widget));
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_rectangle (cr, 0.0, 0.0, w, h);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]