[Xfce4-commits] <exo:versioning-from-0.3-to-1> Drop exo_gtk_object_ref_sink and exo_gtk_radio_action_set_current_value.

Jannis Pohlmann jannis at xfce.org
Thu Aug 13 15:42:01 CEST 2009


Updating branch refs/heads/versioning-from-0.3-to-1
         to 9bb4e592eb7c04d7227292ab3eb59f47a5cb634c (commit)
       from 79ce003347ba5e4bb32a9f3c2cd93739fc07a0f3 (commit)

commit 9bb4e592eb7c04d7227292ab3eb59f47a5cb634c
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Thu Aug 13 15:39:50 2009 +0200

    Drop exo_gtk_object_ref_sink and exo_gtk_radio_action_set_current_value.
    
    This is part of bug #5671, which is about dropping deprecated/obsolete
    bits from exo before we switch from exo-0.3 to exo-1.

 docs/reference/exo-sections.txt             |    2 -
 docs/reference/tmpl/exo-gtk-extensions.sgml |   18 ------
 exo-helper/exo-helper-chooser.c             |    4 +-
 exo/exo-gtk-extensions.c                    |   84 +--------------------------
 exo/exo-gtk-extensions.h                    |    5 --
 exo/exo.symbols                             |    2 -
 6 files changed, 3 insertions(+), 112 deletions(-)

diff --git a/docs/reference/exo-sections.txt b/docs/reference/exo-sections.txt
index c2d97c6..e90e271 100644
--- a/docs/reference/exo-sections.txt
+++ b/docs/reference/exo-sections.txt
@@ -396,8 +396,6 @@ exo_g_value_transform_negate
 <FILE>exo-gtk-extensions</FILE>
 <TITLE>Extensions to Gtk</TITLE>
 exo_gtk_object_destroy_later
-exo_gtk_object_ref_sink
-exo_gtk_radio_action_set_current_value
 exo_gtk_file_chooser_add_thumbnail_preview
 </SECTION>
 
diff --git a/docs/reference/tmpl/exo-gtk-extensions.sgml b/docs/reference/tmpl/exo-gtk-extensions.sgml
index 6d6facd..efe8e54 100644
--- a/docs/reference/tmpl/exo-gtk-extensions.sgml
+++ b/docs/reference/tmpl/exo-gtk-extensions.sgml
@@ -31,24 +31,6 @@ Stable
 @object: 
 
 
-<!-- ##### FUNCTION exo_gtk_object_ref_sink ##### -->
-<para>
-
-</para>
-
- at object: 
- at Returns: 
-
-
-<!-- ##### FUNCTION exo_gtk_radio_action_set_current_value ##### -->
-<para>
-
-</para>
-
- at action: 
- at current_value: 
-
-
 <!-- ##### FUNCTION exo_gtk_file_chooser_add_thumbnail_preview ##### -->
 <para>
 
diff --git a/exo-helper/exo-helper-chooser.c b/exo-helper/exo-helper-chooser.c
index cef9dab..6307756 100644
--- a/exo-helper/exo-helper-chooser.c
+++ b/exo-helper/exo-helper-chooser.c
@@ -141,7 +141,7 @@ exo_helper_chooser_init (ExoHelperChooser *chooser)
   chooser->database = exo_helper_database_get ();
 
   chooser->tooltips = gtk_tooltips_new ();
-  exo_gtk_object_ref_sink (GTK_OBJECT (chooser->tooltips));
+  g_object_ref_sink (G_OBJECT (chooser->tooltips));
 
   gtk_widget_push_composite_child ();
 
@@ -690,7 +690,7 @@ exo_helper_chooser_pressed (ExoHelperChooser *chooser,
 
   /* allocate a new menu */
   menu = gtk_menu_new ();
-  exo_gtk_object_ref_sink (GTK_OBJECT (menu));
+  g_object_ref_sink (G_OBJECT (menu));
   gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (button));
 
   /* set Atk popup-window relation for the menu */
diff --git a/exo/exo-gtk-extensions.c b/exo/exo-gtk-extensions.c
index 1cb8238..805fc40 100644
--- a/exo/exo-gtk-extensions.c
+++ b/exo/exo-gtk-extensions.c
@@ -54,89 +54,7 @@ exo_gtk_object_destroy_later (GtkObject *object)
   g_return_if_fail (GTK_IS_OBJECT (object));
 
   g_idle_add_full (G_PRIORITY_HIGH, later_destroy, object, NULL);
