[gtk+] Remove deprecated GtkSpinner style properties



commit 072023e57b6c894436f1a480797621f3740f6413
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jan 5 23:21:52 2011 -0500

    Remove deprecated GtkSpinner style properties

 gtk/gtkcellrendererspinner.c |    8 +++-----
 gtk/gtkspinner.c             |   37 -------------------------------------
 gtk/gtkstyle.c               |    4 +---
 gtk/gtkthemingengine.c       |    8 +-------
 4 files changed, 5 insertions(+), 52 deletions(-)
---
diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c
index 034e40d..e609fe7 100644
--- a/gtk/gtkcellrendererspinner.c
+++ b/gtk/gtkcellrendererspinner.c
@@ -126,10 +126,8 @@ gtk_cell_renderer_spinner_class_init (GtkCellRendererSpinnerClass *klass)
    * Pulse of the spinner. Increment this value to draw the next frame of the
    * spinner animation. Usually, you would update this value in a timeout.
    *
-   * The #GtkSpinner widget draws one full cycle of the animation per second by default.
-   * You can learn about the number of frames used by the theme
-   * by looking at the #GtkSpinner:num-steps style property and the duration
-   * of the cycle by looking at #GtkSpinner:cycle-duration.
+   * By default, the #GtkSpinner widget draws one full cycle of the animation,
+   * consisting of 12 frames, in 750 milliseconds.
    *
    * Since: 2.20
    */
@@ -172,7 +170,7 @@ gtk_cell_renderer_spinner_init (GtkCellRendererSpinner *cell)
 }
 
 /**
- * gtk_cell_renderer_spinner_new
+ * gtk_cell_renderer_spinner_new:
  *
  * Returns a new cell renderer which will show a spinner to indicate
  * activity.
diff --git a/gtk/gtkspinner.c b/gtk/gtkspinner.c
index 78c6b99..779eee0 100644
--- a/gtk/gtkspinner.c
+++ b/gtk/gtkspinner.c
@@ -119,43 +119,6 @@ gtk_spinner_class_init (GtkSpinnerClass *klass)
                                                          P_("Whether the spinner is active"),
                                                          FALSE,
                                                          G_PARAM_READWRITE));
-  /**
-   * GtkSpinner:num-steps:
-   *
-   * The number of steps for the spinner to complete a full loop.
-   * The animation will complete a full cycle in one second by default
-   * (see the #GtkSpinner:cycle-duration style property).
-   *
-   * Since: 2.20
-   *
-   * Deprecated: 3.0
-   */
-  gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_uint ("num-steps",
-                                                             P_("Number of steps"),
-                                                             P_("The number of steps for the spinner to complete a full loop. The animation will complete a full cycle in one second by default (see #GtkSpinner:cycle-duration)."),
-                                                             1,
-                                                             G_MAXUINT,
-                                                             12,
-                                                             G_PARAM_READABLE));
-
-  /**
-   * GtkSpinner:cycle-duration:
-   *
-   * The duration in milliseconds for the spinner to complete a full cycle.
-   *
-   * Since: 2.20
-   *
-   * Deprecated: 3.0
-   */
-  gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_uint ("cycle-duration",
-                                                             P_("Animation duration"),
-                                                             P_("The length of time in milliseconds for the spinner to complete a full loop"),
-                                                             500,
-                                                             G_MAXUINT,
-                                                             1000,
-                                                             G_PARAM_READABLE));
 }
 
 static void
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 5eb6a20..f9abf8d 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -2841,9 +2841,7 @@ gtk_default_draw_spinner (GtkStyle     *style,
   gint i;
   guint real_step;
 
-  gtk_style_get (style, GTK_TYPE_SPINNER,
-                 "num-steps", &num_steps,
-                 NULL);
+  num_steps = 12;
   real_step = step % num_steps;
 
   /* set a clip region for the expose event */
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 7bd97ef..588d107 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -2912,18 +2912,12 @@ gtk_theming_engine_render_activity (GtkThemingEngine *engine,
       gdouble half;
       gint i;
 
-      num_steps = 0;
-
-      gtk_theming_engine_get_style (engine,
-                                    "num-steps", &num_steps,
-                                    NULL);
+      num_steps = 12;
 
       state = gtk_theming_engine_get_state (engine);
       gtk_theming_engine_get (engine, state,
                               "color", &color,
                               NULL);
-      if (num_steps == 0)
-        num_steps = 12;
 
       if (gtk_theming_engine_state_is_running (engine, GTK_STATE_ACTIVE, &progress))
         step = (guint) (progress * num_steps);



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