pidgin.vv: e2b82dc3: Remove connection attribute from PurpleM...
maiku at soc.pidgin.im
maiku at soc.pidgin.im
Mon Dec 15 21:15:58 EST 2008
-----------------------------------------------------------------
Revision: e2b82dc35cc71671c51ab9fc8140a4d0e4a9abb7
Ancestor: 9857f069b39984eba54b8dc575f9106af886ae93
Author: maiku at soc.pidgin.im
Date: 2008-12-16T01:27:51
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/e2b82dc35cc71671c51ab9fc8140a4d0e4a9abb7
Modified files:
finch/gntmedia.c libpurple/marshallers.list
libpurple/media.c libpurple/media.h libpurple/mediamanager.c
pidgin/gtkconv.c
ChangeLog:
Remove connection attribute from PurpleMedia.
-------------- next part --------------
============================================================
--- finch/gntmedia.c 905f7de8b4e5f9df3124f2118bcc8879811fc799
+++ finch/gntmedia.c 84d3451a8d10da62f09729d75a16b4c8c46a7220
@@ -371,14 +371,14 @@ static gboolean
}
static gboolean
-finch_new_media(PurpleMediaManager *manager, PurpleMedia *media, gpointer null)
+finch_new_media(PurpleMediaManager *manager, PurpleMedia *media,
+ PurpleConnection *gc, gchar *name, gpointer null)
{
GntWidget *gntmedia;
PurpleConversation *conv;
conv = purple_conversation_new(PURPLE_CONV_TYPE_IM,
- purple_connection_get_account(purple_media_get_connection(media)),
- purple_media_get_screenname(media));
+ purple_connection_get_account(gc), name);
gntmedia = finch_media_new(media);
g_signal_connect(G_OBJECT(gntmedia), "message", G_CALLBACK(gntmedia_message_cb), conv);
============================================================
--- libpurple/marshallers.list bfb697fadbe0572456e8cf27a7bb435ec8ac957f
+++ libpurple/marshallers.list a3edfa9599fa64795d23bb60ce1213aceb87170d
@@ -1,4 +1,4 @@ VOID:POINTER,POINTER,OBJECT
VOID:BOXED,BOXED
VOID:POINTER,POINTER,OBJECT
-BOOLEAN:OBJECT
+BOOLEAN:OBJECT,POINTER,STRING
VOID:STRING,STRING
============================================================
--- libpurple/media.c c099d65b42e1565860ea4e385609922576e6dd72
+++ libpurple/media.c 2e728256716a40be071042891b3d73f44888fced
@@ -75,7 +75,6 @@ struct _PurpleMediaPrivate
FsConference *conference;
char *name;
- PurpleConnection *connection;
GHashTable *sessions; /* PurpleMediaSession table */
GHashTable *participants; /* FsParticipant table */
@@ -128,7 +127,6 @@ enum {
PROP_0,
PROP_FS_CONFERENCE,
PROP_NAME,
- PROP_CONNECTION,
};
GType
@@ -178,12 +176,6 @@ purple_media_class_init (PurpleMediaClas
NULL,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
- g_object_class_install_property(gobject_class, PROP_CONNECTION,
- g_param_spec_pointer("connection",
- "Connection",
- "The PurpleConnection associated with this session",
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
-
purple_media_signals[ERROR] = g_signal_new("error", G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL,
g_cclosure_marshal_VOID__STRING,
@@ -335,9 +327,6 @@ purple_media_set_property (GObject *obje
g_free(media->priv->name);
media->priv->name = g_value_dup_string(value);
break;
- case PROP_CONNECTION:
- media->priv->connection = g_value_get_pointer(value);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -359,9 +348,6 @@ purple_media_get_property (GObject *obje
case PROP_NAME:
g_value_set_string(value, media->priv->name);
break;
- case PROP_CONNECTION:
- g_value_set_pointer(value, media->priv->connection);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -753,14 +739,6 @@ purple_media_get_pipeline(PurpleMedia *m
return media->priv->pipeline;
}
-PurpleConnection *
-purple_media_get_connection(PurpleMedia *media)
-{
- PurpleConnection *gc;
- g_object_get(G_OBJECT(media), "connection", &gc, NULL);
- return gc;
-}
-
char *
purple_media_get_screenname(PurpleMedia *media)
{
============================================================
--- libpurple/media.h 3f08b48ae9b3a44240cbd35c2f3d04979fee813c
+++ libpurple/media.h 43e49a3946de6f54da5c8cfa06d78f4622ad3ac9
@@ -214,15 +214,6 @@ GstElement *purple_media_get_pipeline(Pu
GstElement *purple_media_get_pipeline(PurpleMedia *media);
/**
- * Gets the connection the media session is associated with.
- *
- * @param media The media object to retrieve the connection from.
- *
- * @return The retreived connection.
- */
-PurpleConnection *purple_media_get_connection(PurpleMedia *media);
-
-/**
* Gets the screenname of the remote user.
*
* @param media The media object to retrieve the remote user from.
============================================================
--- libpurple/mediamanager.c f2401deae588a60270f3bacf0b7b2578edeacf38
+++ libpurple/mediamanager.c e138dccca97dc56f9d3d4d448ab1f32c7f9424d0
@@ -102,8 +102,9 @@ purple_media_manager_class_init (PurpleM
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
- purple_smarshal_BOOLEAN__OBJECT,
- G_TYPE_BOOLEAN, 1, PURPLE_TYPE_MEDIA);
+ purple_smarshal_BOOLEAN__OBJECT_POINTER_STRING,
+ G_TYPE_BOOLEAN, 3, PURPLE_TYPE_MEDIA,
+ G_TYPE_POINTER, G_TYPE_STRING);
g_type_class_add_private(klass, sizeof(PurpleMediaManagerPrivate));
}
@@ -156,7 +157,6 @@ purple_media_manager_create_media(Purple
media = PURPLE_MEDIA(g_object_new(purple_media_get_type(),
"screenname", remote_user,
- "connection", gc,
"farsight-conference", conference,
NULL));
@@ -172,7 +172,7 @@ purple_media_manager_create_media(Purple
}
g_signal_emit(manager, purple_media_manager_signals[INIT_MEDIA], 0,
- media, &signal_ret);
+ media, gc, remote_user, &signal_ret);
if (signal_ret == FALSE) {
g_object_unref(media);
============================================================
--- pidgin/gtkconv.c de5a51ff32192d0a40e32ad5e7a2da3166f08acd
+++ pidgin/gtkconv.c ec421fcf4473b602811067fd09ab9bee087d6ec5
@@ -7814,17 +7814,15 @@ static gboolean
}
static gboolean
-pidgin_conv_new_media_cb(PurpleMediaManager *manager, PurpleMedia *media, gpointer nul)
+pidgin_conv_new_media_cb(PurpleMediaManager *manager, PurpleMedia *media,
+ PurpleConnection *gc, gchar *screenname, gpointer nul)
{
GtkWidget *gtkmedia;
PurpleConversation *conv;
PidginConversation *gtkconv;
- gchar *name = purple_media_get_screenname(media);
conv = purple_conversation_new(PURPLE_CONV_TYPE_IM,
- purple_connection_get_account(
- purple_media_get_connection(media)), name);
- g_free(name);
+ purple_connection_get_account(gc), screenname);
gtkconv = PIDGIN_CONVERSATION(conv);
More information about the Commits
mailing list