[gtk+/wip/otte/gtk4: 90/127] widget: Remove gtk_widget_{s,g}et_state
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/gtk4: 90/127] widget: Remove gtk_widget_{s,g}et_state
- Date: Sat, 8 Oct 2016 03:17:47 +0000 (UTC)
commit bc5743440626978e12bdf3e0071c329c7e8e56e6
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 1e8a257..efeea07 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -5089,7 +5089,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
@@ -5227,7 +5226,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 90391f5..46a774c 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -8485,93 +8485,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 932bbf5..c942f87 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -806,12 +806,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]