[gtk+/wip/baedert/box: 7/13] widget: Remove gtk_widget_{s,g}et_state



commit 1323b6e1e8c1b11d223cc418c4019c8078a1fa9e
Author: Timm Bäder <mail baedert org>
Date:   Tue Oct 4 18:18:53 2016 +0200

    widget: Remove gtk_widget_{s,g}et_state

 docs/reference/gtk/gtk3-sections.txt |    2 -
 gtk/gtkwidget.c                      |   87 ----------------------------------
 gtk/gtkwidget.h                      |    6 --
 3 files changed, 0 insertions(+), 95 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index e1947d9..4452e2a 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -5181,7 +5181,6 @@ gtk_widget_grab_focus
 gtk_widget_grab_default
 gtk_widget_set_name
 gtk_widget_get_name
-gtk_widget_set_state
 gtk_widget_set_sensitive
 gtk_widget_set_parent
 gtk_widget_set_parent_window
@@ -5320,7 +5319,6 @@ gtk_widget_set_has_window
 gtk_widget_get_sensitive
 gtk_widget_is_sensitive
 GtkStateType
-gtk_widget_get_state
 gtk_widget_get_visible
 gtk_widget_is_visible
 gtk_widget_set_visible
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 91fdb85..9b1df73 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -8580,93 +8580,6 @@ gtk_widget_get_state_flags (GtkWidget *widget)
 }
 
 /**
- * gtk_widget_set_state:
- * @widget: a #GtkWidget
- * @state: new state for @widget
- *
- * This function is for use in widget implementations. Sets the state
- * of a widget (insensitive, prelighted, etc.) Usually you should set
- * the state using wrapper functions such as gtk_widget_set_sensitive().
- *
- * Deprecated: 3.0: Use gtk_widget_set_state_flags() instead.
- **/
-void
-gtk_widget_set_state (GtkWidget           *widget,
-                     GtkStateType         state)
-{
-  GtkStateFlags flags;
-
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-  if (state == gtk_widget_get_state (widget))
-    return;
-  G_GNUC_END_IGNORE_DEPRECATIONS;
-
-  switch (state)
-    {
-    case GTK_STATE_ACTIVE:
-      flags = GTK_STATE_FLAG_ACTIVE;
-      break;
-    case GTK_STATE_PRELIGHT:
-      flags = GTK_STATE_FLAG_PRELIGHT;
-      break;
-    case GTK_STATE_SELECTED:
-      flags = GTK_STATE_FLAG_SELECTED;
-      break;
-    case GTK_STATE_INSENSITIVE:
-      flags = GTK_STATE_FLAG_INSENSITIVE;
-      break;
-    case GTK_STATE_INCONSISTENT:
-      flags = GTK_STATE_FLAG_INCONSISTENT;
-      break;
-    case GTK_STATE_FOCUSED:
-      flags = GTK_STATE_FLAG_FOCUSED;
-      break;
-    case GTK_STATE_NORMAL:
-    default:
-      flags = 0;
-      break;
-    }
-
-  gtk_widget_update_state_flags (widget,
-                                 flags,
-                                 (GTK_STATE_FLAG_ACTIVE | GTK_STATE_FLAG_PRELIGHT | GTK_STATE_FLAG_SELECTED
-                                 | GTK_STATE_FLAG_INSENSITIVE | GTK_STATE_FLAG_INCONSISTENT | 
GTK_STATE_FLAG_FOCUSED) ^ flags);
-}
-
-/**
- * gtk_widget_get_state:
- * @widget: a #GtkWidget
- *
- * Returns the widget’s state. See gtk_widget_set_state().
- *
- * Returns: the state of @widget.
- *
- * Since: 2.18
- *
- * Deprecated: 3.0: Use gtk_widget_get_state_flags() instead.
- */
-GtkStateType
-gtk_widget_get_state (GtkWidget *widget)
-{
-  GtkStateFlags flags;
-
-  g_return_val_if_fail (GTK_IS_WIDGET (widget), GTK_STATE_NORMAL);
-
-  flags = _gtk_widget_get_state_flags (widget);
-
-  if (flags & GTK_STATE_FLAG_INSENSITIVE)
-    return GTK_STATE_INSENSITIVE;
-  else if (flags & GTK_STATE_FLAG_ACTIVE)
-    return GTK_STATE_ACTIVE;
-  else if (flags & GTK_STATE_FLAG_SELECTED)
-    return GTK_STATE_SELECTED;
-  else if (flags & GTK_STATE_FLAG_PRELIGHT)
-    return GTK_STATE_PRELIGHT;
-  else
-    return GTK_STATE_NORMAL;
-}
-
-/**
  * gtk_widget_set_visible:
  * @widget: a #GtkWidget
  * @visible: whether the widget should be shown or not
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 38d6934..1ed0780 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -808,12 +808,6 @@ void                  gtk_widget_set_name               (GtkWidget    *widget,
 GDK_AVAILABLE_IN_ALL
 const gchar *         gtk_widget_get_name               (GtkWidget    *widget);
 
-GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_set_state_flags)
-void                  gtk_widget_set_state              (GtkWidget    *widget,
-                                                        GtkStateType  state);
-
-GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_get_state_flags)
-GtkStateType          gtk_widget_get_state              (GtkWidget    *widget);
 
 GDK_AVAILABLE_IN_ALL
 void                  gtk_widget_set_state_flags        (GtkWidget     *widget,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]