-  exo_gtk_object_ref_sink (object);
-}
-
-
-
-/**
- * exo_gtk_object_ref_sink:
- * @object : a #GtkObject.
- *
- * Helper function used to take a reference on
- * @object and droppping the floating reference
- * to @object (if any) atomically.
- *
- * If libexo is compiled against Gtk+ 2.9.0 or
- * newer, this function will use g_object_ref_sink(),
- * since with newer Gtk+/GObject versions, the floating
- * reference handling was moved to GObject. Else, this
- * function will expand to
- *
- * <informalexample><programlisting>
- * g_object_ref (G_OBJECT (object));
- * gtk_object_sink (GTK_OBJECT (object));
- * </programlisting></informalexample>
- *
- * The caller is responsible to release the reference
- * on @object acquire by this function call using
- * g_object_unref().
- *
- * Return value: a reference to @object.
- **/
-gpointer
-exo_gtk_object_ref_sink (GtkObject *object)
-{
-  g_return_val_if_fail (GTK_IS_OBJECT (object), NULL);
-
-#if GTK_CHECK_VERSION(2,9,0)
-  g_object_ref_sink (G_OBJECT (object));
-#else
-  g_object_ref (G_OBJECT (object));
-  gtk_object_sink (object);
-#endif
-
-  return object;
-}
-
-
-
-/**
- * exo_gtk_radio_action_set_current_value:
- * @action        : A #GtkRadioAction.
- * @current_value : the value of the #GtkRadioAction to activate.
- *
- * Looks for all actions in the group to which @action belongs and if
- * any of the actions matches the @current_value, it will become the
- * new active action.
- *
- * Else if none of the actions in @action<!---->'s radio group match
- * the specified @current_value, all actions will be deactivated and
- * the radio group will have no active action afterwards.
- **/
-void
-exo_gtk_radio_action_set_current_value (GtkRadioAction *action,
-                                        gint            current_value)
-{
-  GSList *lp;
-  gint    value;
-
-  g_return_if_fail (GTK_IS_RADIO_ACTION (action));
-
-  /* check if we have action who's value matches */
-  for (lp = gtk_radio_action_get_group (action); lp != NULL; lp = lp->next)
-    {
-      g_object_get (G_OBJECT (lp->data), "value", &value, NULL);
-      if (value == current_value)
-        {
-          gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (lp->data), TRUE);
-          return;
-        }
-    }
-
-  /* no action found, so none of the actions gets the "active" flag */
-  for (lp = gtk_radio_action_get_group (action); lp != NULL; lp = lp->next)
-    gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (lp->data), FALSE);
+  g_object_ref_sink (object);
 }
 
 
diff --git a/exo/exo-gtk-extensions.h b/exo/exo-gtk-extensions.h
index e8bd1b9..8cae715 100644
--- a/exo/exo-gtk-extensions.h
+++ b/exo/exo-gtk-extensions.h
@@ -33,11 +33,6 @@ G_BEGIN_DECLS
 
 void      exo_gtk_object_destroy_later                (GtkObject      *object);
 
-gpointer  exo_gtk_object_ref_sink                     (GtkObject      *object);
-
-void      exo_gtk_radio_action_set_current_value      (GtkRadioAction *action,
-                                                       gint            current_value);
-
 void      exo_gtk_file_chooser_add_thumbnail_preview  (GtkFileChooser *chooser);
 
 G_END_DECLS
diff --git a/exo/exo.symbols b/exo/exo.symbols
index 25dcce1..ec845e0 100644
--- a/exo/exo.symbols
+++ b/exo/exo.symbols
@@ -129,8 +129,6 @@ exo_g_value_transform_negate
 #if IN_HEADER(__EXO_GTK_EXTENSIONS_H__)
 #if IN_SOURCE(__EXO_GTK_EXTENSIONS_C__)
 exo_gtk_object_destroy_later
-exo_gtk_object_ref_sink
-exo_gtk_radio_action_set_current_value
 exo_gtk_file_chooser_add_thumbnail_preview
 #endif
 #endif



More information about the Xfce4-commits mailing list