[gnome-media] Move callback near the function that calls it



commit b3cf60765989e8ae11a362fbbfa286b3c0daa787
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jul 24 01:17:47 2009 +0100

    Move callback near the function that calls it

 gnome-volume-control/src/gvc-mixer-card.c |   42 ++++++++++++++--------------
 1 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/gnome-volume-control/src/gvc-mixer-card.c b/gnome-volume-control/src/gvc-mixer-card.c
index e0623bc..9237739 100644
--- a/gnome-volume-control/src/gvc-mixer-card.c
+++ b/gnome-volume-control/src/gvc-mixer-card.c
@@ -163,27 +163,6 @@ gvc_mixer_card_get_profile (GvcMixerCard *card)
         return ret;
 }
 
-static void
-_pa_context_set_card_profile_by_index_cb (pa_context                       *context,
-                                          int                               success,
-                                          void                             *userdata)
-{
-        GvcMixerCard *card = GVC_MIXER_CARD (userdata);
-
-        g_assert (card->priv->target_profile);
-
-        if (success > 0) {
-                gvc_mixer_card_set_profile (card, card->priv->target_profile);
-        } else {
-                g_debug ("Failed to switch profile on '%s' from '%s' to '%s'",
-                         card->priv->name,
-                         card->priv->profile,
-                         card->priv->target_profile);
-        }
-        g_free (card->priv->target_profile);
-        card->priv->target_profile = NULL;
-}
-
 gboolean
 gvc_mixer_card_set_profile (GvcMixerCard *card,
                             const char     *profile)
@@ -212,6 +191,27 @@ gvc_mixer_card_set_profile (GvcMixerCard *card,
         return TRUE;
 }
 
+static void
+_pa_context_set_card_profile_by_index_cb (pa_context                       *context,
+                                          int                               success,
+                                          void                             *userdata)
+{
+        GvcMixerCard *card = GVC_MIXER_CARD (userdata);
+
+        g_assert (card->priv->target_profile);
+
+        if (success > 0) {
+                gvc_mixer_card_set_profile (card, card->priv->target_profile);
+        } else {
+                g_debug ("Failed to switch profile on '%s' from '%s' to '%s'",
+                         card->priv->name,
+                         card->priv->profile,
+                         card->priv->target_profile);
+        }
+        g_free (card->priv->target_profile);
+        card->priv->target_profile = NULL;
+}
+
 gboolean
 gvc_mixer_card_change_profile (GvcMixerCard *card,
                                const char *profile)



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