Mercurial > dwindows
comparison gtk3/dw.c @ 1912:5035750bcc65
Fix some deprecation warnings in recent GTK3 versions...
Whole classes GtkStatusIcon and GtkMisc have been deprecated.
This will take some work to rewrite.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 19 Jun 2016 17:21:20 +0000 |
parents | 969f7bbc0ff5 |
children | 5d32be499016 |
comparison
equal
deleted
inserted
replaced
1911:102fca5f2e19 | 1912:5035750bcc65 |
---|---|
1 /* | 1 /* |
2 * Dynamic Windows: | 2 * Dynamic Windows: |
3 * A GTK like cross-platform GUI | 3 * A GTK like cross-platform GUI |
4 * GTK3 forwarder module for portabilty. | 4 * GTK3 forwarder module for portabilty. |
5 * | 5 * |
6 * (C) 2000-2013 Brian Smith <brian@dbsoft.org> | 6 * (C) 2000-2016 Brian Smith <brian@dbsoft.org> |
7 * (C) 2003-2011 Mark Hessling <mark@rexx.org> | 7 * (C) 2003-2011 Mark Hessling <mark@rexx.org> |
8 * (C) 2002 Nickolay V. Shmyrev <shmyrev@yandex.ru> | 8 * (C) 2002 Nickolay V. Shmyrev <shmyrev@yandex.ru> |
9 */ | 9 */ |
10 #include "config.h" | 10 #include "config.h" |
11 #include "dw.h" | 11 #include "dw.h" |
401 GdkCursor *cursor; | 401 GdkCursor *cursor; |
402 GdkPixbuf *pixbuf; | 402 GdkPixbuf *pixbuf; |
403 | 403 |
404 child_box = gtk_event_box_new (); | 404 child_box = gtk_event_box_new (); |
405 child_widget_box = gtk_event_box_new (); | 405 child_widget_box = gtk_event_box_new (); |
406 gtk_widget_set_margin_left(child_widget_box, 2); | 406 gtk_widget_set_margin_start(child_widget_box, 2); |
407 top_event_box = gtk_event_box_new (); | 407 top_event_box = gtk_event_box_new (); |
408 bottom_event_box = gtk_event_box_new (); | 408 bottom_event_box = gtk_event_box_new (); |
409 grid = gtk_grid_new (); | 409 grid = gtk_grid_new (); |
410 gtk_grid_set_row_spacing(GTK_GRID(grid), 1); | 410 gtk_grid_set_row_spacing(GTK_GRID(grid), 1); |
411 gtk_grid_set_column_spacing(GTK_GRID(grid), 1); | 411 gtk_grid_set_column_spacing(GTK_GRID(grid), 1); |
487 for (i = 0; i < 3; i++) | 487 for (i = 0; i < 3; i++) |
488 { | 488 { |
489 gtk_widget_show (button[i]); | 489 gtk_widget_show (button[i]); |
490 } | 490 } |
491 | 491 |
492 cursor = gdk_cursor_new (GDK_HAND1); | 492 cursor = gdk_cursor_new_for_display (gdk_display_get_default(), GDK_HAND1); |
493 gtk_widget_realize (top_event_box); | 493 gtk_widget_realize (top_event_box); |
494 gdk_window_set_cursor (gtk_widget_get_window(top_event_box), cursor); | 494 gdk_window_set_cursor (gtk_widget_get_window(top_event_box), cursor); |
495 cursor = gdk_cursor_new (GDK_BOTTOM_RIGHT_CORNER); | 495 cursor = gdk_cursor_new_for_display (gdk_display_get_default(), GDK_BOTTOM_RIGHT_CORNER); |
496 gtk_widget_realize (bottom_event_box); | 496 gtk_widget_realize (bottom_event_box); |
497 gdk_window_set_cursor (gtk_widget_get_window(bottom_event_box), cursor); | 497 gdk_window_set_cursor (gtk_widget_get_window(bottom_event_box), cursor); |
498 | 498 |
499 g_signal_connect (G_OBJECT (top_event_box), "event", | 499 g_signal_connect (G_OBJECT (top_event_box), "event", |
500 G_CALLBACK (move_child_callback), | 500 G_CALLBACK (move_child_callback), |
2914 cursor = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf, 8, 8); | 2914 cursor = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf, 8, 8); |
2915 } | 2915 } |
2916 else if(!pointertype) | 2916 else if(!pointertype) |
2917 cursor = NULL; | 2917 cursor = NULL; |
2918 else | 2918 else |
2919 cursor = gdk_cursor_new(pointertype); | 2919 cursor = gdk_cursor_new_for_display(gdk_display_get_default(), pointertype); |
2920 if(handle && gtk_widget_get_window(handle)) | 2920 if(handle && gtk_widget_get_window(handle)) |
2921 gdk_window_set_cursor(gtk_widget_get_window(handle), cursor); | 2921 gdk_window_set_cursor(gtk_widget_get_window(handle), cursor); |
2922 if(cursor) | 2922 if(cursor) |
2923 g_object_unref(cursor); | 2923 g_object_unref(cursor); |
2924 DW_MUTEX_UNLOCK; | 2924 DW_MUTEX_UNLOCK; |