summaryrefslogtreecommitdiff
path: root/libslab
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-05-08 21:58:37 +0200
committerraveit65 <[email protected]>2017-05-28 09:52:32 +0200
commit4a8f55bf9ddc92da143012e6eefaeb5580c3d051 (patch)
tree4aa3622ee23243b24f59c2073d7a7f0c0a5e1236 /libslab
parentd3eb027cee37bbf16a5f5f608d4aea37cbe385dd (diff)
downloadmate-control-center-4a8f55bf9ddc92da143012e6eefaeb5580c3d051.tar.bz2
mate-control-center-4a8f55bf9ddc92da143012e6eefaeb5580c3d051.tar.xz
libslab tile.c: replace deprecated gtk_widget_set_state ()
Diffstat (limited to 'libslab')
-rw-r--r--libslab/tile.c12
-rw-r--r--libslab/tile.h4
2 files changed, 8 insertions, 8 deletions
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;