cpw.nader.asynclogging-3: 561ae872: Made PurpleLogs send out signals when th...
Jorge Villaseñor
salinasv at gmail.com
Thu Jan 13 21:12:10 EST 2011
Try to avoid using C++ like comments. We try to keep our code C89
style, and.. "//" looks really ugly.
On Thu, Jan 13, 2011 at 8:05 PM, <morshed.nader at gmail.com> wrote:
> ----------------------------------------------------------------------
> Revision: 561ae872a7991a61f1170583865fbfbafabcf45c
> Parent: 0cf27327f4872967e10dd88cf5d2b3d2df052cdd
> Author: morshed.nader at gmail.com
> Date: 01/13/11 14:02:29
> Branch: im.pidgin.cpw.nader.asynclogging-3
> URL: http://d.pidgin.im/viewmtn/revision/info/561ae872a7991a61f1170583865fbfbafabcf45c
>
> Changelog:
>
> Made PurpleLogs send out signals when their properties are set
>
> Changes against parent 0cf27327f4872967e10dd88cf5d2b3d2df052cdd
>
> patched libpurple/log.c
>
>
> ============================================================
> --- libpurple/log.c df48dfad29d4263a23920969bd2be27d621ade4d
> +++ libpurple/log.c bbf06ce61dd71e2e313c3b894f6f087c50a479b2
> @@ -60,7 +60,7 @@ enum {
> PROP_LOG_CHAT_TYPE,
> PROP_LOG_NAME,
> PROP_LOG_ACCOUNT,
> - PROP_LOG_CONV,
> + PROP_LOG_CONVERSATION,
> PROP_LOG_TIME,
> PROP_LOG_TM,
> LAST_PROP
> @@ -314,7 +314,7 @@ purple_log_class_init(PurpleLogClass *cl
> // PURPLE_TYPE_ACCOUNT,
> G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
>
> - properties[PROP_LOG_CONV] =
> + properties[PROP_LOG_CONVERSATION] =
> //Ideally should be g_param_spec_object
> g_param_spec_pointer("conversation",
> "Conversation",
> @@ -351,8 +351,8 @@ purple_log_class_init(PurpleLogClass *cl
> properties[PROP_LOG_ACCOUNT]);
>
> g_object_class_install_property(gobject_class,
> - PROP_LOG_CONV,
> - properties[PROP_LOG_CONV]);
> + PROP_LOG_CONVERSATION,
> + properties[PROP_LOG_CONVERSATION]);
>
> g_object_class_install_property(gobject_class,
> PROP_LOG_TIME,
> @@ -385,6 +385,9 @@ purple_log_set_chat_type(PurpleLog *log,
> g_return_if_fail(PURPLE_IS_LOG(log));
>
> PURPLE_LOG_GET_PRIVATE(log)->chat_type = chat_type;
> +
> + g_object_notify(G_OBJECT(log), "chat-type");
> + // g_object_notify_by_pspec(G_OBJECT(log), properties[PROP_LOG_CHAT_TYPE]);
> }
>
> static void
> @@ -394,6 +397,9 @@ purple_log_set_name(PurpleLog *log, cons
> g_return_if_fail(name != NULL);
>
> PURPLE_LOG_GET_PRIVATE(log)->name = g_strdup(name);
> +
> + g_object_notify(G_OBJECT(log), "name");
> + // g_object_notify_by_pspec(G_OBJECT(log), properties[PROP_LOG_NAME]);
> }
>
> static void
> @@ -404,6 +410,9 @@ purple_log_set_account(PurpleLog *log, P
> // g_return_if_fail(account == NULL || PURPLE_IS_ACCOUNT(account));
>
> PURPLE_LOG_GET_PRIVATE(log)->account = account; // g_object_ref
> +
> + g_object_notify(G_OBJECT(log), "account");
> + // g_object_notify_by_pspec(G_OBJECT(log), properties[PROP_LOG_ACCOUNT]);
> }
>
> static void
> @@ -413,6 +422,9 @@ purple_log_set_conversation(PurpleLog *l
> // g_return_if_fail(conversation == NULL || PURPLE_IS_CONVERSATION(conversation));
>
> PURPLE_LOG_GET_PRIVATE(log)->conversation = conversation; // g_object_ref
> +
> + g_object_notify(G_OBJECT(log), "conversation");
> + // g_object_notify_by_pspec(G_OBJECT(log), properties[PROP_LOG_CONVERSATION]);
> }
>
> static void
> @@ -421,6 +433,9 @@ purple_log_set_time(PurpleLog *log, time
> g_return_if_fail(PURPLE_IS_LOG(log));
>
> PURPLE_LOG_GET_PRIVATE(log)->time = log_time;
> +
> + g_object_notify(G_OBJECT(log), "time");
> + // g_object_notify_by_pspec(G_OBJECT(log), properties[PROP_LOG_TIME]);
> }
>
> static void
> @@ -453,6 +468,9 @@ purple_log_set_tm(PurpleLog *log, struct
> }
> #endif
> }
> +
> + g_object_notify(G_OBJECT(log), "tm");
> + // g_object_notify_by_pspec(G_OBJECT(log), properties[PROP_LOG_TM]);
> }
>
> PurpleLogChatType
> @@ -519,7 +537,7 @@ purple_log_set_property(GObject *object,
> //g_value_get_object
> purple_log_set_account(log, g_value_get_pointer(value));
> break;
> - case PROP_LOG_CONV:
> + case PROP_LOG_CONVERSATION:
> //g_value_get_object
> purple_log_set_conversation(log, g_value_get_pointer(value));
> break;
> @@ -554,7 +572,7 @@ purple_log_get_property(GObject *object,
> case PROP_LOG_TIME:
> g_value_set_long(value, purple_log_get_time(log));
> break;
> - case PROP_LOG_CONV:
> + case PROP_LOG_CONVERSATION:
> //g_value_set_object
> g_value_set_pointer(value, purple_log_get_conversation(log));
> break;
>
> _______________________________________________
> Commits mailing list
> Commits at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/commits
>
--
Masca
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
More information about the Devel
mailing list