[gtk+/wip/ricotz/deprecated] Remove deprecated GtkStateType
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/ricotz/deprecated] Remove deprecated GtkStateType
- Date: Sun, 23 Oct 2016 11:37:09 +0000 (UTC)
commit ce1358d088ecc4b090cbd6ceed9236488614a34d
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Oct 23 13:36:27 2016 +0200
Remove deprecated GtkStateType
docs/reference/gtk/gtk4-sections.txt | 1 -
gtk/gtkbutton.c | 13 -------------
gtk/gtkcellrendererspinner.c | 22 ----------------------
gtk/gtkenums.h | 33 ---------------------------------
gtk/gtkpathbar.c | 11 -----------
gtk/gtkwidget.h | 2 --
6 files changed, 0 insertions(+), 82 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 5568c41..9ceab02 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4878,7 +4878,6 @@ gtk_widget_get_has_window
gtk_widget_set_has_window
gtk_widget_get_sensitive
gtk_widget_is_sensitive
-GtkStateType
gtk_widget_get_visible
gtk_widget_is_visible
gtk_widget_set_visible
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 82c253b..a4988a3 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -140,8 +140,6 @@ static void gtk_button_update_state (GtkButton *button);
static void gtk_button_finish_activate (GtkButton *button,
gboolean do_it);
-static void gtk_button_state_changed (GtkWidget *widget,
- GtkStateType previous_state);
static void gtk_button_grab_notify (GtkWidget *widget,
gboolean was_grabbed);
static void gtk_button_do_release (GtkButton *button,
@@ -229,7 +227,6 @@ gtk_button_class_init (GtkButtonClass *klass)
widget_class->key_release_event = gtk_button_key_release;
widget_class->enter_notify_event = gtk_button_enter_notify;
widget_class->leave_notify_event = gtk_button_leave_notify;
- widget_class->state_changed = gtk_button_state_changed;
widget_class->grab_notify = gtk_button_grab_notify;
container_class->add = gtk_button_add;
@@ -1299,16 +1296,6 @@ gtk_button_screen_changed (GtkWidget *widget,
}
static void
-gtk_button_state_changed (GtkWidget *widget,
- GtkStateType previous_state)
-{
- GtkButton *button = GTK_BUTTON (widget);
-
- if (!gtk_widget_is_sensitive (widget))
- gtk_button_do_release (button, FALSE);
-}
-
-static void
gtk_button_grab_notify (GtkWidget *widget,
gboolean was_grabbed)
{
diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c
index dc7a0d1..c83a250 100644
--- a/gtk/gtkcellrendererspinner.c
+++ b/gtk/gtkcellrendererspinner.c
@@ -326,7 +326,6 @@ gtk_cell_renderer_spinner_get_size (GtkCellRenderer *cellr,
static void
gtk_paint_spinner (GtkStyleContext *context,
cairo_t *cr,
- GtkStateType state_type,
GtkWidget *widget,
const gchar *detail,
guint step,
@@ -400,7 +399,6 @@ gtk_cell_renderer_spinner_render (GtkCellRenderer *cellr,
{
GtkCellRendererSpinner *cell = GTK_CELL_RENDERER_SPINNER (cellr);
GtkCellRendererSpinnerPrivate *priv = cell->priv;
- GtkStateType state;
GdkRectangle pix_rect;
GdkRectangle draw_rect;
gint xpad, ypad;
@@ -424,25 +422,6 @@ gtk_cell_renderer_spinner_render (GtkCellRenderer *cellr,
if (!gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect))
return;
- state = GTK_STATE_NORMAL;
- if ((gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_INSENSITIVE) ||
- !gtk_cell_renderer_get_sensitive (cellr))
- {
- state = GTK_STATE_INSENSITIVE;
- }
- else
- {
- if ((flags & GTK_CELL_RENDERER_SELECTED) != 0)
- {
- if (gtk_widget_has_focus (widget))
- state = GTK_STATE_SELECTED;
- else
- state = GTK_STATE_ACTIVE;
- }
- else
- state = GTK_STATE_PRELIGHT;
- }
-
cairo_save (cr);
gdk_cairo_rectangle (cr, cell_area);
@@ -450,7 +429,6 @@ gtk_cell_renderer_spinner_render (GtkCellRenderer *cellr,
gtk_paint_spinner (gtk_widget_get_style_context (widget),
cr,
- state,
widget,
"cell",
priv->pulse,
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h
index 5f78da2..b7f5941 100644
--- a/gtk/gtkenums.h
+++ b/gtk/gtkenums.h
@@ -484,39 +484,6 @@ typedef enum
/* Widget states */
/**
- * GtkStateType:
- * @GTK_STATE_NORMAL: State during normal operation.
- * @GTK_STATE_ACTIVE: State of a currently active widget, such as a depressed button.
- * @GTK_STATE_PRELIGHT: State indicating that the mouse pointer is over
- * the widget and the widget will respond to mouse clicks.
- * @GTK_STATE_SELECTED: State of a selected item, such the selected row in a list.
- * @GTK_STATE_INSENSITIVE: State indicating that the widget is
- * unresponsive to user actions.
- * @GTK_STATE_INCONSISTENT: The widget is inconsistent, such as checkbuttons
- * or radiobuttons that aren’t either set to %TRUE nor %FALSE,
- * or buttons requiring the user attention.
- * @GTK_STATE_FOCUSED: The widget has the keyboard focus.
- *
- * This type indicates the current state of a widget; the state determines how
- * the widget is drawn. The #GtkStateType enumeration is also used to
- * identify different colors in a #GtkStyle for drawing, so states can be
- * used for subparts of a widget as well as entire widgets.
- *
- * Deprecated: 3.14: All APIs that are using this enumeration have been deprecated
- * in favor of alternatives using #GtkStateFlags.
- */
-typedef enum
-{
- GTK_STATE_NORMAL,
- GTK_STATE_ACTIVE,
- GTK_STATE_PRELIGHT,
- GTK_STATE_SELECTED,
- GTK_STATE_INSENSITIVE,
- GTK_STATE_INCONSISTENT,
- GTK_STATE_FOCUSED
-} GtkStateType;
-
-/**
* GtkToolbarStyle:
* @GTK_TOOLBAR_ICONS: Buttons display only icons in the toolbar.
* @GTK_TOOLBAR_TEXT: Buttons display only text labels in the toolbar.
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index 7ad0c83..6bf791f 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -155,8 +155,6 @@ static gboolean gtk_path_bar_slider_button_release(GtkWidget *widget,
GtkPathBar *path_bar);
static void gtk_path_bar_grab_notify (GtkWidget *widget,
gboolean was_grabbed);
-static void gtk_path_bar_state_changed (GtkWidget *widget,
- GtkStateType previous_state);
static void gtk_path_bar_style_updated (GtkWidget *widget);
static void gtk_path_bar_screen_changed (GtkWidget *widget,
GdkScreen *previous_screen);
@@ -231,7 +229,6 @@ gtk_path_bar_class_init (GtkPathBarClass *path_bar_class)
widget_class->style_updated = gtk_path_bar_style_updated;
widget_class->screen_changed = gtk_path_bar_screen_changed;
widget_class->grab_notify = gtk_path_bar_grab_notify;
- widget_class->state_changed = gtk_path_bar_state_changed;
widget_class->scroll_event = gtk_path_bar_scroll;
container_class->add = gtk_path_bar_add;
@@ -1104,14 +1101,6 @@ gtk_path_bar_grab_notify (GtkWidget *widget,
gtk_path_bar_stop_scrolling (GTK_PATH_BAR (widget));
}
-static void
-gtk_path_bar_state_changed (GtkWidget *widget,
- GtkStateType previous_state)
-{
- if (!gtk_widget_is_sensitive (widget))
- gtk_path_bar_stop_scrolling (GTK_PATH_BAR (widget));
-}
-
/* Changes the icons wherever it is needed */
static void
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index bb09211..2eaa2c3 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -360,8 +360,6 @@ struct _GtkWidgetClass
void (* unrealize) (GtkWidget *widget);
void (* size_allocate) (GtkWidget *widget,
GtkAllocation *allocation);
- void (* state_changed) (GtkWidget *widget,
- GtkStateType previous_state);
void (* state_flags_changed) (GtkWidget *widget,
GtkStateFlags previous_state_flags);
void (* parent_set) (GtkWidget *widget,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]