From 4a8f55bf9ddc92da143012e6eefaeb5580c3d051 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Mon, 8 May 2017 21:58:37 +0200 Subject: libslab tile.c: replace deprecated gtk_widget_set_state () --- libslab/tile.c | 12 ++++++------ libslab/tile.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'libslab') diff --git a/libslab/tile.c b/libslab/tile.c index fd245720..e3343801 100644 --- a/libslab/tile.c +++ b/libslab/tile.c @@ -292,7 +292,7 @@ tile_setup (Tile * tile) static void tile_enter (GtkButton * widget) { - gtk_widget_set_state (GTK_WIDGET (widget), TILE_STATE_ENTERED); + gtk_widget_set_state_flags (GTK_WIDGET (widget), TILE_STATE_ENTERED, TRUE); TILE (widget)->entered = TRUE; } @@ -301,9 +301,9 @@ static void tile_leave (GtkButton * widget) { if (gtk_widget_has_focus (GTK_WIDGET (widget))) - gtk_widget_set_state (GTK_WIDGET (widget), TILE_STATE_FOCUSED); + gtk_widget_set_state_flags (GTK_WIDGET (widget), TILE_STATE_FOCUSED, TRUE); else - gtk_widget_set_state (GTK_WIDGET (widget), GTK_STATE_NORMAL); + gtk_widget_set_state_flags (GTK_WIDGET (widget), GTK_STATE_FLAG_NORMAL, TRUE); TILE (widget)->entered = FALSE; } @@ -326,7 +326,7 @@ tile_clicked (GtkButton * widget) static gboolean tile_focus_in (GtkWidget * widget, GdkEventFocus * event) { - gtk_widget_set_state (widget, TILE_STATE_FOCUSED); + gtk_widget_set_state_flags (widget, TILE_STATE_FOCUSED, TRUE); return FALSE; } @@ -335,9 +335,9 @@ static gboolean tile_focus_out (GtkWidget * widget, GdkEventFocus * event) { if (TILE (widget)->entered) - gtk_widget_set_state (widget, TILE_STATE_ENTERED); + gtk_widget_set_state_flags (widget, TILE_STATE_ENTERED, TRUE); else - gtk_widget_set_state (widget, GTK_STATE_NORMAL); + gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_NORMAL, TRUE); return FALSE; } diff --git a/libslab/tile.h b/libslab/tile.h index e06366b7..f105a1d2 100644 --- a/libslab/tile.h +++ b/libslab/tile.h @@ -41,8 +41,8 @@ extern "C" { #define IS_TILE_ACTION_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), TILE_ACTION_TYPE)) #define TILE_ACTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TILE_ACTION_TYPE, TileActionClass)) #define TILE_ACTION_CHECK_FLAG(action,flag) ((TILE_ACTION (action)->flags & (flag)) != 0) -#define TILE_STATE_ENTERED GTK_STATE_PRELIGHT -#define TILE_STATE_FOCUSED GTK_STATE_PRELIGHT +#define TILE_STATE_ENTERED GTK_STATE_FLAG_PRELIGHT +#define TILE_STATE_FOCUSED GTK_STATE_FLAG_PRELIGHT typedef struct _Tile Tile; typedef struct _TileClass TileClass; -- cgit v1.2.1