changeset 26376:49b7044be3de

Hide FinchMedia and related structures.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Mon, 30 Mar 2009 02:57:51 +0000
parents 0ee10b3e8ee6
children 452be048bded e9e9ec08e87c
files finch/gntmedia.c finch/gntmedia.h finch/gntui.c
diffstat 3 files changed, 28 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntmedia.c	Mon Mar 30 02:49:08 2009 +0000
+++ b/finch/gntmedia.c	Mon Mar 30 02:57:51 2009 +0000
@@ -45,6 +45,29 @@
 
 #undef hangup
 
+#define FINCH_TYPE_MEDIA            (finch_media_get_type())
+#define FINCH_MEDIA(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), FINCH_TYPE_MEDIA, FinchMedia))
+#define FINCH_MEDIA_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), FINCH_TYPE_MEDIA, FinchMediaClass))
+#define FINCH_IS_MEDIA(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), FINCH_TYPE_MEDIA))
+#define FINCH_IS_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FINCH_TYPE_MEDIA))
+#define FINCH_MEDIA_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), FINCH_TYPE_MEDIA, FinchMediaClass))
+
+typedef struct _FinchMedia FinchMedia;
+typedef struct _FinchMediaClass FinchMediaClass;
+typedef struct _FinchMediaPrivate FinchMediaPrivate;
+typedef enum _FinchMediaState FinchMediaState;
+
+struct _FinchMediaClass
+{
+	GntBoxClass parent_class;
+};
+
+struct _FinchMedia
+{
+	GntBox parent;
+	FinchMediaPrivate *priv;
+};
+
 struct _FinchMediaPrivate
 {
 	PurpleMedia *media;
@@ -435,9 +458,11 @@
 			| PURPLE_MEDIA_ELEMENT_ONE_SINK,
 	create_default_audio_sink,	/* create */
 };
+#endif  /* USE_VV */
 
 void finch_media_manager_init(void)
 {
+#ifdef USE_VV
 	PurpleMediaManager *manager = purple_media_manager_get();
 	g_signal_connect(G_OBJECT(manager), "init-media", G_CALLBACK(finch_new_media), NULL);
 	purple_cmd_register("call", "", PURPLE_CMD_P_DEFAULT,
@@ -447,14 +472,16 @@
 	purple_debug_info("gntmedia", "Registering media element types\n");
 	purple_media_manager_set_active_element(manager, &default_audio_src);
 	purple_media_manager_set_active_element(manager, &default_audio_sink);
+#endif
 }
 
 void finch_media_manager_uninit(void)
 {
+#ifdef USE_VV
 	PurpleMediaManager *manager = purple_media_manager_get();
 	g_signal_handlers_disconnect_by_func(G_OBJECT(manager),
 			G_CALLBACK(finch_new_media), NULL);
+#endif
 }
 
-#endif  /* USE_VV */
 
--- a/finch/gntmedia.h	Mon Mar 30 02:49:08 2009 +0000
+++ b/finch/gntmedia.h	Mon Mar 30 02:57:51 2009 +0000
@@ -31,47 +31,12 @@
 #include "config.h"
 #endif
 
-#ifdef USE_VV
-
-#include <glib-object.h>
-#include "gntbox.h"
-
 G_BEGIN_DECLS
 
-#define FINCH_TYPE_MEDIA            (finch_media_get_type())
-#define FINCH_MEDIA(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), FINCH_TYPE_MEDIA, FinchMedia))
-#define FINCH_MEDIA_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), FINCH_TYPE_MEDIA, FinchMediaClass))
-#define FINCH_IS_MEDIA(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), FINCH_TYPE_MEDIA))
-#define FINCH_IS_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FINCH_TYPE_MEDIA))
-#define FINCH_MEDIA_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), FINCH_TYPE_MEDIA, FinchMediaClass))
-
-typedef struct _FinchMedia FinchMedia;
-typedef struct _FinchMediaClass FinchMediaClass;
-typedef struct _FinchMediaPrivate FinchMediaPrivate;
-typedef enum _FinchMediaState FinchMediaState;
-
-struct _FinchMediaClass
-{
-	GntBoxClass parent_class;
-};
-
-struct _FinchMedia
-{
-	GntBox parent;
-	FinchMediaPrivate *priv;
-};
-
-GType finch_media_get_type(void);
-
-GntWidget *finch_media_new(PurpleMedia *media);
-
 void finch_media_manager_init(void);
-
 void finch_media_manager_uninit(void);
 
 G_END_DECLS
 
-#endif /* USE_VV */
-
 #endif /* GNT_MEDIA_H */
 
--- a/finch/gntui.c	Mon Mar 30 02:49:08 2009 +0000
+++ b/finch/gntui.c	Mon Mar 30 02:57:51 2009 +0000
@@ -92,10 +92,8 @@
 	finch_roomlist_init();
 	purple_roomlist_set_ui_ops(finch_roomlist_get_ui_ops());
 
-#ifdef USE_VV
 	/* Media */
 	finch_media_manager_init();
-#endif
 
 	gnt_register_action(_("Accounts"), finch_accounts_show_all);
 	gnt_register_action(_("Buddy List"), finch_blist_show);