From: <mar...@us...> - 2006-08-21 08:20:14
|
Revision: 16950 Author: markhuetsch Date: 2006-08-21 01:20:11 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16950&view=rev Log Message: ----------- Eliminated some debugging output and made some labels more clear for the users. Also added a few comments. Modified Paths: -------------- trunk/libgaim/protocols/qq/qq.c Modified: trunk/libgaim/protocols/qq/qq.c =================================================================== --- trunk/libgaim/protocols/qq/qq.c 2006-08-21 07:47:03 UTC (rev 16949) +++ trunk/libgaim/protocols/qq/qq.c 2006-08-21 08:20:11 UTC (rev 16950) @@ -176,13 +176,14 @@ switch(q_bud->status) { case QQ_BUDDY_OFFLINE: - g_string_append(status, "My Offline"); + g_string_append(status, "Offline"); break; case QQ_BUDDY_ONLINE_NORMAL: return NULL; break; + /* TODO What does this status mean? Labelling it as offline... */ case QQ_BUDDY_ONLINE_OFFLINE: - g_string_append(status, "Online Offline"); + g_string_append(status, "Offline"); break; case QQ_BUDDY_ONLINE_AWAY: g_string_append(status, "Away"); @@ -193,28 +194,7 @@ default: g_string_printf(status, "Unknown-%d", q_bud->status); } - /* - switch (q_bud->gender) { - case QQ_BUDDY_GENDER_GG: - g_string_append(status, " GG"); - break; - case QQ_BUDDY_GENDER_MM: - g_string_append(status, " MM"); - break; - case QQ_BUDDY_GENDER_UNKNOWN: - g_string_append(status, "^_*"); - break; - default: - g_string_append(status, "^_^"); - } - g_string_append_printf(status, " Age: %d", q_bud->age); - g_string_append_printf(status, " Client: %04x", q_bud->client_version); - having_video = q_bud->comm_flag & QQ_COMM_FLAG_VIDEO; - if (having_video) - g_string_append(status, " (video)"); - */ - ret = status->str; g_string_free(status, FALSE); @@ -226,15 +206,12 @@ static void _qq_tooltip_text(GaimBuddy *b, GString *tooltip, gboolean full) { qq_buddy *q_bud; - /* gchar *country, *country_utf8, *city, *city_utf8; - guint32 ip_value; - */ gchar *ip_str; g_return_if_fail(b != NULL); q_bud = (qq_buddy *) b->proto_data; - /* g_return_if_fail(q_bud != NULL); */ + g_return_if_fail(q_bud != NULL); if (GAIM_BUDDY_IS_ONLINE(b) && q_bud != NULL) { @@ -248,20 +225,23 @@ g_string_append_printf(tooltip, "\n<b>Age:</b> %d", q_bud->age); switch (q_bud->gender) { case QQ_BUDDY_GENDER_GG: - g_string_append(tooltip, "\n<b>Gender:</b> GG"); + g_string_append(tooltip, "\n<b>Gender:</b> Male"); break; case QQ_BUDDY_GENDER_MM: - g_string_append(tooltip, "\n<b>Gender:</b> MM"); + g_string_append(tooltip, "\n<b>Gender:</b> Female"); break; case QQ_BUDDY_GENDER_UNKNOWN: - g_string_append(tooltip, "\n<b>Gender:</b> UNKNOWN"); + g_string_append(tooltip, "\n<b>Gender:</b> Unknown"); break; default: g_string_append_printf(tooltip, "\n<b>Gender:</b> ERROR(%d)", q_bud->gender); - } /* switch gender */ + } + /* For debugging */ + /* g_string_append_printf(tooltip, "\n<b>Flag:</b> %01x", q_bud->flag1); g_string_append_printf(tooltip, "\n<b>CommFlag:</b> %01x", q_bud->comm_flag); g_string_append_printf(tooltip, "\n<b>Client:</b> %04x", q_bud->client_version); + */ } } @@ -476,6 +456,7 @@ g_free(prefix); } +/* Change your status icon (face) */ static void _qq_menu_change_face(GaimPluginAction *action) { GaimConnection *gc = (GaimConnection *) action->context; @@ -898,7 +879,7 @@ } /* chat-related (QQ Qun) menu shown up with right-click */ -/* XXX re-enable this +/* TODO re-enable this static GList *_qq_chat_menu(GaimBlistNode *node) { GList *m; @@ -915,7 +896,7 @@ } */ /* buddy-related menu shown up with right-click */ -/* XXX re-enable this +/* TODO re-enable this static GList *_qq_buddy_menu(GaimBlistNode * node) { GList *m; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-08-24 08:08:19
|
Revision: 17013 Author: markhuetsch Date: 2006-08-24 01:08:14 -0700 (Thu, 24 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=17013&view=rev Log Message: ----------- Don't crash when we try to use a not-yet-functional chat feature. Modified Paths: -------------- trunk/libgaim/protocols/qq/qq.c Modified: trunk/libgaim/protocols/qq/qq.c =================================================================== --- trunk/libgaim/protocols/qq/qq.c 2006-08-24 08:04:46 UTC (rev 17012) +++ trunk/libgaim/protocols/qq/qq.c 2006-08-24 08:08:14 UTC (rev 17013) @@ -965,7 +965,7 @@ _qq_tooltip_text, /* tooltip_text */ _qq_away_states, /* away_states */ NULL, /* blist_node_menu */ - qq_chat_info, /* chat_info */ + NULL, /* chat_info */ NULL, /* chat_info_defaults */ _qq_login, /* login */ _qq_close, /* close */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-09-10 15:07:51
|
Revision: 17216 http://svn.sourceforge.net/gaim/?rev=17216&view=rev Author: datallah Date: 2006-09-10 08:07:46 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Use fstat() on the opened fd instead of stat() on the file separately. Use static buffers in a few places to avoid unnecessary memory allocation and freeing. Modified Paths: -------------- trunk/libgaim/protocols/qq/qq.c Modified: trunk/libgaim/protocols/qq/qq.c =================================================================== --- trunk/libgaim/protocols/qq/qq.c 2006-09-10 07:02:23 UTC (rev 17215) +++ trunk/libgaim/protocols/qq/qq.c 2006-09-10 15:07:46 UTC (rev 17216) @@ -166,7 +166,6 @@ { qq_buddy *q_bud; GString *status; - gchar *ret; q_bud = (qq_buddy *) b->proto_data; if (q_bud == NULL) @@ -195,10 +194,7 @@ g_string_printf(status, "Unknown-%d", q_bud->status); } - ret = status->str; - g_string_free(status, FALSE); - - return ret; + return g_string_free(status, FALSE); } @@ -414,17 +410,16 @@ GaimRequestField *field; struct stat img_stat; FILE *file; - gchar *filename, *img_data, *face; + gchar *filename, *img_data; + gchar face[15]; gint size; - face = g_strdup_printf("qq_%i.png", face_num); + g_snprintf(face, sizeof(face), "qq_%i.png", face_num); filename = g_build_filename(DATADIR, "pixmaps", "gaim","status","default", face, NULL); - g_free(face); - face = g_strdup_printf("%i", face_num); - stat(filename, &img_stat); + g_snprintf(face, sizeof(face), "%i", face_num); file = g_fopen(filename, "rb"); - if (file) { + if (file && fstat(fileno(file), &img_stat) == 0) { img_data = g_malloc(img_stat.st_size); size = fread(img_data, 1, img_stat.st_size, file); @@ -434,7 +429,6 @@ g_free(img_data); fclose(file); } - g_free(face); } /* Change your status icon (face) */ @@ -445,7 +439,7 @@ GaimRequestFields *fields; GaimRequestFieldGroup *group; GaimRequestField *field; - gchar *label; + gchar label[15]; gint i; fields = gaim_request_fields_new(); @@ -454,9 +448,8 @@ field = gaim_request_field_choice_new("face_num", _("Select a number"), qd->my_icon / 3); for(i = 1; i <= QQ_FACES; i++) { - label = g_strdup_printf("%i", i); + g_snprintf(label, sizeof(label), "%i", i); gaim_request_field_choice_add(field, label); - g_free(label); } gaim_request_field_group_add_field(group, field); group = gaim_request_field_group_new(_("Faces")); @@ -776,9 +769,9 @@ GaimRequestFields *fields; GaimRequestFieldGroup *group; GaimRequestField *field; - gchar *tmp; + gchar tmp[15]; qq_data *qd; - + gc = (GaimConnection *) action->context; qd = (qq_data *) gc->proto_data; g_return_if_fail(gc != NULL && qd != NULL); @@ -786,17 +779,15 @@ fields = gaim_request_fields_new(); group = gaim_request_field_group_new(_("Basic Elements")); gaim_request_fields_add_group(fields, group); - tmp = g_strdup_printf("%04X", QQ_CLIENT); + g_snprintf(tmp, sizeof(tmp), "%04X", QQ_CLIENT); field = gaim_request_field_string_new("client", _("Client (hex)"), tmp, FALSE); - g_free(tmp); gaim_request_field_group_add_field(group, field); field = gaim_request_field_string_new("cmd", _("Command (hex)"), "0000", FALSE); gaim_request_field_group_add_field(group, field); field = gaim_request_field_string_new("seq", _("Sequence (hex)"), "0000", FALSE); gaim_request_field_group_add_field(group, field); - tmp = g_strdup_printf("%u", qd->uid); + g_snprintf(tmp, sizeof(tmp), "%u", qd->uid); field = gaim_request_field_string_new("uid", _("QQ Number (decimal)"), tmp, FALSE); - g_free(tmp); gaim_request_field_group_add_field(group, field); field = gaim_request_field_string_new("body", _("Body (hex)"), NULL, TRUE); gaim_request_field_group_add_field(group, field); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-09-11 03:39:48
|
Revision: 17241 http://svn.sourceforge.net/gaim/?rev=17241&view=rev Author: markhuetsch Date: 2006-09-10 20:39:40 -0700 (Sun, 10 Sep 2006) Log Message: ----------- We don't need to see this log. Modified Paths: -------------- trunk/libgaim/protocols/qq/qq.c Modified: trunk/libgaim/protocols/qq/qq.c =================================================================== --- trunk/libgaim/protocols/qq/qq.c 2006-09-11 02:30:59 UTC (rev 17240) +++ trunk/libgaim/protocols/qq/qq.c 2006-09-11 03:39:40 UTC (rev 17241) @@ -584,15 +584,6 @@ } */ -/* -static void _qq_menu_show_system_message(GaimPluginAction *action) -{ - GaimConnection *gc = (GaimConnection *) action->context; - g_return_if_fail ( gc != NULL ); - gaim_gtk_log_show(GAIM_LOG_IM, "systemim", gaim_connection_get_account(gc)); -} -*/ - /* TODO: re-enable this static void _qq_menu_send_file(GaimBlistNode * node, gpointer ignored) { @@ -833,11 +824,6 @@ m = g_list_append(m, act); */ - /* XXX consider re-enabling this - act = gaim_plugin_action_new(_("Show System Message"), _qq_menu_show_system_message); - m = g_list_append(m, act); - */ - /* act = gaim_plugin_action_new(_("Qun: Search a permanent Qun"), _qq_menu_search_or_add_permanent_group); m = g_list_append(m, act); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-10-20 23:08:43
|
Revision: 17555 http://svn.sourceforge.net/gaim/?rev=17555&view=rev Author: rlaager Date: 2006-10-20 16:08:07 -0700 (Fri, 20 Oct 2006) Log Message: ----------- Patch from Bj?\195?\182rn Voigt to standardize the Server and Port strings in the QQ prpl. Modified Paths: -------------- trunk/libgaim/protocols/qq/qq.c Modified: trunk/libgaim/protocols/qq/qq.c =================================================================== --- trunk/libgaim/protocols/qq/qq.c 2006-10-20 17:05:30 UTC (rev 17554) +++ trunk/libgaim/protocols/qq/qq.c 2006-10-20 23:08:07 UTC (rev 17555) @@ -1028,10 +1028,10 @@ option = gaim_account_option_bool_new(_("Login Hidden"), "hidden", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - option = gaim_account_option_string_new(_("QQ Server"), "server", NULL); + option = gaim_account_option_string_new(_("Server"), "server", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - option = gaim_account_option_string_new(_("QQ Port"), "port", NULL); + option = gaim_account_option_string_new(_("Port"), "port", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); my_protocol = plugin; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-10-30 04:39:28
|
Revision: 17626 http://svn.sourceforge.net/gaim/?rev=17626&view=rev Author: rlaager Date: 2006-10-29 20:39:11 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Mark a string for translation. Fixes SF Bug #1586953 Modified Paths: -------------- trunk/libgaim/protocols/qq/qq.c Modified: trunk/libgaim/protocols/qq/qq.c =================================================================== --- trunk/libgaim/protocols/qq/qq.c 2006-10-30 03:54:24 UTC (rev 17625) +++ trunk/libgaim/protocols/qq/qq.c 2006-10-30 04:39:11 UTC (rev 17626) @@ -519,7 +519,7 @@ g_string_append_printf(info, _("<b>My Public IP</b>: %s<br>\n"), qd->my_ip); g_string_append(info, "<hr>\n"); - g_string_append(info, "<i>Information below may not be accurate</i><br>\n"); + g_string_append(info, _("<i>Information below may not be accurate</i><br>\n")); g_string_append_printf(info, _("<b>Login Time</b>: %s<br>\n"), ctime(&qd->login_time)); g_string_append_printf(info, _("<b>Last Login IP</b>: %s<br>\n"), qd->last_login_ip); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-11-30 10:56:56
|
Revision: 17856 http://svn.sourceforge.net/gaim/?rev=17856&view=rev Author: markhuetsch Date: 2006-11-30 02:56:56 -0800 (Thu, 30 Nov 2006) Log Message: ----------- These icons are neither useful nor existent right now. Modified Paths: -------------- trunk/libgaim/protocols/qq/qq.c Modified: trunk/libgaim/protocols/qq/qq.c =================================================================== --- trunk/libgaim/protocols/qq/qq.c 2006-11-30 10:30:13 UTC (rev 17855) +++ trunk/libgaim/protocols/qq/qq.c 2006-11-30 10:56:56 UTC (rev 17856) @@ -245,15 +245,18 @@ if (q_bud == NULL) { emblems[0] = "offline"; } else { - /* TODO the wireless icon is a bit too big to look good with QQ faces */ if (q_bud->status == QQ_BUDDY_ONLINE_AWAY) emblems[i++] = "away"; + /* if (q_bud->comm_flag & QQ_COMM_FLAG_QQ_MEMBER) emblems[i++] = "qq_member"; + */ if (q_bud->comm_flag & QQ_COMM_FLAG_BIND_MOBILE) emblems[i++] = "wireless"; + /* if (q_bud->comm_flag & QQ_COMM_FLAG_VIDEO) emblems[i%4] = "video"; + */ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |