[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (9b803f2740021a18ae37f89b341efb87fad39786)
The branch, master has been updated
via 9b803f2740021a18ae37f89b341efb87fad39786 (commit)
from 718b9c34a4c2e4070436cf8abf756f22c5c74cec (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gtkhid-gdk.c | 6 ++++--
src/hid/gtk/gui-drc-window.c | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
=================
Commit Messages
=================
commit 9b803f2740021a18ae37f89b341efb87fad39786
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
hid/gtk: Use gtk_widget_get_style() accessor, rather than direct access
In GTK3.0, direct access to widget->style will be impossible.
Swap out the GTK_WIDGET_STATE() macro for gtk_widget_get_state(), which
does not directly access the GSeal'd member widget->state.
:100644 100644 85fd1d6... 96e54a6... M src/hid/gtk/gtkhid-gdk.c
:100644 100644 e7f5c46... 4ab38b1... M src/hid/gtk/gui-drc-window.c
=========
Changes
=========
commit 9b803f2740021a18ae37f89b341efb87fad39786
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
hid/gtk: Use gtk_widget_get_style() accessor, rather than direct access
In GTK3.0, direct access to widget->style will be impossible.
Swap out the GTK_WIDGET_STATE() macro for gtk_widget_get_state(), which
does not directly access the GSeal'd member widget->state.
diff --git a/src/hid/gtk/gtkhid-gdk.c b/src/hid/gtk/gtkhid-gdk.c
index 85fd1d6..96e54a6 100644
--- a/src/hid/gtk/gtkhid-gdk.c
+++ b/src/hid/gtk/gtkhid-gdk.c
@@ -1025,6 +1025,7 @@ show_crosshair (gboolean paint_new_location)
{
render_priv *priv = gport->render_priv;
GdkWindow *window = gtk_widget_get_window (gport->drawing_area);
+ GtkStyle *style = gtk_widget_get_style (gport->drawing_area);
gint x, y;
static gint x_prev = -1, y_prev = -1;
static gboolean draw_markers, draw_markers_prev = FALSE;
@@ -1037,7 +1038,7 @@ show_crosshair (gboolean paint_new_location)
if (!xor_gc)
{
xor_gc = gdk_gc_new (window);
- gdk_gc_copy (xor_gc, ghid_port.drawing_area->style->white_gc);
+ gdk_gc_copy (xor_gc, style->white_gc);
gdk_gc_set_function (xor_gc, GDK_XOR);
gdk_gc_set_clip_origin (xor_gc, 0, 0);
set_clip (priv, xor_gc);
@@ -1332,6 +1333,7 @@ static void
draw_lead_user (render_priv *priv)
{
GdkWindow *window = gtk_widget_get_window (gport->drawing_area);
+ GtkStyle *style = gtk_widget_get_style (gport->drawing_area);
int i;
Coord radius = priv->lead_user_radius;
Coord width = MM_TO_COORD (LEAD_USER_WIDTH);
@@ -1345,7 +1347,7 @@ draw_lead_user (render_priv *priv)
if (lead_gc == NULL)
{
lead_gc = gdk_gc_new (window);
- gdk_gc_copy (lead_gc, ghid_port.drawing_area->style->white_gc);
+ gdk_gc_copy (lead_gc, style->white_gc);
gdk_gc_set_function (lead_gc, GDK_XOR);
gdk_gc_set_clip_origin (lead_gc, 0, 0);
lead_color.pixel = 0;
diff --git a/src/hid/gtk/gui-drc-window.c b/src/hid/gtk/gui-drc-window.c
index e7f5c46..4ab38b1 100644
--- a/src/hid/gtk/gui-drc-window.c
+++ b/src/hid/gtk/gui-drc-window.c
@@ -719,6 +719,7 @@ ghid_violation_renderer_render (GtkCellRenderer *cell,
GtkCellRendererState flags)
{
GdkDrawable *mydrawable;
+ GtkStyle *style = gtk_widget_get_style (widget);
GhidViolationRenderer *renderer = GHID_VIOLATION_RENDERER (cell);
GhidDrcViolation *violation = renderer->violation;
int pixmap_size = VIOLATION_PIXMAP_PIXEL_SIZE - 2 * VIOLATION_PIXMAP_PIXEL_BORDER;
@@ -751,7 +752,7 @@ ghid_violation_renderer_render (GtkCellRenderer *cell,
mydrawable = GDK_DRAWABLE (violation->pixmap);
- gdk_draw_drawable (window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
+ gdk_draw_drawable (window, style->fg_gc[gtk_widget_get_state (widget)],
mydrawable, 0, 0,
cell_area->x + cell_area->width + VIOLATION_PIXMAP_PIXEL_BORDER,
cell_area->y + VIOLATION_PIXMAP_PIXEL_BORDER, -1, -1);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs