Merge lp:~bregma/libgrip/lp-1468786 into lp:libgrip

Proposed by Stephen M. Webb
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 97
Merged at revision: 97
Proposed branch: lp:~bregma/libgrip/lp-1468786
Merge into: lp:libgrip
Diff against target: 34 lines (+11/-2)
1 file modified
examples/rectangle-mover/gesture.c (+11/-2)
To merge this branch: bzr merge lp:~bregma/libgrip/lp-1468786
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+264313@code.launchpad.net

Commit message

replace deprecated GTK functions with non-deprecated GTK 3.16 calls.

Description of the change

Replaces deprecated GTK functions with non-deprecated GTK 3.16 calls.

To post a comment you must log in.
lp:~bregma/libgrip/lp-1468786 updated
97. By Stephen M. Webb

replaced GTK functions deprecated in 3.16

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'examples/rectangle-mover/gesture.c'
--- examples/rectangle-mover/gesture.c 2014-01-07 18:39:29 +0000
+++ examples/rectangle-mover/gesture.c 2015-07-09 16:46:29 +0000
@@ -176,7 +176,8 @@
176 GtkWidget *tv;176 GtkWidget *tv;
177 GtkTreeModel *model;177 GtkTreeModel *model;
178 GtkWidget *sw;178 GtkWidget *sw;
179 const GdkRGBA white = { 0xffff, 0xffff, 0xffff, 0xffff };179 GtkCssProvider *style;
180 GtkStyleContext *style_ctx;
180181
181 app->da = gtk_drawing_area_new ();182 app->da = gtk_drawing_area_new ();
182183
@@ -216,12 +217,20 @@
216217
217 gtk_container_add (GTK_CONTAINER (window), hbox);218 gtk_container_add (GTK_CONTAINER (window), hbox);
218219
219 gtk_widget_override_background_color (app->da, GTK_STATE_NORMAL, &white);220 style = gtk_css_provider_new();
221 style_ctx = gtk_widget_get_style_context(GTK_WIDGET(app->da));
222 gtk_css_provider_load_from_data(style,
223 "* { background-color: #ffffff; }", -1,
224 NULL);
225 gtk_style_context_add_provider(style_ctx,
226 GTK_STYLE_PROVIDER (style),
227 GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
220228
221 g_signal_connect (app->da, "draw",229 g_signal_connect (app->da, "draw",
222 G_CALLBACK (draw_canvas), NULL);230 G_CALLBACK (draw_canvas), NULL);
223231
224 subscribe_gestures(app->manager, window, app->da);232 subscribe_gestures(app->manager, window, app->da);
233 g_object_unref(style);
225 return window;234 return window;
226}235}
227236

Subscribers

People subscribed via source and target branches