You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(106) |
Oct
(334) |
Nov
(246) |
Dec
(145) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(53) |
Mar
(232) |
Apr
(109) |
May
(137) |
Jun
(63) |
Jul
(26) |
Aug
(263) |
Sep
(193) |
Oct
(507) |
Nov
(440) |
Dec
(241) |
2003 |
Jan
(567) |
Feb
(195) |
Mar
(504) |
Apr
(481) |
May
(524) |
Jun
(522) |
Jul
(594) |
Aug
(502) |
Sep
(643) |
Oct
(508) |
Nov
(430) |
Dec
(377) |
2004 |
Jan
(361) |
Feb
(251) |
Mar
(219) |
Apr
(499) |
May
(461) |
Jun
(419) |
Jul
(314) |
Aug
(519) |
Sep
(416) |
Oct
(247) |
Nov
(305) |
Dec
(382) |
2005 |
Jan
(267) |
Feb
(282) |
Mar
(327) |
Apr
(338) |
May
(189) |
Jun
(400) |
Jul
(462) |
Aug
(530) |
Sep
(316) |
Oct
(523) |
Nov
(481) |
Dec
(650) |
2006 |
Jan
(536) |
Feb
(361) |
Mar
(287) |
Apr
(146) |
May
(101) |
Jun
(169) |
Jul
(221) |
Aug
(498) |
Sep
(300) |
Oct
(236) |
Nov
(209) |
Dec
(205) |
2007 |
Jan
(30) |
Feb
(23) |
Mar
(26) |
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <the...@us...> - 2006-06-26 03:53:19
|
Revision: 16343 Author: thekingant Date: 2006-06-25 20:53:13 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16343&view=rev Log Message: ----------- Backport SVN revision #16342 from HEAD to v2_0_0 Original commit message: Get rid of some unnecessary if !NULL checks ViewCVS Links: ------------- http://svn.sourceforge.net/gaim/?rev=16342&view=rev Modified Paths: -------------- branches/v2_0_0/src/buddyicon.c Modified: branches/v2_0_0/src/buddyicon.c =================================================================== --- branches/v2_0_0/src/buddyicon.c 2006-06-26 03:52:21 UTC (rev 16342) +++ branches/v2_0_0/src/buddyicon.c 2006-06-26 03:53:13 UTC (rev 16343) @@ -132,12 +132,8 @@ if (icon_cache != NULL) g_hash_table_remove(icon_cache, gaim_buddy_icon_get_username(icon)); - if (icon->username != NULL) - g_free(icon->username); - - if (icon->data != NULL) - g_free(icon->data); - + g_free(icon->username); + g_free(icon->data); GAIM_DBUS_UNREGISTER_POINTER(icon); g_free(icon); } @@ -315,8 +311,7 @@ g_return_if_fail(icon != NULL); g_return_if_fail(username != NULL); - if (icon->username != NULL) - g_free(icon->username); + g_free(icon->username); icon->username = g_strdup(username); } @@ -326,8 +321,7 @@ { g_return_if_fail(icon != NULL); - if (icon->data != NULL) - g_free(icon->data); + g_free(icon->data); if (data != NULL && len > 0) { @@ -485,8 +479,7 @@ { g_return_if_fail(dir != NULL); - if (cache_dir != NULL) - g_free(cache_dir); + g_free(cache_dir); cache_dir = g_strdup(dir); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-26 03:52:25
|
Revision: 16342 Author: thekingant Date: 2006-06-25 20:52:21 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16342&view=rev Log Message: ----------- Get rid of some unnecessary if !NULL checks Modified Paths: -------------- trunk/src/buddyicon.c Modified: trunk/src/buddyicon.c =================================================================== --- trunk/src/buddyicon.c 2006-06-26 03:44:39 UTC (rev 16341) +++ trunk/src/buddyicon.c 2006-06-26 03:52:21 UTC (rev 16342) @@ -132,12 +132,8 @@ if (icon_cache != NULL) g_hash_table_remove(icon_cache, gaim_buddy_icon_get_username(icon)); - if (icon->username != NULL) - g_free(icon->username); - - if (icon->data != NULL) - g_free(icon->data); - + g_free(icon->username); + g_free(icon->data); GAIM_DBUS_UNREGISTER_POINTER(icon); g_free(icon); } @@ -315,8 +311,7 @@ g_return_if_fail(icon != NULL); g_return_if_fail(username != NULL); - if (icon->username != NULL) - g_free(icon->username); + g_free(icon->username); icon->username = g_strdup(username); } @@ -326,8 +321,7 @@ { g_return_if_fail(icon != NULL); - if (icon->data != NULL) - g_free(icon->data); + g_free(icon->data); if (data != NULL && len > 0) { @@ -485,8 +479,7 @@ { g_return_if_fail(dir != NULL); - if (cache_dir != NULL) - g_free(cache_dir); + g_free(cache_dir); cache_dir = g_strdup(dir); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-06-26 03:44:44
|
Revision: 16341 Author: markhuetsch Date: 2006-06-25 20:44:39 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16341&view=rev Log Message: ----------- Fixed a bug that prevented libqq from being loaded as a plugin. Modified Paths: -------------- trunk/src/protocols/qq/buddy_status.c trunk/src/protocols/qq/im.c trunk/src/protocols/qq/qq_proxy.c trunk/src/protocols/qq/send_core.c trunk/src/protocols/qq/send_file.c Modified: trunk/src/protocols/qq/buddy_status.c =================================================================== --- trunk/src/protocols/qq/buddy_status.c 2006-06-26 02:58:54 UTC (rev 16340) +++ trunk/src/protocols/qq/buddy_status.c 2006-06-26 03:44:39 UTC (rev 16341) @@ -62,7 +62,7 @@ /*****************************************************************************/ // parse the data into qq_buddy_status -static gint _qq_buddy_status_read(guint8 * data, guint8 ** cursor, gint len, qq_buddy_status * s) { +gint _qq_buddy_status_read(guint8 * data, guint8 ** cursor, gint len, qq_buddy_status * s) { gint bytes; g_return_val_if_fail(data != NULL && *cursor != NULL && s != NULL, -1); Modified: trunk/src/protocols/qq/im.c =================================================================== --- trunk/src/protocols/qq/im.c 2006-06-26 02:58:54 UTC (rev 16340) +++ trunk/src/protocols/qq/im.c 2006-06-26 03:44:39 UTC (rev 16341) @@ -48,7 +48,7 @@ #define DEFAULT_FONT_NAME_LEN 4 // a debug function -static void _qq_show_packet(gchar * desc, gchar * buf, gint len); +void _qq_show_packet(gchar * desc, gchar * buf, gint len); enum { @@ -230,7 +230,7 @@ /*****************************************************************************/ // generate a md5 key using uid and session_key -static gchar *_gen_session_md5(gint uid, gchar * session_key) +gchar *_gen_session_md5(gint uid, gchar * session_key) { gchar *src, md5_str[QQ_KEY_LENGTH]; guint8 *cursor; Modified: trunk/src/protocols/qq/qq_proxy.c =================================================================== --- trunk/src/protocols/qq/qq_proxy.c 2006-06-26 02:58:54 UTC (rev 16340) +++ trunk/src/protocols/qq/qq_proxy.c 2006-06-26 03:44:39 UTC (rev 16341) @@ -60,7 +60,7 @@ } */ -static void _qq_show_packet(gchar * desc, gchar * buf, gint len) +void _qq_show_packet(gchar * desc, gchar * buf, gint len) { char buf1[4096], buf2[10]; int i; @@ -108,7 +108,7 @@ /*****************************************************************************/ -static gint _qq_fill_host(struct sockaddr_in * addr, const gchar * host, guint16 port) +gint _qq_fill_host(struct sockaddr_in * addr, const gchar * host, guint16 port) { if (!inet_aton(host, &(addr->sin_addr))) { struct hostent *hp; Modified: trunk/src/protocols/qq/send_core.c =================================================================== --- trunk/src/protocols/qq/send_core.c 2006-06-26 02:58:54 UTC (rev 16340) +++ trunk/src/protocols/qq/send_core.c 2006-06-26 03:44:39 UTC (rev 16341) @@ -37,7 +37,7 @@ // create qq packet header with given sequence // return the number of bytes in header if succeeds // return -1 if there is any error -static gint _create_packet_head_seq(guint8 * buf, guint8 ** cursor, +gint _create_packet_head_seq(guint8 * buf, guint8 ** cursor, GaimConnection * gc, guint16 cmd, gboolean is_auto_seq, guint16 * seq) { qq_data *qd; @@ -77,7 +77,7 @@ // for those need ack and resend no ack feed back from server // return number of bytes written to the socket, // return -1 if there is any error -static gint _qq_send_packet(GaimConnection * gc, guint8 * buf, gint len, guint16 cmd) +gint _qq_send_packet(GaimConnection * gc, guint8 * buf, gint len, guint16 cmd) { qq_data *qd; qq_sendpacket *p; Modified: trunk/src/protocols/qq/send_file.c =================================================================== --- trunk/src/protocols/qq/send_file.c 2006-06-26 02:58:54 UTC (rev 16340) +++ trunk/src/protocols/qq/send_file.c 2006-06-26 03:44:39 UTC (rev 16341) @@ -140,7 +140,7 @@ } */ -static gssize _qq_xfer_write(const guchar *buf, size_t len, GaimXfer *xfer) //gfhuang +gssize _qq_xfer_write(const guchar *buf, size_t len, GaimXfer *xfer) //gfhuang { return _qq_xfer_udp_send(buf, len, xfer); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-06-26 03:01:06
|
Revision: 16340 Author: markhuetsch Date: 2006-06-25 19:58:54 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16340&view=rev Log Message: ----------- Performed minor cleanup of the OpenQ codebase and patched it into the Gaim trunk as a prpl, providing basic QQ functionality. Modified Paths: -------------- trunk/configure.ac trunk/pixmaps/smileys/default/Makefile.am trunk/pixmaps/smileys/default/theme trunk/pixmaps/status/default/Makefile.am trunk/src/protocols/Makefile.am Added Paths: ----------- trunk/pixmaps/smileys/default/qq_smiley_0.gif trunk/pixmaps/smileys/default/qq_smiley_1.gif trunk/pixmaps/smileys/default/qq_smiley_10.gif trunk/pixmaps/smileys/default/qq_smiley_11.gif trunk/pixmaps/smileys/default/qq_smiley_12.gif trunk/pixmaps/smileys/default/qq_smiley_13.gif trunk/pixmaps/smileys/default/qq_smiley_14.gif trunk/pixmaps/smileys/default/qq_smiley_15.gif trunk/pixmaps/smileys/default/qq_smiley_16.gif trunk/pixmaps/smileys/default/qq_smiley_17.gif trunk/pixmaps/smileys/default/qq_smiley_18.gif trunk/pixmaps/smileys/default/qq_smiley_19.gif trunk/pixmaps/smileys/default/qq_smiley_2.gif trunk/pixmaps/smileys/default/qq_smiley_20.gif trunk/pixmaps/smileys/default/qq_smiley_21.gif trunk/pixmaps/smileys/default/qq_smiley_22.gif trunk/pixmaps/smileys/default/qq_smiley_23.gif trunk/pixmaps/smileys/default/qq_smiley_24.gif trunk/pixmaps/smileys/default/qq_smiley_25.gif trunk/pixmaps/smileys/default/qq_smiley_26.gif trunk/pixmaps/smileys/default/qq_smiley_27.gif trunk/pixmaps/smileys/default/qq_smiley_28.gif trunk/pixmaps/smileys/default/qq_smiley_29.gif trunk/pixmaps/smileys/default/qq_smiley_3.gif trunk/pixmaps/smileys/default/qq_smiley_30.gif trunk/pixmaps/smileys/default/qq_smiley_31.gif trunk/pixmaps/smileys/default/qq_smiley_32.gif trunk/pixmaps/smileys/default/qq_smiley_33.gif trunk/pixmaps/smileys/default/qq_smiley_34.gif trunk/pixmaps/smileys/default/qq_smiley_35.gif trunk/pixmaps/smileys/default/qq_smiley_36.gif trunk/pixmaps/smileys/default/qq_smiley_37.gif trunk/pixmaps/smileys/default/qq_smiley_38.gif trunk/pixmaps/smileys/default/qq_smiley_39.gif trunk/pixmaps/smileys/default/qq_smiley_4.gif trunk/pixmaps/smileys/default/qq_smiley_40.gif trunk/pixmaps/smileys/default/qq_smiley_41.gif trunk/pixmaps/smileys/default/qq_smiley_42.gif trunk/pixmaps/smileys/default/qq_smiley_43.gif trunk/pixmaps/smileys/default/qq_smiley_44.gif trunk/pixmaps/smileys/default/qq_smiley_45.gif trunk/pixmaps/smileys/default/qq_smiley_46.gif trunk/pixmaps/smileys/default/qq_smiley_47.gif trunk/pixmaps/smileys/default/qq_smiley_48.gif trunk/pixmaps/smileys/default/qq_smiley_49.gif trunk/pixmaps/smileys/default/qq_smiley_5.gif trunk/pixmaps/smileys/default/qq_smiley_50.gif trunk/pixmaps/smileys/default/qq_smiley_51.gif trunk/pixmaps/smileys/default/qq_smiley_52.gif trunk/pixmaps/smileys/default/qq_smiley_53.gif trunk/pixmaps/smileys/default/qq_smiley_54.gif trunk/pixmaps/smileys/default/qq_smiley_55.gif trunk/pixmaps/smileys/default/qq_smiley_56.gif trunk/pixmaps/smileys/default/qq_smiley_57.gif trunk/pixmaps/smileys/default/qq_smiley_58.gif trunk/pixmaps/smileys/default/qq_smiley_59.gif trunk/pixmaps/smileys/default/qq_smiley_6.gif trunk/pixmaps/smileys/default/qq_smiley_60.gif trunk/pixmaps/smileys/default/qq_smiley_61.gif trunk/pixmaps/smileys/default/qq_smiley_62.gif trunk/pixmaps/smileys/default/qq_smiley_63.gif trunk/pixmaps/smileys/default/qq_smiley_64.gif trunk/pixmaps/smileys/default/qq_smiley_65.gif trunk/pixmaps/smileys/default/qq_smiley_66.gif trunk/pixmaps/smileys/default/qq_smiley_67.gif trunk/pixmaps/smileys/default/qq_smiley_68.gif trunk/pixmaps/smileys/default/qq_smiley_69.gif trunk/pixmaps/smileys/default/qq_smiley_7.gif trunk/pixmaps/smileys/default/qq_smiley_70.gif trunk/pixmaps/smileys/default/qq_smiley_71.gif trunk/pixmaps/smileys/default/qq_smiley_72.gif trunk/pixmaps/smileys/default/qq_smiley_73.gif trunk/pixmaps/smileys/default/qq_smiley_74.gif trunk/pixmaps/smileys/default/qq_smiley_75.gif trunk/pixmaps/smileys/default/qq_smiley_76.gif trunk/pixmaps/smileys/default/qq_smiley_77.gif trunk/pixmaps/smileys/default/qq_smiley_78.gif trunk/pixmaps/smileys/default/qq_smiley_79.gif trunk/pixmaps/smileys/default/qq_smiley_8.gif trunk/pixmaps/smileys/default/qq_smiley_80.gif trunk/pixmaps/smileys/default/qq_smiley_81.gif trunk/pixmaps/smileys/default/qq_smiley_82.gif trunk/pixmaps/smileys/default/qq_smiley_83.gif trunk/pixmaps/smileys/default/qq_smiley_84.gif trunk/pixmaps/smileys/default/qq_smiley_85.gif trunk/pixmaps/smileys/default/qq_smiley_86.gif trunk/pixmaps/smileys/default/qq_smiley_87.gif trunk/pixmaps/smileys/default/qq_smiley_88.gif trunk/pixmaps/smileys/default/qq_smiley_89.gif trunk/pixmaps/smileys/default/qq_smiley_9.gif trunk/pixmaps/smileys/default/qq_smiley_90.gif trunk/pixmaps/smileys/default/qq_smiley_91.gif trunk/pixmaps/smileys/default/qq_smiley_92.gif trunk/pixmaps/smileys/default/qq_smiley_93.gif trunk/pixmaps/smileys/default/qq_smiley_94.gif trunk/pixmaps/smileys/default/qq_smiley_95.gif trunk/pixmaps/status/default/qq.png trunk/src/protocols/qq/ trunk/src/protocols/qq/Makefile.am trunk/src/protocols/qq/Makefile.in trunk/src/protocols/qq/Makefile.mingw trunk/src/protocols/qq/TODO trunk/src/protocols/qq/buddy_info.c trunk/src/protocols/qq/buddy_info.h trunk/src/protocols/qq/buddy_list.c trunk/src/protocols/qq/buddy_list.h trunk/src/protocols/qq/buddy_opt.c trunk/src/protocols/qq/buddy_opt.h trunk/src/protocols/qq/buddy_status.c trunk/src/protocols/qq/buddy_status.h trunk/src/protocols/qq/char_conv.c trunk/src/protocols/qq/char_conv.h trunk/src/protocols/qq/crypt.c trunk/src/protocols/qq/crypt.h trunk/src/protocols/qq/file_trans.c trunk/src/protocols/qq/file_trans.h trunk/src/protocols/qq/group.c trunk/src/protocols/qq/group.h trunk/src/protocols/qq/group_admindlg.c trunk/src/protocols/qq/group_admindlg.h trunk/src/protocols/qq/group_conv.c trunk/src/protocols/qq/group_conv.h trunk/src/protocols/qq/group_find.c trunk/src/protocols/qq/group_find.h trunk/src/protocols/qq/group_free.c trunk/src/protocols/qq/group_free.h trunk/src/protocols/qq/group_hash.c trunk/src/protocols/qq/group_hash.h trunk/src/protocols/qq/group_im.c trunk/src/protocols/qq/group_im.h trunk/src/protocols/qq/group_info.c trunk/src/protocols/qq/group_info.h trunk/src/protocols/qq/group_join.c trunk/src/protocols/qq/group_join.h trunk/src/protocols/qq/group_misc.c trunk/src/protocols/qq/group_misc.h trunk/src/protocols/qq/group_network.c trunk/src/protocols/qq/group_network.h trunk/src/protocols/qq/group_opt.c trunk/src/protocols/qq/group_opt.h trunk/src/protocols/qq/group_search.c trunk/src/protocols/qq/group_search.h trunk/src/protocols/qq/header_info.c trunk/src/protocols/qq/header_info.h trunk/src/protocols/qq/im.c trunk/src/protocols/qq/im.h trunk/src/protocols/qq/infodlg.c trunk/src/protocols/qq/infodlg.h trunk/src/protocols/qq/ip_location.c trunk/src/protocols/qq/ip_location.h trunk/src/protocols/qq/keep_alive.c trunk/src/protocols/qq/keep_alive.h trunk/src/protocols/qq/login_logout.c trunk/src/protocols/qq/login_logout.h trunk/src/protocols/qq/packet_parse.c trunk/src/protocols/qq/packet_parse.h trunk/src/protocols/qq/qq.c trunk/src/protocols/qq/qq.h trunk/src/protocols/qq/qq_proxy.c trunk/src/protocols/qq/qq_proxy.h trunk/src/protocols/qq/recv_core.c trunk/src/protocols/qq/recv_core.h trunk/src/protocols/qq/send_core.c trunk/src/protocols/qq/send_core.h trunk/src/protocols/qq/send_file.c trunk/src/protocols/qq/send_file.h trunk/src/protocols/qq/sendqueue.c trunk/src/protocols/qq/sendqueue.h trunk/src/protocols/qq/show.c trunk/src/protocols/qq/show.h trunk/src/protocols/qq/sys_msg.c trunk/src/protocols/qq/sys_msg.h trunk/src/protocols/qq/udp_proxy_s5.c trunk/src/protocols/qq/udp_proxy_s5.h trunk/src/protocols/qq/utils.c trunk/src/protocols/qq/utils.h Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-06-26 00:12:31 UTC (rev 16339) +++ trunk/configure.ac 2006-06-26 02:58:54 UTC (rev 16340) @@ -401,7 +401,7 @@ fi if test "x$STATIC_PRPLS" = "xall" ; then - STATIC_PRPLS="bonjour gg irc jabber msn novell oscar sametime silc simple yahoo zephyr" + STATIC_PRPLS="bonjour gg irc jabber msn novell oscar qq sametime silc simple yahoo zephyr" fi if test "x$have_meanwhile" != "xyes" ; then STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'` @@ -436,6 +436,7 @@ msn) static_msn=yes ;; novell) static_novell=yes ;; oscar) static_oscar=yes ;; + qq) static_qq=yes ;; sametime) static_sametime=yes ;; silc) static_silc=yes ;; simple) static_simple=yes ;; @@ -452,6 +453,7 @@ AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes") AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes") AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes") +AM_CONDITIONAL(STATIC_QQ, test "x$static_qq" = "xyes") AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes") AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes") AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes") @@ -464,7 +466,7 @@ AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`]) if test "x$DYNAMIC_PRPLS" = "xall" ; then - DYNAMIC_PRPLS="bonjour gg irc jabber msn novell oscar sametime silc simple yahoo zephyr" + DYNAMIC_PRPLS="bonjour gg irc jabber msn novell oscar qq sametime silc simple yahoo zephyr" fi if test "x$have_meanwhile" != "xyes"; then DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'` @@ -488,6 +490,7 @@ msn) dynamic_msn=yes ;; novell) dynamic_novell=yes ;; oscar) dynamic_oscar=yes ;; + qq) dynamic_qq=yes ;; sametime) dynamic_sametime=yes ;; silc) dynamic_silc=yes ;; simple) dynamic_simple=yes ;; @@ -504,6 +507,7 @@ AM_CONDITIONAL(DYNAMIC_MSN, test "x$dynamic_msn" = "xyes") AM_CONDITIONAL(DYNAMIC_NOVELL, test "x$dynamic_novell" = "xyes") AM_CONDITIONAL(DYNAMIC_OSCAR, test "x$dynamic_oscar" = "xyes") +AM_CONDITIONAL(DYNAMIC_QQ, test "x$dynamic_qq" = "xyes") AM_CONDITIONAL(DYNAMIC_SAMETIME, test "x$dynamic_sametime" = "xyes" -a "x$have_meanwhile" = "xyes") AM_CONDITIONAL(DYNAMIC_SILC, test "x$dynamic_silc" = "xyes" -a "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes") AM_CONDITIONAL(DYNAMIC_SIMPLE, test "x$dynamic_simple" = "xyes") @@ -1772,6 +1776,7 @@ src/protocols/napster/Makefile src/protocols/novell/Makefile src/protocols/oscar/Makefile + src/protocols/qq/Makefile src/protocols/sametime/Makefile src/protocols/silc/Makefile src/protocols/simple/Makefile Modified: trunk/pixmaps/smileys/default/Makefile.am =================================================================== --- trunk/pixmaps/smileys/default/Makefile.am 2006-06-26 00:12:31 UTC (rev 16339) +++ trunk/pixmaps/smileys/default/Makefile.am 2006-06-26 02:58:54 UTC (rev 16340) @@ -107,6 +107,104 @@ msn_wink.gif \ msn_xbox.png +QQ_SMILEYS = \ + qq_smiley_0.gif \ + qq_smiley_10.gif \ + qq_smiley_11.gif \ + qq_smiley_12.gif \ + qq_smiley_13.gif \ + qq_smiley_14.gif \ + qq_smiley_15.gif \ + qq_smiley_16.gif \ + qq_smiley_17.gif \ + qq_smiley_18.gif \ + qq_smiley_19.gif \ + qq_smiley_1.gif \ + qq_smiley_20.gif \ + qq_smiley_21.gif \ + qq_smiley_22.gif \ + qq_smiley_23.gif \ + qq_smiley_24.gif \ + qq_smiley_25.gif \ + qq_smiley_26.gif \ + qq_smiley_27.gif \ + qq_smiley_28.gif \ + qq_smiley_29.gif \ + qq_smiley_2.gif \ + qq_smiley_30.gif \ + qq_smiley_31.gif \ + qq_smiley_32.gif \ + qq_smiley_33.gif \ + qq_smiley_34.gif \ + qq_smiley_35.gif \ + qq_smiley_36.gif \ + qq_smiley_37.gif \ + qq_smiley_38.gif \ + qq_smiley_39.gif \ + qq_smiley_3.gif \ + qq_smiley_40.gif \ + qq_smiley_41.gif \ + qq_smiley_42.gif \ + qq_smiley_43.gif \ + qq_smiley_44.gif \ + qq_smiley_45.gif \ + qq_smiley_46.gif \ + qq_smiley_47.gif \ + qq_smiley_48.gif \ + qq_smiley_49.gif \ + qq_smiley_4.gif \ + qq_smiley_50.gif \ + qq_smiley_51.gif \ + qq_smiley_52.gif \ + qq_smiley_53.gif \ + qq_smiley_54.gif \ + qq_smiley_55.gif \ + qq_smiley_56.gif \ + qq_smiley_57.gif \ + qq_smiley_58.gif \ + qq_smiley_59.gif \ + qq_smiley_5.gif \ + qq_smiley_60.gif \ + qq_smiley_61.gif \ + qq_smiley_62.gif \ + qq_smiley_63.gif \ + qq_smiley_64.gif \ + qq_smiley_65.gif \ + qq_smiley_66.gif \ + qq_smiley_67.gif \ + qq_smiley_68.gif \ + qq_smiley_69.gif \ + qq_smiley_6.gif \ + qq_smiley_70.gif \ + qq_smiley_71.gif \ + qq_smiley_72.gif \ + qq_smiley_73.gif \ + qq_smiley_74.gif \ + qq_smiley_75.gif \ + qq_smiley_76.gif \ + qq_smiley_77.gif \ + qq_smiley_78.gif \ + qq_smiley_79.gif \ + qq_smiley_7.gif \ + qq_smiley_80.gif \ + qq_smiley_81.gif \ + qq_smiley_82.gif \ + qq_smiley_83.gif \ + qq_smiley_84.gif \ + qq_smiley_85.gif \ + qq_smiley_86.gif \ + qq_smiley_87.gif \ + qq_smiley_88.gif \ + qq_smiley_89.gif \ + qq_smiley_8.gif \ + qq_smiley_90.gif \ + qq_smiley_91.gif \ + qq_smiley_92.gif \ + qq_smiley_93.gif \ + qq_smiley_94.gif \ + qq_smiley_95.gif \ + qq_smiley_9.gif + YAHOO_SMILEYS = \ yahoo_alien.gif \ yahoo_alien2.gif \ @@ -194,6 +292,7 @@ $(AIM_SMILEYS) \ $(MSN_SMILEYS) \ $(YAHOO_SMILEYS) \ + $(QQ_SMILEYS) \ theme EXTRA_DIST = $(gaimsmileypix_DATA) Added: trunk/pixmaps/smileys/default/qq_smiley_0.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_0.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_1.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_1.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_10.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_10.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_11.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_11.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_12.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_12.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_13.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_13.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_14.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_14.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_15.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_15.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_16.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_17.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_17.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_18.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_18.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_19.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_19.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_2.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_2.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_20.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_20.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_21.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_21.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_22.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_22.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_23.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_23.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_24.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_24.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_25.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_25.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_26.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_26.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_27.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_27.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_28.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_28.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_29.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_29.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_3.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_3.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_30.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_30.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_31.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_31.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_32.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_32.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_33.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_33.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_34.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_34.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_35.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_35.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_36.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_36.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_37.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_37.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_38.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_38.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_39.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_39.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_4.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_4.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_40.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_40.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_41.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_41.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_42.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_42.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_43.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_43.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_44.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_44.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_45.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_45.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_46.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_46.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_47.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_47.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_48.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_48.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_49.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_49.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_5.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_5.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_50.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_50.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_51.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_51.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_52.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_52.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_53.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_53.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_54.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_54.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_55.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_55.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_56.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_56.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_57.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_57.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_58.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_58.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_59.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_59.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_6.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_6.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_60.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_60.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_61.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_61.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_62.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_62.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_63.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_63.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_64.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_64.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_65.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_65.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_66.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_66.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_67.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_67.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_68.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_68.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_69.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_69.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_7.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_7.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_70.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_70.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_71.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_71.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_72.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_72.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_73.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_73.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_74.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_74.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_75.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_75.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_76.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_76.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_77.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_77.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_78.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_78.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_79.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_79.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_8.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_8.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_80.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_80.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_81.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_81.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_82.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_82.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_83.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_83.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_84.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_84.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_85.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_85.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_86.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_86.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_87.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_87.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_88.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_88.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_89.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_89.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_9.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_9.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_90.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_90.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_91.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_91.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_92.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_92.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_93.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_93.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_94.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_94.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/pixmaps/smileys/default/qq_smiley_95.gif =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/smileys/default/qq_smiley_95.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/pixmaps/smileys/default/theme =================================================================== --- trunk/pixmaps/smileys/default/theme 2006-06-26 00:12:31 UTC (rev 16339) +++ trunk/pixmaps/smileys/default/theme 2006-06-26 02:58:54 UTC (rev 16340) @@ -37,7 +37,7 @@ msn_tongue.png :p :-P :P :-p msn_hot.png (h) (H) msn_angry.png :@ :-@ -msn_neutral.png :-| :| +msn_neutral.png :-| :| msn_weird.png :s :-S :-s :S msn_embarrassed.png :$ :-$ msn_sad.png :( :-( :-< @@ -110,6 +110,104 @@ msn_xbox.png (xx) msn_cigarette.gif (ci) +[QQ] +qq_smiley_0.gif /jy +qq_smiley_1.gif /se +qq_smiley_2.gif /pz +qq_smiley_3.gif /fd +qq_smiley_4.gif /dy +qq_smiley_5.gif /ll +qq_smiley_6.gif /hx +qq_smiley_7.gif /bz +qq_smiley_8.gif /shui +qq_smiley_9.gif /dk +qq_smiley_10.gif /gg +qq_smiley_11.gif /fn +qq_smiley_12.gif /tp +qq_smiley_13.gif /cy +qq_smiley_14.gif /wx +qq_smiley_15.gif /ng +qq_smiley_16.gif /kuk +qq_smiley_17.gif /feid +qq_smiley_18.gif /zk +qq_smiley_19.gif /tu +qq_smiley_20.gif /tx +qq_smiley_21.gif /ka +qq_smiley_22.gif /by +qq_smiley_23.gif /am +qq_smiley_24.gif /jie +qq_smiley_25.gif /kun +qq_smiley_26.gif /jk +qq_smiley_27.gif /lh +qq_smiley_28.gif /hanx +qq_smiley_29.gif /db +qq_smiley_30.gif /fendou +qq_smiley_31.gif /zhm +qq_smiley_32.gif /yiw +qq_smiley_33.gif /xu +qq_smiley_34.gif /yun +qq_smiley_35.gif /zhem +qq_smiley_36.gif /shuai +qq_smiley_37.gif /kl +qq_smiley_38.gif /qiao +qq_smiley_39.gif /zj +qq_smiley_40.gif /shan +qq_smiley_41.gif /fad +qq_smiley_42.gif /aiq +qq_smiley_43.gif /tiao +qq_smiley_44.gif /zhao +qq_smiley_45.gif /mm +qq_smiley_46.gif /zt +qq_smiley_47.gif /maom +qq_smiley_48.gif /xg +qq_smiley_49.gif /yb +qq_smiley_50.gif /qianc +qq_smiley_51.gif /dp +qq_smiley_52.gif /bei +qq_smiley_53.gif /dg +qq_smiley_54.gif /shd +qq_smiley_55.gif /zhd +qq_smiley_56.gif /dao +qq_smiley_57.gif /zq +qq_smiley_58.gif /yy +qq_smiley_59.gif /bb +qq_smiley_60.gif /gf +qq_smiley_61.gif /fan +qq_smiley_62.gif /yw +qq_smiley_63.gif /mg +qq_smiley_64.gif /dx +qq_smiley_65.gif /wen +qq_smiley_66.gif /xin +qq_smiley_67.gif /xs +qq_smiley_68.gif /hy +qq_smiley_69.gif /lw +qq_smiley_70.gif /dh +qq_smiley_71.gif /sj +qq_smiley_72.gif /yj +qq_smiley_73.gif /ds +qq_smiley_74.gif /ty +qq_smiley_75.gif /yl +qq_smiley_76.gif /qiang +qq_smiley_77.gif /ruo +qq_smiley_78.gif /ws +qq_smiley_79.gif /shl +qq_smiley_80.gif /dd +qq_smiley_81.gif /mn +qq_smiley_82.gif /hl +qq_smiley_83.gif /mamao +qq_smiley_84.gif /qz +qq_smiley_85.gif /fw +qq_smiley_86.gif /oh +qq_smiley_87.gif /bj +qq_smiley_88.gif /qsh +qq_smiley_89.gif /xig +qq_smiley_90.gif /xy +qq_smiley_91.gif /duoy +qq_smiley_92.gif /xr +qq_smiley_93.gif /xixing +qq_smiley_94.gif /nv +qq_smiley_95.gif /nan + [Yahoo] yahoo_angel.gif o:-) O:-) 0:-) yahoo_angry.gif X-( x-( X( x( Modified: trunk/pixmaps/status/default/Makefile.am =================================================================== --- trunk/pixmaps/status/default/Makefile.am 2006-06-26 00:12:31 UTC (rev 16339) +++ trunk/pixmaps/status/default/Makefile.am 2006-06-26 02:58:54 UTC (rev 16340) @@ -34,6 +34,7 @@ offline.png \ op.png \ pending.png \ + qq.png \ secure.png \ silc.png \ simple.png \ Added: trunk/pixmaps/status/default/qq.png =================================================================== (Binary files differ) Property changes on: trunk/pixmaps/status/default/qq.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/src/protocols/Makefile.am =================================================================== --- trunk/src/protocols/Makefile.am 2006-06-26 00:12:31 UTC (rev 16339) +++ trunk/src/protocols/Makefile.am 2006-06-26 02:58:54 UTC (rev 16340) @@ -1,3 +1,3 @@ -DIST_SUBDIRS = bonjour gg irc jabber msn napster novell oscar sametime silc toc simple yahoo zephyr +DIST_SUBDIRS = bonjour gg irc jabber msn napster novell oscar qq sametime silc toc simple yahoo zephyr SUBDIRS = $(DYNAMIC_PRPLS) $(STATIC_PRPLS) Added: trunk/src/protocols/qq/Makefile.am =================================================================== --- trunk/src/protocols/qq/Makefile.am (rev 0) +++ trunk/src/protocols/qq/Makefile.am 2006-06-26 02:58:54 UTC (rev 16340) @@ -0,0 +1,108 @@ +EXTRA_DIST = \ + Makefile.mingw + +pkgdir = $(libdir)/gaim + +QQSOURCES = \ + utils.c \ + utils.h \ + packet_parse.c \ + packet_parse.h \ + buddy_info.c \ + buddy_info.h \ + buddy_list.c \ + buddy_list.h \ + buddy_opt.c \ + buddy_opt.h \ + buddy_status.c \ + buddy_status.h \ + qq.c \ + char_conv.c \ + char_conv.h \ + crypt.c \ + crypt.h \ + group_admindlg.c \ + group_admindlg.h \ + group.c \ + group_conv.c \ + group_conv.h \ + group_find.c \ + group_find.h \ + group_free.c \ + group_free.h \ + group.h \ + group_hash.c \ + group_hash.h \ + group_im.c \ + group_im.h \ + group_info.c \ + group_info.h \ + group_join.c \ + group_join.h \ + group_misc.c \ + group_misc.h \ + group_network.c \ + group_network.h \ + group_opt.c \ + group_opt.h \ + group_search.c \ + group_search.h \ + qq.h \ + header_info.c \ + header_info.h \ + im.c \ + im.h \ + infodlg.c \ + infodlg.h \ + ip_location.c \ + ip_location.h \ + keep_alive.c \ + keep_alive.h \ + login_logout.c \ + login_logout.h \ + qq_proxy.c \ + qq_proxy.h \ + recv_core.c \ + recv_core.h \ + send_core.c \ + send_core.h \ + sendqueue.c \ + sendqueue.h \ + show.c \ + show.h \ + sys_msg.c \ + sys_msg.h \ + udp_proxy_s5.c \ + udp_proxy_s5.h \ + send_file.c \ + send_file.h \ + file_trans.c \ + file_trans.h + +AM_CFLAGS = $(st) + +libqq_la_LDFLAGS = -module -avoid-version + +if STATIC_QQ + +st = -DGAIM_STATIC_PRPL +noinst_LIBRARIES = libqq.a +libqq_a_SOURCES = $(QQSOURCES) +libqq_a_CFLAGS = $(AM_CFLAGS) + +else + +st = +pkg_LTLIBRARIES = libqq.la +libqq_la_SOURCES = $(QQSOURCES) + +endif + +AM_CPPFLAGS = \ + -I$(top_srcdir)/src \ + -DDATADIR=\"${datadir}\" \ + -DVERSION=\"$(VERSION)\" \ + $(DEBUG_CFLAGS) \ + $(GTK_CFLAGS) \ + $(GLIB_CFLAGS) \ + $(GAIM_CFLAGS) Property changes on: trunk/src/protocols/qq/Makefile.am ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/src/protocols/qq/Makefile.in =================================================================== --- trunk/src/protocols/qq/Makefile.in (rev 0) +++ trunk/src/protocols/qq/Makefile.in 2006-06-26 02:58:54 UTC (rev 16340) @@ -0,0 +1,576 @@ +# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = ../../.. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_alias = @build_alias@ +build_triplet = @build@ +host_alias = @host_alias@ +host_triplet = @host@ +target_alias = @target_alias@ +target_triplet = @target@ +ALL_LINGUAS = @ALL_LINGUAS@ +AO_CFLAGS = @AO_CFLAGS@ +AO_LIBS = @AO_LIBS@ +AR = @AR@ +AS = @AS@ +AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@ +AUDIOFILE_CONFIG = @AUDIOFILE_CONFIG@ +AUDIOFILE_LIBS = @AUDIOFILE_LIBS@ +BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ +BINRELOC_LIBS = @BINRELOC_LIBS@ +BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CFLAGS = @CFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +DATADIRNAME = @DATADIRNAME@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ +DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DYNALOADER_A = @DYNALOADER_A@ +DYNAMIC_PRPLS = @DYNAMIC_PRPLS@ +ECHO = @ECHO@ +EGREP = @EGREP@ +EVOLUTION_ADDRESSBOOK_CFLAGS = @EVOLUTION_ADDRESSBOOK_CFLAGS@ +EVOLUTION_ADDRESSBOOK_LIBS = @EVOLUTION_ADDRESSBOOK_LIBS@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +GADU_CFLAGS = @GADU_CFLAGS@ +GADU_LIBS = @GADU_LIBS@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ +GENCAT = @GENCAT@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIBC2 = @GLIBC2@ +GLIBC21 = @GLIBC21@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ +GNUTLS_LIBS = @GNUTLS_LIBS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ +GSTREAMER_LIBS = @GSTREAMER_LIBS@ +GTKSPELL_CFLAGS = @GTKSPELL_CFLAGS@ +GTKSPELL_LIBS = @GTKSPELL_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HAVE_ASPRINTF = @HAVE_ASPRINTF@ +HAVE_LIB = @HAVE_LIB@ +HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ +HAVE_SNPRINTF = @HAVE_SNPRINTF@ +HAVE_WPRINTF = @HAVE_WPRINTF@ +HOWL_CFLAGS = @HOWL_CFLAGS@ +HOWL_LIBS = @HOWL_LIBS@ +INSTOBJEXT = @INSTOBJEXT@ +INTLBISON = @INTLBISON@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +KRB4_CFLAGS = @KRB4_CFLAGS@ +KRB4_LDFLAGS = @KRB4_LDFLAGS@ +KRB4_LIBS = @KRB4_LIBS@ +LDADD = @LDADD@ +LIB = @LIB@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBPERL_A = @LIBPERL_A@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXML_CFLAGS = @LIBXML_CFLAGS@ +LIBXML_LIBS = @LIBXML_LIBS@ +LN_S = @LN_S@ +LTLIB = @LTLIB@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +MAKEINFO = @MAKEINFO@ +MEANWHILE_CFLAGS = @MEANWHILE_CFLAGS@ +MEANWHILE_LIBS = @MEANWHILE_LIBS@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MONO_CFLAGS = @MONO_CFLAGS@ +MONO_LIBS = @MONO_LIBS@ +NSS_CFLAGS = @NSS_CFLAGS@ +NSS_LIBS = @NSS_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PERL = @PERL@ +PERL_CFLAGS = @PERL_CFLAGS@ +PERL_LIBS = @PERL_LIBS@ +PERL_MM_PARAMS = @PERL_MM_PARAMS@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RC = @RC@ +SASL_LIBS = @SASL_LIBS@ +SILC_CFLAGS = @SILC_CFLAGS@ +SILC_LIBS = @SILC_LIBS@ +SM_LIBS = @SM_LIBS@ +STARTUP_NOTIFICATION_CFLAGS = @STARTUP_NOTIFICATION_CFLAGS@ +STARTUP_NOTIFICATION_LIBS = @STARTUP_NOTIFICATION_LIBS@ +STATIC_LINK_LIBS = @STATIC_LINK_LIBS@ +STATIC_PRPLS = @STATIC_PRPLS@ +STRIP = @STRIP@ +TCL_CFLAGS = @TCL_CFLAGS@ +TCL_LIBS = @TCL_LIBS@ +TK_LIBS = @TK_LIBS@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XSS_LIBS = @XSS_LIBS@ +ZEPHYR_CFLAGS = @ZEPHYR_CFLAGS@ +ZEPHYR_LDFLAGS = @ZEPHYR_LDFLAGS@ +ZEPHYR_LIBS = @ZEPHYR_LIBS@ +enable_dbus = @enable_dbus@ +enable_dot = @enable_dot@ +enable_doxygen = @enable_doxygen@ +gaimpath = @gaimpath@ +perlpath = @perlpath@ +sedpath = @sedpath@ + +EXTRA_DIST = Makefile.mingw + + +pkgdir = $(libdir)/gaim + +QQSOURCES = utils.c utils.h packet_parse.c packet_parse.h buddy_info.c buddy_info.h buddy_list.c buddy_list.h buddy_opt.c buddy_opt.h buddy_status.c buddy_status.h qq.c char_conv.c char_conv.h crypt.c crypt.h group_admindlg.c group_admindlg.h group.c group_conv.c group_conv.h group_find.c group_find.h group_free.c group_free.h group.h group_hash.c group_hash.h group_im.c group_im.h group_info.c group_info.h group_join.c group_join.h group_misc.c group_misc.h group_network.c group_network.h group_opt.c group_opt.h group_search.c group_search.h qq.h header_info.c header_info.h im.c im.h infodlg.c infodlg.h ip_location.c ip_location.h keep_alive.c keep_alive.h login_logout.c login_logout.h qq_proxy.c qq_proxy.h recv_core.c recv_core.h send_core.c send_core.h sendqueue.c sendqueue.h show.c show.h sys... [truncated message content] |
From: <ro...@us...> - 2006-06-26 00:12:47
|
Revision: 16339 Author: roast Date: 2006-06-25 17:12:31 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16339&view=rev Log Message: ----------- merged with svn trunk. 16329:16338. Modified Paths: -------------- branches/soc-2006-file-loggers/console/Makefile branches/soc-2006-file-loggers/console/gntblist.c branches/soc-2006-file-loggers/console/gntgaim.c branches/soc-2006-file-loggers/console/libgnt/Makefile branches/soc-2006-file-loggers/console/libgnt/gnt.h branches/soc-2006-file-loggers/console/libgnt/gntbox.c branches/soc-2006-file-loggers/console/libgnt/gntmain.c branches/soc-2006-file-loggers/console/libgnt/gnttree.c branches/soc-2006-file-loggers/console/libgnt/gntwidget.c branches/soc-2006-file-loggers/plugins/ChangeLog.API branches/soc-2006-file-loggers/src/blist.c branches/soc-2006-file-loggers/src/blist.h branches/soc-2006-file-loggers/src/log.c branches/soc-2006-file-loggers/src/status.c Modified: branches/soc-2006-file-loggers/console/Makefile =================================================================== --- branches/soc-2006-file-loggers/console/Makefile 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/console/Makefile 2006-06-26 00:12:31 UTC (rev 16339) @@ -1,5 +1,5 @@ CFLAGS=`pkg-config --cflags gaim gobject-2.0` -g -I./libgnt/ -LDFLAGS=`pkg-config --libs gaim gobject-2.0 libxml-2.0` -lncursesw -L./libgnt/ -lgnt +LDFLAGS=`pkg-config --libs gaim gobject-2.0 libxml-2.0` -lncursesw -L./libgnt/ -lgnt -pg GG_SOURCES = \ gntblist.c \ @@ -13,7 +13,9 @@ gntblist.o \ gntui.o -all: gntgaim +all: + cd libgnt && make + make gntgaim gntgaim: gntgaim.o $(GG_OBJECTS) $(CC) -o gntgaim gntgaim.o $(GG_OBJECTS) $(LDFLAGS) @@ -22,6 +24,7 @@ gntui.o: gntui.c $(GG_HEADERS) clean: + cd libgnt && make clean rm *.o rm gntgaim Modified: branches/soc-2006-file-loggers/console/gntblist.c =================================================================== --- branches/soc-2006-file-loggers/console/gntblist.c 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/console/gntblist.c 2006-06-26 00:12:31 UTC (rev 16339) @@ -24,6 +24,7 @@ static void add_buddy(GaimBuddy *buddy, GGBlist *ggblist); static void add_group(GaimGroup *group, GGBlist *ggblist); +static void add_node(GaimBlistNode *node, GGBlist *ggblist); static void draw_tooltip(GGBlist *ggblist); static void @@ -31,6 +32,15 @@ { } +static void add_node(GaimBlistNode *node, GGBlist *ggblist) +{ + if (GAIM_BLIST_NODE_IS_BUDDY(node)) + add_buddy((GaimBuddy*)node, ggblist); + else if (GAIM_BLIST_NODE_IS_GROUP(node)) + add_group((GaimGroup*)node, ggblist); + draw_tooltip(ggblist); +} + static void remove_tooltip(GGBlist *ggblist) { @@ -56,14 +66,8 @@ GaimGroup *group = gaim_buddy_get_group((GaimBuddy*)node); if (gaim_blist_get_group_online_count(group) == 0) node_remove(list, (GaimBlistNode*)group); - else if (ggblist->tnode == (GaimBlistNode *)group) /* Need to update the counts */ - draw_tooltip(ggblist); } - - if (ggblist->tnode == node) - { - remove_tooltip(ggblist); - } + draw_tooltip(ggblist); } static void @@ -73,7 +77,7 @@ { GaimBuddy *buddy = (GaimBuddy*)node; if (gaim_presence_is_online(gaim_buddy_get_presence(buddy))) - add_buddy(buddy, list->ui_data); + add_node((GaimBlistNode*)buddy, list->ui_data); else node_remove(gaim_get_blist(), node); } @@ -171,19 +175,16 @@ return; group = gaim_buddy_get_group(buddy); - add_group(group, ggblist); + add_node((GaimBlistNode*)group, ggblist); node->ui_data = gnt_tree_add_row_after(GNT_TREE(ggblist->tree), buddy, get_buddy_display_name(buddy), group, NULL); - - if (ggblist->tnode == (GaimBlistNode*)group) - draw_tooltip(ggblist); } static void buddy_signed_on(GaimBuddy *buddy, GGBlist *ggblist) { - add_buddy(buddy, ggblist); + add_node((GaimBlistNode*)buddy, ggblist); } static void @@ -221,6 +222,8 @@ if (ggblist->tooltip) { + /* XXX: Once we can properly redraw on expose events, this can be removed at the end + * to avoid the blinking*/ remove_tooltip(ggblist); } @@ -292,6 +295,8 @@ g_string_free(str, TRUE); ggblist->tooltip = box; ggblist->tnode = node; + + gnt_widget_set_name(ggblist->tooltip, "tooltip"); } static void @@ -332,6 +337,7 @@ gaim_get_blist()->ui_data = ggblist; ggblist->window = gnt_box_new(FALSE, FALSE); + gnt_widget_set_name(ggblist->window, "buddylist"); gnt_box_set_toplevel(GNT_BOX(ggblist->window), TRUE); gnt_box_set_title(GNT_BOX(ggblist->window), _("Buddy List")); gnt_box_set_pad(GNT_BOX(ggblist->window), 0); Modified: branches/soc-2006-file-loggers/console/gntgaim.c =================================================================== --- branches/soc-2006-file-loggers/console/gntgaim.c 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/console/gntgaim.c 2006-06-26 00:12:31 UTC (rev 16339) @@ -169,7 +169,7 @@ int main(int argc, char **argv) { /* XXX: Don't puke */ - freopen("/dev/null", "w", stderr); + freopen(".error", "w", stderr); /* Initialize the libgaim stuff */ init_libgaim(); Modified: branches/soc-2006-file-loggers/console/libgnt/Makefile =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/Makefile 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/console/libgnt/Makefile 2006-06-26 00:12:31 UTC (rev 16339) @@ -1,5 +1,5 @@ CFLAGS=`pkg-config --cflags gobject-2.0` -g -LDFLAGS=`pkg-config --libs gobject-2.0` -lncursesw +LDFLAGS=`pkg-config --libs gobject-2.0` -lncursesw -pg HEADERS = \ gntwidget.h \ Modified: branches/soc-2006-file-loggers/console/libgnt/gnt.h =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gnt.h 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/console/libgnt/gnt.h 2006-06-26 00:12:31 UTC (rev 16339) @@ -3,15 +3,11 @@ #include "gntcolors.h" #include "gntkeys.h" -/* XXX: Find a better place for this */ -#define SCROLL_HEIGHT 4096 -#define SCROLL_WIDTH 512 - void gnt_init(); void gnt_main(); -void gnt_screen_take_focus(GntWidget *widget); +void gnt_screen_occupy(GntWidget *widget); -void gnt_screen_remove_widget(GntWidget *widget); +void gnt_screen_release(GntWidget *widget); Modified: branches/soc-2006-file-loggers/console/libgnt/gntbox.c =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntbox.c 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/console/libgnt/gntbox.c 2006-06-26 00:12:31 UTC (rev 16339) @@ -16,7 +16,9 @@ for (iter = box->list; iter; iter = iter->next) { - gnt_widget_draw(GNT_WIDGET(iter->data)); + GntWidget *w = GNT_WIDGET(iter->data); + gnt_widget_draw(w); + overwrite(w->window, widget->window); } if (box->title) @@ -39,6 +41,8 @@ g_free(title); } wrefresh(widget->window); + + gnt_screen_occupy(widget); DEBUG; } @@ -202,7 +206,7 @@ now = box->list; } - if (now) + if (now && now != box->active) { gnt_widget_set_focus(box->active->data, FALSE); box->active = now; @@ -263,10 +267,21 @@ gnt_widget_destroy(iter->data); } + gnt_screen_release(w); + g_list_free(box->list); } static void +gnt_box_expose(GntWidget *widget, int x, int y, int width, int height) +{ + WINDOW *win = newwin(height, width, widget->priv.y + y, widget->priv.x + x); + copywin(widget->window, win, y, x, 0, 0, height - 1, width - 1, FALSE); + wrefresh(win); + delwin(win); +} + +static void gnt_box_class_init(GntBoxClass *klass) { GObjectClass *obj_class = G_OBJECT_CLASS(klass); @@ -274,6 +289,7 @@ parent_class = GNT_WIDGET_CLASS(klass); parent_class->destroy = gnt_box_destroy; parent_class->draw = gnt_box_draw; + parent_class->expose = gnt_box_expose; parent_class->map = gnt_box_map; parent_class->size_request = gnt_box_size_request; parent_class->set_position = gnt_box_set_position; Modified: branches/soc-2006-file-loggers/console/libgnt/gntmain.c =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntmain.c 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/console/libgnt/gntmain.c 2006-06-26 00:12:31 UTC (rev 16339) @@ -9,6 +9,10 @@ static int max_x; static int max_y; +static GHashTable *nodes; + +static void free_node(gpointer data); + void gnt_screen_take_focus(GntWidget *widget) { focus_list = g_list_prepend(focus_list, widget); @@ -95,6 +99,8 @@ max_x = getmaxx(stdscr); max_y = getmaxy(stdscr); + nodes = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free_node); + wbkgdset(stdscr, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); noecho(); refresh(); @@ -108,3 +114,83 @@ g_main_run(loop); } +/********************************* + * Stuff for 'window management' * + *********************************/ + +typedef struct +{ + GntWidget *me; + GList *below; /* List of widgets below me */ + GList *above; /* List of widgets above me */ +} GntNode; + +static void +free_node(gpointer data) +{ + GntNode *node = data; + g_list_free(node->below); + g_list_free(node->above); + g_free(node); +} + +static void +check_intersection(gpointer key, gpointer value, gpointer data) +{ + GntNode *n = value; + GntNode *nu = data; + + if (value == NULL) + return; + + if (n->me->priv.x + n->me->priv.width < nu->me->priv.x) + return; + if (nu->me->priv.x + nu->me->priv.width < n->me->priv.x) + return; + + if (n->me->priv.y + n->me->priv.height < nu->me->priv.y) + return; + if (nu->me->priv.y + nu->me->priv.height < n->me->priv.y) + return; + + n->above = g_list_prepend(n->above, nu->me); + nu->below = g_list_prepend(nu->below, n->me); +} + +void gnt_screen_occupy(GntWidget *widget) +{ + /* XXX: what happens if this is called more than once for the same widget? + * perhaps _release first? */ + GntNode *node = g_new0(GntNode, 1); + node->me = widget; + + g_hash_table_foreach(nodes, check_intersection, node); + g_hash_table_replace(nodes, widget, node); +} + +void gnt_screen_release(GntWidget *widget) +{ + GList *iter; + GntNode *node = g_hash_table_lookup(nodes, widget); + if (node == NULL || node->below == NULL) /* Yay! Nothing to do. */ + return; + + /* XXX: This is not going to work. + * It will be necessary to build a topology and go from there. */ + for (iter = node->below; iter; iter = iter->next) + { + GntWidget *w = iter->data; + int left, right, top, bottom; + + left = MAX(widget->priv.x, w->priv.x) - w->priv.x; + right = MIN(widget->priv.x + widget->priv.width, w->priv.x + w->priv.width) - w->priv.x; + + top = MAX(widget->priv.y, w->priv.y) - w->priv.y; + bottom = MIN(widget->priv.y + widget->priv.height, w->priv.y + w->priv.height) - w->priv.y; + + gnt_widget_expose(w, left, top, right - left, bottom - top); + } + + g_hash_table_remove(nodes, widget); +} + Modified: branches/soc-2006-file-loggers/console/libgnt/gnttree.c =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gnttree.c 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/console/libgnt/gnttree.c 2006-06-26 00:12:31 UTC (rev 16339) @@ -6,6 +6,7 @@ enum { SIG_SELECTION_CHANGED, + SIG_SCROLLED, SIGS, }; @@ -345,6 +346,14 @@ NULL, NULL, gnt_closure_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER); + signals[SIG_SCROLLED] = + g_signal_new("scrolled", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, 1, G_TYPE_INT); DEBUG; } @@ -445,6 +454,7 @@ } redraw_tree(tree); + g_signal_emit(tree, signals[SIG_SCROLLED], 0, count); } static int Modified: branches/soc-2006-file-loggers/console/libgnt/gntwidget.c =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntwidget.c 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/console/libgnt/gntwidget.c 2006-06-26 00:12:31 UTC (rev 16339) @@ -225,8 +225,6 @@ delwin(obj->window); if(!(GNT_WIDGET_FLAGS(obj) & GNT_WIDGET_DESTROYING)) g_object_run_dispose(G_OBJECT(obj)); - /* XXX: This may be the wrong place */ - /*gnt_screen_remove_widget(obj);*/ DEBUG; } @@ -264,11 +262,10 @@ else werase(widget->window); +#if 0 + /* XXX: No shadow for now :( */ if (!(GNT_WIDGET_FLAGS(widget) & GNT_WIDGET_NO_SHADOW)) { - /* XXX: Find out the actual windows beneath this window, and - * draw the shadow on them */ - /* XXX: Or perhaps do all these from a psedo-WM! */ widget->back = newwin(widget->priv.height, widget->priv.width, widget->priv.y + 1, widget->priv.x + 1); wbkgd(widget->back, COLOR_PAIR(GNT_COLOR_SHADOW)); @@ -279,6 +276,7 @@ touchline(widget->back, 0, widget->priv.height); wrefresh(widget->back); } +#endif wrefresh(widget->window); g_signal_emit(widget, signals[SIG_DRAW], 0); Modified: branches/soc-2006-file-loggers/plugins/ChangeLog.API =================================================================== --- branches/soc-2006-file-loggers/plugins/ChangeLog.API 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/plugins/ChangeLog.API 2006-06-26 00:12:31 UTC (rev 16339) @@ -176,6 +176,7 @@ notify_searchresults in GaimNotifyUiOps. * gaim_conversation_get_send_history(), and send_history from GaimConversation + * Removed ui_ops from GaimBuddyList. Use gaim_blist_get_ui_ops() instead Added: * gaim_prefs_disconnect_by_handle() Modified: branches/soc-2006-file-loggers/src/blist.c =================================================================== --- branches/soc-2006-file-loggers/src/blist.c 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/src/blist.c 2006-06-26 00:12:31 UTC (rev 16339) @@ -655,17 +655,18 @@ GaimBuddyList *gaim_blist_new() { + GaimBlistUiOps *ui_ops; GaimBuddyList *gbl = g_new0(GaimBuddyList, 1); GAIM_DBUS_REGISTER_POINTER(gbl, GaimBuddyList); - gbl->ui_ops = gaim_blist_get_ui_ops(); + ui_ops = gaim_blist_get_ui_ops(); gbl->buddies = g_hash_table_new_full((GHashFunc)_gaim_blist_hbuddy_hash, (GEqualFunc)_gaim_blist_hbuddy_equal, (GDestroyNotify)_gaim_blist_hbuddy_free_key, NULL); - if (gbl->ui_ops != NULL && gbl->ui_ops->new_list != NULL) - gbl->ui_ops->new_list(gbl); + if (ui_ops != NULL && ui_ops->new_list != NULL) + ui_ops->new_list(gbl); return gbl; } @@ -690,7 +691,7 @@ void gaim_blist_show() { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); if (ops && ops->show) ops->show(gaimbuddylist); @@ -698,7 +699,7 @@ void gaim_blist_destroy() { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); gaim_debug(GAIM_DEBUG_INFO, "blist", "Destroying\n"); @@ -708,7 +709,7 @@ void gaim_blist_set_visible(gboolean show) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); if (ops && ops->set_visible) ops->set_visible(gaimbuddylist, show); @@ -744,7 +745,7 @@ void gaim_blist_update_buddy_status(GaimBuddy *buddy, GaimStatus *old_status) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimPresence *presence; GaimStatus *status; @@ -794,7 +795,7 @@ void gaim_blist_update_buddy_icon(GaimBuddy *buddy) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); g_return_if_fail(buddy != NULL); @@ -808,7 +809,7 @@ */ void gaim_blist_rename_buddy(GaimBuddy *buddy, const char *name) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); struct _gaim_hbuddy *hb; g_return_if_fail(buddy != NULL); @@ -834,7 +835,7 @@ void gaim_blist_alias_contact(GaimContact *contact, const char *alias) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimConversation *conv; char *old_alias = contact->alias; GaimBlistNode *bnode; @@ -868,7 +869,7 @@ void gaim_blist_alias_chat(GaimChat *chat, const char *alias) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); char *old_alias = chat->alias; g_return_if_fail(chat != NULL); @@ -890,7 +891,7 @@ void gaim_blist_alias_buddy(GaimBuddy *buddy, const char *alias) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimConversation *conv; char *old_alias = buddy->alias; @@ -918,7 +919,7 @@ void gaim_blist_server_alias_buddy(GaimBuddy *buddy, const char *alias) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimConversation *conv; char *old_alias = buddy->server_alias; @@ -949,7 +950,7 @@ */ void gaim_blist_rename_group(GaimGroup *source, const char *new_name) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimGroup *dest; gchar *old_name; GList *moved_buddies = NULL; @@ -1071,7 +1072,7 @@ GaimChat *gaim_chat_new(GaimAccount *account, const char *alias, GHashTable *components) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimChat *chat; g_return_val_if_fail(account != NULL, FALSE); @@ -1094,7 +1095,7 @@ GaimBuddy *gaim_buddy_new(GaimAccount *account, const char *screenname, const char *alias) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBuddy *buddy; g_return_val_if_fail(account != NULL, FALSE); @@ -1169,7 +1170,7 @@ void gaim_blist_add_chat(GaimChat *chat, GaimGroup *group, GaimBlistNode *node) { GaimBlistNode *cnode = (GaimBlistNode*)chat; - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); g_return_if_fail(chat != NULL); g_return_if_fail(GAIM_BLIST_NODE_IS_CHAT((GaimBlistNode *)chat)); @@ -1251,7 +1252,7 @@ GaimBlistNode *cnode, *bnode; GaimGroup *g; GaimContact *c; - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); struct _gaim_hbuddy *hb; g_return_if_fail(buddy != NULL); @@ -1400,7 +1401,7 @@ void gaim_contact_set_alias(GaimContact *contact, const char *alias) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); char *old_alias = contact->alias; g_return_if_fail(contact != NULL); @@ -1486,7 +1487,7 @@ void gaim_blist_add_contact(GaimContact *contact, GaimGroup *group, GaimBlistNode *node) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimGroup *g; GaimBlistNode *gnode, *cnode, *bnode; @@ -1652,7 +1653,7 @@ g_return_if_fail(group != NULL); g_return_if_fail(GAIM_BLIST_NODE_IS_GROUP((GaimBlistNode *)group)); - ops = gaimbuddylist->ui_ops; + ops = gaim_blist_get_ui_ops(); if (!gaimbuddylist->root) { gaimbuddylist->root = gnode; @@ -1702,7 +1703,7 @@ void gaim_blist_remove_contact(GaimContact *contact) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBlistNode *node, *gnode; g_return_if_fail(contact != NULL); @@ -1749,7 +1750,7 @@ void gaim_blist_remove_buddy(GaimBuddy *buddy) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBlistNode *node, *cnode, *gnode; GaimContact *contact; GaimGroup *group; @@ -1837,7 +1838,7 @@ void gaim_blist_remove_chat(GaimChat *chat) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBlistNode *node, *gnode; GaimGroup *group; @@ -1881,7 +1882,7 @@ void gaim_blist_remove_group(GaimGroup *group) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBlistNode *node; GList *l; @@ -2244,7 +2245,7 @@ void gaim_blist_add_account(GaimAccount *account) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBlistNode *gnode, *cnode, *bnode; g_return_if_fail(gaimbuddylist != NULL); @@ -2286,7 +2287,7 @@ void gaim_blist_remove_account(GaimAccount *account) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBlistNode *gnode, *cnode, *bnode; GaimBuddy *buddy; GaimChat *chat; Modified: branches/soc-2006-file-loggers/src/blist.h =================================================================== --- branches/soc-2006-file-loggers/src/blist.h 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/src/blist.h 2006-06-26 00:12:31 UTC (rev 16339) @@ -152,8 +152,6 @@ struct _GaimBuddyList { GaimBlistNode *root; /**< The first node in the buddy list */ GHashTable *buddies; /**< Every buddy in this list */ - GaimBlistUiOps *ui_ops; /**< The UI operations for the buddy list */ - void *ui_data; /**< UI-specific data. */ }; Modified: branches/soc-2006-file-loggers/src/log.c =================================================================== --- branches/soc-2006-file-loggers/src/log.c 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/src/log.c 2006-06-26 00:12:31 UTC (rev 16339) @@ -23,6 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "internal.h" #include "account.h" #include "dbus-maybe.h" #include "debug.h" Modified: branches/soc-2006-file-loggers/src/status.c =================================================================== --- branches/soc-2006-file-loggers/src/status.c 2006-06-25 23:15:25 UTC (rev 16338) +++ branches/soc-2006-file-loggers/src/status.c 2006-06-26 00:12:31 UTC (rev 16339) @@ -1298,7 +1298,7 @@ update_buddy_idle(GaimBuddy *buddy, GaimPresence *presence, time_t current_time, gboolean old_idle, gboolean idle) { - GaimBlistUiOps *ops = gaim_get_blist()->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); if (!old_idle && idle) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2006-06-25 23:15:34
|
Revision: 16338 Author: billatq Date: 2006-06-25 16:15:25 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16338&view=rev Log Message: ----------- Add documentation for the dblogger database schema Added Paths: ----------- branches/soc-2006-db-logger/doc/static-html/ branches/soc-2006-db-logger/doc/static-html/gaim-dbschema-logo.png branches/soc-2006-db-logger/doc/static-html/gaim-dbschema-overview.png branches/soc-2006-db-logger/doc/static-html/gaim-dbschema-transparent.gif branches/soc-2006-db-logger/doc/static-html/gaim-dbschema.css branches/soc-2006-db-logger/doc/static-html/gaim-dbschema.html branches/soc-2006-db-logger/doc/static-html/gaim-dbschema.js Added: branches/soc-2006-db-logger/doc/static-html/gaim-dbschema-logo.png =================================================================== (Binary files differ) Property changes on: branches/soc-2006-db-logger/doc/static-html/gaim-dbschema-logo.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/soc-2006-db-logger/doc/static-html/gaim-dbschema-overview.png =================================================================== (Binary files differ) Property changes on: branches/soc-2006-db-logger/doc/static-html/gaim-dbschema-overview.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/soc-2006-db-logger/doc/static-html/gaim-dbschema-transparent.gif =================================================================== (Binary files differ) Property changes on: branches/soc-2006-db-logger/doc/static-html/gaim-dbschema-transparent.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/soc-2006-db-logger/doc/static-html/gaim-dbschema.css =================================================================== --- branches/soc-2006-db-logger/doc/static-html/gaim-dbschema.css (rev 0) +++ branches/soc-2006-db-logger/doc/static-html/gaim-dbschema.css 2006-06-25 23:15:25 UTC (rev 16338) @@ -0,0 +1,217 @@ +.Body { + color: #000000; + font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; + font-size: 9pt; + font-style: normal; + font-variant: normal; + font-weight: normal; + letter-spacing: 0; + line-height: 14.3pt; + margin-bottom: 0pt; + margin-left: 0pt; + margin-right: 0pt; + margin-top: 0pt; + padding-bottom: 9pt; + padding-top: 0pt; + text-align: left; + text-decoration: none; + text-indent: 0pt; + text-transform: none; +} +.Footnote_Text { + color: #000000; + font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; + font-size: 9pt; + font-style: normal; + font-variant: normal; + font-weight: normal; + letter-spacing: 0; + line-height: 14.3pt; + margin-bottom: 0pt; + margin-left: 0pt; + margin-right: 0pt; + margin-top: 0pt; + padding-bottom: 0pt; + padding-top: 0pt; + text-align: left; + text-decoration: none; + text-indent: 0pt; + text-transform: none; +} +.Free_Form { + color: #000000; + font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; + font-size: 9pt; + font-style: normal; + font-variant: normal; + font-weight: normal; + letter-spacing: 0; + line-height: 14.3pt; + margin-bottom: 0pt; + margin-left: 0pt; + margin-right: 0pt; + margin-top: 0pt; + padding-bottom: 0pt; + padding-top: 0pt; + text-align: left; + text-decoration: none; + text-indent: 0pt; + text-transform: none; +} +.Heading_1 { + color: #136993; + font-family: 'HelveticaNeue', 'Helvetica Neue', 'Arial', 'sans-serif'; + font-size: 13pt; + font-style: normal; + font-variant: normal; + font-weight: bold; + letter-spacing: 0; + line-height: 19.5pt; + margin-bottom: 0pt; + margin-left: 0pt; + margin-right: 0pt; + margin-top: 0pt; + padding-bottom: 0pt; + padding-top: 9pt; + text-align: left; + text-decoration: none; + text-indent: 0pt; + text-transform: none; +} +.Heading_3 { + color: #000000; + font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; + font-size: 9pt; + font-style: normal; + font-variant: normal; + font-weight: bold; + letter-spacing: 0; + line-height: 14.3pt; + margin-bottom: 0pt; + margin-left: 0pt; + margin-right: 0pt; + margin-top: 0pt; + padding-bottom: 0pt; + padding-top: 9pt; + text-align: left; + text-decoration: none; + text-indent: 0pt; + text-transform: none; +} +.TOC_Heading_1 { + color: #136993; + font-family: 'HelveticaNeue', 'Helvetica Neue', 'Arial', 'sans-serif'; + font-size: 14pt; + font-style: normal; + font-variant: normal; + font-weight: bold; + letter-spacing: 0; + line-height: 16pt; + margin-bottom: 0pt; + margin-left: 0pt; + margin-right: 0pt; + margin-top: 0pt; + padding-bottom: 0pt; + padding-top: 12pt; + text-align: left; + text-decoration: none; + text-indent: 0pt; + text-transform: none; +} +.TOC_Heading_2 { + color: #136993; + font-family: 'HelveticaNeue', 'Helvetica Neue', 'Arial', 'sans-serif'; + font-size: 10pt; + font-style: normal; + font-variant: normal; + font-weight: bold; + letter-spacing: 0; + line-height: 12pt; + margin-bottom: 0pt; + margin-left: 9pt; + margin-right: 0pt; + margin-top: 0pt; + padding-bottom: 0pt; + padding-top: 12pt; + text-align: left; + text-decoration: none; + text-indent: 0pt; + text-transform: none; +} +.Title { + color: #000000; + font-family: 'HelveticaNeue-UltraLight', 'Helvetica Neue', 'Helvetica Neue UltraLight', 'Arial', 'sans-serif'; + font-size: 32pt; + font-style: normal; + font-variant: normal; + font-weight: normal; + letter-spacing: 0.06em; + line-height: 38pt; + margin-bottom: 0pt; + margin-left: 0pt; + margin-right: 0pt; + margin-top: 0pt; + padding-bottom: 68pt; + padding-top: 0pt; + text-align: left; + text-decoration: none; + text-indent: 0pt; + text-transform: none; +} +.Normal_22 { + width: 468pt; +} +.Normal_23 { + width: 468pt; +} +.Normal_26 { + width: 468pt; +} +.Table { + background: transparent; + border-collapse: collapse; +} +.graphic_textbox_style_default, .graphic_textbox_style_default_6 { + background: transparent; + border: 1pt #000000 none; + float: none; + margin: 0pt; +} +.graphic_textbox_style_default_6 { + float: none; + margin: 0pt; +} +.table_cell_style_default { + background: transparent; +} +.table_header_row_cell_style_default { + background: #136993; +} +.FootnoteRegion { + border-bottom-width: 0; + border-color: #7f7f7f; + border-left-width: 0; + border-right-width: 0; + border-style: solid; + border-top-width: thin; + margin-top: 1em; + padding-top: 0.5em; +} +.Spacer {display: inline; } +.Spacer {display: inline-block; } +ol { + list-style-image: none; + list-style-position: inside; + list-style-type: none; + margin: 0; + padding: 0; + text-indent: 0; +} +.Bullet { text-decoration: none; +} +div { + overflow: visible; +} +img { + border: none; +} Property changes on: branches/soc-2006-db-logger/doc/static-html/gaim-dbschema.css ___________________________________________________________________ Name: svn:mime-type + text/css Name: svn:eol-style + native Added: branches/soc-2006-db-logger/doc/static-html/gaim-dbschema.html =================================================================== --- branches/soc-2006-db-logger/doc/static-html/gaim-dbschema.html (rev 0) +++ branches/soc-2006-db-logger/doc/static-html/gaim-dbschema.html 2006-06-25 23:15:25 UTC (rev 16338) @@ -0,0 +1,1277 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + +<meta name="Generator" content="Pages 2.0" /> +<title></title> +<link rel="stylesheet" type="text/css" media="screen" href="gaim-dbschema.css" /> +<script type="text/javascript" src="gaim-dbschema.js"></script></head> +<body style="margin: 72pt; " onload="onPageLoad();"> +<div><div style="margin: 90pt 0pt 0pt 0pt; width: 468pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; padding-top: 0pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; margin-top: 1.6pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; text-decoration: none;"> </div> +<div class="paragraph Free_Form" style="line-height: 14.3pt; text-decoration: none;"> </div> +<div style="float: right; position: relative; "><img src="gaim-dbschema-logo.png" alt="" id="id1" style="border: none; float: right; height: 47pt; position: relative; width: 35.8pt; " /></div> +<div style="float: none; margin: 0pt; float: right; height: 14pt; position: relative; width: 93pt; "><div><div><div class="graphic_textbox_layout_style_default"><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; text-align: center; line-height: 14.3pt;">Gaim Project</div> +</div> +</div> +</div> +</div> +<div class="paragraph Title" style="line-height: 38pt; ">SQL Logging Database Schema Design Document</div> +<div class="paragraph Body" style="line-height: 14.3pt; margin-top: -1.6pt; ">Prepared By: William Reading</div> +<div class="paragraph Body" style="line-height: 14.3pt; margin-top: 1.6pt; ">Date: 25 June 2006</div> +<div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; ">Version: 5</div> +</div> +</div> +<div><div style="margin: 36pt 0pt 0pt 0pt; width: 468pt; "><div class="paragraph"></div> +<div class="paragraph Title" style="line-height: 38pt; padding-top: 0pt; "><span>Table of Contents</span><span style="color: #136993; line-height: 38pt; "></span></div> +<div class="paragraph TOC_Heading_1" style="line-height: 17pt; "><a href="#TOC398">Table Design</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC411">Conventions</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC880">Definitions</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC1602">Overview</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC1622">Accounts</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC1927">AliasDates</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC2224">Aliases</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC2497">Buddies</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC2766">Events</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC2850">MessageEvents</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC3130">Messages</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC3585">Metadata</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC3757">Protocols</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC3924">SessionBuddy</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC4149">Sessions</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC4609">Status</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC4765">StatusChange</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC5067">Timezones</a></div> +<div class="paragraph TOC_Heading_1" style="line-height: 17pt; "><a href="#TOC5116">Appendix: Sample SQL</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC5137">Overview</a></div> +<div class="paragraph TOC_Heading_2" style="line-height: 12pt; "><a href="#TOC5205">Schema</a></div> +</div> +</div> +<div><div style="margin: 36pt 0pt 0pt 0pt; width: 468pt; "><div class="paragraph"></div> +<div class="paragraph Title" style="line-height: 38pt; padding-top: 0pt; "><a name="TOC398" id="TOC398"></a><span>Table Design</span></div> +<div class="paragraph Heading_1" style="line-height: 20.8pt; margin-top: -2.4pt; "><a name="TOC411" id="TOC411"></a><span>Conventions</span></div> +<ol><li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 1pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">The key words “MUST”, “MUST NOT”, “SHOULD”, “SHOULD NOT”, and “MAY” in this document are to be interpreted as defined in RFC2119.</span></div> +</li> +<li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">Primary keys implicitly require that the field is NOT NULL and UNIQUE.</span></div> +</li> +<li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">Primary keys of type INTEGER will AUTOINCREMENT unless otherwise specified.</span></div> +</li> +<li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">All fields are NOT NULL unless otherwise specified.</span></div> +</li> +<li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">All VARCHAR fields SHOULD be stored as UTF-8.</span></div> +</li> +<li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">Times MUST be stored in UTC, with a link to the Timezone that it was logged from.</span></div> +</li> +</ol> +<div class="paragraph Heading_1" style="line-height: 20.8pt; margin-top: 1.6pt; "><a name="TOC880" id="TOC880"></a><span>Definitions</span></div> +<div class="paragraph Body" style="line-height: 14.3pt; "><span style="font-weight: bold; line-height: 14.3pt; ">ASCII</span><span> - </span><span style="font-style: italic; line-height: 14.3pt; ">American Standard Code for Information Interchange. </span><span>Commonly used character encoding based upon the English language</span><a href="#Footnote1" style="font-size: 5.9pt; line-height: 14.3pt; vertical-align: 0.50em; ">3</a><span>.</span><span style="font-weight: bold; line-height: 14.3pt; "> </span></div> +<div class="paragraph Body" style="line-height: 14.3pt; "><span style="font-weight: bold; line-height: 14.3pt; ">PRPL </span><span>- </span><span style="font-style: italic; line-height: 14.3pt; ">Protocol Plugin</span><span>. Protocol plugins provide support for protocols that Gaim uses, such as Jabber or Zephyr.</span></div> +<div class="paragraph Body" style="line-height: 14.3pt; "><span style="font-weight: bold; line-height: 14.3pt; ">Unicode</span><span> - Industry standard designed to allow text and symbols from all of the writing systems of the world to be consistently represented and manipulated by computers</span><a href="#(null)" style="font-size: 5.9pt; line-height: 14.3pt; vertical-align: 0.50em; "></a><span>.</span></div> +<div class="paragraph Body" style="line-height: 14.3pt; "><span style="font-weight: bold; line-height: 14.3pt; ">UTC</span><span> - </span><span style="font-style: italic; line-height: 14.3pt; ">Coordinated Universal Time</span><span>. The time system in which time zone offsets use as a reference point.</span></div> +<div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: -1.6pt; "><span style="font-weight: bold; line-height: 14.3pt; ">UTF-8</span><span style="line-height: 14.3pt; "> - </span><span style="font-style: italic; line-height: 14.3pt; ">8-bit Unicode Transformation Format</span><span style="line-height: 14.3pt; ">. A variable-length character encoding for Unicode that can represent any letter in the Unicode standard, but is also backwards-compatible with ASCII</span><a href="#(null)" style="font-size: 5.9pt; line-height: 14.3pt; vertical-align: 0.50em; "></a><span style="line-height: 14.3pt; ">.</span></div> +<div class="paragraph Heading_1" style="line-height: 20.8pt; margin-top: 1.6pt; "></div> +<div class="paragraph Heading_1" style="line-height: 20.8pt; "><a name="TOC1602" id="TOC1602"></a><span>Overview</span></div> +<div class="paragraph Heading_3" style="line-height: 14.3pt; margin-top: -1.6pt; ">Diagram</div> +<div class="paragraph Body" style="line-height: 14.3pt; margin-top: 1.6pt; text-decoration: none;"> </div> +<div class="paragraph Body" style="line-height: 14.3pt; "><img src="gaim-dbschema-overview.png" alt="" id="id2" style="border: none; height: 399.7pt; margin-bottom: 1pt; margin-right: 1pt; width: 468pt; " /></div> +<div class="paragraph Heading_1" style="line-height: 20.8pt; "><a name="TOC1622" id="TOC1622"></a><span>Accounts</span></div> +<div class="paragraph Body" style="line-height: 14.3pt; ">Stores information about accounts in which the buddy is associated. The ‘Name’ field MUST be processed with the gaim_normalize() function before being inserted into the database.</div> +<div class="paragraph Heading_3" style="line-height: 14.3pt; ">Table Layout</div> +<div class="paragraph Body" style="line-height: 14.3pt; "><table cellspacing="0" cellpadding="0" style="background: transparent; border-collapse: collapse; height: 79pt; width: 467pt; word-wrap: break-word; " id="id3"><tr><th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Field Name</div> +</div> +</div> +</th> +<th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Data Type</div> +</div> +</div> +</th> +<th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Purpose</div> +</div> +</div> +</th> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">AccountID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER PRIMARY KEY</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the Account in the table.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">ProtocolID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Uniquely identifies the protocol in the table.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Name</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">VARCHAR</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the name of the account</div> +</div> +</div> +</td> +</tr> +</table> +</div> +<div class="paragraph Heading_3" style="line-height: 14.3pt; ">Table Constraints</div> +<ol><li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: -1.6pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">UNIQUE(ProtocolID, Name)</span></div> +</li> +<li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">FOREIGN KEY (ProtocolID) REFERENCES Protocols (ProtocolID)</span></div> +</li> +</ol> +<div class="paragraph Heading_1" style="line-height: 20.8pt; margin-top: 1.6pt; "><a name="TOC1927" id="TOC1927"></a><span>AliasDates</span></div> +<div class="paragraph Body" style="line-height: 14.3pt; ">Stores when the alias was used.</div> +<div class="paragraph Heading_3" style="line-height: 14.3pt; ">Table Layout</div> +<div class="paragraph Body" style="line-height: 14.3pt; "><table cellspacing="0" cellpadding="0" style="background: transparent; border-collapse: collapse; height: 169pt; width: 467pt; word-wrap: break-word; " id="id4"><tr><th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Field Name</div> +</div> +</div> +</th> +<th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Data Type</div> +</div> +</div> +</th> +<th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Purpose</div> +</div> +</div> +</th> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">AliasDateID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER PRIMARY KEY</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the date range.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">AliasID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies an AliasID that this AliasDate describes.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">StartTime</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">DATETIME</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Contains the time that the alias entered use.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">EndTime</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">DATETIME NULL</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Contains the time that the alias finished use.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 33pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">BeginTimezone</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 33pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 33pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the timezone for the time when the alias entered use.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 33pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">EndTimezone</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 33pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER NULL</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 33pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the timezone for the time when the alias ended use.</div> +</div> +</div> +</td> +</tr> +</table> +</div> +<div class="paragraph Heading_3" style="line-height: 14.3pt; ">Table Constraints</div> +<ol><li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: -1.6pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">CHECK (EndTime IS NULL OR EndTime >= StartTime)</span></div> +</li> +<li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">FOREIGN KEY (AliasID) REFERENCES Aliases (AliasID)</span></div> +</li> +<li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">FOREIGN KEY (BeginTimezone) REFERENCES Timezones (TimezoneID)</span></div> +</li> +<li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">FOREIGN KEY (EndTimezone) REFERENCES Timezones (TimezoneID)</span></div> +</li> +</ol> +<div class="paragraph Heading_1" style="line-height: 20.8pt; margin-top: 1.6pt; "><a name="TOC2224" id="TOC2224"></a><span>Aliases</span></div> +<div class="paragraph Body" style="line-height: 14.3pt; ">Stores information about aliases in use. An alias represents the name displayed when the conversation took place. For instance, this could be a buddy alias, contact alias, server alias or a non-normalized screen name.</div> +<div class="paragraph Heading_3" style="line-height: 14.3pt; ">Table Layout</div> +<div class="paragraph Body" style="line-height: 14.3pt; "><table cellspacing="0" cellpadding="0" style="background: transparent; border-collapse: collapse; height: 59pt; width: 467pt; word-wrap: break-word; " id="id5"><tr><th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Field Name</div> +</div> +</div> +</th> +<th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Data Type</div> +</div> +</div> +</th> +<th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Purpose</div> +</div> +</div> +</th> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">AliasID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER PRIMARY KEY</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies an Alias in the table.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Alias</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">VARCHAR</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">An Alias as a string.</div> +</div> +</div> +</td> +</tr> +</table> +</div> +<div class="paragraph Heading_3" style="line-height: 14.3pt; ">Table Constraints</div> +<ol><li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: -1.6pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">UNIQUE(Alias)</span></div> +</li> +</ol> +<div class="paragraph Heading_1" style="line-height: 20.8pt; margin-top: 1.6pt; "><a name="TOC2497" id="TOC2497"></a><span>Buddies</span></div> +<div class="paragraph Body" style="line-height: 14.3pt; ">Buddies stores data about the buddy. The ‘Name’ field MUST be processed with the gaim_normalize() function before being inserted into the database.</div> +<div class="paragraph Heading_3" style="line-height: 14.3pt; ">Table Layout</div> +<div class="paragraph Body" style="line-height: 14.3pt; "><table cellspacing="0" cellpadding="0" style="background: transparent; border-collapse: collapse; height: 94pt; width: 467pt; word-wrap: break-word; " id="id6"><tr><th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Field Name</div> +</div> +</div> +</th> +<th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Data Type</div> +</div> +</div> +</th> +<th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Purpose</div> +</div> +</div> +</th> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">BuddyID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER PRIMARY KEY</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the buddy.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 33pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">AccountID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 33pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 33pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Uniquely identifies the Account in which the buddy is associated.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Name</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">VARCHAR</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the name of the buddy.</div> +</div> +</div> +</td> +</tr> +</table> +</div> +<div class="paragraph Heading_3" style="line-height: 14.3pt; ">Table Constraints</div> +<ol><li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: -1.6pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">UNIQUE(AccountID, Name)</span></div> +</li> +<li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">FOREIGN KEY (AccountID) REFERENCES Accounts (AccountID)</span></div> +</li> +</ol> +<div class="paragraph Heading_1" style="line-height: 20.8pt; margin-top: 1.6pt; "><a name="TOC2766" id="TOC2766"></a><span>Events</span></div> +<div class="paragraph Body" style="line-height: 14.3pt; ">Stores a list of system events. Names SHOULD be in lowercase.</div> +<div class="paragraph Heading_3" style="line-height: 14.3pt; ">Table Layout</div> +<div class="paragraph Body" style="line-height: 14.3pt; "><table cellspacing="0" cellpadding="0" style="background: transparent; border-collapse: collapse; height: 59pt; width: 467pt; word-wrap: break-word; " id="id7"><tr><th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Field Name</div> +</div> +</div> +</th> +<th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Data Type</div> +</div> +</div> +</th> +<th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Purpose</div> +</div> +</div> +</th> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">EventID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER PRIMARY KEY</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the Event in Events.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Name</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">VARCHAR</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Stores the name of the Event.</div> +</div> +</div> +</td> +</tr> +</table> +</div> +<div class="paragraph Heading_1" style="line-height: 20.8pt; "><a name="TOC2850" id="TOC2850"></a><span>MessageEvents</span></div> +<div class="paragraph Body" style="line-height: 14.3pt; ">Event types are defined here as they are implemented. Applications needing events not defined here MUST prefix them with "x-".</div> +<div class="paragraph Heading_3" style="line-height: 14.3pt; ">Table Layout</div> +<div class="paragraph Body" style="line-height: 14.3pt; "><table cellspacing="0" cellpadding="0" style="background: transparent; border-collapse: collapse; height: 139pt; width: 467pt; word-wrap: break-word; " id="id8"><tr><th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Field Name</div> +</div> +</div> +</th> +<th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Data Type</div> +</div> +</div> +</th> +<th style="background: #136993; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Free_Form" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 0pt; padding-top: 0pt; color: #ffffff; font-family: 'HelveticaNeue-Bold', 'Helvetica Neue', 'Arial', 'sans-serif'; font-weight: bold; line-height: 14.3pt;">Purpose</div> +</div> +</div> +</th> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">MessageEventID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER PRIMARY KEY</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the MessageEvent in MessageEvents.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">AccountID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER NULL</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the account in the “Accounts” table.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">EventID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the event in the “Events” table.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">BuddyID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER NULL</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the buddy in the “Buddies” table.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Timestamp</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">DATETIME</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Stores the time the event occurred.</div> +</div> +</div> +</td> +</tr> +<tr><td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">TimezoneID</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 116pt; "><div><div style="margin: 4pt; width: 115.9pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">INTEGER</div> +</div> +</div> +</td> +<td style="background: transparent; border: 1pt #7f7f7f solid; height: 18pt; width: 232pt; "><div><div style="margin: 4pt; width: 232.2pt; "><div class="paragraph Body" style="line-height: 14.3pt; padding-bottom: 0pt; padding-top: 0pt; ">Identifies the timezone when the event occurred.</div> +</div> +</div> +</td> +</tr> +</table> +</div> +<div class="paragraph Heading_3" style="line-height: 14.3pt; ">Table Constraints</div> +<ol><li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: -1.6pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 0; line-height: 14.3pt; position: relative; text-decoration: none; text-transform: none; top: 1pt; " class="Bullet">•</span><span style="width: 4pt; " class="Spacer"></span><span style="line-height: 14.3pt; ">FOREIGN KEY (AccountID) REFERENCES Accounts (AccountID)</span></div> +</li> +<li style="line-height: 14.3pt; margin-left: 9pt; padding-left: 0pt; text-indent: -9pt; "><div class="paragraph Body" style="line-height: 14.3pt; margin-bottom: 0pt; margin-top: 0pt; text-indent: -9pt; "><span style="color: #000000; font-family: 'HelveticaNeue-Light', 'Helvetica Neue', 'Helvetica Neue Light', 'Arial', 'sans-serif'; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: norma... [truncated message content] |
From: <ro...@us...> - 2006-06-25 23:09:14
|
Revision: 16337 Author: roast Date: 2006-06-25 16:08:49 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16337&view=rev Log Message: ----------- fixed botched up 16271:16329 merge Added Paths: ----------- branches/soc-2006-file-loggers/console/ branches/soc-2006-file-loggers/console/Makefile branches/soc-2006-file-loggers/console/gntblist.c branches/soc-2006-file-loggers/console/gntblist.h branches/soc-2006-file-loggers/console/gntgaim.c branches/soc-2006-file-loggers/console/gntgaim.h branches/soc-2006-file-loggers/console/gntui.c branches/soc-2006-file-loggers/console/gntui.h branches/soc-2006-file-loggers/console/libgnt/ branches/soc-2006-file-loggers/console/libgnt/Makefile branches/soc-2006-file-loggers/console/libgnt/gnt-skel.c branches/soc-2006-file-loggers/console/libgnt/gnt-skel.h branches/soc-2006-file-loggers/console/libgnt/gnt.h branches/soc-2006-file-loggers/console/libgnt/gntbox.c branches/soc-2006-file-loggers/console/libgnt/gntbox.h branches/soc-2006-file-loggers/console/libgnt/gntbutton.c branches/soc-2006-file-loggers/console/libgnt/gntbutton.h branches/soc-2006-file-loggers/console/libgnt/gntcolors.c branches/soc-2006-file-loggers/console/libgnt/gntcolors.h branches/soc-2006-file-loggers/console/libgnt/gntentry.c branches/soc-2006-file-loggers/console/libgnt/gntentry.h branches/soc-2006-file-loggers/console/libgnt/gntkeys.h branches/soc-2006-file-loggers/console/libgnt/gntlabel.c branches/soc-2006-file-loggers/console/libgnt/gntlabel.h branches/soc-2006-file-loggers/console/libgnt/gntmain.c branches/soc-2006-file-loggers/console/libgnt/gnttree.c branches/soc-2006-file-loggers/console/libgnt/gnttree.h branches/soc-2006-file-loggers/console/libgnt/gntutils.c branches/soc-2006-file-loggers/console/libgnt/gntutils.h branches/soc-2006-file-loggers/console/libgnt/gntwidget.c branches/soc-2006-file-loggers/console/libgnt/gntwidget.h branches/soc-2006-file-loggers/console/libgnt/test.c branches/soc-2006-file-loggers/plugins/tcl/tcl_cmd.c branches/soc-2006-file-loggers/plugins/tcl/tcl_ref.c Added: branches/soc-2006-file-loggers/console/Makefile =================================================================== --- branches/soc-2006-file-loggers/console/Makefile (rev 0) +++ branches/soc-2006-file-loggers/console/Makefile 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,27 @@ +CFLAGS=`pkg-config --cflags gaim gobject-2.0` -g -I./libgnt/ +LDFLAGS=`pkg-config --libs gaim gobject-2.0 libxml-2.0` -lncursesw -L./libgnt/ -lgnt + +GG_SOURCES = \ + gntblist.c \ + gntui.c + +GG_HEADERS = \ + gntblist.h \ + gntui.h + +GG_OBJECTS = \ + gntblist.o \ + gntui.o + +all: gntgaim + +gntgaim: gntgaim.o $(GG_OBJECTS) + $(CC) -o gntgaim gntgaim.o $(GG_OBJECTS) $(LDFLAGS) +gntblist.o: gntblist.c $(GG_HEADERS) +gntgaim.o: gntgaim.c gntgaim.h $(GG_HEADERS) +gntui.o: gntui.c $(GG_HEADERS) + +clean: + rm *.o + rm gntgaim + Property changes on: branches/soc-2006-file-loggers/console/Makefile ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/gntblist.c =================================================================== --- branches/soc-2006-file-loggers/console/gntblist.c (rev 0) +++ branches/soc-2006-file-loggers/console/gntblist.c 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,369 @@ +#include <gaim/account.h> +#include <gaim/blist.h> +#include <signal.h> +#include <gaim/util.h> +#include <gaim/server.h> + +#include "gntgaim.h" +#include "gntbox.h" +#include "gnttree.h" + +#include "gntblist.h" +#include <string.h> + +typedef struct +{ + GntWidget *window; + GntWidget *tree; + + GntWidget *tooltip; + GaimBlistNode *tnode; /* Who is the tooltip being displayed for? */ +} GGBlist; + +GGBlist *ggblist; + +static void add_buddy(GaimBuddy *buddy, GGBlist *ggblist); +static void add_group(GaimGroup *group, GGBlist *ggblist); +static void draw_tooltip(GGBlist *ggblist); + +static void +new_node(GaimBlistNode *node) +{ +} + +static void +remove_tooltip(GGBlist *ggblist) +{ + gnt_widget_destroy(ggblist->tooltip); + ggblist->tooltip = NULL; + ggblist->tnode = NULL; +} + +static void +node_remove(GaimBuddyList *list, GaimBlistNode *node) +{ + GGBlist *ggblist = list->ui_data; + + if (node->ui_data == NULL) + return; + + gnt_tree_remove(GNT_TREE(ggblist->tree), node); + node->ui_data = NULL; + + /* XXX: Depending on the node, we may want to remove the group/contact node if necessary */ + if (GAIM_BLIST_NODE_IS_BUDDY(node)) + { + GaimGroup *group = gaim_buddy_get_group((GaimBuddy*)node); + if (gaim_blist_get_group_online_count(group) == 0) + node_remove(list, (GaimBlistNode*)group); + else if (ggblist->tnode == (GaimBlistNode *)group) /* Need to update the counts */ + draw_tooltip(ggblist); + } + + if (ggblist->tnode == node) + { + remove_tooltip(ggblist); + } +} + +static void +node_update(GaimBuddyList *list, GaimBlistNode *node) +{ + if (GAIM_BLIST_NODE_IS_BUDDY(node)) + { + GaimBuddy *buddy = (GaimBuddy*)node; + if (gaim_presence_is_online(gaim_buddy_get_presence(buddy))) + add_buddy(buddy, list->ui_data); + else + node_remove(gaim_get_blist(), node); + } +} + +static void +new_list(GaimBuddyList *list) +{ +} + +static GaimBlistUiOps blist_ui_ops = +{ + new_list, + new_node, + NULL, + node_update, /* This doesn't do crap */ + node_remove, + NULL, + NULL, + NULL, + NULL, + NULL +}; + +static gpointer +gg_blist_get_handle() +{ + static int handle; + + return &handle; +} + +static void +add_group(GaimGroup *group, GGBlist *ggblist) +{ + GaimBlistNode *node = (GaimBlistNode *)group; + if (node->ui_data) + return; + node->ui_data = gnt_tree_add_row_after(GNT_TREE(ggblist->tree), group, + group->name, NULL, NULL); +} + +static const char * +get_buddy_display_name(GaimBuddy *buddy) +{ + static char text[2096]; + char status[8]; + GaimStatusPrimitive prim; + GaimPresence *presence; + GaimStatus *now; + + presence = gaim_buddy_get_presence(buddy); + now = gaim_presence_get_active_status(presence); + + prim = gaim_status_type_get_primitive(gaim_status_get_type(now)); + + switch(prim) + { +#if 1 + case GAIM_STATUS_OFFLINE: + strncpy(status, "x", sizeof(status) - 1); + break; + case GAIM_STATUS_AVAILABLE: + strncpy(status, "o", sizeof(status) - 1); + break; + default: + strncpy(status, ".", sizeof(status) - 1); + break; +#else + /* XXX: Let's use these some time */ + case GAIM_STATUS_OFFLINE: + strncpy(status, "M-bM-^JM-^W", sizeof(status) - 1); + break; + case GAIM_STATUS_AVAILABLE: + /* XXX: Detect idleness */ + strncpy(status, "M-bM-^WM-/", sizeof(status) - 1); + break; + default: + strncpy(status, "M-bM-^JM-^V", sizeof(status) - 1); + break; +#endif + } + + snprintf(text, sizeof(text) - 1, "%s %s", status, gaim_buddy_get_alias(buddy)); + + return text; +} + +static void +add_buddy(GaimBuddy *buddy, GGBlist *ggblist) +{ + GaimGroup *group; + GaimBlistNode *node = (GaimBlistNode *)buddy; + if (node->ui_data) + return; + + group = gaim_buddy_get_group(buddy); + add_group(group, ggblist); + + node->ui_data = gnt_tree_add_row_after(GNT_TREE(ggblist->tree), buddy, + get_buddy_display_name(buddy), group, NULL); + + if (ggblist->tnode == (GaimBlistNode*)group) + draw_tooltip(ggblist); +} + +static void +buddy_signed_on(GaimBuddy *buddy, GGBlist *ggblist) +{ + add_buddy(buddy, ggblist); +} + +static void +buddy_signed_off(GaimBuddy *buddy, GGBlist *ggblist) +{ + node_remove(gaim_get_blist(), (GaimBlistNode*)buddy); +} + +GaimBlistUiOps *gg_blist_get_ui_ops() +{ + return &blist_ui_ops; +} + +static void +selection_activate(GntWidget *widget, GGBlist *ggblist) +{ + gnt_widget_set_focus(widget, FALSE); +} + +static void +draw_tooltip(GGBlist *ggblist) +{ + GaimBlistNode *node; + int x, y, top, width; + GString *str; + GaimPlugin *prpl; + GaimPluginProtocolInfo *prpl_info; + GaimAccount *account; + GntTree *tree; + GntWidget *widget, *box, *label; + char *title = NULL; + + widget = ggblist->tree; + tree = GNT_TREE(widget); + + if (ggblist->tooltip) + { + remove_tooltip(ggblist); + } + + node = gnt_tree_get_selection_data(tree); + if (!node) + return; + + str = g_string_new(""); + + if (GAIM_BLIST_NODE_IS_BUDDY(node)) + { + GaimBuddy *buddy = (GaimBuddy *)node; + account = gaim_buddy_get_account(buddy); + + g_string_append_printf(str, _("Account: %s"), gaim_account_get_username(account)); + + prpl = gaim_find_prpl(gaim_account_get_protocol_id(account)); + prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl); + if (prpl_info && prpl_info->tooltip_text) + { + GString *tip = g_string_new(""); + char *strip, *br; + prpl_info->tooltip_text(buddy, tip, TRUE); + + br = gaim_strreplace(tip->str, "\n", "<br>"); + strip = gaim_markup_strip_html(br); + g_string_append(str, strip); + g_string_free(tip, TRUE); + g_free(strip); + g_free(br); + } + + title = g_strdup(gaim_buddy_get_name(buddy)); + } + else if (GAIM_BLIST_NODE_IS_GROUP(node)) + { + GaimGroup *group = (GaimGroup *)node; + + g_string_append_printf(str, _("Online: %d\nTotal: %d"), + gaim_blist_get_group_online_count(group), + gaim_blist_get_group_size(group, FALSE)); + + title = g_strdup(group->name); + } + else + { + g_string_free(str, TRUE); + return; + } + + gnt_widget_get_position(widget, &x, &y); + gnt_widget_get_size(widget, &width, NULL); + top = gnt_tree_get_selection_visible_line(tree); + + x += width; + y += top - 1; + + box = gnt_box_new(FALSE, FALSE); + gnt_box_set_toplevel(GNT_BOX(box), TRUE); + GNT_WIDGET_SET_FLAGS(box, GNT_WIDGET_NO_SHADOW); + gnt_box_set_title(GNT_BOX(box), title); + + gnt_box_add_widget(GNT_BOX(box), GNT_WIDGET(gnt_label_new(str->str))); + + gnt_widget_set_position(box, x, y); + gnt_widget_draw(box); + + g_free(title); + g_string_free(str, TRUE); + ggblist->tooltip = box; + ggblist->tnode = node; +} + +static void +selection_changed(GntWidget *widget, gpointer old, gpointer current, GGBlist *ggblist) +{ + draw_tooltip(ggblist); +} + + +static gboolean +key_pressed(GntWidget *widget, const char *text, GGBlist *ggblist) +{ + if (text[0] == 27 && text[1] == 0) + { + /* Escape was pressed */ + if (ggblist->tooltip) + { + gnt_widget_destroy(ggblist->tooltip); + ggblist->tooltip = NULL; + return TRUE; + } + } + return FALSE; +} + +static void +buddy_status_changed(GaimBuddy *buddy, GaimStatus *old, GaimStatus *now, GGBlist *ggblist) +{ + gnt_tree_change_text(GNT_TREE(ggblist->tree), buddy, get_buddy_display_name(buddy)); + if (ggblist->tnode == (GaimBlistNode*)buddy) + draw_tooltip(ggblist); +} + +void gg_blist_init() +{ + ggblist = g_new0(GGBlist, 1); + + gaim_get_blist()->ui_data = ggblist; + + ggblist->window = gnt_box_new(FALSE, FALSE); + gnt_box_set_toplevel(GNT_BOX(ggblist->window), TRUE); + gnt_box_set_title(GNT_BOX(ggblist->window), _("Buddy List")); + gnt_box_set_pad(GNT_BOX(ggblist->window), 0); + + ggblist->tree = gnt_tree_new(); + GNT_WIDGET_SET_FLAGS(ggblist->tree, GNT_WIDGET_NO_BORDER); + gnt_widget_set_size(ggblist->tree, 25, getmaxy(stdscr) - 2); + + gnt_box_add_widget(GNT_BOX(ggblist->window), ggblist->tree); + gnt_widget_show(ggblist->window); + + gaim_signal_connect(gaim_blist_get_handle(), "buddy-status-changed", gg_blist_get_handle(), + GAIM_CALLBACK(buddy_status_changed), ggblist); + +#if 0 + gaim_signal_connect(gaim_blist_get_handle(), "buddy-signed-on", gg_blist_get_handle(), + GAIM_CALLBACK(buddy_signed_on), ggblist); + gaim_signal_connect(gaim_blist_get_handle(), "buddy-signed-off", gg_blist_get_handle(), + GAIM_CALLBACK(buddy_signed_off), ggblist); + + /* These I plan to use to indicate unread-messages etc. */ + gaim_signal_connect(gaim_conversations_get_handle(), "received-im-msg", gg_blist_get_handle(), + GAIM_CALLBACK(received_im_msg), list); + gaim_signal_connect(gaim_conversations_get_handle(), "sent-im-msg", gg_blist_get_handle(), + GAIM_CALLBACK(sent_im_msg), NULL); + + gaim_signal_connect(gaim_conversations_get_handle(), "received-chat-msg", gg_blist_get_handle(), + GAIM_CALLBACK(received_chat_msg), list); +#endif + + g_signal_connect(G_OBJECT(ggblist->tree), "selection_changed", G_CALLBACK(selection_changed), ggblist); + g_signal_connect(G_OBJECT(ggblist->tree), "key_pressed", G_CALLBACK(key_pressed), ggblist); + g_signal_connect(G_OBJECT(ggblist->tree), "activate", G_CALLBACK(selection_activate), ggblist); +} + Property changes on: branches/soc-2006-file-loggers/console/gntblist.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/gntblist.h =================================================================== --- branches/soc-2006-file-loggers/console/gntblist.h (rev 0) +++ branches/soc-2006-file-loggers/console/gntblist.h 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,5 @@ +#include "blist.h" + +GaimBlistUiOps * gg_blist_get_ui_ops(); + +void gg_blist_init(); Property changes on: branches/soc-2006-file-loggers/console/gntblist.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/gntgaim.c =================================================================== --- branches/soc-2006-file-loggers/console/gntgaim.c (rev 0) +++ branches/soc-2006-file-loggers/console/gntgaim.c 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,187 @@ +#include "account.h" +#include "conversation.h" +#include "core.h" +#include "debug.h" +#include "eventloop.h" +#include "ft.h" +#include "log.h" +#include "notify.h" +#include "prefs.h" +#include "prpl.h" +#include "pounce.h" +#include "savedstatuses.h" +#include "sound.h" +#include "status.h" +#include "util.h" +#include "whiteboard.h" + +#include "gntgaim.h" + +/* Anything IO-related is directly copied from gtkgaim's source tree */ + +static GaimCoreUiOps core_ops = +{ + NULL, /*gaim_gtk_prefs_init,*/ + NULL, /*debug_init,*/ + NULL, /*gaim_gtk_ui_init,*/ + NULL, /*gaim_gtk_quit*/ +}; + +static GaimCoreUiOps * +gnt_core_get_ui_ops() +{ + return &core_ops; +} + +#define GAIM_GTK_READ_COND (G_IO_IN | G_IO_HUP | G_IO_ERR) +#define GAIM_GTK_WRITE_COND (G_IO_OUT | G_IO_HUP | G_IO_ERR | G_IO_NVAL) + +typedef struct _GaimGtkIOClosure { + GaimInputFunction function; + guint result; + gpointer data; + +} GaimGtkIOClosure; + +static void gaim_gtk_io_destroy(gpointer data) +{ + g_free(data); +} + +static gboolean gaim_gtk_io_invoke(GIOChannel *source, GIOCondition condition, gpointer data) +{ + GaimGtkIOClosure *closure = data; + GaimInputCondition gaim_cond = 0; + + if (condition & GAIM_GTK_READ_COND) + gaim_cond |= GAIM_INPUT_READ; + if (condition & GAIM_GTK_WRITE_COND) + gaim_cond |= GAIM_INPUT_WRITE; + +#if 0 + gaim_debug(GAIM_DEBUG_MISC, "gtk_eventloop", + "CLOSURE: callback for %d, fd is %d\n", + closure->result, g_io_channel_unix_get_fd(source)); +#endif + +#ifdef _WIN32 + if(! gaim_cond) { +#if DEBUG + gaim_debug(GAIM_DEBUG_MISC, "gtk_eventloop", + "CLOSURE received GIOCondition of 0x%x, which does not" + " match 0x%x (READ) or 0x%x (WRITE)\n", + condition, GAIM_GTK_READ_COND, GAIM_GTK_WRITE_COND); +#endif /* DEBUG */ + + return TRUE; + } +#endif /* _WIN32 */ + + closure->function(closure->data, g_io_channel_unix_get_fd(source), + gaim_cond); + + return TRUE; +} + +static guint gnt_input_add(gint fd, GaimInputCondition condition, GaimInputFunction function, + gpointer data) +{ + GaimGtkIOClosure *closure = g_new0(GaimGtkIOClosure, 1); + GIOChannel *channel; + GIOCondition cond = 0; + + closure->function = function; + closure->data = data; + + if (condition & GAIM_INPUT_READ) + cond |= GAIM_GTK_READ_COND; + if (condition & GAIM_INPUT_WRITE) + cond |= GAIM_GTK_WRITE_COND; + + channel = g_io_channel_unix_new(fd); + closure->result = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, cond, + gaim_gtk_io_invoke, closure, gaim_gtk_io_destroy); + +#if 0 + gaim_debug(GAIM_DEBUG_MISC, "gtk_eventloop", + "CLOSURE: adding input watcher %d for fd %d\n", + closure->result, fd); +#endif + + g_io_channel_unref(channel); + return closure->result; +} + +static GaimEventLoopUiOps eventloop_ops = +{ + g_timeout_add, + (guint (*)(guint))g_source_remove, + gnt_input_add, + (guint (*)(guint))g_source_remove +}; + +GaimEventLoopUiOps * +gnt_eventloop_get_ui_ops(void) +{ + return &eventloop_ops; +} + +/* This is mostly copied from gtkgaim's source tree */ +static void +init_libgaim() +{ + char *path; + + gaim_debug_set_enabled(FALSE); + + gaim_core_set_ui_ops(gnt_core_get_ui_ops()); + gaim_eventloop_set_ui_ops(gnt_eventloop_get_ui_ops()); + + gaim_util_set_user_dir("/tmp/tmp/"); /* XXX: */ + + path = g_build_filename(gaim_user_dir(), "plugins", NULL); + gaim_plugins_add_search_path(path); + g_free(path); + gaim_plugins_add_search_path("/usr/local/lib/gaim"); /* XXX: */ + + if (!gaim_core_init(GAIM_GNT_UI)) + { + fprintf(stderr, "OOPSSS!!\n"); + abort(); + } + + /* TODO: Move blist loading into gaim_blist_init() */ + gaim_set_blist(gaim_blist_new()); + gaim_blist_load(); + + /* TODO: Move prefs loading into gaim_prefs_init() */ + gaim_prefs_load(); + gaim_prefs_update_old(); + + /* load plugins we had when we quit */ + gaim_plugins_load_saved("/gaim/gtk/plugins/loaded"); + + /* TODO: Move pounces loading into gaim_pounces_init() */ + gaim_pounces_load(); + +} + +int main(int argc, char **argv) +{ + /* XXX: Don't puke */ + freopen("/dev/null", "w", stderr); + + /* Initialize the libgaim stuff */ + init_libgaim(); + + /* Enable the accounts and restore the status */ + gaim_accounts_restore_current_statuses(); + + /* Initialize the UI */ + init_gnt_ui(); + + gaim_core_quit(); + + return 0; +} + Property changes on: branches/soc-2006-file-loggers/console/gntgaim.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/gntgaim.h =================================================================== --- branches/soc-2006-file-loggers/console/gntgaim.h (rev 0) +++ branches/soc-2006-file-loggers/console/gntgaim.h 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,5 @@ +#include <glib.h> + +#define GAIM_GNT_UI "gnt-gaim" + +#define _(x) x Property changes on: branches/soc-2006-file-loggers/console/gntgaim.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/gntui.c =================================================================== --- branches/soc-2006-file-loggers/console/gntui.c (rev 0) +++ branches/soc-2006-file-loggers/console/gntui.c 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,17 @@ +#include "gntui.h" + +void init_gnt_ui() +{ + gnt_init(); + + wbkgdset(stdscr, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); + werase(stdscr); + wrefresh(stdscr); + + /* Initialize the buddy list */ + gg_blist_init(); + gaim_blist_set_ui_ops(gg_blist_get_ui_ops()); + + gnt_main(); +} + Property changes on: branches/soc-2006-file-loggers/console/gntui.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/gntui.h =================================================================== --- branches/soc-2006-file-loggers/console/gntui.h (rev 0) +++ branches/soc-2006-file-loggers/console/gntui.h 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,3 @@ +#include "gnt.h" + +void init_gnt_ui(); Property changes on: branches/soc-2006-file-loggers/console/gntui.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/Makefile =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/Makefile (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/Makefile 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,58 @@ +CFLAGS=`pkg-config --cflags gobject-2.0` -g +LDFLAGS=`pkg-config --libs gobject-2.0` -lncursesw + +HEADERS = \ + gntwidget.h \ + gntbox.h \ + gntbutton.h \ + gntcolors.h \ + gntentry.h \ + gntlabel.h \ + gnttree.h \ + gntutils.h \ + gnt.h + +SOURCES = \ + gntwidget.c \ + gntbox.c \ + gntbutton.c \ + gntcolors.c \ + gntentry.c \ + gntlabel.c \ + gnttree.c \ + gntutils.c \ + gntmain.c + +OBJECTS = \ + gntwidget.o \ + gntbox.o \ + gntbutton.o \ + gntcolors.o \ + gntentry.o \ + gntlabel.o \ + gnttree.o \ + gntutils.o \ + gntmain.o + +all: libgnt + +test2: $(OBJECTS) +key: $(OBJECTS) + +gntwidget.o: gntwidget.c $(HEADERS) +gntbox.o: gntbox.c $(HEADERS) +gntbutton.o: gntbutton.c $(HEADERS) +gntcolors.o: gntcolors.c $(HEADERS) +gntentry.o: gntentry.c $(HEADERS) +gntlabel.o: gntlabel.c $(HEADERS) +gnttree.o: gnttree.c $(HEADERS) +gntutils.o: gntutils.c $(HEADERS) +gntmain.o: gntmain.c $(HEADERS) + +libgnt: $(OBJECTS) + $(CC) --shared -o libgnt.so $(OBJECTS) + +clean: + rm *.o + rm libgnt.so + Property changes on: branches/soc-2006-file-loggers/console/libgnt/Makefile ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gnt-skel.c =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gnt-skel.c (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gnt-skel.c 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,99 @@ +#include "gnt-skel.h" + +enum +{ + SIGS = 1, +}; + +static GntWidgetClass *parent_class = NULL; +static guint signals[SIGS] = { 0 }; + +static void +gnt_skel_draw(GntWidget *widget) +{ + DEBUG; +} + +static void +gnt_skel_size_request(GntWidget *widget) +{ +} + +static void +gnt_skel_map(GntWidget *widget) +{ + if (widget->priv.width == 0 || widget->priv.height == 0) + gnt_widget_size_request(widget); + DEBUG; +} + +static gboolean +gnt_skel_key_pressed(GntWidget *widget, const char *text) +{ + return FALSE; +} + +static void +gnt_skel_destroy(GntWidget *widget) +{ +} + +static void +gnt_skel_class_init(GntSkelClass *klass) +{ + GObjectClass *obj_class = G_OBJECT_CLASS(klass); + + parent_class = GNT_WIDGET_CLASS(klass); + parent_class->destroy = gnt_skel_destroy; + parent_class->draw = gnt_skel_draw; + parent_class->map = gnt_skel_map; + parent_class->size_request = gnt_skel_size_request; + parent_class->key_pressed = gnt_skel_key_pressed; + + DEBUG; +} + +static void +gnt_skel_init(GTypeInstance *instance, gpointer class) +{ + DEBUG; +} + +/****************************************************************************** + * GntSkel API + *****************************************************************************/ +GType +gnt_skel_get_gtype(void) +{ + static GType type = 0; + + if(type == 0) + { + static const GTypeInfo info = { + sizeof(GntSkelClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc)gnt_skel_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof(GntSkel), + 0, /* n_preallocs */ + gnt_skel_init, /* instance_init */ + }; + + type = g_type_register_static(GNT_TYPE_WIDGET, + "GntSkel", + &info, 0); + } + + return type; +} + +GntWidget *gnt_skel_new() +{ + GntWidget *widget = g_object_new(GNT_TYPE_SKEL, NULL); + GntSkel *skel = GNT_SKEL(widget); + + return widget; +} + Property changes on: branches/soc-2006-file-loggers/console/libgnt/gnt-skel.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gnt-skel.h =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gnt-skel.h (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gnt-skel.h 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,47 @@ +#ifndef GNT_SKEL_H +#define GNT_SKEL_H + +#include "gntwidget.h" +#include "gnt.h" +#include "gntcolors.h" +#include "gntkeys.h" + +#define GNT_TYPE_SKEL (gnt_skel_get_gtype()) +#define GNT_SKEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_SKEL, GntSkel)) +#define GNT_SKEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_SKEL, GntSkelClass)) +#define GNT_IS_SKEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_SKEL)) +#define GNT_IS_SKEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_SKEL)) +#define GNT_SKEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_SKEL, GntSkelClass)) + +#define GNT_SKEL_FLAGS(obj) (GNT_SKEL(obj)->priv.flags) +#define GNT_SKEL_SET_FLAGS(obj, flags) (GNT_SKEL_FLAGS(obj) |= flags) +#define GNT_SKEL_UNSET_FLAGS(obj, flags) (GNT_SKEL_FLAGS(obj) &= ~(flags)) + +typedef struct _GnSkel GntSkel; +typedef struct _GnSkelPriv GntSkelPriv; +typedef struct _GnSkelClass GntSkelClass; + +struct _GnSkel +{ + GntWidget parent; +}; + +struct _GnSkelClass +{ + GntWidgetClass parent; + + void (*gnt_reserved1)(void); + void (*gnt_reserved2)(void); + void (*gnt_reserved3)(void); + void (*gnt_reserved4)(void); +}; + +G_BEGIN_DECLS + +GType gnt_skel_get_gtype(void); + +GntWidget *gnt_skel_new(); + +G_END_DECLS + +#endif /* GNT_SKEL_H */ Property changes on: branches/soc-2006-file-loggers/console/libgnt/gnt-skel.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gnt.h =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gnt.h (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gnt.h 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,17 @@ +#include <glib.h> +#include "gntwidget.h" +#include "gntcolors.h" +#include "gntkeys.h" + +/* XXX: Find a better place for this */ +#define SCROLL_HEIGHT 4096 +#define SCROLL_WIDTH 512 + +void gnt_init(); + +void gnt_main(); + +void gnt_screen_take_focus(GntWidget *widget); + +void gnt_screen_remove_widget(GntWidget *widget); + Property changes on: branches/soc-2006-file-loggers/console/libgnt/gnt.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gntbox.c =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntbox.c (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gntbox.c 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,362 @@ +#include "gntbox.h" + +enum +{ + SIGS = 1, +}; + +static GntWidgetClass *parent_class = NULL; +static guint signals[SIGS] = { 0 }; + +static void +gnt_box_draw(GntWidget *widget) +{ + GntBox *box = GNT_BOX(widget); + GList *iter; + + for (iter = box->list; iter; iter = iter->next) + { + gnt_widget_draw(GNT_WIDGET(iter->data)); + } + + if (box->title) + { + gchar *title = g_strdup(box->title); + int pos = g_utf8_strlen(title, -1); + + if (pos >= widget->priv.width - 2) + { + g_utf8_strncpy(title, box->title, widget->priv.width - 2); + pos = 1; + } + else + { + /* XXX: Position of the title might be configurable */ + pos = (widget->priv.width - pos) / 2; + } + wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_TITLE)); + mvwprintw(widget->window, 0, pos, title); + g_free(title); + } + wrefresh(widget->window); + + DEBUG; +} + +static void +reposition_children(GntWidget *widget) +{ + GList *iter; + GntBox *box = GNT_BOX(widget); + int w, h, curx, cury, max; + gboolean has_border = FALSE; + + w = h = 0; + max = -1; + curx = widget->priv.x; + cury = widget->priv.y; + if (!(GNT_WIDGET_FLAGS(widget) & GNT_WIDGET_NO_BORDER)) + { + has_border = TRUE; + curx += 1; + cury += 1; + } + + for (iter = box->list; iter; iter = iter->next) + { + gnt_widget_set_position(GNT_WIDGET(iter->data), curx, cury); + gnt_widget_get_size(GNT_WIDGET(iter->data), &w, &h); + if (box->vertical) + { + cury += h + box->pad; + if (max < w) + max = w; + } + else + { + curx += w + box->pad; + if (max < h) + max = h; + } + } + + if (has_border) + { + curx += 1; + cury += 1; + max += 2; + } + + if (box->vertical) + { + widget->priv.width = max; + widget->priv.height = cury - widget->priv.y; + } + else + { + widget->priv.width = curx - widget->priv.x; + widget->priv.height = max; + } +} + +static void +gnt_box_set_position(GntWidget *widget, int x, int y) +{ + gnt_widget_size_request(widget); + reposition_children(widget); +} + +static void +gnt_box_size_request(GntWidget *widget) +{ + GntBox *box = GNT_BOX(widget); + GList *iter; + + g_list_foreach(box->list, (GFunc)gnt_widget_size_request, NULL); + + if (box->homogeneous) + { + int max = -1, w, h; + + /* XXX: should probably be changed based on vertical-ness */ + for (iter = box->list; iter; iter = iter->next) + { + gnt_widget_get_size(GNT_WIDGET(iter->data), &w, NULL); + if (max < w) + max = w; + } + + for (iter = box->list; iter; iter = iter->next) + { + gnt_widget_get_size(GNT_WIDGET(iter->data), NULL, &h); + gnt_widget_set_size(GNT_WIDGET(iter->data), max, h); + } + } + + reposition_children(widget); +} + +static void +gnt_box_map(GntWidget *widget) +{ + if (widget->priv.width == 0 || widget->priv.height == 0) + gnt_widget_size_request(widget); + DEBUG; +} + +/* Ensures that the current widget can take focus */ +static void +ensure_active(GntBox *box) +{ + int investigated = 0; + int total; + + if (box->active == NULL) + box->active = box->list; + + total = g_list_length(box->list); + + while (box->active && !GNT_WIDGET_IS_FLAG_SET(box->active->data, GNT_WIDGET_CAN_TAKE_FOCUS)) + { + box->active = box->active->next; + investigated++; + } + + /* Rotate if necessary */ + if (!box->active && investigated < total) + { + box->active = box->list; + while (investigated < total && !GNT_WIDGET_IS_FLAG_SET(box->active->data, GNT_WIDGET_CAN_TAKE_FOCUS)) + { + box->active = box->active->next; + investigated++; + } + } +} + +static gboolean +gnt_box_key_pressed(GntWidget *widget, const char *text) +{ + GntBox *box = GNT_BOX(widget); + + ensure_active(box); + if (box->active == NULL) + return FALSE; + + if (gnt_widget_key_pressed(box->active->data, text)) + return TRUE; + + if (text[0] == 27) + { + GList *now = NULL; + if (strcmp(text+1, GNT_KEY_LEFT) == 0) + { + now = box->active->prev; + if (now == NULL) + now = g_list_last(box->list); + } + else if (strcmp(text+1, GNT_KEY_RIGHT) == 0) + { + now = box->active->next; + if (now == NULL) + now = box->list; + } + + if (now) + { + gnt_widget_set_focus(box->active->data, FALSE); + box->active = now; + gnt_widget_set_focus(box->active->data, TRUE); + + return TRUE; + } + } + + return FALSE; +} + +static GntWidget *find_focused_widget(GntBox *box) +{ + GList *iter; + + for (iter = box->list; iter; iter = iter->next) + { + GntWidget *w = iter->data; + + if (GNT_IS_BOX(w)) + { + if ((w = find_focused_widget(GNT_BOX(w))) != NULL) + return w; + } + else + { + if (GNT_WIDGET_IS_FLAG_SET(w, GNT_WIDGET_CAN_TAKE_FOCUS) && + GNT_WIDGET_IS_FLAG_SET(w, GNT_WIDGET_HAS_FOCUS)) + return w; + } + } + return NULL; +} + +static void +gnt_box_lost_focus(GntWidget *widget) +{ + GntBox *box = GNT_BOX(widget); + GntWidget *p = widget; + + while (p->parent) + p = p->parent; + + p = find_focused_widget(GNT_BOX(p)); + if (p) + gnt_widget_set_focus(p, FALSE); +} + +static void +gnt_box_destroy(GntWidget *w) +{ + GntBox *box = GNT_BOX(w); + GList *iter; + + for (iter = box->list; iter; iter = iter->next) + { + gnt_widget_destroy(iter->data); + } + + g_list_free(box->list); +} + +static void +gnt_box_class_init(GntBoxClass *klass) +{ + GObjectClass *obj_class = G_OBJECT_CLASS(klass); + + parent_class = GNT_WIDGET_CLASS(klass); + parent_class->destroy = gnt_box_destroy; + parent_class->draw = gnt_box_draw; + parent_class->map = gnt_box_map; + parent_class->size_request = gnt_box_size_request; + parent_class->set_position = gnt_box_set_position; + parent_class->key_pressed = gnt_box_key_pressed; + parent_class->lost_focus = gnt_box_lost_focus; + + DEBUG; +} + +static void +gnt_box_init(GTypeInstance *instance, gpointer class) +{ + DEBUG; +} + +/****************************************************************************** + * GntBox API + *****************************************************************************/ +GType +gnt_box_get_gtype(void) +{ + static GType type = 0; + + if(type == 0) + { + static const GTypeInfo info = { + sizeof(GntBoxClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc)gnt_box_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof(GntBox), + 0, /* n_preallocs */ + gnt_box_init, /* instance_init */ + }; + + type = g_type_register_static(GNT_TYPE_WIDGET, + "GntBox", + &info, 0); + } + + return type; +} + +GntWidget *gnt_box_new(gboolean homo, gboolean vert) +{ + GntWidget *widget = g_object_new(GNT_TYPE_BOX, NULL); + GntBox *box = GNT_BOX(widget); + + box->homogeneous = homo; + box->vertical = vert; + box->pad = 1; + gnt_widget_set_take_focus(widget, TRUE); + GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); + + return widget; +} + +void gnt_box_add_widget(GntBox *b, GntWidget *widget) +{ + b->list = g_list_append(b->list, widget); + widget->parent = GNT_WIDGET(b); +} + +void gnt_box_set_title(GntBox *b, const char *title) +{ + g_free(b->title); + b->title = g_strdup(title); +} + +void gnt_box_set_pad(GntBox *box, int pad) +{ + box->pad = pad; + /* XXX: Perhaps redraw if already showing? */ +} + +void gnt_box_set_toplevel(GntBox *box, gboolean set) +{ + GntWidget *widget = GNT_WIDGET(box); + if (set) + GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); + else + GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); +} + Property changes on: branches/soc-2006-file-loggers/console/libgnt/gntbox.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gntbox.h =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntbox.h (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gntbox.h 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,63 @@ +#ifndef GNT_BOX_H +#define GNT_BOX_H + +#include "gnt.h" +#include "gntwidget.h" + +#define GNT_TYPE_BOX (gnt_box_get_gtype()) +#define GNT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_BOX, GntBox)) +#define GNT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_BOX, GntBoxClass)) +#define GNT_IS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_BOX)) +#define GNT_IS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_BOX)) +#define GNT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BOX, GntBoxClass)) + +typedef struct _GnBox GntBox; +typedef struct _GnBoxClass GntBoxClass; + +struct _GnBox +{ + GntWidget parent; + + gboolean vertical; + gboolean homogeneous; + GList *list; /* List of widgets */ + + GList *active; + int pad; /* Number of spaces to use between widgets */ + + char *title; + + void (*gnt_reserved1)(void); + void (*gnt_reserved2)(void); + void (*gnt_reserved3)(void); + void (*gnt_reserved4)(void); +}; + +struct _GnBoxClass +{ + GntWidgetClass parent; + + void (*gnt_reserved1)(void); + void (*gnt_reserved2)(void); + void (*gnt_reserved3)(void); + void (*gnt_reserved4)(void); +}; + +G_BEGIN_DECLS + +GType gnt_box_get_gtype(void); + +GntWidget *gnt_box_new(gboolean homo, gboolean vert); + +void gnt_box_add_widget(GntBox *box, GntWidget *widget); + +void gnt_box_set_title(GntBox *box, const char *title); + +void gnt_box_set_pad(GntBox *box, int pad); + +void gnt_box_set_toplevel(GntBox *box, gboolean set); + +G_END_DECLS + +#endif /* GNT_BOX_H */ + Property changes on: branches/soc-2006-file-loggers/console/libgnt/gntbox.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gntbutton.c =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntbutton.c (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gntbutton.c 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,116 @@ +#include "gntbutton.h" + +enum +{ + SIGS = 1, +}; + +static GntWidgetClass *parent_class = NULL; +static guint signals[SIGS] = { 0 }; + +static void +gnt_button_draw(GntWidget *widget) +{ + GntButton *button = GNT_BUTTON(widget); + GntColorType type; + + if (GNT_WIDGET_FLAGS(widget) & GNT_WIDGET_HAS_FOCUS) + type = GNT_COLOR_HIGHLIGHT; + else + type = GNT_COLOR_NORMAL; + wbkgdset(widget->window, '\0' | COLOR_PAIR(type)); + mvwprintw(widget->window, 1, 1, button->priv->text); + + wrefresh(widget->window); + + DEBUG; +} + +static void +gnt_button_size_request(GntWidget *widget) +{ + GntButton *button = GNT_BUTTON(widget); + widget->priv.width = g_utf8_strlen(button->priv->text, -1) + 2; + widget->priv.height = 3; +} + +static void +gnt_button_map(GntWidget *widget) +{ + if (widget->priv.width == 0 || widget->priv.height == 0) + gnt_widget_size_request(widget); + DEBUG; +} + +static gboolean +gnt_button_key_pressed(GntWidget *widget, const char *key) +{ + if (strcmp(key, GNT_KEY_ENTER) == 0) + { + gnt_widget_activate(widget); + return TRUE; + } + return FALSE; +} + +static void +gnt_button_class_init(GntWidgetClass *klass) +{ + GObjectClass *obj_class = G_OBJECT_CLASS(klass); + + parent_class = GNT_WIDGET_CLASS(klass); + parent_class->draw = gnt_button_draw; + parent_class->map = gnt_button_map; + parent_class->size_request = gnt_button_size_request; + parent_class->key_pressed = gnt_button_key_pressed; + + DEBUG; +} + +static void +gnt_button_init(GTypeInstance *instance, gpointer class) +{ + GntButton *button = GNT_BUTTON(instance); + button->priv = g_new0(GntButtonPriv, 1); + DEBUG; +} + +/****************************************************************************** + * GntButton API + *****************************************************************************/ +GType +gnt_button_get_gtype(void) { + static GType type = 0; + + if(type == 0) { + static const GTypeInfo info = { + sizeof(GntButtonClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc)gnt_button_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof(GntButton), + 0, /* n_preallocs */ + gnt_button_init, /* instance_init */ + }; + + type = g_type_register_static(GNT_TYPE_WIDGET, + "GntButton", + &info, 0); + } + + return type; +} + +GntWidget *gnt_button_new(const char *text) +{ + GntWidget *widget = g_object_new(GNT_TYPE_BUTTON, NULL); + GntButton *button = GNT_BUTTON(widget); + + button->priv->text = g_strdup(text); + gnt_widget_set_take_focus(widget, TRUE); + + return widget; +} + Property changes on: branches/soc-2006-file-loggers/console/libgnt/gntbutton.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gntbutton.h =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntbutton.h (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gntbutton.h 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,55 @@ +#ifndef GNT_BUTTON_H +#define GNT_BUTTON_H + +#include <glib.h> +#include <glib-object.h> +#include "gnt.h" +#include "gntwidget.h" + +#define GNT_TYPE_BUTTON (gnt_button_get_gtype()) +#define GNT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_BUTTON, GntButton)) +#define GNT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_BUTTON, GntButtonClass)) +#define GNT_IS_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_BUTTON)) +#define GNT_IS_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_BUTTON)) +#define GNT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BUTTON, GntButtonClass)) + +typedef struct _GnButton GntButton; +typedef struct _GnButtonPriv GntButtonPriv; +typedef struct _GnButtonClass GntButtonClass; + +struct _GnButtonPriv +{ + char *text; +}; + +struct _GnButton +{ + GntWidget parent; + + GntButtonPriv *priv; + + void (*gnt_reserved1)(void); + void (*gnt_reserved2)(void); + void (*gnt_reserved3)(void); + void (*gnt_reserved4)(void); +}; + +struct _GnButtonClass +{ + GntWidgetClass parent; + + void (*gnt_reserved1)(void); + void (*gnt_reserved2)(void); + void (*gnt_reserved3)(void); + void (*gnt_reserved4)(void); +}; + +G_BEGIN_DECLS + +GType gnt_button_get_gtype(void); + +GntWidget *gnt_button_new(const char *text); + +G_END_DECLS + +#endif /* GNT_BUTTON_H */ Property changes on: branches/soc-2006-file-loggers/console/libgnt/gntbutton.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gntcolors.c =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntcolors.c (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gntcolors.c 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,33 @@ +#include <ncursesw/ncurses.h> +#include "gntcolors.h" + +void gnt_init_colors() +{ + if (can_change_color()) + { + /* XXX: Do some init_color()s */ + init_color(GNT_COLOR_BLACK, 0, 0, 0); + init_color(GNT_COLOR_RED, 1000, 0, 0); + init_color(GNT_COLOR_GREEN, 0, 1000, 0); + init_color(GNT_COLOR_BLUE, 0, 0, 1000); + init_color(GNT_COLOR_WHITE, 1000, 1000, 1000); + init_color(GNT_COLOR_GRAY, 799, 799, 799); + init_color(GNT_COLOR_DARK_GRAY, 256, 256, 256); + + /* Now some init_pair()s */ + init_pair(GNT_COLOR_NORMAL, GNT_COLOR_BLACK, GNT_COLOR_WHITE); + init_pair(GNT_COLOR_HIGHLIGHT, GNT_COLOR_BLUE, GNT_COLOR_GRAY); + init_pair(GNT_COLOR_SHADOW, GNT_COLOR_BLACK, GNT_COLOR_DARK_GRAY); + init_pair(GNT_COLOR_TITLE, GNT_COLOR_WHITE, GNT_COLOR_DARK_GRAY); + init_pair(GNT_COLOR_TEXT_NORMAL, GNT_COLOR_BLACK, GNT_COLOR_GRAY); + } + else + { + init_pair(GNT_COLOR_NORMAL, COLOR_BLACK, COLOR_WHITE); + init_pair(GNT_COLOR_HIGHLIGHT, COLOR_CYAN, COLOR_BLACK); + init_pair(GNT_COLOR_SHADOW, COLOR_BLACK, COLOR_BLACK); + init_pair(GNT_COLOR_TITLE, COLOR_WHITE, COLOR_BLACK); + init_pair(GNT_COLOR_TEXT_NORMAL, COLOR_BLACK, COLOR_WHITE); + } +} + Property changes on: branches/soc-2006-file-loggers/console/libgnt/gntcolors.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gntcolors.h =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntcolors.h (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gntcolors.h 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,34 @@ +#ifndef GNT_COLORS_H +#define GNT_COLORS_H + +typedef enum +{ + GNT_COLOR_NORMAL = 1, + GNT_COLOR_HIGHLIGHT, /* eg. when a button is selected */ + GNT_COLOR_DISABLED, /* eg. when a button is disabled */ + GNT_COLOR_HIGHLIGHT_D, /* eg. when a button is selected, but some other window is in focus */ + GNT_COLOR_TEXT_NORMAL, + GNT_COLOR_TEXT_INACTIVE, /* when the entry is out of focus */ + GNT_COLOR_MNEMONIC, + GNT_COLOR_MNEMONIC_D, + GNT_COLOR_SHADOW, + GNT_COLOR_TITLE, + GNT_COLORS +} GntColorType; + +enum +{ + GNT_COLOR_BLACK = 1, + GNT_COLOR_RED, + GNT_COLOR_GREEN, + GNT_COLOR_BLUE, + GNT_COLOR_WHITE, + GNT_COLOR_GRAY, + GNT_COLOR_DARK_GRAY, + GNT_TOTAL_COLORS +}; + +/* populate some default colors */ +void gnt_init_colors(); + +#endif Property changes on: branches/soc-2006-file-loggers/console/libgnt/gntcolors.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gntentry.c =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntentry.c (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gntentry.c 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,251 @@ +#include <string.h> +#include "gntentry.h" + +enum +{ + SIGS = 1, +}; + +static GntWidgetClass *parent_class = NULL; +static guint signals[SIGS] = { 0 }; + +static void +gnt_entry_draw(GntWidget *widget) +{ + GntEntry *entry = GNT_ENTRY(widget); + int stop; + + wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_TEXT_NORMAL)); + mvwprintw(widget->window, 0, 0, entry->scroll); + + stop = entry->end - entry->scroll; + if (stop < widget->priv.width) + mvwhline(widget->window, 0, stop, ENTRY_CHAR, widget->priv.width - stop); + + wrefresh(widget->window); + + DEBUG; +} + +static void +gnt_entry_size_request(GntWidget *widget) +{ + GntEntry *entry = GNT_ENTRY(widget); + widget->priv.height = 1; + widget->priv.width = 20; +} + +static void +gnt_entry_map(GntWidget *widget) +{ + if (widget->priv.width == 0 || widget->priv.height == 0) + gnt_widget_size_request(widget); + DEBUG; +} + +static gboolean +gnt_entry_key_pressed(GntWidget *widget, const char *text) +{ + GntEntry *entry = GNT_ENTRY(widget); + + if (text[0] == 27) + { + if (strcmp(text + 1, GNT_KEY_DEL) == 0 && entry->cursor < entry->end) + { + memmove(entry->cursor, entry->cursor + 1, entry->end - entry->cursor + 1); + entry->end--; + gnt_entry_draw(widget); + } + else if (strcmp(text + 1, GNT_KEY_LEFT) == 0 && entry->cursor > entry->start) + { + entry->cursor--; + if (entry->cursor < entry->scroll) + entry->scroll--; + gnt_entry_draw(widget); + } + else if (strcmp(text + 1, GNT_KEY_RIGHT) == 0 && entry->cursor < entry->end) + { + entry->cursor++; + if (entry->cursor - entry->scroll > widget->priv.width) + entry->scroll++; + gnt_entry_draw(widget); + } + /* XXX: handle other keys, like home/end, and ctrl+ goodness */ + } + else + { + if (!iscntrl(text[0])) + { + int i; + + for (i = 0; text[i]; i++) + { + /* Valid input? */ + if (ispunct(text[i]) && (entry->flag & GNT_ENTRY_FLAG_NO_PUNCT)) + continue; + if (isspace(text[i]) && (entry->flag & GNT_ENTRY_FLAG_NO_SPACE)) + continue; + if (isalpha(text[i]) && !(entry->flag & GNT_ENTRY_FLAG_ALPHA)) + continue; + if (isdigit(text[i]) && !(entry->flag & GNT_ENTRY_FLAG_INT)) + continue; + + /* Reached the max? */ + if (entry->max && entry->end - entry->start >= entry->max) + continue; + + if (entry->end - entry->start >= entry->buffer) + { + char *tmp = g_strdup_printf(entry->start); + gnt_entry_set_text(entry, tmp); + g_free(tmp); + } + + *(entry->cursor) = text[i]; + entry->cursor++; + + entry->end++; + if (entry->cursor - entry->scroll > widget->priv.width) + entry->scroll++; + } + gnt_entry_draw(widget); + } + else + { + /* Backspace is here */ + if (strcmp(text, GNT_KEY_BACKSPACE) == 0 && entry->cursor > entry->start) + { + entry->cursor--; + memmove(entry->cursor, entry->cursor + 1, entry->end - entry->cursor); + entry->end--; + + if (entry->scroll > entry->start) + entry->scroll--; + + gnt_entry_draw(widget); + } + } + } + + return FALSE; +} + +static void +gnt_entry_destroy(GntWidget *widget) +{ + GntEntry *entry = GNT_ENTRY(widget); + g_free(entry->start); +} + +static void +gnt_entry_class_init(GntEntryClass *klass) +{ + GObjectClass *obj_class = G_OBJECT_CLASS(klass); + + parent_class = GNT_WIDGET_CLASS(klass); + parent_class->destroy = gnt_entry_destroy; + parent_class->draw = gnt_entry_draw; + parent_class->map = gnt_entry_map; + parent_class->size_request = gnt_entry_size_request; + parent_class->key_pressed = gnt_entry_key_pressed; + + DEBUG; +} + +static void +gnt_entry_init(GTypeInstance *instance, gpointer class) +{ + GntEntry *entry = GNT_ENTRY(instance); + + entry->flag = GNT_ENTRY_FLAG_ALL; + entry->max = 0; + + GNT_WIDGET_SET_FLAGS(GNT_WIDGET(entry), + GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW | GNT_WIDGET_CAN_TAKE_FOCUS); + + DEBUG; +} + +/****************************************************************************** + * GntEntry API + *****************************************************************************/ +GType +gnt_entry_get_gtype(void) +{ + static GType type = 0; + + if(type == 0) + { + static const GTypeInfo info = { + sizeof(GntEntryClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc)gnt_entry_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof(GntEntry), + 0, /* n_preallocs */ + gnt_entry_init, /* instance_init */ + }; + + type = g_type_register_static(GNT_TYPE_WIDGET, + "GntEntry", + &info, 0); + } + + return type; +} + +GntWidget *gnt_entry_new(const char *text) +{ + GntWidget *widget = g_object_new(GNT_TYPE_ENTRY, NULL); + GntEntry *entry = GNT_ENTRY(widget); + + gnt_entry_set_text(entry, text); + + return widget; +} + +void gnt_entry_set_text(GntEntry *entry, const char *text) +{ + int len; + int scroll, cursor; + + g_free(entry->start); + + if (text && text[0]) + { + len = g_utf8_strlen(text, -1); + entry->buffer = len * 2; + } + else + { + entry->buffer = 128; + len = 0; + } + + scroll = entry->scroll - entry->start; + cursor = entry->end - entry->cursor; + + entry->start = g_new0(char, entry->buffer); + if (text) + snprintf(entry->start, len + 1, "%s", text); + entry->end = entry->start + len; + + entry->scroll = entry->start + scroll; + entry->cursor = entry->end - cursor; + + /* XXX: redraw if necessary? */ +} + +void gnt_entry_set_max(GntEntry *entry, int max) +{ + entry->max = max; +} + +void gnt_entry_set_flag(GntEntry *entry, GntEntryFlag flag) +{ + entry->flag = flag; + /* XXX: Check the existing string to make sure the flags are respected? */ +} + Property changes on: branches/soc-2006-file-loggers/console/libgnt/gntentry.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gntentry.h =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntentry.h (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gntentry.h 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,78 @@ +#ifndef GNT_ENTRY_H +#define GNT_ENTRY_H + +#include "gntwidget.h" +#include "gnt.h" +#include "gntcolors.h" +#include "gntkeys.h" + +#define GNT_TYPE_ENTRY (gnt_entry_get_gtype()) +#define GNT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_ENTRY, GntEntry)) +#define GNT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_ENTRY, GntEntryClass)) +#define GNT_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_ENTRY)) +#define GNT_IS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_ENTRY)) +#define GNT_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_ENTRY, GntEntryClass)) + +#define GNT_ENTRY_FLAGS(obj) (GNT_ENTRY(obj)->priv.flags) +#define GNT_ENTRY_SET_FLAGS(obj, flags) (GNT_ENTRY_FLAGS(obj) |= flags) +#define GNT_ENTRY_UNSET_FLAGS(obj, flags) (GNT_ENTRY_FLAGS(obj) &= ~(flags)) + +#define ENTRY_CHAR '_' /* The character to use to fill in the blank places */ + +typedef struct _GnEntry GntEntry; +typedef struct _GnEntryPriv GntEntryPriv; +typedef struct _GnEntryClass GntEntryClass; + +typedef enum +{ + GNT_ENTRY_FLAG_ALPHA = 1 << 0, /* Only alpha */ + GNT_ENTRY_FLAG_INT = 1 << 1, /* Only integer */ + GNT_ENTRY_FLAG_NO_SPACE = 1 << 2, /* No blank space is allowed */ + GNT_ENTRY_FLAG_NO_PUNCT = 1 << 3, /* No punctuations */ + GNT_ENTRY_FLAG_MASK = 1 << 4, /* Mask the inputs */ +} GntEntryFlag; + +#define GNT_ENTRY_FLAG_ALL (GNT_ENTRY_FLAG_ALPHA | GNT_ENTRY_FLAG_INT) + +struct _GnEntry +{ + GntWidget parent; + + GntEntryFlag flag; + + char *start; + char *end; + char *scroll; /* Current scrolling position */ + char *cursor; /* Cursor location */ + /* 0 <= cursor - scroll < widget-width */ + + size_t buffer; /* Size of the buffer */ + + int max; /* 0 means infinite */ +}; + +struct _GnEntryClass +{ + GntWidgetClass parent; + + void (*gnt_reserved1)(void); + void (*gnt_reserved2)(void); + void (*gnt_reserved3)(void); + void (*gnt_reserved4)(void); +}; + +G_BEGIN_DECLS + +GType gnt_entry_get_gtype(void); + +GntWidget *gnt_entry_new(const char *text); + +void gnt_entry_set_max(GntEntry *entry, int max); + +void gnt_entry_set_text(GntEntry *entry, const char *text); + +void gnt_entry_set_flag(GntEntry *entry, GntEntryFlag flag); + +G_END_DECLS + +#endif /* GNT_ENTRY_H */ Property changes on: branches/soc-2006-file-loggers/console/libgnt/gntentry.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gntkeys.h =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntkeys.h (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gntkeys.h 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,17 @@ +#ifndef GNT_KEYS_H +#define GNT_KEYS_H + +#define GNT_KEY_POPUP "[29~" + +/* Arrow keys */ +#define GNT_KEY_LEFT "[D" +#define GNT_KEY_RIGHT "[C" +#define GNT_KEY_UP "[A" +#define GNT_KEY_DOWN "[B" + +#define GNT_KEY_ENTER "\r" + +#define GNT_KEY_BACKSPACE "\177" +#define GNT_KEY_DEL "[3~" + +#endif Property changes on: branches/soc-2006-file-loggers/console/libgnt/gntkeys.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gntlabel.c =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntlabel.c (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gntlabel.c 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,120 @@ +#include "gntlabel.h" + +#include <string.h> + +enum +{ + SIGS = 1, +}; + +static GntWidgetClass *parent_class = NULL; +static guint signals[SIGS] = { 0 }; + +static void +gnt_label_destroy(GntWidget *widget) +{ + GntLabel *label = GNT_LABEL(widget); + g_free(label->text); +} + +static void +gnt_label_draw(GntWidget *widget) +{ + GntLabel *label = GNT_LABEL(widget); + + wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); + mvwprintw(widget->window, 0, 0, label->text); + wrefresh(widget->window); + + DEBUG; +} + +static void +gnt_label_size_request(GntWidget *widget) +{ + GntLabel *label = GNT_LABEL(widget); + char *s = label->text, *last = s; + int count = 1; + int max = 0; + + /* XXX: ew ... everyone look away */ + while (*s) + { + if (*s == '\n' || *s == '\r') + { + count++; + if (max < s - last + 1) + max = s - last + 1; + last = s + 1; + } + s++; + } + if (max < s - last + 1) + max = s - last + 1; + widget->priv.height = count; + + widget->priv.width = max; +} + +static void +gnt_label_class_init(GntLabelClass *klass) +{ + GObjectClass *obj_class = G_OBJECT_CLASS(klass); + + parent_class = GNT_WIDGET_CLASS(klass); + parent_class->destroy = gnt_label_destroy; + parent_class->draw = gnt_label_draw; + parent_class->map = NULL; + parent_class->size_request = gnt_label_size_request; + + DEBUG; +} + +static void +gnt_label_init(GTypeInstance *instance, gpointer class) +{ + DEBUG; +} + +/****************************************************************************** + * GntLabel API + *****************************************************************************/ +GType +gnt_label_get_gtype(void) +{ + static GType type = 0; + + if(type == 0) + { + static const GTypeInfo info = { + sizeof(GntLabelClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc)gnt_label_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof(GntLabel), + 0, /* n_preallocs */ + gnt_label_init, /* instance_init */ + }; + + type = g_type_register_static(GNT_TYPE_WIDGET, + "GntLabel", + &info, 0); + } + + return type; +} + +GntWidget *gnt_label_new(const char *text) +{ + GntWidget *widget = g_object_new(GNT_TYPE_LABEL, NULL); + GntLabel *label = GNT_LABEL(widget); + + label->text = g_strdup(text); + gnt_widget_set_take_focus(widget, FALSE); + GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); + + return widget; +} + Property changes on: branches/soc-2006-file-loggers/console/libgnt/gntlabel.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gntlabel.h =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntlabel.h (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gntlabel.h 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,48 @@ +#ifndef GNT_LABEL_H +#define GNT_LABEL_H + +#include "gnt.h" +#include "gntwidget.h" + +#define GNT_TYPE_LABEL (gnt_label_get_gtype()) +#define GNT_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_LABEL, GntLabel)) +#define GNT_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_LABEL, GntLabelClass)) +#define GNT_IS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_LABEL)) +#define GNT_IS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_LABEL)) +#define GNT_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_LABEL, GntLabelClass)) + +typedef struct _GnLabel GntLabel; +typedef struct _GnLabelClass GntLabelClass; + +struct _GnLabel +{ + GntWidget parent; + + char *text; + + void (*gnt_reserved1)(void); + void (*gnt_reserved2)(void); + void (*gnt_reserved3)(void); + void (*gnt_reserved4)(void); +}; + +struct _GnLabelClass +{ + GntWidgetClass parent; + + void (*gnt_reserved1)(void); + void (*gnt_reserved2)(void); + void (*gnt_reserved3)(void); + void (*gnt_reserved4)(void); +}; + +G_BEGIN_DECLS + +GType gnt_label_get_gtype(void); + +GntWidget *gnt_label_new(const char *text); + +G_END_DECLS + +#endif /* GNT_LABEL_H */ + Property changes on: branches/soc-2006-file-loggers/console/libgnt/gntlabel.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: branches/soc-2006-file-loggers/console/libgnt/gntmain.c =================================================================== --- branches/soc-2006-file-loggers/console/libgnt/gntmain.c (rev 0) +++ branches/soc-2006-file-loggers/console/libgnt/gntmain.c 2006-06-25 23:08:49 UTC (rev 16337) @@ -0,0 +1,110 @@ +#include "gnt.h" +#include "gntkeys.h" +#include "gntcolors.h" +#include <stdio.h> +#include <stdlib.h> +#include <locale.h> + +static GList *focus_list; +static int max_x; +static int max_y; + +void gnt_screen_take_focus(GntWidget *widget) +{ + focus_list = g_list_prepend(focus_list, widget); +} + +void gnt_screen_remove_widget(GntWidget *widget) +{ + focus_list = g_list_remove(focus_list, widget); + if (focus_list) + gnt_widge... [truncated message content] |
From: <rl...@us...> - 2006-06-25 19:05:18
|
Revision: 16336 Author: rlaager Date: 2006-06-25 12:05:11 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16336&view=rev Log Message: ----------- Avoid calling gaim_utf8_strftime() multiple times. Modified Paths: -------------- branches/soc-2006-file-loggers/src/log.c Modified: branches/soc-2006-file-loggers/src/log.c =================================================================== --- branches/soc-2006-file-loggers/src/log.c 2006-06-25 03:15:41 UTC (rev 16335) +++ branches/soc-2006-file-loggers/src/log.c 2006-06-25 19:05:11 UTC (rev 16336) @@ -1002,7 +1002,7 @@ const char *from, time_t time, const char *message) { char *msg_fixed; - const char *date = gaim_utf8_strftime("%F %T%z", localtime(&time)); + char *date = g_strdup(gaim_utf8_strftime("%F %T%z", localtime(&time))); GaimPlugin *plugin = gaim_find_prpl(gaim_account_get_protocol_id(log->account)); GaimLogCommonLoggerData *data = log->logger_data; @@ -1022,10 +1022,6 @@ // if file doesn't exist, die if (!data->file) return 0; - // because gaim_utf8_strftime returns a pointer to static data, - // and was called in gaim_log_common_writer - date = gaim_utf8_strftime("%F %T%z", localtime(&time)); - fprintf(data->file, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"); if (log->type == GAIM_LOG_SYSTEM) @@ -1097,6 +1093,7 @@ } } + g_free(date); fflush(data->file); return written; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-25 03:15:48
|
Revision: 16335 Author: sadrul Date: 2006-06-24 20:15:41 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16335&view=rev Log Message: ----------- A bunch of stuff that doesn't really do much. I am trying to get the "expose" thingy going where a widget will redraw some of its parts when some other widget covering it is destroyed. Modified Paths: -------------- trunk/console/Makefile trunk/console/gntblist.c trunk/console/gntgaim.c trunk/console/libgnt/Makefile trunk/console/libgnt/gnt.h trunk/console/libgnt/gntbox.c trunk/console/libgnt/gntmain.c trunk/console/libgnt/gntwidget.c Modified: trunk/console/Makefile =================================================================== --- trunk/console/Makefile 2006-06-24 22:52:59 UTC (rev 16334) +++ trunk/console/Makefile 2006-06-25 03:15:41 UTC (rev 16335) @@ -1,5 +1,5 @@ CFLAGS=`pkg-config --cflags gaim gobject-2.0` -g -I./libgnt/ -LDFLAGS=`pkg-config --libs gaim gobject-2.0 libxml-2.0` -lncursesw -L./libgnt/ -lgnt +LDFLAGS=`pkg-config --libs gaim gobject-2.0 libxml-2.0` -lncursesw -L./libgnt/ -lgnt -pg GG_SOURCES = \ gntblist.c \ @@ -13,7 +13,9 @@ gntblist.o \ gntui.o -all: gntgaim +all: + cd libgnt && make + make gntgaim gntgaim: gntgaim.o $(GG_OBJECTS) $(CC) -o gntgaim gntgaim.o $(GG_OBJECTS) $(LDFLAGS) @@ -22,6 +24,7 @@ gntui.o: gntui.c $(GG_HEADERS) clean: + cd libgnt && make clean rm *.o rm gntgaim Modified: trunk/console/gntblist.c =================================================================== --- trunk/console/gntblist.c 2006-06-24 22:52:59 UTC (rev 16334) +++ trunk/console/gntblist.c 2006-06-25 03:15:41 UTC (rev 16335) @@ -222,6 +222,8 @@ if (ggblist->tooltip) { + /* XXX: Once we can properly redraw on expose events, this can be removed at the end + * to avoid the blinking*/ remove_tooltip(ggblist); } @@ -293,6 +295,8 @@ g_string_free(str, TRUE); ggblist->tooltip = box; ggblist->tnode = node; + + gnt_widget_set_name(ggblist->tooltip, "tooltip"); } static void @@ -333,6 +337,7 @@ gaim_get_blist()->ui_data = ggblist; ggblist->window = gnt_box_new(FALSE, FALSE); + gnt_widget_set_name(ggblist->window, "buddylist"); gnt_box_set_toplevel(GNT_BOX(ggblist->window), TRUE); gnt_box_set_title(GNT_BOX(ggblist->window), _("Buddy List")); gnt_box_set_pad(GNT_BOX(ggblist->window), 0); Modified: trunk/console/gntgaim.c =================================================================== --- trunk/console/gntgaim.c 2006-06-24 22:52:59 UTC (rev 16334) +++ trunk/console/gntgaim.c 2006-06-25 03:15:41 UTC (rev 16335) @@ -169,7 +169,7 @@ int main(int argc, char **argv) { /* XXX: Don't puke */ - freopen("/dev/null", "w", stderr); + freopen(".error", "w", stderr); /* Initialize the libgaim stuff */ init_libgaim(); Modified: trunk/console/libgnt/Makefile =================================================================== --- trunk/console/libgnt/Makefile 2006-06-24 22:52:59 UTC (rev 16334) +++ trunk/console/libgnt/Makefile 2006-06-25 03:15:41 UTC (rev 16335) @@ -1,5 +1,5 @@ CFLAGS=`pkg-config --cflags gobject-2.0` -g -LDFLAGS=`pkg-config --libs gobject-2.0` -lncursesw +LDFLAGS=`pkg-config --libs gobject-2.0` -lncursesw -pg HEADERS = \ gntwidget.h \ Modified: trunk/console/libgnt/gnt.h =================================================================== --- trunk/console/libgnt/gnt.h 2006-06-24 22:52:59 UTC (rev 16334) +++ trunk/console/libgnt/gnt.h 2006-06-25 03:15:41 UTC (rev 16335) @@ -3,15 +3,11 @@ #include "gntcolors.h" #include "gntkeys.h" -/* XXX: Find a better place for this */ -#define SCROLL_HEIGHT 4096 -#define SCROLL_WIDTH 512 - void gnt_init(); void gnt_main(); -void gnt_screen_take_focus(GntWidget *widget); +void gnt_screen_occupy(GntWidget *widget); -void gnt_screen_remove_widget(GntWidget *widget); +void gnt_screen_release(GntWidget *widget); Modified: trunk/console/libgnt/gntbox.c =================================================================== --- trunk/console/libgnt/gntbox.c 2006-06-24 22:52:59 UTC (rev 16334) +++ trunk/console/libgnt/gntbox.c 2006-06-25 03:15:41 UTC (rev 16335) @@ -16,7 +16,9 @@ for (iter = box->list; iter; iter = iter->next) { - gnt_widget_draw(GNT_WIDGET(iter->data)); + GntWidget *w = GNT_WIDGET(iter->data); + gnt_widget_draw(w); + overwrite(w->window, widget->window); } if (box->title) @@ -39,6 +41,8 @@ g_free(title); } wrefresh(widget->window); + + gnt_screen_occupy(widget); DEBUG; } @@ -263,10 +267,21 @@ gnt_widget_destroy(iter->data); } + gnt_screen_release(w); + g_list_free(box->list); } static void +gnt_box_expose(GntWidget *widget, int x, int y, int width, int height) +{ + WINDOW *win = newwin(height, width, widget->priv.y + y, widget->priv.x + x); + copywin(widget->window, win, y, x, 0, 0, height - 1, width - 1, FALSE); + wrefresh(win); + delwin(win); +} + +static void gnt_box_class_init(GntBoxClass *klass) { GObjectClass *obj_class = G_OBJECT_CLASS(klass); @@ -274,6 +289,7 @@ parent_class = GNT_WIDGET_CLASS(klass); parent_class->destroy = gnt_box_destroy; parent_class->draw = gnt_box_draw; + parent_class->expose = gnt_box_expose; parent_class->map = gnt_box_map; parent_class->size_request = gnt_box_size_request; parent_class->set_position = gnt_box_set_position; Modified: trunk/console/libgnt/gntmain.c =================================================================== --- trunk/console/libgnt/gntmain.c 2006-06-24 22:52:59 UTC (rev 16334) +++ trunk/console/libgnt/gntmain.c 2006-06-25 03:15:41 UTC (rev 16335) @@ -9,6 +9,10 @@ static int max_x; static int max_y; +static GHashTable *nodes; + +static void free_node(gpointer data); + void gnt_screen_take_focus(GntWidget *widget) { focus_list = g_list_prepend(focus_list, widget); @@ -95,6 +99,8 @@ max_x = getmaxx(stdscr); max_y = getmaxy(stdscr); + nodes = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free_node); + wbkgdset(stdscr, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); noecho(); refresh(); @@ -108,3 +114,83 @@ g_main_run(loop); } +/********************************* + * Stuff for 'window management' * + *********************************/ + +typedef struct +{ + GntWidget *me; + GList *below; /* List of widgets below me */ + GList *above; /* List of widgets above me */ +} GntNode; + +static void +free_node(gpointer data) +{ + GntNode *node = data; + g_list_free(node->below); + g_list_free(node->above); + g_free(node); +} + +static void +check_intersection(gpointer key, gpointer value, gpointer data) +{ + GntNode *n = value; + GntNode *nu = data; + + if (value == NULL) + return; + + if (n->me->priv.x + n->me->priv.width < nu->me->priv.x) + return; + if (nu->me->priv.x + nu->me->priv.width < n->me->priv.x) + return; + + if (n->me->priv.y + n->me->priv.height < nu->me->priv.y) + return; + if (nu->me->priv.y + nu->me->priv.height < n->me->priv.y) + return; + + n->above = g_list_prepend(n->above, nu->me); + nu->below = g_list_prepend(nu->below, n->me); +} + +void gnt_screen_occupy(GntWidget *widget) +{ + /* XXX: what happens if this is called more than once for the same widget? + * perhaps _release first? */ + GntNode *node = g_new0(GntNode, 1); + node->me = widget; + + g_hash_table_foreach(nodes, check_intersection, node); + g_hash_table_replace(nodes, widget, node); +} + +void gnt_screen_release(GntWidget *widget) +{ + GList *iter; + GntNode *node = g_hash_table_lookup(nodes, widget); + if (node == NULL || node->below == NULL) /* Yay! Nothing to do. */ + return; + + /* XXX: This is not going to work. + * It will be necessary to build a topology and go from there. */ + for (iter = node->below; iter; iter = iter->next) + { + GntWidget *w = iter->data; + int left, right, top, bottom; + + left = MAX(widget->priv.x, w->priv.x) - w->priv.x; + right = MIN(widget->priv.x + widget->priv.width, w->priv.x + w->priv.width) - w->priv.x; + + top = MAX(widget->priv.y, w->priv.y) - w->priv.y; + bottom = MIN(widget->priv.y + widget->priv.height, w->priv.y + w->priv.height) - w->priv.y; + + gnt_widget_expose(w, left, top, right - left, bottom - top); + } + + g_hash_table_remove(nodes, widget); +} + Modified: trunk/console/libgnt/gntwidget.c =================================================================== --- trunk/console/libgnt/gntwidget.c 2006-06-24 22:52:59 UTC (rev 16334) +++ trunk/console/libgnt/gntwidget.c 2006-06-25 03:15:41 UTC (rev 16335) @@ -225,8 +225,6 @@ delwin(obj->window); if(!(GNT_WIDGET_FLAGS(obj) & GNT_WIDGET_DESTROYING)) g_object_run_dispose(G_OBJECT(obj)); - /* XXX: This may be the wrong place */ - /*gnt_screen_remove_widget(obj);*/ DEBUG; } @@ -264,11 +262,10 @@ else werase(widget->window); +#if 0 + /* XXX: No shadow for now :( */ if (!(GNT_WIDGET_FLAGS(widget) & GNT_WIDGET_NO_SHADOW)) { - /* XXX: Find out the actual windows beneath this window, and - * draw the shadow on them */ - /* XXX: Or perhaps do all these from a psedo-WM! */ widget->back = newwin(widget->priv.height, widget->priv.width, widget->priv.y + 1, widget->priv.x + 1); wbkgd(widget->back, COLOR_PAIR(GNT_COLOR_SHADOW)); @@ -279,6 +276,7 @@ touchline(widget->back, 0, widget->priv.height); wrefresh(widget->back); } +#endif wrefresh(widget->window); g_signal_emit(widget, signals[SIG_DRAW], 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-06-24 22:53:09
|
Revision: 16334 Author: datallah Date: 2006-06-24 15:52:59 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16334&view=rev Log Message: ----------- This should cause the logging DBUS registration to actually work. Modified Paths: -------------- trunk/src/log.c Modified: trunk/src/log.c =================================================================== --- trunk/src/log.c 2006-06-24 22:25:22 UTC (rev 16333) +++ trunk/src/log.c 2006-06-24 22:52:59 UTC (rev 16334) @@ -23,6 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "internal.h" #include "account.h" #include "dbus-maybe.h" #include "debug.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-24 22:25:27
|
Revision: 16333 Author: sadrul Date: 2006-06-24 15:25:22 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16333&view=rev Log Message: ----------- Patch #1511180: Buddy list ui_ops fix I had a hard time figuring out why things were not working even after I set the blist-uiops using gaim_blist_set_ui_ops. This patch is a fix for it. Modified Paths: -------------- trunk/plugins/ChangeLog.API trunk/src/blist.c trunk/src/blist.h trunk/src/status.c Modified: trunk/plugins/ChangeLog.API =================================================================== --- trunk/plugins/ChangeLog.API 2006-06-24 20:32:18 UTC (rev 16332) +++ trunk/plugins/ChangeLog.API 2006-06-24 22:25:22 UTC (rev 16333) @@ -176,6 +176,7 @@ notify_searchresults in GaimNotifyUiOps. * gaim_conversation_get_send_history(), and send_history from GaimConversation + * Removed ui_ops from GaimBuddyList. Use gaim_blist_get_ui_ops() instead Added: * gaim_prefs_disconnect_by_handle() Modified: trunk/src/blist.c =================================================================== --- trunk/src/blist.c 2006-06-24 20:32:18 UTC (rev 16332) +++ trunk/src/blist.c 2006-06-24 22:25:22 UTC (rev 16333) @@ -655,17 +655,18 @@ GaimBuddyList *gaim_blist_new() { + GaimBlistUiOps *ui_ops; GaimBuddyList *gbl = g_new0(GaimBuddyList, 1); GAIM_DBUS_REGISTER_POINTER(gbl, GaimBuddyList); - gbl->ui_ops = gaim_blist_get_ui_ops(); + ui_ops = gaim_blist_get_ui_ops(); gbl->buddies = g_hash_table_new_full((GHashFunc)_gaim_blist_hbuddy_hash, (GEqualFunc)_gaim_blist_hbuddy_equal, (GDestroyNotify)_gaim_blist_hbuddy_free_key, NULL); - if (gbl->ui_ops != NULL && gbl->ui_ops->new_list != NULL) - gbl->ui_ops->new_list(gbl); + if (ui_ops != NULL && ui_ops->new_list != NULL) + ui_ops->new_list(gbl); return gbl; } @@ -690,7 +691,7 @@ void gaim_blist_show() { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); if (ops && ops->show) ops->show(gaimbuddylist); @@ -698,7 +699,7 @@ void gaim_blist_destroy() { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); gaim_debug(GAIM_DEBUG_INFO, "blist", "Destroying\n"); @@ -708,7 +709,7 @@ void gaim_blist_set_visible(gboolean show) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); if (ops && ops->set_visible) ops->set_visible(gaimbuddylist, show); @@ -744,7 +745,7 @@ void gaim_blist_update_buddy_status(GaimBuddy *buddy, GaimStatus *old_status) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimPresence *presence; GaimStatus *status; @@ -794,7 +795,7 @@ void gaim_blist_update_buddy_icon(GaimBuddy *buddy) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); g_return_if_fail(buddy != NULL); @@ -808,7 +809,7 @@ */ void gaim_blist_rename_buddy(GaimBuddy *buddy, const char *name) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); struct _gaim_hbuddy *hb; g_return_if_fail(buddy != NULL); @@ -834,7 +835,7 @@ void gaim_blist_alias_contact(GaimContact *contact, const char *alias) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimConversation *conv; char *old_alias = contact->alias; GaimBlistNode *bnode; @@ -868,7 +869,7 @@ void gaim_blist_alias_chat(GaimChat *chat, const char *alias) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); char *old_alias = chat->alias; g_return_if_fail(chat != NULL); @@ -890,7 +891,7 @@ void gaim_blist_alias_buddy(GaimBuddy *buddy, const char *alias) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimConversation *conv; char *old_alias = buddy->alias; @@ -918,7 +919,7 @@ void gaim_blist_server_alias_buddy(GaimBuddy *buddy, const char *alias) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimConversation *conv; char *old_alias = buddy->server_alias; @@ -949,7 +950,7 @@ */ void gaim_blist_rename_group(GaimGroup *source, const char *new_name) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimGroup *dest; gchar *old_name; GList *moved_buddies = NULL; @@ -1071,7 +1072,7 @@ GaimChat *gaim_chat_new(GaimAccount *account, const char *alias, GHashTable *components) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimChat *chat; g_return_val_if_fail(account != NULL, FALSE); @@ -1094,7 +1095,7 @@ GaimBuddy *gaim_buddy_new(GaimAccount *account, const char *screenname, const char *alias) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBuddy *buddy; g_return_val_if_fail(account != NULL, FALSE); @@ -1169,7 +1170,7 @@ void gaim_blist_add_chat(GaimChat *chat, GaimGroup *group, GaimBlistNode *node) { GaimBlistNode *cnode = (GaimBlistNode*)chat; - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); g_return_if_fail(chat != NULL); g_return_if_fail(GAIM_BLIST_NODE_IS_CHAT((GaimBlistNode *)chat)); @@ -1251,7 +1252,7 @@ GaimBlistNode *cnode, *bnode; GaimGroup *g; GaimContact *c; - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); struct _gaim_hbuddy *hb; g_return_if_fail(buddy != NULL); @@ -1400,7 +1401,7 @@ void gaim_contact_set_alias(GaimContact *contact, const char *alias) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); char *old_alias = contact->alias; g_return_if_fail(contact != NULL); @@ -1486,7 +1487,7 @@ void gaim_blist_add_contact(GaimContact *contact, GaimGroup *group, GaimBlistNode *node) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimGroup *g; GaimBlistNode *gnode, *cnode, *bnode; @@ -1652,7 +1653,7 @@ g_return_if_fail(group != NULL); g_return_if_fail(GAIM_BLIST_NODE_IS_GROUP((GaimBlistNode *)group)); - ops = gaimbuddylist->ui_ops; + ops = gaim_blist_get_ui_ops(); if (!gaimbuddylist->root) { gaimbuddylist->root = gnode; @@ -1702,7 +1703,7 @@ void gaim_blist_remove_contact(GaimContact *contact) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBlistNode *node, *gnode; g_return_if_fail(contact != NULL); @@ -1749,7 +1750,7 @@ void gaim_blist_remove_buddy(GaimBuddy *buddy) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBlistNode *node, *cnode, *gnode; GaimContact *contact; GaimGroup *group; @@ -1837,7 +1838,7 @@ void gaim_blist_remove_chat(GaimChat *chat) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBlistNode *node, *gnode; GaimGroup *group; @@ -1881,7 +1882,7 @@ void gaim_blist_remove_group(GaimGroup *group) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBlistNode *node; GList *l; @@ -2244,7 +2245,7 @@ void gaim_blist_add_account(GaimAccount *account) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBlistNode *gnode, *cnode, *bnode; g_return_if_fail(gaimbuddylist != NULL); @@ -2286,7 +2287,7 @@ void gaim_blist_remove_account(GaimAccount *account) { - GaimBlistUiOps *ops = gaimbuddylist->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); GaimBlistNode *gnode, *cnode, *bnode; GaimBuddy *buddy; GaimChat *chat; Modified: trunk/src/blist.h =================================================================== --- trunk/src/blist.h 2006-06-24 20:32:18 UTC (rev 16332) +++ trunk/src/blist.h 2006-06-24 22:25:22 UTC (rev 16333) @@ -152,8 +152,6 @@ struct _GaimBuddyList { GaimBlistNode *root; /**< The first node in the buddy list */ GHashTable *buddies; /**< Every buddy in this list */ - GaimBlistUiOps *ui_ops; /**< The UI operations for the buddy list */ - void *ui_data; /**< UI-specific data. */ }; Modified: trunk/src/status.c =================================================================== --- trunk/src/status.c 2006-06-24 20:32:18 UTC (rev 16332) +++ trunk/src/status.c 2006-06-24 22:25:22 UTC (rev 16333) @@ -1298,7 +1298,7 @@ update_buddy_idle(GaimBuddy *buddy, GaimPresence *presence, time_t current_time, gboolean old_idle, gboolean idle) { - GaimBlistUiOps *ops = gaim_get_blist()->ui_ops; + GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); if (!old_idle && idle) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-24 20:32:23
|
Revision: 16332 Author: sadrul Date: 2006-06-24 13:32:18 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16332&view=rev Log Message: ----------- No need to redraw a widget if the focus didn't change. Modified Paths: -------------- trunk/console/libgnt/gntbox.c Modified: trunk/console/libgnt/gntbox.c =================================================================== --- trunk/console/libgnt/gntbox.c 2006-06-24 20:06:37 UTC (rev 16331) +++ trunk/console/libgnt/gntbox.c 2006-06-24 20:32:18 UTC (rev 16332) @@ -202,7 +202,7 @@ now = box->list; } - if (now) + if (now && now != box->active) { gnt_widget_set_focus(box->active->data, FALSE); box->active = now; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-24 20:06:45
|
Revision: 16331 Author: sadrul Date: 2006-06-24 13:06:37 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16331&view=rev Log Message: ----------- Make the tooltips move to the right place when the selected item goes up/down when someone signs on/off. Modified Paths: -------------- trunk/console/gntblist.c trunk/console/libgnt/gnttree.c Modified: trunk/console/gntblist.c =================================================================== --- trunk/console/gntblist.c 2006-06-24 18:11:59 UTC (rev 16330) +++ trunk/console/gntblist.c 2006-06-24 20:06:37 UTC (rev 16331) @@ -24,6 +24,7 @@ static void add_buddy(GaimBuddy *buddy, GGBlist *ggblist); static void add_group(GaimGroup *group, GGBlist *ggblist); +static void add_node(GaimBlistNode *node, GGBlist *ggblist); static void draw_tooltip(GGBlist *ggblist); static void @@ -31,6 +32,15 @@ { } +static void add_node(GaimBlistNode *node, GGBlist *ggblist) +{ + if (GAIM_BLIST_NODE_IS_BUDDY(node)) + add_buddy((GaimBuddy*)node, ggblist); + else if (GAIM_BLIST_NODE_IS_GROUP(node)) + add_group((GaimGroup*)node, ggblist); + draw_tooltip(ggblist); +} + static void remove_tooltip(GGBlist *ggblist) { @@ -56,14 +66,8 @@ GaimGroup *group = gaim_buddy_get_group((GaimBuddy*)node); if (gaim_blist_get_group_online_count(group) == 0) node_remove(list, (GaimBlistNode*)group); - else if (ggblist->tnode == (GaimBlistNode *)group) /* Need to update the counts */ - draw_tooltip(ggblist); } - - if (ggblist->tnode == node) - { - remove_tooltip(ggblist); - } + draw_tooltip(ggblist); } static void @@ -73,7 +77,7 @@ { GaimBuddy *buddy = (GaimBuddy*)node; if (gaim_presence_is_online(gaim_buddy_get_presence(buddy))) - add_buddy(buddy, list->ui_data); + add_node((GaimBlistNode*)buddy, list->ui_data); else node_remove(gaim_get_blist(), node); } @@ -171,19 +175,16 @@ return; group = gaim_buddy_get_group(buddy); - add_group(group, ggblist); + add_node((GaimBlistNode*)group, ggblist); node->ui_data = gnt_tree_add_row_after(GNT_TREE(ggblist->tree), buddy, get_buddy_display_name(buddy), group, NULL); - - if (ggblist->tnode == (GaimBlistNode*)group) - draw_tooltip(ggblist); } static void buddy_signed_on(GaimBuddy *buddy, GGBlist *ggblist) { - add_buddy(buddy, ggblist); + add_node((GaimBlistNode*)buddy, ggblist); } static void Modified: trunk/console/libgnt/gnttree.c =================================================================== --- trunk/console/libgnt/gnttree.c 2006-06-24 18:11:59 UTC (rev 16330) +++ trunk/console/libgnt/gnttree.c 2006-06-24 20:06:37 UTC (rev 16331) @@ -6,6 +6,7 @@ enum { SIG_SELECTION_CHANGED, + SIG_SCROLLED, SIGS, }; @@ -345,6 +346,14 @@ NULL, NULL, gnt_closure_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER); + signals[SIG_SCROLLED] = + g_signal_new("scrolled", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, 1, G_TYPE_INT); DEBUG; } @@ -445,6 +454,7 @@ } redraw_tree(tree); + g_signal_emit(tree, signals[SIG_SCROLLED], 0, count); } static int This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ro...@us...> - 2006-06-24 18:12:35
|
Revision: 16330 Author: roast Date: 2006-06-24 11:11:59 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16330&view=rev Log Message: ----------- merged with svn trunk, r16329 Modified Paths: -------------- branches/soc-2006-file-loggers/COPYRIGHT branches/soc-2006-file-loggers/configure.ac branches/soc-2006-file-loggers/doc/plugin-ids.dox branches/soc-2006-file-loggers/plugins/ChangeLog.API branches/soc-2006-file-loggers/plugins/idle.c branches/soc-2006-file-loggers/plugins/perl/common/Account.xs branches/soc-2006-file-loggers/plugins/perl/common/Conversation.xs branches/soc-2006-file-loggers/plugins/perl/common/Server.xs branches/soc-2006-file-loggers/plugins/tcl/Makefile.am branches/soc-2006-file-loggers/plugins/tcl/Makefile.mingw branches/soc-2006-file-loggers/plugins/tcl/tcl.c branches/soc-2006-file-loggers/plugins/tcl/tcl_cmds.c branches/soc-2006-file-loggers/plugins/tcl/tcl_gaim.h branches/soc-2006-file-loggers/plugins/tcl/tcl_signals.c branches/soc-2006-file-loggers/src/cmds.h branches/soc-2006-file-loggers/src/conversation.c branches/soc-2006-file-loggers/src/conversation.h branches/soc-2006-file-loggers/src/ft.c branches/soc-2006-file-loggers/src/gtkblist.c branches/soc-2006-file-loggers/src/gtkconv.c branches/soc-2006-file-loggers/src/gtkconv.h branches/soc-2006-file-loggers/src/gtkmain.c branches/soc-2006-file-loggers/src/gtkpounce.c branches/soc-2006-file-loggers/src/gtksavedstatuses.c branches/soc-2006-file-loggers/src/gtkstatusbox.c branches/soc-2006-file-loggers/src/pounce.c branches/soc-2006-file-loggers/src/pounce.h branches/soc-2006-file-loggers/src/protocols/irc/cmds.c branches/soc-2006-file-loggers/src/protocols/jabber/message.c branches/soc-2006-file-loggers/src/protocols/jabber/message.h branches/soc-2006-file-loggers/src/protocols/msn/msn.c branches/soc-2006-file-loggers/src/protocols/novell/novell.c branches/soc-2006-file-loggers/src/protocols/oscar/oscar.c branches/soc-2006-file-loggers/src/protocols/sametime/sametime.c branches/soc-2006-file-loggers/src/protocols/simple/simple.c branches/soc-2006-file-loggers/src/protocols/yahoo/yahoo.c branches/soc-2006-file-loggers/src/protocols/yahoo/yahoo.h branches/soc-2006-file-loggers/src/protocols/yahoo/yahoo_filexfer.c branches/soc-2006-file-loggers/src/protocols/zephyr/zephyr.c branches/soc-2006-file-loggers/src/prpl.h branches/soc-2006-file-loggers/src/server.c branches/soc-2006-file-loggers/src/server.h branches/soc-2006-file-loggers/src/xmlnode.c Modified: branches/soc-2006-file-loggers/COPYRIGHT =================================================================== --- branches/soc-2006-file-loggers/COPYRIGHT 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/COPYRIGHT 2006-06-24 18:11:59 UTC (rev 16330) @@ -51,6 +51,7 @@ Christophe Chapuis Ka-Hing Cheung Sadrul Habib Chowdhury +Brian Chu Arturo Cisneros, Jr. Vincas Ciziunas Jonathan Clark Modified: branches/soc-2006-file-loggers/configure.ac =================================================================== --- branches/soc-2006-file-loggers/configure.ac 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/configure.ac 2006-06-24 18:11:59 UTC (rev 16330) @@ -163,7 +163,11 @@ dnl # GStreamer dnl ####################################################################### enable_gst=yes -PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10, ,enable_gst=no) +PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], , + [ + AC_MSG_RESULT(no) + enable_gst=no + ]) AC_SUBST(GSTREAMER_CFLAGS) AC_SUBST(GSTREAMER_LIBS) AC_ARG_ENABLE(gstreamer,[ --disable-gstreamer compile without GStreamer audio support],enable_gst=no) @@ -175,7 +179,11 @@ dnl # LibXML2 dnl ################# enable_libxml2=yes -PKG_CHECK_MODULES(LIBXML, libxml-2.0, ,enable_libxml2=no) +PKG_CHECK_MODULES(LIBXML, [libxml-2.0], , + [ + AC_MSG_RESULT(no) + enable_libxml2=no + ]) AC_SUBST(LIBXML_CFLAGS) AC_SUBST(LIBXML_LIBS) AC_ARG_ENABLE(libxml,[ --disable-libxml compile without libxml2 support],enable_libxml2=no) @@ -690,7 +698,7 @@ PYTHON=$withval) if test "x$enable_dbus" = "xyes" ; then - if test -z "$PYTHON" ; then + if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then AC_PATH_PROG([PYTHON], [python], [no]) fi Modified: branches/soc-2006-file-loggers/doc/plugin-ids.dox =================================================================== --- branches/soc-2006-file-loggers/doc/plugin-ids.dox 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/doc/plugin-ids.dox 2006-06-24 18:11:59 UTC (rev 16330) @@ -28,10 +28,7 @@ - qpe - Gaim for Qtopia plugin. The @em username must be a unique identifier for that person. It - @em should be your Gaim website user ID - (registered <a href="http://gaim.sourceforge.net/register.php">here</a>). - If for some reason you cannot register there (it shouldn't be a - problem!), you can use your SourceForge ID. Do @em not leave this field + @em should be your SourceForge ID. Do @em not leave this field blank. The @em pluginname is the name of your plugin. It can be whatever you like, Modified: branches/soc-2006-file-loggers/plugins/ChangeLog.API =================================================================== --- branches/soc-2006-file-loggers/plugins/ChangeLog.API 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/plugins/ChangeLog.API 2006-06-24 18:11:59 UTC (rev 16330) @@ -114,6 +114,7 @@ gaim_proxy_connect() and gaim_network_listen*(). * gaim_gtk_create_imhtml(): Added sw_ret() parameter * gaim_account_get_log(): Added create parameter + * GAIM_CMD_P_VERYHIGH is now GAIM_CMD_P_VERY_HIGH Removed: * gaim_gtk_sound_{get,set}_mute() (replaced by the /gaim/gtk/sound/mute @@ -173,6 +174,8 @@ * GAIM_MESSAGE_COLORIZE * user_data from gaim_notify_searchresults_new_rows and from notify_searchresults in GaimNotifyUiOps. + * gaim_conversation_get_send_history(), and send_history from + GaimConversation Added: * gaim_prefs_disconnect_by_handle() Modified: branches/soc-2006-file-loggers/plugins/idle.c =================================================================== --- branches/soc-2006-file-loggers/plugins/idle.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/plugins/idle.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -102,12 +102,13 @@ idle_all_action_ok(void *ignored, GaimRequestFields *fields) { GaimAccount *acct = NULL; - GList *l = gaim_accounts_get_all_active(); + GList *list, *iter; int tm = gaim_request_fields_get_integer(fields, "mins"); const char *prpl_id = NULL; - for(; l; l = l->next) { - acct = (GaimAccount *)(l->data); + list = gaim_accounts_get_all_active(); + for(iter = list; iter; iter = iter->next) { + acct = (GaimAccount *)(iter->data); if(acct) prpl_id = gaim_account_get_protocol_id(acct); @@ -122,6 +123,8 @@ idled_accts = g_list_append(idled_accts, acct); } } + + g_list_free(list); } static void Modified: branches/soc-2006-file-loggers/plugins/perl/common/Account.xs =================================================================== --- branches/soc-2006-file-loggers/plugins/perl/common/Account.xs 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/plugins/perl/common/Account.xs 2006-06-24 18:11:59 UTC (rev 16330) @@ -286,11 +286,13 @@ void gaim_accounts_get_all_active() PREINIT: - GList *l; + GList *list, *iter; PPCODE: - for (l = gaim_accounts_get_all_active(); l != NULL; l = l->next) { - XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Account"))); + list = gaim_accounts_get_all_active(); + for (iter = gaim_accounts_get_all_active(); iter != NULL; iter = iter->next) { + XPUSHs(sv_2mortal(gaim_perl_bless_object(iter->data, "Gaim::Account"))); } + g_list_free(list); Gaim::Account gaim_accounts_find(name, protocol) Modified: branches/soc-2006-file-loggers/plugins/perl/common/Conversation.xs =================================================================== --- branches/soc-2006-file-loggers/plugins/perl/common/Conversation.xs 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/plugins/perl/common/Conversation.xs 2006-06-24 18:11:59 UTC (rev 16330) @@ -46,16 +46,6 @@ PROTOTYPES: ENABLE void -gaim_conversation_get_send_history(conv) - Gaim::Conversation conv -PREINIT: - GList *l; -PPCODE: - for (l = gaim_conversation_get_send_history(conv); l != NULL; l = l->next) { - XPUSHs(sv_2mortal(newSVpv(l->data, 0))); - } - -void gaim_conversation_destroy(conv) Gaim::Conversation conv @@ -189,15 +179,15 @@ Gaim::Conversation::IM im void -gaim_conv_im_start_type_again_timeout(im) +gaim_conv_im_start_send_typed_timeout(im) Gaim::Conversation::IM im void -gaim_conv_im_stop_type_again_timeout(im) +gaim_conv_im_stop_send_typed_timeout(im) Gaim::Conversation::IM im guint -gaim_conv_im_get_type_again_timeout(im) +gaim_conv_im_get_send_typed_timeout(im) Gaim::Conversation::IM im void Modified: branches/soc-2006-file-loggers/plugins/perl/common/Server.xs =================================================================== --- branches/soc-2006-file-loggers/plugins/perl/common/Server.xs 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/plugins/perl/common/Server.xs 2006-06-24 18:11:59 UTC (rev 16330) @@ -200,10 +200,10 @@ Gaim::MessageFlags flags int -serv_send_typing(con, a, b) +serv_send_typing(con, a, state) Gaim::Connection con const char * a - int b + Gaim::TypingState state void serv_set_buddyicon(gc, filename) Modified: branches/soc-2006-file-loggers/plugins/tcl/Makefile.am =================================================================== --- branches/soc-2006-file-loggers/plugins/tcl/Makefile.am 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/plugins/tcl/Makefile.am 2006-06-24 18:11:59 UTC (rev 16330) @@ -5,7 +5,7 @@ plugin_LTLIBRARIES = tcl.la tcl_la_SOURCES = tcl.c tcl_glib.c tcl_glib.h tcl_cmds.c tcl_signals.c tcl_gaim.h \ - tcl_ref.c + tcl_ref.c tcl_cmd.c EXTRA_DIST = signal-test.tcl Makefile.mingw Modified: branches/soc-2006-file-loggers/plugins/tcl/Makefile.mingw =================================================================== --- branches/soc-2006-file-loggers/plugins/tcl/Makefile.mingw 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/plugins/tcl/Makefile.mingw 2006-06-24 18:11:59 UTC (rev 16330) @@ -61,6 +61,7 @@ ## C_SRC = tcl.c \ + tcl_cmd.c \ tcl_cmds.c \ tcl_glib.c \ tcl_ref.c \ Modified: branches/soc-2006-file-loggers/plugins/tcl/tcl.c =================================================================== --- branches/soc-2006-file-loggers/plugins/tcl/tcl.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/plugins/tcl/tcl.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -126,6 +126,7 @@ Tcl_CreateObjCommand(interp, "::gaim::account", tcl_cmd_account, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::buddy", tcl_cmd_buddy, (ClientData)NULL, NULL); + Tcl_CreateObjCommand(interp, "::gaim::cmd", tcl_cmd_cmd, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::connection", tcl_cmd_connection, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::conversation", tcl_cmd_conversation, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::core", tcl_cmd_core, (ClientData)NULL, NULL); @@ -284,7 +285,9 @@ if (Tcl_EvalFile(interp, plugin->path) != TCL_OK) { result = Tcl_GetObjResult(interp); - gaim_debug(GAIM_DEBUG_ERROR, "tcl", "Error evaluating %s: %s\n", plugin->path, Tcl_GetString(result)); + gaim_debug(GAIM_DEBUG_ERROR, "tcl", + "Error evaluating %s: %s\n", plugin->path, + Tcl_GetString(result)); Tcl_DeleteInterp(interp); return FALSE; } @@ -313,6 +316,7 @@ if (data != NULL) { g_hash_table_remove(tcl_plugins, (gpointer)(data->interp)); gaim_signals_disconnect_by_handle(data->interp); + tcl_cmd_cleanup(data->interp); tcl_signal_cleanup(data->interp); Tcl_Release((ClientData)data->interp); Tcl_DeleteInterp(data->interp); @@ -341,6 +345,7 @@ if(!tcl_loaded) return FALSE; tcl_glib_init(); + tcl_cmd_init(); tcl_signal_init(); gaim_tcl_ref_init(); Modified: branches/soc-2006-file-loggers/plugins/tcl/tcl_cmds.c =================================================================== --- branches/soc-2006-file-loggers/plugins/tcl/tcl_cmds.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/plugins/tcl/tcl_cmds.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -73,7 +73,7 @@ return convo; } if (interp != NULL) - Tcl_SetStringObj(Tcl_GetObjResult(interp), "invalid account", -1); + Tcl_SetStringObj(Tcl_GetObjResult(interp), "invalid conversation", -1); return NULL; } @@ -541,6 +541,70 @@ return TCL_OK; } +int tcl_cmd_cmd(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) +{ + const char *cmds[] = { "register", "unregister", NULL }; + enum { CMD_CMD_REGISTER, CMD_CMD_UNREGISTER } cmd; + struct tcl_cmd_handler *handler; + Tcl_Obj *result = Tcl_GetObjResult(interp); + GaimCmdId id; + int error; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?args?"); + return TCL_ERROR; + } + + if ((error = Tcl_GetIndexFromObj(interp, objv[1], cmds, "subcommand", 0, (int *)&cmd)) != TCL_OK) + return error; + + switch (cmd) { + case CMD_CMD_REGISTER: + if (objc != 9) { + Tcl_WrongNumArgs(interp, 2, objv, "cmd arglist priority flags prpl_id proc helpstr"); + return TCL_ERROR; + } + handler = g_new0(struct tcl_cmd_handler, 1); + handler->cmd = objv[2]; + handler->args = Tcl_GetString(objv[3]); + handler->nargs = strlen(handler->args); + if ((error = Tcl_GetIntFromObj(interp, objv[4], + &handler->priority)) != TCL_OK) { + g_free(handler); + return error; + } + if ((error = Tcl_GetIntFromObj(interp, objv[5], + &handler->flags)) != TCL_OK) { + g_free(handler); + return error; + } + handler->prpl_id = Tcl_GetString(objv[6]); + handler->proc = objv[7]; + handler->helpstr = Tcl_GetString(objv[8]); + handler->interp = interp; + if ((id = tcl_cmd_register(handler)) == 0) { + tcl_cmd_handler_free(handler); + Tcl_SetIntObj(result, 0); + } else { + handler->id = id; + Tcl_SetIntObj(result, id); + } + break; + case CMD_CMD_UNREGISTER: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "id"); + return TCL_ERROR; + } + if ((error = Tcl_GetIntFromObj(interp, objv[2], + (int *)&id)) != TCL_OK) + return error; + tcl_cmd_unregister(id, interp); + break; + } + + return TCL_OK; +} + int tcl_cmd_connection(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { Tcl_Obj *result = Tcl_GetObjResult(interp), *list, *elem; Modified: branches/soc-2006-file-loggers/plugins/tcl/tcl_gaim.h =================================================================== --- branches/soc-2006-file-loggers/plugins/tcl/tcl_gaim.h 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/plugins/tcl/tcl_gaim.h 2006-06-24 18:11:59 UTC (rev 16330) @@ -26,6 +26,7 @@ #include <tcl.h> #include "internal.h" +#include "cmds.h" #include "plugin.h" #include "value.h" #include "stringref.h" @@ -45,6 +46,23 @@ GaimValue **argtypes; }; +struct tcl_cmd_handler { + int id; + Tcl_Obj *cmd; + Tcl_Interp *interp; + + Tcl_Obj *namespace; + /* These are temporary during setup */ + const char *args; + int priority; + int flags; + const char *prpl_id; + Tcl_Obj *proc; + const char *helpstr; + + int nargs; +}; + extern GaimPlugin *_tcl_plugin; /* Capitalized this way because these are "types" */ @@ -65,6 +83,12 @@ gboolean tcl_signal_connect(struct tcl_signal_handler *handler); void tcl_signal_disconnect(void *instance, const char *signal, Tcl_Interp *interp); +void tcl_cmd_init(void); +void tcl_cmd_handler_free(struct tcl_cmd_handler *handler); +void tcl_cmd_cleanup(Tcl_Interp *interp); +GaimCmdId tcl_cmd_register(struct tcl_cmd_handler *handler); +void tcl_cmd_unregister(GaimCmdId id, Tcl_Interp *interp); + void gaim_tcl_ref_init(void); void *gaim_tcl_ref_get(Tcl_Interp *interp, Tcl_Obj *obj, GaimStringref *type); Tcl_Obj *gaim_tcl_ref_new(GaimStringref *type, void *value); @@ -72,6 +96,7 @@ Tcl_ObjCmdProc tcl_cmd_account; Tcl_ObjCmdProc tcl_cmd_signal_connect; Tcl_ObjCmdProc tcl_cmd_buddy; +Tcl_ObjCmdProc tcl_cmd_cmd; Tcl_ObjCmdProc tcl_cmd_connection; Tcl_ObjCmdProc tcl_cmd_conversation; Tcl_ObjCmdProc tcl_cmd_core; Modified: branches/soc-2006-file-loggers/plugins/tcl/tcl_signals.c =================================================================== --- branches/soc-2006-file-loggers/plugins/tcl/tcl_signals.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/plugins/tcl/tcl_signals.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -387,7 +387,6 @@ g_string_free(val, TRUE); g_free(vals); g_free(strs); - return retval; } Modified: branches/soc-2006-file-loggers/src/cmds.h =================================================================== --- branches/soc-2006-file-loggers/src/cmds.h 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/cmds.h 2006-06-24 18:11:59 UTC (rev 16330) @@ -56,14 +56,14 @@ typedef guint GaimCmdId; enum _GaimCmdPriority { - GAIM_CMD_P_VERY_LOW = -1000, - GAIM_CMD_P_LOW = 0, - GAIM_CMD_P_DEFAULT = 1000, - GAIM_CMD_P_PRPL = 2000, - GAIM_CMD_P_PLUGIN = 3000, - GAIM_CMD_P_ALIAS = 4000, - GAIM_CMD_P_HIGH = 5000, - GAIM_CMD_P_VERYHIGH = 6000, + GAIM_CMD_P_VERY_LOW = -1000, + GAIM_CMD_P_LOW = 0, + GAIM_CMD_P_DEFAULT = 1000, + GAIM_CMD_P_PRPL = 2000, + GAIM_CMD_P_PLUGIN = 3000, + GAIM_CMD_P_ALIAS = 4000, + GAIM_CMD_P_HIGH = 5000, + GAIM_CMD_P_VERY_HIGH = 6000, }; enum _GaimCmdFlag { @@ -111,11 +111,11 @@ * @param f These are the flags. You need to at least pass one of GAIM_CMD_FLAG_IM or * GAIM_CMD_FLAG_CHAT (can may pass both) in order for the command to ever actually * be called. - * @param prpl_id This is the prpl's id string. This is only meaningful is the proper flag is set. + * @param prpl_id This is the prpl's id string. This is only meaningful if the proper flag is set. * @param func This is the function to call when someone enters this command. * @param helpstr This is a whitespace sensitive, UTF-8, HTML string describing how to use the command. * The preferred format of this string shall be the commands name, followed by a space - * and any arguments it accpets (if it takes any arguments, otherwise no space), follow + * and any arguments it accepts (if it takes any arguments, otherwise no space), followed * by a colon, two spaces, and a description of the command in sentence form. No slash * before the command name. * @param data User defined data to pass to the GaimCmdFunc Modified: branches/soc-2006-file-loggers/src/conversation.c =================================================================== --- branches/soc-2006-file-loggers/src/conversation.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/conversation.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -46,39 +46,44 @@ } static gboolean -reset_typing(gpointer data) +reset_typing_cb(gpointer data) { GaimConversation *c = (GaimConversation *)data; GaimConvIm *im; - if (!g_list_find(conversations, c)) - return FALSE; - im = GAIM_CONV_IM(c); gaim_conv_im_set_typing_state(im, GAIM_NOT_TYPING); gaim_conv_im_update_typing(im); gaim_conv_im_stop_typing_timeout(im); + gaim_signal_emit(gaim_conversations_get_handle(), + "buddy-typing-stopped", c->account, c->name); + return FALSE; } static gboolean -send_typed(gpointer data) +send_typed_cb(gpointer data) { GaimConversation *conv = (GaimConversation *)data; GaimConnection *gc; const char *name; g_return_val_if_fail(conv != NULL, FALSE); - + gc = gaim_conversation_get_gc(conv); name = gaim_conversation_get_name(conv); if (gc != NULL && name != NULL) { - gaim_conv_im_set_type_again(GAIM_CONV_IM(conv), TRUE); + /* We set this to 1 so that GAIM_TYPING will be sent + * if the Gaim user types anything else. + */ + gaim_conv_im_set_type_again(GAIM_CONV_IM(conv), 1); serv_send_typing(gc, name, GAIM_TYPED); + gaim_signal_emit(gaim_conversations_get_handle(), + "buddy-typed", conv->account, conv->name); gaim_debug(GAIM_DEBUG_MISC, "conversation", "typed...\n"); } @@ -263,7 +268,6 @@ conv->account = account; conv->name = g_strdup(name); conv->title = g_strdup(name); - conv->send_history = g_list_append(NULL, NULL); conv->data = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); /* copy features from the connection. */ @@ -419,20 +423,9 @@ conv->name = NULL; conv->title = NULL; - for (node = g_list_first(conv->send_history); - node != NULL; - node = g_list_next(node)) { - - if (node->data != NULL) - g_free(node->data); - node->data = NULL; - } - - g_list_free(g_list_first(conv->send_history)); - if (conv->type == GAIM_CONV_TYPE_IM) { gaim_conv_im_stop_typing_timeout(conv->u.im); - gaim_conv_im_stop_type_again_timeout(conv->u.im); + gaim_conv_im_stop_send_typed_timeout(conv->u.im); if (conv->u.im->icon != NULL) gaim_buddy_icon_unref(conv->u.im->icon); @@ -708,14 +701,6 @@ conv->logs = NULL; } -GList * -gaim_conversation_get_send_history(const GaimConversation *conv) -{ - g_return_val_if_fail(conv != NULL, NULL); - - return conv->send_history; -} - GaimConvIm * gaim_conversation_get_im_data(const GaimConversation *conv) { @@ -1006,9 +991,14 @@ gaim_signal_emit(gaim_conversations_get_handle(), "buddy-typing", im->conv->account, im->conv->name); } - else + else if (state == GAIM_TYPED) { gaim_signal_emit(gaim_conversations_get_handle(), + "buddy-typed", im->conv->account, im->conv->name); + } + else if (state == GAIM_NOT_TYPING) + { + gaim_signal_emit(gaim_conversations_get_handle(), "buddy-typing-stopped", im->conv->account, im->conv->name); } } @@ -1036,7 +1026,7 @@ conv = gaim_conv_im_get_conversation(im); name = gaim_conversation_get_name(conv); - im->typing_timeout = gaim_timeout_add(timeout * 1000, reset_typing, conv); + im->typing_timeout = gaim_timeout_add(timeout * 1000, reset_typing_cb, conv); } void @@ -1060,11 +1050,14 @@ } void -gaim_conv_im_set_type_again(GaimConvIm *im, time_t val) +gaim_conv_im_set_type_again(GaimConvIm *im, unsigned int val) { g_return_if_fail(im != NULL); - im->type_again = val; + if (val == 0) + im->type_again = 0; + else + im->type_again = time(NULL) + val; } time_t @@ -1076,32 +1069,32 @@ } void -gaim_conv_im_start_type_again_timeout(GaimConvIm *im) +gaim_conv_im_start_send_typed_timeout(GaimConvIm *im) { g_return_if_fail(im != NULL); - im->type_again_timeout = gaim_timeout_add(SEND_TYPED_TIMEOUT, send_typed, + im->send_typed_timeout = gaim_timeout_add(SEND_TYPED_TIMEOUT, send_typed_cb, gaim_conv_im_get_conversation(im)); } void -gaim_conv_im_stop_type_again_timeout(GaimConvIm *im) +gaim_conv_im_stop_send_typed_timeout(GaimConvIm *im) { g_return_if_fail(im != NULL); - if (im->type_again_timeout == 0) + if (im->send_typed_timeout == 0) return; - gaim_timeout_remove(im->type_again_timeout); - im->type_again_timeout = 0; + gaim_timeout_remove(im->send_typed_timeout); + im->send_typed_timeout = 0; } guint -gaim_conv_im_get_type_again_timeout(const GaimConvIm *im) +gaim_conv_im_get_send_typed_timeout(const GaimConvIm *im) { g_return_val_if_fail(im != NULL, 0); - return im->type_again_timeout; + return im->send_typed_timeout; } void @@ -2110,6 +2103,12 @@ GAIM_SUBTYPE_ACCOUNT), gaim_value_new(GAIM_TYPE_STRING)); + gaim_signal_register(handle, "buddy-typed", + gaim_marshal_VOID__POINTER_POINTER, NULL, 2, + gaim_value_new(GAIM_TYPE_SUBTYPE, + GAIM_SUBTYPE_ACCOUNT), + gaim_value_new(GAIM_TYPE_STRING)); + gaim_signal_register(handle, "buddy-typing-stopped", gaim_marshal_VOID__POINTER_POINTER, NULL, 2, gaim_value_new(GAIM_TYPE_SUBTYPE, Modified: branches/soc-2006-file-loggers/src/conversation.h =================================================================== --- branches/soc-2006-file-loggers/src/conversation.h 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/conversation.h 2006-06-24 18:11:59 UTC (rev 16330) @@ -186,7 +186,7 @@ GaimTypingState typing_state; /**< The current typing state. */ guint typing_timeout; /**< The typing timer handle. */ time_t type_again; /**< The type again time. */ - guint type_again_timeout; /**< The type again timer handle. */ + guint send_typed_timeout; /**< The type again timer handle. */ GaimBuddyIcon *icon; /**< The buddy icon. */ }; @@ -236,8 +236,6 @@ GList *logs; /**< This conversation's logs */ - GList *send_history; /**< The send history. */ - union { GaimConvIm *im; /**< IM-specific data. */ @@ -441,15 +439,6 @@ void gaim_conversation_close_logs(GaimConversation *conv); /** - * Returns the specified conversation's send history. - * - * @param conv The conversation. - * - * @return The conversation's send history. - */ -GList *gaim_conversation_get_send_history(const GaimConversation *conv); - -/** * Returns the specified conversation's IM-specific data. * * If the conversation type is not GAIM_CONV_TYPE_IM, this will return @c NULL. @@ -677,19 +666,25 @@ guint gaim_conv_im_get_typing_timeout(const GaimConvIm *im); /** - * Sets the IM's time until it should send another typing notification. + * Sets the quiet-time when no GAIM_TYPING messages will be sent. + * Few protocols need this (maybe only MSN). If the user is still + * typing after this quiet-period, then another GAIM_TYPING message + * will be sent. * * @param im The IM. - * @param val The time. + * @param val The number of seconds to wait before allowing another + * GAIM_TYPING message to be sent to the user. Or 0 to + * not send another GAIM_TYPING message. */ -void gaim_conv_im_set_type_again(GaimConvIm *im, time_t val); +void gaim_conv_im_set_type_again(GaimConvIm *im, unsigned int val); /** - * Returns the IM's time until it should send another typing notification. + * Returns the time after which another GAIM_TYPING message should be sent. * * @param im The IM. * - * @return The time. + * @return The time in seconds since the epoch. Or 0 if no additional + * GAIM_TYPING message should be sent. */ time_t gaim_conv_im_get_type_again(const GaimConvIm *im); @@ -698,14 +693,14 @@ * * @param im The IM. */ -void gaim_conv_im_start_type_again_timeout(GaimConvIm *im); +void gaim_conv_im_start_send_typed_timeout(GaimConvIm *im); /** * Stops the IM's type again timeout. * * @param im The IM. */ -void gaim_conv_im_stop_type_again_timeout(GaimConvIm *im); +void gaim_conv_im_stop_send_typed_timeout(GaimConvIm *im); /** * Returns the IM's type again timeout interval. @@ -714,7 +709,7 @@ * * @return The type again timeout interval. */ -guint gaim_conv_im_get_type_again_timeout(const GaimConvIm *im); +guint gaim_conv_im_get_send_typed_timeout(const GaimConvIm *im); /** * Updates the visual typing notification for an IM conversation. Modified: branches/soc-2006-file-loggers/src/ft.c =================================================================== --- branches/soc-2006-file-loggers/src/ft.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/ft.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -388,8 +388,9 @@ gaim_xfer_get_status(xfer) == GAIM_XFER_STATUS_ACCEPTED) { gchar* message = NULL; + GaimBuddy *buddy = gaim_find_buddy(xfer->account, xfer->who); message = g_strdup_printf(_("%s is offering to send file %s"), - xfer->who, gaim_xfer_get_filename(xfer)); + buddy ? gaim_buddy_get_alias(buddy) : xfer->who, gaim_xfer_get_filename(xfer)); gaim_xfer_conversation_write(xfer, message, FALSE); g_free(message); /* Ask for a filename to save to if it's not already given by a plugin */ Modified: branches/soc-2006-file-loggers/src/gtkblist.c =================================================================== --- branches/soc-2006-file-loggers/src/gtkblist.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/gtkblist.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -1659,6 +1659,11 @@ static void gaim_gtk_blist_drag_data_rcv_cb(GtkWidget *widget, GdkDragContext *dc, guint x, guint y, GtkSelectionData *sd, guint info, guint t) { + if (gtkblist->drag_timeout) { + g_source_remove(gtkblist->drag_timeout); + gtkblist->drag_timeout = 0; + } + if (sd->target == gdk_atom_intern("GAIM_BLIST_NODE", FALSE) && sd->data) { GaimBlistNode *n = NULL; GtkTreePath *path = NULL; Modified: branches/soc-2006-file-loggers/src/gtkconv.c =================================================================== --- branches/soc-2006-file-loggers/src/gtkconv.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/gtkconv.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -427,18 +427,14 @@ } static void -send_history_add(GaimConversation *conv, const char *message) +send_history_add(GaimGtkConversation *gtkconv, const char *message) { GList *first; - first = g_list_first(conv->send_history); - - if (first->data) - g_free(first->data); - + first = g_list_first(gtkconv->send_history); + g_free(first->data); first->data = g_strdup(message); - - conv->send_history = g_list_prepend(first, NULL); + gtkconv->send_history = g_list_prepend(first, NULL); } static gboolean @@ -462,7 +458,7 @@ GtkTextIter end; send_history = gtk_imhtml_get_markup(GTK_IMHTML(gtkconv->entry)); - send_history_add(conv, send_history); + send_history_add(gtkconv, send_history); g_free(send_history); cmdline = cmd + strlen(prefix); @@ -562,7 +558,7 @@ bufs = gtk_imhtml_get_markup_lines(GTK_IMHTML(gtkconv->entry)); for (i = 0; bufs[i]; i++) { - send_history_add(conv, bufs[i]); + send_history_add(gtkconv, bufs[i]); if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) gaim_conv_im_send_with_flags(GAIM_CONV_IM(conv), bufs[i], flags); else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) @@ -572,7 +568,7 @@ g_strfreev(bufs); } else { - send_history_add(conv, buf); + send_history_add(gtkconv, buf); if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) gaim_conv_im_send_with_flags(GAIM_CONV_IM(conv), buf, flags); else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) @@ -1787,29 +1783,28 @@ if (event->state & GDK_CONTROL_MASK) { switch (event->keyval) { case GDK_Up: - if (!conv->send_history) + if (!gtkconv->send_history) break; - if (!conv->send_history->prev) { + if (!gtkconv->send_history->prev) { GtkTextIter start, end; - if (conv->send_history->data) - g_free(conv->send_history->data); + g_free(gtkconv->send_history->data); gtk_text_buffer_get_start_iter(gtkconv->entry_buffer, &start); gtk_text_buffer_get_end_iter(gtkconv->entry_buffer, &end); - conv->send_history->data = + gtkconv->send_history->data = gtk_imhtml_get_markup(GTK_IMHTML(gtkconv->entry)); } - if (conv->send_history->next && conv->send_history->next->data) { + if (gtkconv->send_history->next && gtkconv->send_history->next->data) { GObject *object; GtkTextIter iter; GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry)); - conv->send_history = conv->send_history->next; + gtkconv->send_history = gtkconv->send_history->next; /* Block the signal to prevent application of default formatting. */ object = g_object_ref(G_OBJECT(gtkconv->entry)); @@ -1824,7 +1819,7 @@ gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); gtk_imhtml_append_text_with_images( - GTK_IMHTML(gtkconv->entry), conv->send_history->data, + GTK_IMHTML(gtkconv->entry), gtkconv->send_history->data, 0, NULL); /* this is mainly just a hack so the formatting at the * cursor gets picked up. */ @@ -1836,15 +1831,15 @@ break; case GDK_Down: - if (!conv->send_history) + if (!gtkconv->send_history) break; - if (conv->send_history->prev && conv->send_history->prev->data) { + if (gtkconv->send_history->prev && gtkconv->send_history->prev->data) { GObject *object; GtkTextIter iter; GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry)); - conv->send_history = conv->send_history->prev; + gtkconv->send_history = gtkconv->send_history->prev; /* Block the signal to prevent application of default formatting. */ object = g_object_ref(G_OBJECT(gtkconv->entry)); @@ -1859,11 +1854,11 @@ gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); gtk_imhtml_append_text_with_images( - GTK_IMHTML(gtkconv->entry), conv->send_history->data, + GTK_IMHTML(gtkconv->entry), gtkconv->send_history->data, 0, NULL); /* this is mainly just a hack so the formatting at the * cursor gets picked up. */ - if (*(char *)conv->send_history->data) { + if (*(char *)gtkconv->send_history->data) { gtk_text_buffer_get_end_iter(buffer, &iter); gtk_text_buffer_move_mark_by_name(buffer, "insert", &iter); } else { @@ -2173,8 +2168,7 @@ if (gtk_text_iter_is_start(start_pos) && gtk_text_iter_is_end(end_pos)) { /* We deleted all the text, so turn off typing. */ - if (gaim_conv_im_get_type_again_timeout(im)) - gaim_conv_im_stop_type_again_timeout(im); + gaim_conv_im_stop_send_typed_timeout(im); serv_send_typing(gaim_conversation_get_gc(conv), gaim_conversation_get_name(conv), @@ -2918,22 +2912,18 @@ im = GAIM_CONV_IM(conv); - if (gaim_conv_im_get_type_again_timeout(im)) - gaim_conv_im_stop_type_again_timeout(im); + gaim_conv_im_stop_send_typed_timeout(im); + gaim_conv_im_start_send_typed_timeout(im); - gaim_conv_im_start_type_again_timeout(im); - + /* Check if we need to send another GAIM_TYPING message */ if (first || (gaim_conv_im_get_type_again(im) != 0 && - time(NULL) > gaim_conv_im_get_type_again(im))) { - - int timeout = serv_send_typing(gaim_conversation_get_gc(conv), - (char *)gaim_conversation_get_name(conv), - GAIM_TYPING); - - if (timeout) - gaim_conv_im_set_type_again(im, time(NULL) + timeout); - else - gaim_conv_im_set_type_again(im, 0); + time(NULL) > gaim_conv_im_get_type_again(im))) + { + unsigned int timeout; + timeout = serv_send_typing(gaim_conversation_get_gc(conv), + gaim_conversation_get_name(conv), + GAIM_TYPING); + gaim_conv_im_set_type_again(im, timeout); } } @@ -4347,6 +4337,7 @@ conv->ui_data = gtkconv; gtkconv->active_conv = conv; gtkconv->convs = g_list_prepend(gtkconv->convs, conv); + gtkconv->send_history = g_list_append(NULL, NULL); /* Setup some initial variables. */ gtkconv->sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); @@ -4515,6 +4506,10 @@ gtk_object_sink(GTK_OBJECT(gtkconv->tooltips)); + gtkconv->send_history = g_list_first(gtkconv->send_history); + g_list_foreach(gtkconv->send_history, (GFunc)g_free, NULL); + g_list_free(gtkconv->send_history); + g_free(gtkconv); } Modified: branches/soc-2006-file-loggers/src/gtkconv.h =================================================================== --- branches/soc-2006-file-loggers/src/gtkconv.h 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/gtkconv.h 2006-06-24 18:11:59 UTC (rev 16330) @@ -114,6 +114,7 @@ { GaimConversation *active_conv; GList *convs; + GList *send_history; GaimGtkWindow *win; Modified: branches/soc-2006-file-loggers/src/gtkmain.c =================================================================== --- branches/soc-2006-file-loggers/src/gtkmain.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/gtkmain.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -432,6 +432,7 @@ char *opt_session_arg = NULL; int dologin_ret = -1; char *search_path; + GList *accounts; #ifdef HAVE_SIGNAL_H int sig_indx; /* for setting up signal catching */ sigset_t sigset; @@ -752,10 +753,14 @@ gaim_accounts_restore_current_statuses(); } - if (gaim_accounts_get_all_active() == NULL) + if ((accounts = gaim_accounts_get_all_active()) == NULL) { gaim_gtk_accounts_window_show(); } + else + { + g_list_free(accounts); + } #ifdef HAVE_STARTUP_NOTIFICATION startup_notification_complete(); Modified: branches/soc-2006-file-loggers/src/gtkpounce.c =================================================================== --- branches/soc-2006-file-loggers/src/gtkpounce.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/gtkpounce.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -81,6 +81,7 @@ GtkWidget *idle; GtkWidget *idle_return; GtkWidget *typing; + GtkWidget *typed; GtkWidget *stop_typing; GtkWidget *message_recv; @@ -278,6 +279,9 @@ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->typing))) events |= GAIM_POUNCE_TYPING; + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->typed))) + events |= GAIM_POUNCE_TYPED; + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->stop_typing))) events |= GAIM_POUNCE_TYPING_STOPPED; @@ -564,7 +568,7 @@ /* Create the "Pounce When Buddy..." frame. */ frame = gaim_gtk_make_frame(vbox2, _("Pounce When Buddy...")); - table = gtk_table_new(2, 4, FALSE); + table = gtk_table_new(5, 2, FALSE); gtk_container_add(GTK_CONTAINER(frame), table); gtk_table_set_col_spacings(GTK_TABLE(table), GAIM_HIG_BORDER); gtk_widget_show(table); @@ -583,29 +587,33 @@ gtk_check_button_new_with_mnemonic(_("Is no longer i_dle")); dialog->typing = gtk_check_button_new_with_mnemonic(_("Starts _typing")); + dialog->typed = + gtk_check_button_new_with_mnemonic(_("P_auses while typing")); dialog->stop_typing = gtk_check_button_new_with_mnemonic(_("Stops t_yping")); dialog->message_recv = gtk_check_button_new_with_mnemonic(_("Sends a _message")); - gtk_table_attach(GTK_TABLE(table), dialog->signon, 0, 1, 0, 1, + gtk_table_attach(GTK_TABLE(table), dialog->message_recv, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); - gtk_table_attach(GTK_TABLE(table), dialog->signoff, 1, 2, 0, 1, + gtk_table_attach(GTK_TABLE(table), dialog->signon, 0, 1, 1, 2, GTK_FILL, 0, 0, 0); - gtk_table_attach(GTK_TABLE(table), dialog->away, 0, 1, 1, 2, + gtk_table_attach(GTK_TABLE(table), dialog->signoff, 0, 1, 2, 3, GTK_FILL, 0, 0, 0); - gtk_table_attach(GTK_TABLE(table), dialog->away_return, 1, 2, 1, 2, + gtk_table_attach(GTK_TABLE(table), dialog->away, 0, 1, 3, 4, GTK_FILL, 0, 0, 0); - gtk_table_attach(GTK_TABLE(table), dialog->idle, 0, 1, 2, 3, + gtk_table_attach(GTK_TABLE(table), dialog->away_return, 0, 1, 4, 5, GTK_FILL, 0, 0, 0); - gtk_table_attach(GTK_TABLE(table), dialog->idle_return, 1, 2, 2, 3, + gtk_table_attach(GTK_TABLE(table), dialog->idle, 1, 2, 0, 1, GTK_FILL, 0, 0, 0); - gtk_table_attach(GTK_TABLE(table), dialog->typing, 0, 1, 3, 4, + gtk_table_attach(GTK_TABLE(table), dialog->idle_return, 1, 2, 1, 2, GTK_FILL, 0, 0, 0); - gtk_table_attach(GTK_TABLE(table), dialog->stop_typing, 1, 2, 3, 4, + gtk_table_attach(GTK_TABLE(table), dialog->typing, 1, 2, 2, 3, GTK_FILL, 0, 0, 0); - gtk_table_attach(GTK_TABLE(table), dialog->message_recv, 0, 1, 4, 5, + gtk_table_attach(GTK_TABLE(table), dialog->typed, 1, 2, 3, 4, GTK_FILL, 0, 0, 0); + gtk_table_attach(GTK_TABLE(table), dialog->stop_typing, 1, 2, 4, 5, + GTK_FILL, 0, 0, 0); gtk_widget_show(dialog->signon); gtk_widget_show(dialog->signoff); @@ -614,6 +622,7 @@ gtk_widget_show(dialog->idle); gtk_widget_show(dialog->idle_return); gtk_widget_show(dialog->typing); + gtk_widget_show(dialog->typed); gtk_widget_show(dialog->stop_typing); gtk_widget_show(dialog->message_recv); @@ -845,6 +854,8 @@ (events & GAIM_POUNCE_IDLE_RETURN)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->typing), (events & GAIM_POUNCE_TYPING)); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->typed), + (events & GAIM_POUNCE_TYPED)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->stop_typing), (events & GAIM_POUNCE_TYPING_STOPPED)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->message_recv), @@ -1429,6 +1440,8 @@ tmp = g_strdup_printf( (events & GAIM_POUNCE_TYPING) ? _("%s has started typing to you (%s)") : + (events & GAIM_POUNCE_TYPED) ? + _("%s has paused while typing to you (%s)") : (events & GAIM_POUNCE_SIGNON) ? _("%s has signed on (%s)") : (events & GAIM_POUNCE_IDLE_RETURN) ? Modified: branches/soc-2006-file-loggers/src/gtksavedstatuses.c =================================================================== --- branches/soc-2006-file-loggers/src/gtksavedstatuses.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/gtksavedstatuses.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -760,6 +760,10 @@ type = gaim_account_get_status_type(account, id); gaim_savedstatus_set_substatus(saved_status, account, type, message); } + else + { + gaim_savedstatus_unset_substatus(saved_status, account); + } g_free(id); g_free(message); } while (gtk_tree_model_iter_next(model, &iter)); Modified: branches/soc-2006-file-loggers/src/gtkstatusbox.c =================================================================== --- branches/soc-2006-file-loggers/src/gtkstatusbox.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/gtkstatusbox.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -744,7 +744,11 @@ { g_source_remove(status_box->typing); status_box->typing = 0; - status_menu_refresh_iter(status_box); + if (status_box->account != NULL) + update_to_reflect_account_status(status_box, status_box->account, + gaim_account_get_active_status(status_box->account)); + else + status_menu_refresh_iter(status_box); return TRUE; } Modified: branches/soc-2006-file-loggers/src/pounce.c =================================================================== --- branches/soc-2006-file-loggers/src/pounce.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/pounce.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -206,6 +206,8 @@ add_event_to_xmlnode(child, "return-from-idle"); if (events & GAIM_POUNCE_TYPING) add_event_to_xmlnode(child, "start-typing"); + if (events & GAIM_POUNCE_TYPED) + add_event_to_xmlnode(child, "typed"); if (events & GAIM_POUNCE_TYPING_STOPPED) add_event_to_xmlnode(child, "stop-typing"); if (events & GAIM_POUNCE_MESSAGE_RECEIVED) @@ -411,7 +413,7 @@ else if (!strcmp(element_name, "option")) { if (!strcmp(data->option_type, "on-away")) data->options |= GAIM_POUNCE_OPTION_AWAY; - + g_free(data->option_type); data->option_type = NULL; } @@ -430,6 +432,8 @@ data->events |= GAIM_POUNCE_IDLE_RETURN; else if (!strcmp(data->event_type, "start-typing")) data->events |= GAIM_POUNCE_TYPING; + else if (!strcmp(data->event_type, "typed")) + data->events |= GAIM_POUNCE_TYPED; else if (!strcmp(data->event_type, "stop-typing")) data->events |= GAIM_POUNCE_TYPING_STOPPED; else if (!strcmp(data->event_type, "message-received")) @@ -1059,10 +1063,16 @@ conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, account); if (conv != NULL) { + GaimTypingState state; GaimPounceEvent event; - event = (gaim_conv_im_get_typing_state(GAIM_CONV_IM(conv)) == GAIM_TYPING - ? GAIM_POUNCE_TYPING : GAIM_POUNCE_TYPING_STOPPED); + state = gaim_conv_im_get_typing_state(GAIM_CONV_IM(conv)); + if (state == GAIM_TYPED) + event = GAIM_POUNCE_TYPED; + else if (state == GAIM_NOT_TYPING) + event = GAIM_POUNCE_TYPING_STOPPED; + else + event = GAIM_POUNCE_TYPING; gaim_pounce_execute(account, name, event); } @@ -1105,6 +1115,8 @@ gaim_signal_connect(conv_handle, "buddy-typing", handle, GAIM_CALLBACK(buddy_typing_cb), NULL); + gaim_signal_connect(conv_handle, "buddy-typed", + handle, GAIM_CALLBACK(buddy_typing_cb), NULL); gaim_signal_connect(conv_handle, "buddy-typing-stopped", handle, GAIM_CALLBACK(buddy_typing_cb), NULL); Modified: branches/soc-2006-file-loggers/src/pounce.h =================================================================== --- branches/soc-2006-file-loggers/src/pounce.h 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/pounce.h 2006-06-24 18:11:59 UTC (rev 16330) @@ -35,16 +35,17 @@ */ typedef enum { - GAIM_POUNCE_NONE = 0x00, /**< No events. */ - GAIM_POUNCE_SIGNON = 0x01, /**< The buddy signed on. */ - GAIM_POUNCE_SIGNOFF = 0x02, /**< The buddy signed off. */ - GAIM_POUNCE_AWAY = 0x04, /**< The buddy went away. */ - GAIM_POUNCE_AWAY_RETURN = 0x08, /**< The buddy returned from away. */ - GAIM_POUNCE_IDLE = 0x10, /**< The buddy became idle. */ - GAIM_POUNCE_IDLE_RETURN = 0x20, /**< The buddy is no longer idle. */ - GAIM_POUNCE_TYPING = 0x40, /**< The buddy started typing. */ - GAIM_POUNCE_TYPING_STOPPED = 0x80, /**< The buddy stopped typing. */ - GAIM_POUNCE_MESSAGE_RECEIVED = 0x100 /**< The buddy sent a message */ + GAIM_POUNCE_NONE = 0x000, /**< No events. */ + GAIM_POUNCE_SIGNON = 0x001, /**< The buddy signed on. */ + GAIM_POUNCE_SIGNOFF = 0x002, /**< The buddy signed off. */ + GAIM_POUNCE_AWAY = 0x004, /**< The buddy went away. */ + GAIM_POUNCE_AWAY_RETURN = 0x008, /**< The buddy returned from away. */ + GAIM_POUNCE_IDLE = 0x010, /**< The buddy became idle. */ + GAIM_POUNCE_IDLE_RETURN = 0x020, /**< The buddy is no longer idle. */ + GAIM_POUNCE_TYPING = 0x040, /**< The buddy started typing. */ + GAIM_POUNCE_TYPED = 0x080, /**< The buddy has entered text. */ + GAIM_POUNCE_TYPING_STOPPED = 0x100, /**< The buddy stopped typing. */ + GAIM_POUNCE_MESSAGE_RECEIVED = 0x200 /**< The buddy sent a message */ } GaimPounceEvent; Modified: branches/soc-2006-file-loggers/src/protocols/irc/cmds.c =================================================================== --- branches/soc-2006-file-loggers/src/protocols/irc/cmds.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/protocols/irc/cmds.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -372,6 +372,8 @@ g_free(buf); irc->quitting = TRUE; + + gaim_account_set_status(irc->account, "offline", TRUE, NULL); } return 0; Modified: branches/soc-2006-file-loggers/src/protocols/jabber/message.c =================================================================== --- branches/soc-2006-file-loggers/src/protocols/jabber/message.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/protocols/jabber/message.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -589,7 +589,7 @@ return 1; } -int jabber_send_typing(GaimConnection *gc, const char *who, int typing) +unsigned int jabber_send_typing(GaimConnection *gc, const char *who, GaimTypingState state) { JabberMessage *jm; JabberBuddy *jb; @@ -611,9 +611,9 @@ jm->to = g_strdup(who); jm->id = jabber_get_next_id(jm->js); - if(GAIM_TYPING == typing) + if(GAIM_TYPING == state) jm->chat_state = JM_STATE_COMPOSING; - else if(GAIM_TYPED == typing) + else if(GAIM_TYPED == state) jm->chat_state = JM_STATE_PAUSED; else jm->chat_state = JM_STATE_ACTIVE; Modified: branches/soc-2006-file-loggers/src/protocols/jabber/message.h =================================================================== --- branches/soc-2006-file-loggers/src/protocols/jabber/message.h 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/protocols/jabber/message.h 2006-06-24 18:11:59 UTC (rev 16330) @@ -71,7 +71,7 @@ GaimMessageFlags flags); int jabber_message_send_chat(GaimConnection *gc, int id, const char *message, GaimMessageFlags flags); -int jabber_send_typing(GaimConnection *gc, const char *who, int typing); +unsigned int jabber_send_typing(GaimConnection *gc, const char *who, GaimTypingState state); #endif /* _GAIM_JABBER_MESSAGE_H_ */ Modified: branches/soc-2006-file-loggers/src/protocols/msn/msn.c =================================================================== --- branches/soc-2006-file-loggers/src/protocols/msn/msn.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/protocols/msn/msn.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -836,8 +836,8 @@ return 1; } -static int -msn_send_typing(GaimConnection *gc, const char *who, int typing) +static unsigned int +msn_send_typing(GaimConnection *gc, const char *who, GaimTypingState state) { GaimAccount *account; MsnSession *session; @@ -847,7 +847,12 @@ account = gaim_connection_get_account(gc); session = gc->proto_data; - if (!typing) + /* + * TODO: I feel like this should be "if (state != GAIM_TYPING)" + * but this is how it was before, and I don't want to break + * anything. --KingAnt + */ + if (state == GAIM_NOT_TYPING) return 0; if (!g_ascii_strcasecmp(who, gaim_account_get_username(account))) Modified: branches/soc-2006-file-loggers/src/protocols/novell/novell.c =================================================================== --- branches/soc-2006-file-loggers/src/protocols/novell/novell.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/protocols/novell/novell.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -2303,8 +2303,8 @@ return 1; } -static int -novell_send_typing(GaimConnection * gc, const char *name, int typing) +static unsigned int +novell_send_typing(GaimConnection * gc, const char *name, GaimTypingState state) { NMConference *conf = NULL; NMUser *user; @@ -2312,11 +2312,11 @@ NMERR_T rc = NM_OK; if (gc == NULL || name == NULL) - return -1; + return 0; user = gc->proto_data; if (user == NULL) - return -1; + return 0; /* Need to get the DN for the buddy so we can look up the convo */ dn = nm_lookup_dn(user, name); @@ -2327,7 +2327,7 @@ if (conf) { rc = nm_send_typing(user, conf, - ((typing == GAIM_TYPING) ? TRUE : FALSE), NULL); + ((state == GAIM_TYPING) ? TRUE : FALSE), NULL); _check_for_disconnect(user, rc); } Modified: branches/soc-2006-file-loggers/src/protocols/oscar/oscar.c =================================================================== --- branches/soc-2006-file-loggers/src/protocols/oscar/oscar.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/protocols/oscar/oscar.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -1113,9 +1113,8 @@ od->iconconnecting = FALSE; - if (od->icontimer) - gaim_timeout_remove(od->icontimer); - od->icontimer = gaim_timeout_add(100, gaim_icon_timerfunc, gc); + if (od->icontimer == 0) + od->icontimer = gaim_timeout_add(100, gaim_icon_timerfunc, gc); } static int @@ -1815,9 +1814,8 @@ cur = cur->next; if (!cur) { od->requesticon = g_slist_append(od->requesticon, g_strdup(gaim_normalize(account, info->sn))); - if (od->icontimer) - gaim_timeout_remove(od->icontimer); - od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); + if (od->icontimer == 0) + od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); } } g_free(b16); @@ -3169,9 +3167,8 @@ od->requesticon = g_slist_remove(od->requesticon, sn); g_free(sn); - if (od->icontimer) - gaim_timeout_remove(od->icontimer); - od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); + if (od->icontimer == 0) + od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); return 1; } @@ -3221,9 +3218,8 @@ cur = cur->next; } - if (od->icontimer) - gaim_timeout_remove(od->icontimer); - od->icontimer = gaim_timeout_add(250, gaim_icon_timerfunc, gc); + if (od->icontimer == 0) + od->icontimer = gaim_timeout_add(250, gaim_icon_timerfunc, gc); return 1; } @@ -3234,6 +3230,8 @@ aim_userinfo_t *userinfo; FlapConnection *conn; + od->icontimer = 0; + conn = flap_connection_getbytype(od, SNAC_FAMILY_BART); if (!conn) { if (!od->iconconnecting) { @@ -3286,7 +3284,9 @@ g_free(sn); } - return TRUE; + od->icontimer = gaim_timeout_add(100, gaim_icon_timerfunc, gc); + + return FALSE; } /* @@ -3945,8 +3945,8 @@ flap_connection_send_keepalive(od, conn); } -static int -oscar_send_typing(GaimConnection *gc, const char *name, int typing) +static unsigned int +oscar_send_typing(GaimConnection *gc, const char *name, GaimTypingState state) { OscarData *od; PeerConnection *conn; @@ -3956,7 +3956,7 @@ if ((conn != NULL) && (conn->ready)) { - peer_odc_send_typing(conn, typing); + peer_odc_send_typing(conn, state); } else { /* Don't send if this turkey is in our deny list */ @@ -3965,9 +3965,9 @@ if (!list) { struct buddyinfo *bi = g_hash_table_lookup(od->buddyinfo, gaim_normalize(gc->account, name)); if (bi && bi->typingnot) { - if (typing == GAIM_TYPING) + if (state == GAIM_TYPING) aim_im_sendmtn(od, 0x0001, name, 0x0002); - else if (typing == GAIM_TYPED) + else if (state == GAIM_TYPED) aim_im_sendmtn(od, 0x0001, name, 0x0001); else aim_im_sendmtn(od, 0x0001, name, 0x0000); Modified: branches/soc-2006-file-loggers/src/protocols/sametime/sametime.c =================================================================== --- branches/soc-2006-file-loggers/src/protocols/sametime/sametime.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/protocols/sametime/sametime.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -3965,14 +3965,14 @@ } -static int mw_prpl_send_typing(GaimConnection *gc, const char *name, - int typing) { +static unsigned int mw_prpl_send_typing(GaimConnection *gc, const char *name, + GaimTypingState state) { struct mwGaimPluginData *pd; struct mwIdBlock who = { (char *) name, NULL }; struct mwConversation *conv; - gpointer t = GINT_TO_POINTER(!! typing); + gpointer t = GINT_TO_POINTER(!! state); g_return_val_if_fail(gc != NULL, 0); pd = gc->proto_data; @@ -3984,7 +3984,7 @@ if(mwConversation_isOpen(conv)) return ! mwConversation_send(conv, mwImSend_TYPING, t); - if(typing) { + if ((state == GAIM_TYPING) || (state == GAIM_TYPED)) { /* let's only open a channel for typing, not for not-typing. Otherwise two users in psychic mode will continually open conversations to each other, never able to get rid of them, as @@ -3996,6 +3996,11 @@ mwConversation_open(conv); } + /* + * TODO: This should probably be "0." When it's set to 1, the Gaim + * core will call serv_send_typing(gc, who, GAIM_TYPING) once + * every second until the Gaim user stops typing. --KingAnt + */ return 1; } Modified: branches/soc-2006-file-loggers/src/protocols/simple/simple.c =================================================================== --- branches/soc-2006-file-loggers/src/protocols/simple/simple.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/protocols/simple/simple.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -1053,7 +1053,7 @@ send_sip_response(sip->gc, msg, 200, "OK", NULL); } -static int simple_typing(GaimConnection *gc, const char *name, int typing) { +static unsigned int simple_typing(GaimConnection *gc, const char *name, GaimTypingState state) { struct simple_account_data *sip = gc->proto_data; gchar *xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" @@ -1065,16 +1065,22 @@ "<refresh>60</refresh>\n" "</isComposing>"; gchar *recv = g_strdup(name); - if(typing == GAIM_TYPING) { + if(state == GAIM_TYPING) { gchar *msg = g_strdup_printf(xml, "active"); simple_send_message(sip, recv, msg, "application/im-iscomposing+xml"); g_free(msg); - } else { + } else /* TODO: Only if (state == GAIM_TYPED) ? */ { gchar *msg = g_strdup_printf(xml, "idle"); simple_send_message(sip, recv, msg, "application/im-iscomposing+xml"); g_free(msg); } g_free(recv); + /* + * TODO: Is this right? It will cause the core to call + * serv_send_typing(gc, who, GAIM_TYPING) once every second + * until the user stops typing. If that's not desired, + * then return 0 instead. + */ return 1; } Modified: branches/soc-2006-file-loggers/src/protocols/yahoo/yahoo.c =================================================================== --- branches/soc-2006-file-loggers/src/protocols/yahoo/yahoo.c 2006-06-24 12:04:32 UTC (rev 16329) +++ branches/soc-2006-file-loggers/src/protocols/yahoo/yahoo.c 2006-06-24 18:11:59 UTC (rev 16330) @@ -670,6 +670,7 @@ static void yahoo_process_message(GaimConnection *gc, struct yahoo_packet *pkt) { + struct yahoo_data *yd = gc->proto_data; GSList *l = pkt->hash; GSList *list = NULL; struct _yahoo_im *im = NULL; @@ -712,24 +713,29 @@ /** TODO: It seems that this check should be per IM, not global */ /* Check for the Doodle IMV */ - if(im != NULL && imv != NULL && !strcmp(imv, "doodle;11")) + if (im != NULL && imv!= NULL && im->from != NULL) { - GaimWhiteboard *wb; + g_hash_table_replace(yd->imvironments, g_strdup(im->from), g_strdup(imv)); - if (!yahoo_privacy_check(gc, im->from)) { - gaim_debug_info("yahoo", "Doodle request from %s dropped.\n", im->from); - return; - } + if (strcmp(imv, "doodle;11") == 0) + { + GaimWhiteboard *wb; - wb = gaim_whiteboard_get_session(gc->account, im->from); + if (!yahoo_privacy_check(gc, im->from)) { + gaim_debug_info("yahoo", "Doodle request from %s dropped.\n", im->from); + return; + } - /* If a Doodle session doesn't exist between this user */ - if(wb == NULL) - { - wb = gaim_whiteboard_create(gc->account, im->from, DOODLE_STATE_REQUESTED); + wb = gaim_whiteboard_get_session(gc->account, im->from); - yahoo_doodle_command_send_request(gc, im->from); - yahoo_doodle_command_send_ready(gc, im->from); + /* If a Doodle session doesn't exist between this user */ + if(wb == NULL) + { + wb = gaim_whiteboard_create(gc->account, im->from, DOODLE_STATE_REQUESTED); + + yahoo_doodle_command_send_request(gc, im->from); + yahoo_doodle_command_send_ready(gc, im->from); + } } } @@ -2576,6 +2582,7 @@ /* TODO: Is there a good grow size for the buffer? */ yd->txbuf = gaim_circ_buffer_new(0); yd->friends = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, yahoo_friend_free); + yd->imvironments = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); yd->confs = NULL; yd->conf_id = 2; @@ -2628,6 +2635,7 @@ yahoo_c_leave(gc, 1); /* 1 = YAHOO_CHAT_ID */ g_hash_table_destroy(yd->friends); + g_hash_table_destroy(yd->imvironments); g_free(yd->chat_name); g_free(yd->cookie_y); @@ -3101,14 +3109,30 @@ yahoo_packet_hash_str(pkt, 97, "1"); yahoo_packet_hash_str(pkt, 14, msg2); - /* If this message is to a user who is also Doodling with the local user, + /* + * IMVironment. + * + * If this message is to a user who is also Doodling with the local user, * format the chat packet with the correct IMV information (thanks Yahoo!) - */ - wb = gaim_whiteboard_get_session(gc->account, (char*)who); + * + * Otherwise attempt to use the same IMVironment as the remote user, + * just so that we don't inadvertantly reset their IMVironment back + * to nothing. + * + * If they have no set an IMVironment, then use the default.... [truncated message content] |
From: <may...@us...> - 2006-06-24 12:05:04
|
Revision: 16329 Author: mayuan2006 Date: 2006-06-24 05:04:32 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16329&view=rev Log Message: ----------- change it to windows Live Messenger Basic TWN authentication OK now Modified Paths: -------------- branches/soc-2006-msnp13/src/protocols/msn/cmdproc.c branches/soc-2006-msnp13/src/protocols/msn/command.c branches/soc-2006-msnp13/src/protocols/msn/msn.c branches/soc-2006-msnp13/src/protocols/msn/msn.h branches/soc-2006-msnp13/src/protocols/msn/nexus.c branches/soc-2006-msnp13/src/protocols/msn/nexus.h branches/soc-2006-msnp13/src/protocols/msn/notification.c branches/soc-2006-msnp13/src/protocols/msn/servconn.c branches/soc-2006-msnp13/src/protocols/msn/session.c branches/soc-2006-msnp13/src/protocols/msn/sync.c Modified: branches/soc-2006-msnp13/src/protocols/msn/cmdproc.c =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/cmdproc.c 2006-06-24 10:10:53 UTC (rev 16328) +++ branches/soc-2006-msnp13/src/protocols/msn/cmdproc.c 2006-06-24 12:04:32 UTC (rev 16329) @@ -228,8 +228,7 @@ { MsnMsgTypeCb cb; - if (msn_message_get_content_type(msg) == NULL) - { + if (msn_message_get_content_type(msg) == NULL){ gaim_debug_misc("msn", "failed to find message content\n"); return; } @@ -237,8 +236,7 @@ cb = g_hash_table_lookup(cmdproc->cbs_table->msgs, msn_message_get_content_type(msg)); - if (cb == NULL) - { + if (cb == NULL){ gaim_debug_warning("msn", "Unhandled content-type '%s'\n", msn_message_get_content_type(msg)); Modified: branches/soc-2006-msnp13/src/protocols/msn/command.c =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/command.c 2006-06-24 10:10:53 UTC (rev 16328) +++ branches/soc-2006-msnp13/src/protocols/msn/command.c 2006-06-24 12:04:32 UTC (rev 16329) @@ -36,12 +36,67 @@ return TRUE; } +/* + * check the command is the command with payload content + * if it is return TRUE + * else return FALSE + */ +static gboolean +isPayloadCmd(char *str) +{ + if( (!strcmp(str,"ADL")) || + (!strcmp(str,"GCF")) || + (!strcmp(str,"MSG")) || + (!strcmp(str,"QRY")) || + (!strcmp(str,"RML")) || + (!strcmp(str,"UBX")) || + (!strcmp(str,"UBN")) || + (!strcmp(str,"UUN")) || + (!strcmp(str,"UUX"))){ + return TRUE; + } + + return FALSE; +} + +/*get the payload positon*/ +int getPayloadPosition(char *str) +{ + /*because MSG has "MSG hotmail hotmail [payload length]"*/ + if(!(strcmp(str,"MSG"))){ + return 2; + } + return 1; +} +/* + * set command Payload length + */ +int +setPayloadLen(MsnCommand *cmd) +{ + char * param; + + if(isPayloadCmd(cmd->command)){ + if(!(strcmp(cmd->command,"MSG"))){ + param = cmd->params[2]; + }else{ + param = cmd->params[1]; + } + cmd->payload_len = is_num(param) ? atoi(param) : 0; + }else{ + cmd->payload_len = 0; + } + return 0; +} + MsnCommand * msn_command_from_string(const char *string) { MsnCommand *cmd; char *tmp; char *param_start; + char *param; + int c; g_return_val_if_fail(string != NULL, NULL); @@ -51,11 +106,7 @@ cmd = g_new0(MsnCommand, 1); cmd->command = tmp; - if (param_start) - { - char *param; - int c; - + if (param_start){ *param_start++ = '\0'; cmd->params = g_strsplit(param_start, " ", 0); @@ -65,10 +116,14 @@ param = cmd->params[0]; cmd->trId = is_num(param) ? atoi(param) : 0; + }else{ + cmd->trId = 0; } - else - cmd->trId = 0; + /*add payload Length checking*/ + setPayloadLen(cmd); + gaim_debug_info("MaYuan","get payload len:%d\n",cmd->payload_len); + msn_command_ref(cmd); return cmd; Modified: branches/soc-2006-msnp13/src/protocols/msn/msn.c =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/msn.c 2006-06-24 10:10:53 UTC (rev 16328) +++ branches/soc-2006-msnp13/src/protocols/msn/msn.c 2006-06-24 12:04:32 UTC (rev 16329) @@ -2025,10 +2025,10 @@ "MSN", /**< name */ VERSION, /**< version */ /** summary */ - N_("MSN Protocol Plugin"), + N_("Windows Live Messenger Protocol Plugin"), /** description */ - N_("MSN Protocol Plugin"), - "Christian Hammond <ch...@gn...>", /**< author */ + N_("Windows Live Messenger Protocol Plugin"), + "MaYuan <may...@gm...>", /**< author */ GAIM_WEBSITE, /**< homepage */ msn_load, /**< load */ @@ -2047,11 +2047,11 @@ GaimAccountOption *option; option = gaim_account_option_string_new(_("Server"), "server", - MSN_SERVER); + WLM_SERVER); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - option = gaim_account_option_int_new(_("Port"), "port", 1863); + option = gaim_account_option_int_new(_("Port"), "port", WLM_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); Modified: branches/soc-2006-msnp13/src/protocols/msn/msn.h =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/msn.h 2006-06-24 10:10:53 UTC (rev 16328) +++ branches/soc-2006-msnp13/src/protocols/msn/msn.h 2006-06-24 12:04:32 UTC (rev 16329) @@ -62,6 +62,12 @@ #define USEROPT_MSNPORT 4 #define MSN_PORT 1863 +/* Windows Live Messenger Server*/ +#define WLM_SERVER "muser.messenger.hotmail.com" +#define WLM_PORT 1863 +#define WLM_PROT_VER 13 +#define WLM_MIN_PROTOCOL 13 + #define MSN_TYPING_RECV_TIMEOUT 6 #define MSN_TYPING_SEND_TIMEOUT 4 Modified: branches/soc-2006-msnp13/src/protocols/msn/nexus.c =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/nexus.c 2006-06-24 10:10:53 UTC (rev 16328) +++ branches/soc-2006-msnp13/src/protocols/msn/nexus.c 2006-06-24 12:04:32 UTC (rev 16329) @@ -68,19 +68,25 @@ msn_ssl_read(MsnNexus *nexus) { gssize len; + gssize total_len = 0; char temp_buf[4096]; - if ((len = gaim_ssl_read(nexus->gsc, temp_buf, + if((len = gaim_ssl_read(nexus->gsc, temp_buf, sizeof(temp_buf))) > 0) { +#if 0 + g_string_append(nexus->read_buf,temp_buf); +#else + total_len += len; nexus->read_buf = g_realloc(nexus->read_buf, nexus->read_len + len + 1); strncpy(nexus->read_buf + nexus->read_len, temp_buf, len); nexus->read_len += len; nexus->read_buf[nexus->read_len] = '\0'; +#endif } - - return len; +// gaim_debug_info("MaYuan","nexus ssl read:{%s}\n",nexus->read_buf); + return total_len; } static void @@ -91,6 +97,10 @@ total_len = strlen(nexus->write_buf); + /* + * write the content to SSL server, + * We use SOAP to request Windows Live ID authentication + */ len = gaim_ssl_write(nexus->gsc, nexus->write_buf + nexus->written_len, total_len - nexus->written_len); @@ -157,12 +167,11 @@ nexus->input_handler = gaim_input_add(nexus->gsc->fd, GAIM_INPUT_READ, nexus_login_written_cb, nexus); - + /*read the request header*/ len = msn_ssl_read(nexus); - - if (len < 0 && errno == EAGAIN) + if (len < 0 && errno == EAGAIN){ return; - else if (len < 0) { + }else if (len < 0) { gaim_input_remove(nexus->input_handler); nexus->input_handler = -1; g_free(nexus->read_buf); @@ -172,20 +181,22 @@ return; } + if(nexus->read_buf == NULL){ + return; + } if (g_strstr_len(nexus->read_buf, nexus->read_len, - "\r\n\r\n") == NULL) + "</S:Envelope>") == NULL){ return; + } gaim_input_remove(nexus->input_handler); nexus->input_handler = -1; - gaim_ssl_close(nexus->gsc); nexus->gsc = NULL; - gaim_debug_misc("msn", "ssl buffer: {%s}", nexus->read_buf); +// gaim_debug_misc("msn", "TWN Server Reply: {%s}", nexus->read_buf); - if (strstr(nexus->read_buf, "HTTP/1.1 302") != NULL) - { + if (strstr(nexus->read_buf, "HTTP/1.1 302") != NULL){ /* Redirect. */ char *location, *c; @@ -221,15 +232,11 @@ gaim_ssl_connect(session->account, nexus->login_host, GAIM_SSL_DEFAULT_PORT, login_connect_cb, login_error_cb, nexus); - } - else if (strstr(nexus->read_buf, "HTTP/1.1 401 Unauthorized") != NULL) - { + }else if (strstr(nexus->read_buf, "HTTP/1.1 401 Unauthorized") != NULL){ const char *error; - if ((error = strstr(nexus->read_buf, "WWW-Authenticate")) != NULL) - { - if ((error = strstr(error, "cbtxt=")) != NULL) - { + if ((error = strstr(nexus->read_buf, "WWW-Authenticate")) != NULL) { + if ((error = strstr(error, "cbtxt=")) != NULL){ const char *c; char *temp; @@ -243,45 +250,60 @@ g_free(temp); } } - msn_session_set_error(session, MSN_ERROR_AUTH, error); - } - else if (strstr(nexus->read_buf, "HTTP/1.1 200 OK")) - { + }else if (strstr(nexus->read_buf, "HTTP/1.1 200 OK")){ + /*reply OK, we should process the SOAP body*/ char *base, *c; char *login_params; + char *length_start,*length_end,*body_len; + char **elems, **cur, **tokens; + const char * cert_str; + + gaim_debug_info("MaYuan","Receive 200\n"); #if 0 - /* All your base are belong to us. */ - base = buffer; + length_start = strstr(nexus->read_buf, "Content-Length: "); + length_start += strlen("Content-Length: "); + length_end = strstr(length_start, "\r\n"); + body_len = g_strndup(length_start,length_end - length_start); +// gaim_debug_info("MaYuan","body length is :%s\n",body_len); - /* For great cookie! */ - while ((base = strstr(base, "Set-Cookie: ")) != NULL) - { - base += strlen("Set-Cookie: "); - - c = strchr(base, ';'); - - session->login_cookies = - g_list_append(session->login_cookies, - g_strndup(base, c - base)); - } + g_free(body_len); +// g_return_if_fail(body_len != NULL); #endif + //TODO: we should parse it using XML + base = strstr(base, TWN_START_TOKEN); + base += strlen(TWN_START_TOKEN); +// gaim_debug_info("MaYuan","base is :%s\n",base); + c = strstr(base, TWN_END_TOKEN); +// gaim_debug_info("MaYuan","c is :%s\n",c); +// gaim_debug_info("MaYuan","len is :%d\n",c-base); + login_params = g_strndup(base, c - base); - base = strstr(nexus->read_buf, "Authentication-Info: "); + gaim_debug_info("msn", "TWN Cert: {%s}\n", login_params); - g_return_if_fail(base != NULL); + /* Parse the challenge data. */ + elems = g_strsplit(login_params, "&", 0); - base = strstr(base, "from-PP='"); - base += strlen("from-PP='"); - c = strchr(base, '\''); + for (cur = elems; *cur != NULL; cur++){ + tokens = g_strsplit(*cur, "=", 2); + g_hash_table_insert(session->nexus->challenge_data, tokens[0], tokens[1]); + /* Don't free each of the tokens, only the array. */ + g_free(tokens); + } - login_params = g_strndup(base, c - base); + g_strfreev(elems); - msn_got_login_params(session, login_params); + cert_str = g_strdup_printf("t=%s&p=%s", + (char *)g_hash_table_lookup(nexus->challenge_data, "t"), + (char *)g_hash_table_lookup(nexus->challenge_data, "p") + ); + msn_got_login_params(session, cert_str); + g_free(cert_str); +// g_free(body_len); g_free(login_params); - +// return; msn_nexus_destroy(nexus); session->nexus = NULL; return; @@ -290,7 +312,6 @@ g_free(nexus->read_buf); nexus->read_buf = NULL; nexus->read_len = 0; - } @@ -301,10 +322,11 @@ MsnNexus *nexus; MsnSession *session; char *username, *password; - char *request_str, *head, *tail; + char *request_str, *head, *tail,*challenge_str; char *buffer = NULL; guint32 ctint; + gaim_debug_info("MaYuan","starting Windows Live ID authentication\n"); nexus = data; g_return_if_fail(nexus != NULL); @@ -315,44 +337,44 @@ msn_session_set_login_step(session, MSN_LOGIN_STEP_GET_COOKIE); - username = - g_strdup(gaim_url_encode(gaim_account_get_username(session->account))); + username = g_strdup(gaim_account_get_username(session->account)); - password = - g_strdup(gaim_url_encode(gaim_connection_get_password(session->account->gc))); + password = g_strdup(gaim_connection_get_password(session->account->gc)); +// g_strdup(gaim_url_encode(gaim_connection_get_password(session->account->gc))); - ctint = strtoul((char *)g_hash_table_lookup(nexus->challenge_data, "ct"), NULL, 10) + 200; - - head = g_strdup_printf( - "GET %s HTTP/1.1\r\n" - "Authorization: Passport1.4 OrgVerb=GET,OrgURL=%s,sign-in=%s", - nexus->login_path, - (char *)g_hash_table_lookup(nexus->challenge_data, "ru"), - username); - - tail = g_strdup_printf( - "lc=%s,id=%s,tw=%s,fs=%s,ru=%s,ct=%" G_GUINT32_FORMAT ",kpp=%s,kv=%s,ver=%s,tpf=%s\r\n" - "User-Agent: MSMSGS\r\n" - "Host: %s\r\n" - "Connection: Keep-Alive\r\n" - "Cache-Control: no-cache\r\n", + challenge_str = g_strdup_printf( + "lc=%s&id=%s&tw=%s&fs=%s&ru=%s&ct=%s&kpp=%s&kv=%s&ver=%s&rn=%s&tpf=%s\r\n", (char *)g_hash_table_lookup(nexus->challenge_data, "lc"), (char *)g_hash_table_lookup(nexus->challenge_data, "id"), (char *)g_hash_table_lookup(nexus->challenge_data, "tw"), (char *)g_hash_table_lookup(nexus->challenge_data, "fs"), (char *)g_hash_table_lookup(nexus->challenge_data, "ru"), - ctint, + (char *)g_hash_table_lookup(nexus->challenge_data, "ct"), (char *)g_hash_table_lookup(nexus->challenge_data, "kpp"), (char *)g_hash_table_lookup(nexus->challenge_data, "kv"), (char *)g_hash_table_lookup(nexus->challenge_data, "ver"), - (char *)g_hash_table_lookup(nexus->challenge_data, "tpf"), - nexus->login_host); + (char *)g_hash_table_lookup(nexus->challenge_data, "rn"), + (char *)g_hash_table_lookup(nexus->challenge_data, "tpf") + ); - buffer = g_strdup_printf("%s,pwd=XXXXXXXX,%s\r\n", head, tail); - request_str = g_strdup_printf("%s,pwd=%s,%s\r\n", head, password, tail); + /*build the SOAP windows Live ID XML body */ + tail = g_strdup_printf(TWN_ENVELOP_TEMPLATE,username,password,challenge_str ); - gaim_debug_misc("msn", "Sending: {%s}\n", buffer); + nexus->login_path = g_strdup(TWN_POST_URL); + head = g_strdup_printf( + "POST %s HTTP/1.1\r\n" + "Accept: text/*\r\n" + "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n" + "Host: %s\r\n" + "Content-Length: %d\r\n" + "Connection: Keep-Alive\r\n" + "Cache-Control: no-cache\r\n\r\n", + nexus->login_path,nexus->login_host,strlen(tail)); + request_str = g_strdup_printf("%s%s", head,tail); +// gaim_debug_misc("msn", "TWN Sending: {%s}\n", request_str); + +// g_free(nexus->login_path); g_free(buffer); g_free(head); g_free(tail); @@ -372,123 +394,18 @@ nexus_write_cb(nexus, gsc->fd, GAIM_INPUT_WRITE); return; - - } -static void -nexus_connect_written_cb(gpointer data, gint source, GaimInputCondition cond) -{ - MsnNexus *nexus = data; - int len; - char *da_login; - char *base, *c; - - if (nexus->input_handler == -1) - nexus->input_handler = gaim_input_add(nexus->gsc->fd, - GAIM_INPUT_READ, nexus_connect_written_cb, nexus); - - /* Get the PassportURLs line. */ - len = msn_ssl_read(nexus); - - if (len < 0 && errno == EAGAIN) - return; - else if (len < 0) { - gaim_input_remove(nexus->input_handler); - nexus->input_handler = -1; - g_free(nexus->read_buf); - nexus->read_buf = NULL; - nexus->read_len = 0; - /* TODO: error handling */ - return; - } - - if (g_strstr_len(nexus->read_buf, nexus->read_len, - "\r\n\r\n") == NULL) - return; - - gaim_input_remove(nexus->input_handler); - nexus->input_handler = -1; - - base = strstr(nexus->read_buf, "PassportURLs"); - - if (base == NULL) - { - g_free(nexus->read_buf); - nexus->read_buf = NULL; - nexus->read_len = 0; - return; - } - - if ((da_login = strstr(base, "DALogin=")) != NULL) - { - if ((da_login = strchr(da_login, '=')) != NULL) - da_login++; - - if ((c = strchr(da_login, ',')) != NULL) - *c = '\0'; - - if ((c = strchr(da_login, '/')) != NULL) - { - nexus->login_path = g_strdup(c); - *c = '\0'; - } - - nexus->login_host = g_strdup(da_login); - } - - g_free(nexus->read_buf); - nexus->read_buf = NULL; - nexus->read_len = 0; - - gaim_ssl_close(nexus->gsc); - nexus->gsc = NULL; - - /* Now begin the connection to the login server. */ - gaim_ssl_connect(nexus->session->account, nexus->login_host, - GAIM_SSL_DEFAULT_PORT, login_connect_cb, login_error_cb, - nexus); -} - - /************************************************************************** * Connect **************************************************************************/ - -static void -nexus_connect_cb(gpointer data, GaimSslConnection *gsc, - GaimInputCondition cond) -{ - MsnNexus *nexus; - MsnSession *session; - - nexus = data; - g_return_if_fail(nexus != NULL); - - session = nexus->session; - g_return_if_fail(session != NULL); - - nexus->gsc = gsc; - - msn_session_set_login_step(session, MSN_LOGIN_STEP_AUTH); - - nexus->write_buf = g_strdup("GET /rdr/pprdr.asp\r\n\r\n"); - nexus->written_len = 0; - - nexus->read_len = 0; - - nexus->written_cb = nexus_connect_written_cb; - - nexus->input_handler = gaim_input_add(gsc->fd, GAIM_INPUT_WRITE, - nexus_write_cb, nexus); - - nexus_write_cb(nexus, gsc->fd, GAIM_INPUT_WRITE); -} - void msn_nexus_connect(MsnNexus *nexus) { - gaim_ssl_connect(nexus->session->account, "nexus.passport.com", - GAIM_SSL_DEFAULT_PORT, nexus_connect_cb, - login_error_cb, nexus); + /* Authenticate via Windows Live ID. */ + gaim_debug_info("MaYuan","msn_nexus_connect...\n"); + nexus->login_host = g_strdup(TWN_SERVER); + gaim_ssl_connect(nexus->session->account, nexus->login_host, + GAIM_SSL_DEFAULT_PORT, login_connect_cb, login_error_cb, + nexus); } Modified: branches/soc-2006-msnp13/src/protocols/msn/nexus.h =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/nexus.h 2006-06-24 10:10:53 UTC (rev 16328) +++ branches/soc-2006-msnp13/src/protocols/msn/nexus.h 2006-06-24 12:04:32 UTC (rev 16329) @@ -24,6 +24,52 @@ #ifndef _MSN_NEXUS_H_ #define _MSN_NEXUS_H_ +#define TWN_SERVER "loginnet.passport.com" + +#define TWN_START_TOKEN "<wsse:BinarySecurityToken Id=\"PPToken1\">" +#define TWN_END_TOKEN "</wsse:BinarySecurityToken>" + +#define TWN_POST_URL "/RST.srf" +#define TWN_ENVELOP_TEMPLATE "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"\ + "<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:wsse=\"http://schemas.xmlsoap.org/ws/2003/06/secext\" xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2002/12/policy\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/03/addressing\" xmlns:wssc=\"http://schemas.xmlsoap.org/ws/2004/04/sc\" xmlns:wst=\"http://schemas.xmlsoap.org/ws/2004/04/trust\">"\ + "<Header>"\ + "<ps:AuthInfo xmlns:ps=\"http://schemas.microsoft.com/Passport/SoapServices/PPCRL\" Id=\"PPAuthInfo\">"\ + "<ps:HostingApp>{3:B}</ps:HostingApp>"\ + "<ps:BinaryVersion>4</ps:BinaryVersion>"\ + "<ps:UIVersion>1</ps:UIVersion>"\ + "<ps:Cookies></ps:Cookies>"\ + "<ps:RequestParams>AQAAAAIAAABsYwQAAAAzMDg0</ps:RequestParams>"\ + "</ps:AuthInfo>"\ + "<wsse:Security>"\ + "<wsse:UsernameToken Id=\"user\">"\ + "<wsse:Username>%s</wsse:Username>"\ + "<wsse:Password>%s</wsse:Password>"\ + "</wsse:UsernameToken>"\ + "</wsse:Security>"\ + "</Header><Body>"\ + "<ps:RequestMultipleSecurityTokens xmlns:ps=\"http://schemas.microsoft.com/Passport/SoapServices/PPCRL\" Id=\"RSTS\">"\ + "<wst:RequestSecurityToken Id=\"RST0\">"\ + "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"\ + "<wsp:AppliesTo>"\ + "<wsa:EndpointReference>"\ + "<wsa:Address>http://Passport.NET/tb</wsa:Address>"\ + "</wsa:EndpointReference>"\ + "</wsp:AppliesTo>"\ + "</wst:RequestSecurityToken>"\ + "<wst:RequestSecurityToken Id=\"RST1\">"\ + "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"\ + "<wsp:AppliesTo>"\ + "<wsa:EndpointReference>"\ + "<wsa:Address>messenger.msn.com</wsa:Address>"\ + "</wsa:EndpointReference>"\ + "</wsp:AppliesTo>"\ + "<wsse:PolicyReference URI=\"?%s\">"\ + "</wsse:PolicyReference>"\ + "</wst:RequestSecurityToken>"\ + "</ps:RequestMultipleSecurityTokens>"\ + "</Body>"\ + "</Envelope>" + typedef struct _MsnNexus MsnNexus; struct _MsnNexus Modified: branches/soc-2006-msnp13/src/protocols/msn/notification.c =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/notification.c 2006-06-24 10:10:53 UTC (rev 16328) +++ branches/soc-2006-msnp13/src/protocols/msn/notification.c 2006-06-24 12:04:32 UTC (rev 16329) @@ -102,9 +102,9 @@ account = session->account; /* Allocate an array for CVR0, NULL, and all the versions */ - a = c = g_new0(char *, session->protocol_ver - 8 + 3); + a = c = g_new0(char *, session->protocol_ver - WLM_MIN_PROTOCOL + 3); - for (i = session->protocol_ver; i >= 8; i--) + for (i = session->protocol_ver; i >= WLM_MIN_PROTOCOL; i--) *c++ = g_strdup_printf("MSNP%d", i); *c++ = g_strdup("CVR0"); @@ -230,9 +230,8 @@ account = session->account; gc = gaim_account_get_connection(account); - if (!g_ascii_strcasecmp(cmd->params[1], "OK")) - { - /* OK */ + if (!g_ascii_strcasecmp(cmd->params[1], "OK")){ + /* authenticate OK */ const char *friendly = gaim_url_decode(cmd->params[3]); gaim_connection_set_display_name(gc, friendly); @@ -240,9 +239,7 @@ msn_session_set_login_step(session, MSN_LOGIN_STEP_SYN); msn_cmdproc_send(cmdproc, "SYN", "%s", "0"); - } - else if (!g_ascii_strcasecmp(cmd->params[1], "TWN")) - { + }else if (!g_ascii_strcasecmp(cmd->params[1], "TWN")){ /* Passport authentication */ char **elems, **cur, **tokens; @@ -252,8 +249,7 @@ elems = g_strsplit(cmd->params[3], ",", 0); - for (cur = elems; *cur != NULL; cur++) - { + for (cur = elems; *cur != NULL; cur++){ tokens = g_strsplit(*cur, "=", 2); g_hash_table_insert(session->nexus->challenge_data, tokens[0], tokens[1]); /* Don't free each of the tokens, only the array. */ @@ -322,8 +318,12 @@ return; } + /* + * Windows Live Messenger 8.0 + * Notice :CVR String discriminate! + */ msn_cmdproc_send(cmdproc, "CVR", - "0x0409 winnt 5.1 i386 MSNMSGR 6.0.0602 MSMSGS %s", + "0x0409 winnt 5.1 i386 MSG80BETA 8.0.0689 msmsgs %s", gaim_account_get_username(account)); } @@ -379,16 +379,16 @@ static void msg_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) { + gaim_debug_info("MaYuan","Processing MSG... \n"); + if(cmd->payload_len == 0){ + return; + } /* NOTE: cmd is not always cmdproc->last_cmd, sometimes cmd is a queued * command and we are processing it */ - - if (cmd->payload == NULL) - { + if (cmd->payload == NULL){ cmdproc->last_cmd->payload_cb = msg_cmd_post; cmdproc->servconn->payload_len = atoi(cmd->params[2]); - } - else - { + }else{ g_return_if_fail(cmd->payload_cb != NULL); cmd->payload_cb(cmdproc, cmd, cmd->payload, cmd->payload_len); @@ -1118,6 +1118,27 @@ g_free(host); } +static void +gcf_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) +{ + gaim_debug_info("MaYuan","Processing GCF... \n"); + if(cmd->payload_len == 0){ +// cmd->payload_len = is_num(cmd->params[1]) ? atoi(cmd->params[1]) : 0; + return; + } + /*get the payload content*/ +} + +static void +sbs_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) +{ + gaim_debug_info("MaYuan","Processing SBS... \n"); + if(cmd->payload_len == 0){ + return; + } + /*get the payload content*/ +} + /************************************************************************** * Message Types **************************************************************************/ @@ -1387,6 +1408,7 @@ msn_table_add_cmd(cbs_table, "REM", "REM", rem_cmd); msn_table_add_cmd(cbs_table, "USR", "USR", usr_cmd); msn_table_add_cmd(cbs_table, "USR", "XFR", xfr_cmd); + msn_table_add_cmd(cbs_table, "USR", "GCF", gcf_cmd); msn_table_add_cmd(cbs_table, "SYN", "SYN", syn_cmd); msn_table_add_cmd(cbs_table, "CVR", "CVR", cvr_cmd); msn_table_add_cmd(cbs_table, "VER", "VER", ver_cmd); @@ -1402,6 +1424,8 @@ /* Asynchronous */ msn_table_add_cmd(cbs_table, NULL, "IPG", ipg_cmd); msn_table_add_cmd(cbs_table, NULL, "MSG", msg_cmd); + msn_table_add_cmd(cbs_table, NULL, "GCF", gcf_cmd); + msn_table_add_cmd(cbs_table, NULL, "SBS", sbs_cmd); msn_table_add_cmd(cbs_table, NULL, "NOT", not_cmd); msn_table_add_cmd(cbs_table, NULL, "CHL", chl_cmd); Modified: branches/soc-2006-msnp13/src/protocols/msn/servconn.c =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/servconn.c 2006-06-24 10:10:53 UTC (rev 16328) +++ branches/soc-2006-msnp13/src/protocols/msn/servconn.c 2006-06-24 12:04:32 UTC (rev 16329) @@ -428,14 +428,12 @@ servconn->rx_len -= cur_len; - if (servconn->payload_len) - { + if (servconn->payload_len){ msn_cmdproc_process_payload(servconn->cmdproc, cur, cur_len); servconn->payload_len = 0; - } - else - { + }else{ msn_cmdproc_process_cmd_text(servconn->cmdproc, cur); + servconn->payload_len = servconn->cmdproc->last_cmd->payload_len; } } while (servconn->connected && !servconn->wasted && servconn->rx_len > 0); Modified: branches/soc-2006-msnp13/src/protocols/msn/session.c =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/session.c 2006-06-24 10:10:53 UTC (rev 16328) +++ branches/soc-2006-msnp13/src/protocols/msn/session.c 2006-06-24 12:04:32 UTC (rev 16329) @@ -43,7 +43,7 @@ session->user = msn_user_new(session->userlist, gaim_account_get_username(account), NULL); - session->protocol_ver = 9; + session->protocol_ver = WLM_PROT_VER; session->conv_seq = 1; return session; Modified: branches/soc-2006-msnp13/src/protocols/msn/sync.c =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/sync.c 2006-06-24 10:10:53 UTC (rev 16328) +++ branches/soc-2006-msnp13/src/protocols/msn/sync.c 2006-06-24 12:04:32 UTC (rev 16329) @@ -35,8 +35,7 @@ list_name = cmd->params[0]; - if (!g_ascii_strcasecmp(list_name, "AL")) - { + if (!g_ascii_strcasecmp(list_name, "AL")){ /* * If the current setting is AL, messages from users who * are not in BL will be delivered. @@ -44,9 +43,7 @@ * In other words, deny some. */ gc->account->perm_deny = GAIM_PRIVACY_DENY_USERS; - } - else - { + }else{ /* If the current setting is BL, only messages from people * who are in the AL will be delivered. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-24 10:11:01
|
Revision: 16328 Author: sadrul Date: 2006-06-24 03:10:53 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16328&view=rev Log Message: ----------- Change the internals of GntTree. The change was required to accommodate expand/collapsing of the groups. I have added tooltips for Groups as well, which shows the online/total count. Do we like it? I have also added emblems at the beginning of the names of the buddies to indicate their status. Currently I am using ASCII-emblems ('o' for available, '.' for away, 'x' for offline (but I am not showing any offline buddies yet)), but I plan on using some cool unicode-emblems Sean suggested to me. Modified Paths: -------------- trunk/console/gntblist.c trunk/console/gntgaim.c trunk/console/libgnt/Makefile trunk/console/libgnt/gntbox.c trunk/console/libgnt/gnttree.c trunk/console/libgnt/gnttree.h trunk/console/libgnt/gntutils.c trunk/console/libgnt/gntutils.h Modified: trunk/console/gntblist.c =================================================================== --- trunk/console/gntblist.c 2006-06-24 08:56:57 UTC (rev 16327) +++ trunk/console/gntblist.c 2006-06-24 10:10:53 UTC (rev 16328) @@ -9,6 +9,7 @@ #include "gnttree.h" #include "gntblist.h" +#include <string.h> typedef struct { @@ -23,6 +24,7 @@ static void add_buddy(GaimBuddy *buddy, GGBlist *ggblist); static void add_group(GaimGroup *group, GGBlist *ggblist); +static void draw_tooltip(GGBlist *ggblist); static void new_node(GaimBlistNode *node) @@ -54,6 +56,8 @@ GaimGroup *group = gaim_buddy_get_group((GaimBuddy*)node); if (gaim_blist_get_group_online_count(group) == 0) node_remove(list, (GaimBlistNode*)group); + else if (ggblist->tnode == (GaimBlistNode *)group) /* Need to update the counts */ + draw_tooltip(ggblist); } if (ggblist->tnode == node) @@ -68,6 +72,10 @@ if (GAIM_BLIST_NODE_IS_BUDDY(node)) { GaimBuddy *buddy = (GaimBuddy*)node; + if (gaim_presence_is_online(gaim_buddy_get_presence(buddy))) + add_buddy(buddy, list->ui_data); + else + node_remove(gaim_get_blist(), node); } } @@ -108,6 +116,52 @@ group->name, NULL, NULL); } +static const char * +get_buddy_display_name(GaimBuddy *buddy) +{ + static char text[2096]; + char status[8]; + GaimStatusPrimitive prim; + GaimPresence *presence; + GaimStatus *now; + + presence = gaim_buddy_get_presence(buddy); + now = gaim_presence_get_active_status(presence); + + prim = gaim_status_type_get_primitive(gaim_status_get_type(now)); + + switch(prim) + { +#if 1 + case GAIM_STATUS_OFFLINE: + strncpy(status, "x", sizeof(status) - 1); + break; + case GAIM_STATUS_AVAILABLE: + strncpy(status, "o", sizeof(status) - 1); + break; + default: + strncpy(status, ".", sizeof(status) - 1); + break; +#else + /* XXX: Let's use these some time */ + case GAIM_STATUS_OFFLINE: + strncpy(status, "⊗", sizeof(status) - 1); + break; + case GAIM_STATUS_AVAILABLE: + /* XXX: Detect idleness */ + strncpy(status, "◯", sizeof(status) - 1); + break; + default: + strncpy(status, "⊖", sizeof(status) - 1); + break; +#endif + } + + snprintf(text, sizeof(text) - 1, "%s %s", status, gaim_buddy_get_alias(buddy)); + + return text; +} + static void add_buddy(GaimBuddy *buddy, GGBlist *ggblist) { @@ -120,7 +174,10 @@ add_group(group, ggblist); node->ui_data = gnt_tree_add_row_after(GNT_TREE(ggblist->tree), buddy, - gaim_buddy_get_alias(buddy), group, NULL); + get_buddy_display_name(buddy), group, NULL); + + if (ggblist->tnode == (GaimBlistNode*)group) + draw_tooltip(ggblist); } static void @@ -147,18 +204,21 @@ } static void -selection_changed(GntWidget *widget, int old, int current, GGBlist *ggblist) +draw_tooltip(GGBlist *ggblist) { GaimBlistNode *node; - GntTree *tree = GNT_TREE(widget); int x, y, top, width; GString *str; GaimPlugin *prpl; GaimPluginProtocolInfo *prpl_info; GaimAccount *account; - GntWidget *box, *label; - char *title; + GntTree *tree; + GntWidget *widget, *box, *label; + char *title = NULL; + widget = ggblist->tree; + tree = GNT_TREE(widget); + if (ggblist->tooltip) { remove_tooltip(ggblist); @@ -195,6 +255,16 @@ title = g_strdup(gaim_buddy_get_name(buddy)); } + else if (GAIM_BLIST_NODE_IS_GROUP(node)) + { + GaimGroup *group = (GaimGroup *)node; + + g_string_append_printf(str, _("Online: %d\nTotal: %d"), + gaim_blist_get_group_online_count(group), + gaim_blist_get_group_size(group, FALSE)); + + title = g_strdup(group->name); + } else { g_string_free(str, TRUE); @@ -217,12 +287,20 @@ gnt_widget_set_position(box, x, y); gnt_widget_draw(box); - + + g_free(title); g_string_free(str, TRUE); ggblist->tooltip = box; ggblist->tnode = node; } +static void +selection_changed(GntWidget *widget, gpointer old, gpointer current, GGBlist *ggblist) +{ + draw_tooltip(ggblist); +} + + static gboolean key_pressed(GntWidget *widget, const char *text, GGBlist *ggblist) { @@ -239,6 +317,14 @@ return FALSE; } +static void +buddy_status_changed(GaimBuddy *buddy, GaimStatus *old, GaimStatus *now, GGBlist *ggblist) +{ + gnt_tree_change_text(GNT_TREE(ggblist->tree), buddy, get_buddy_display_name(buddy)); + if (ggblist->tnode == (GaimBlistNode*)buddy) + draw_tooltip(ggblist); +} + void gg_blist_init() { ggblist = g_new0(GGBlist, 1); @@ -256,13 +342,16 @@ gnt_box_add_widget(GNT_BOX(ggblist->window), ggblist->tree); gnt_widget_show(ggblist->window); + + gaim_signal_connect(gaim_blist_get_handle(), "buddy-status-changed", gg_blist_get_handle(), + GAIM_CALLBACK(buddy_status_changed), ggblist); +#if 0 gaim_signal_connect(gaim_blist_get_handle(), "buddy-signed-on", gg_blist_get_handle(), GAIM_CALLBACK(buddy_signed_on), ggblist); gaim_signal_connect(gaim_blist_get_handle(), "buddy-signed-off", gg_blist_get_handle(), GAIM_CALLBACK(buddy_signed_off), ggblist); -#if 0 /* These I plan to use to indicate unread-messages etc. */ gaim_signal_connect(gaim_conversations_get_handle(), "received-im-msg", gg_blist_get_handle(), GAIM_CALLBACK(received_im_msg), list); Modified: trunk/console/gntgaim.c =================================================================== --- trunk/console/gntgaim.c 2006-06-24 08:56:57 UTC (rev 16327) +++ trunk/console/gntgaim.c 2006-06-24 10:10:53 UTC (rev 16328) @@ -168,6 +168,9 @@ int main(int argc, char **argv) { + /* XXX: Don't puke */ + freopen("/dev/null", "w", stderr); + /* Initialize the libgaim stuff */ init_libgaim(); Modified: trunk/console/libgnt/Makefile =================================================================== --- trunk/console/libgnt/Makefile 2006-06-24 08:56:57 UTC (rev 16327) +++ trunk/console/libgnt/Makefile 2006-06-24 10:10:53 UTC (rev 16328) @@ -36,7 +36,7 @@ all: libgnt -test: $(OBJECTS) +test2: $(OBJECTS) key: $(OBJECTS) gntwidget.o: gntwidget.c $(HEADERS) Modified: trunk/console/libgnt/gntbox.c =================================================================== --- trunk/console/libgnt/gntbox.c 2006-06-24 08:56:57 UTC (rev 16327) +++ trunk/console/libgnt/gntbox.c 2006-06-24 10:10:53 UTC (rev 16328) @@ -32,7 +32,7 @@ else { /* XXX: Position of the title might be configurable */ - pos = (widget->priv.width - pos - 2) / 2; + pos = (widget->priv.width - pos) / 2; } wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_TITLE)); mvwprintw(widget->window, 0, pos, title); Modified: trunk/console/libgnt/gnttree.c =================================================================== --- trunk/console/libgnt/gnttree.c 2006-06-24 08:56:57 UTC (rev 16327) +++ trunk/console/libgnt/gnttree.c 2006-06-24 10:10:53 UTC (rev 16328) @@ -1,6 +1,8 @@ #include "gnttree.h" #include "gntutils.h" +#include <string.h> + enum { SIG_SELECTION_CHANGED, @@ -17,7 +19,8 @@ char *text; void *data; /* XXX: unused */ - /* XXX: These are also unused */ + gboolean collapsed; + GntTreeRow *parent; GntTreeRow *child; GntTreeRow *next; @@ -27,30 +30,166 @@ static GntWidgetClass *parent_class = NULL; static guint signals[SIGS] = { 0 }; +static GntTreeRow * +_get_next(GntTreeRow *row, gboolean godeep) +{ + if (row == NULL) + return NULL; + if (godeep && row->child) + return row->child; + if (row->next) + return row->next; + return _get_next(row->parent, FALSE); +} + +static GntTreeRow * +get_next(GntTreeRow *row) +{ + if (row == NULL) + return; + return _get_next(row, !row->collapsed); +} + +/* Returns the n-th next row. If it doesn't exist, returns NULL */ +static GntTreeRow * +get_next_n(GntTreeRow *row, int n) +{ + while (row && n--) + row = get_next(row); + return row; +} + +/* Returns the n-th next row. If it doesn't exist, then the last non-NULL node */ +static GntTreeRow * +get_next_n_opt(GntTreeRow *row, int n, int *pos) +{ + GntTreeRow *next = row; + int r = 0; + + if (row == NULL) + return NULL; + + while (row && n--) + { + row = get_next(row); + if (row) + { + next = row; + r++; + } + } + + if (pos) + *pos = r; + + return next; +} + +static GntTreeRow * +get_last_child(GntTreeRow *row) +{ + if (row == NULL) + return NULL; + if (!row->collapsed && row->child) + row = row->child; + else + return row; + + while(row->next) + row = row->next; + if (row->child) + row = get_last_child(row->child); + return row; +} + +static GntTreeRow * +get_prev(GntTreeRow *row) +{ + if (row == NULL) + return NULL; + if (row->prev) + return get_last_child(row->prev); + return row->parent; +} + +static GntTreeRow * +get_prev_n(GntTreeRow *row, int n) +{ + while (row && n--) + row = get_prev(row); + return row; +} + +/* Distance of row from the root */ +/* XXX: This is uber-inefficient */ +static int +get_root_distance(GntTreeRow *row) +{ + if (row == NULL) + return -1; + return get_root_distance(get_prev(row)) + 1; +} + +/* Returns the distance between a and b. + * If a is 'above' b, then the distance is positive */ +static int +get_distance(GntTreeRow *a, GntTreeRow *b) +{ + /* First get the distance from a to the root. + * Then the distance from b to the root. + * Subtract. + * It's not that good, but it works. */ + int ha = get_root_distance(a); + int hb = get_root_distance(b); + + return (hb - ha); +} + static void redraw_tree(GntTree *tree) { int start; GntWidget *widget = GNT_WIDGET(tree); - GList *iter; + GntTreeRow *row; int pos; + gboolean deep; if (GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_NO_BORDER)) pos = 0; else pos = 1; + if (tree->top == NULL) + tree->top = tree->root; + if (tree->current == NULL) + tree->current = tree->root; + wbkgd(widget->window, COLOR_PAIR(GNT_COLOR_NORMAL)); - for (start = tree->top, iter = g_list_nth(tree->list, tree->top); - iter && start < tree->bottom; start++, iter = iter->next) + deep = TRUE; + row = tree->top; + for (start = pos; row && start < widget->priv.height - pos; + start++, row = get_next(row)) { - char str[2096]; /* XXX: This should be safe for any terminal */ + char str[2048]; int wr; - GntTreeRow *row = g_hash_table_lookup(tree->hash, iter->data); + char format[16] = ""; - if ((wr = snprintf(str, widget->priv.width, "%s", row->text)) >= widget->priv.width) + deep = TRUE; + + if (row->parent == NULL && row->child) { + if (row->collapsed) + { + strcpy(format, "+ "); + deep = FALSE; + } + else + strcpy(format, "- "); + } + + if ((wr = g_snprintf(str, widget->priv.width, "%s%s", format, row->text)) >= widget->priv.width) + { /* XXX: ellipsize */ str[widget->priv.width - 1 - pos] = 0; } @@ -61,19 +200,20 @@ str[wr] = 0; } - if (start == tree->current) + if (row == tree->current) { wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_HIGHLIGHT)); - mvwprintw(widget->window, start - tree->top + pos, pos, str); + mvwprintw(widget->window, start, pos, str); wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); } else - mvwprintw(widget->window, start - tree->top + pos, pos, str); + mvwprintw(widget->window, start, pos, str); + tree->bottom = row; } - while (start < tree->bottom) + while (start < widget->priv.height - pos) { - mvwhline(widget->window, start - tree->top + pos, pos, ' ', + mvwhline(widget->window, start, pos, ' ', widget->priv.width - pos * 2); start++; } @@ -85,13 +225,12 @@ gnt_tree_draw(GntWidget *widget) { GntTree *tree = GNT_TREE(widget); + int bottom; scrollok(widget->window, TRUE); wsetscrreg(widget->window, 0, widget->priv.height - 1); - tree->top = 0; - tree->bottom = widget->priv.height - - (GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_NO_BORDER) ? 0 : 2); + tree->top = tree->root; redraw_tree(tree); @@ -116,32 +255,42 @@ } static void -tree_selection_changed(GntTree *tree, int old, int current) +tree_selection_changed(GntTree *tree, GntTreeRow *old, GntTreeRow *current) { g_signal_emit(tree, signals[SIG_SELECTION_CHANGED], 0, old, current); } +static GntTreeRow * +get_nth_row(GntTree *tree, int n) +{ + gpointer key = g_list_nth_data(tree->list, n); + return g_hash_table_lookup(tree->hash, key); +} + static gboolean gnt_tree_key_pressed(GntWidget *widget, const char *text) { GntTree *tree = GNT_TREE(widget); - int old = tree->current; + GntTreeRow *old = tree->current; + GntTreeRow *row; if (text[0] == 27) { - if (strcmp(text+1, GNT_KEY_DOWN) == 0 && tree->current < g_list_length(tree->list) - 1) + int dist; + if (strcmp(text+1, GNT_KEY_DOWN) == 0 && (row = get_next(tree->current)) != NULL) { - tree->current++; - if (tree->current >= tree->bottom) - gnt_tree_scroll(tree, 1 + tree->current - tree->bottom); + tree->current = row; + if ((dist = get_distance(tree->current, tree->bottom)) < 0) + gnt_tree_scroll(tree, -dist); else redraw_tree(tree); } - else if (strcmp(text+1, GNT_KEY_UP) == 0 && tree->current > 0) + else if (strcmp(text+1, GNT_KEY_UP) == 0 && (row = get_prev(tree->current)) != NULL) { - tree->current--; - if (tree->current < tree->top) - gnt_tree_scroll(tree, tree->current - tree->top); + tree->current = row; + + if ((dist = get_distance(tree->current, tree->top)) > 0) + gnt_tree_scroll(tree, -dist); else redraw_tree(tree); } @@ -150,6 +299,16 @@ { gnt_widget_activate(widget); } + else if (text[0] == ' ' && text[1] == 0) + { + /* Space pressed */ + GntTreeRow *row = tree->current; + if (row && row->child) + { + row->collapsed = !row->collapsed; + redraw_tree(tree); + } + } if (old != tree->current) tree_selection_changed(tree, old, tree->current); @@ -184,8 +343,8 @@ G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GntTreeClass, selection_changed), NULL, NULL, - gnt_closure_marshal_VOID__INT_INT, - G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); + gnt_closure_marshal_VOID__POINTER_POINTER, + G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER); DEBUG; } @@ -268,17 +427,23 @@ void gnt_tree_scroll(GntTree *tree, int count) { - if (tree->top == 0 && count < 0) - return; + GntTreeRow *row; - if (count > 0 && tree->bottom + count >= g_list_length(tree->list)) - count = g_list_length(tree->list) - tree->bottom; - else if (count < 0 && tree->top + count < 0) - count = -tree->top; + if (count < 0) + { + if (get_root_distance(tree->top) == 0) + return; + row = get_prev_n(tree->top, -count); + if (row == NULL) + row = tree->root; + tree->top = row; + } + else + { + get_next_n_opt(tree->bottom, count, &count); + tree->top = get_next_n(tree->top, count); + } - tree->top += count; - tree->bottom += count; - redraw_tree(tree); } @@ -300,7 +465,7 @@ { GntTreeRow *row = g_new0(GntTreeRow, 1), *pr = NULL; - g_hash_table_insert(tree->hash, key, row); + g_hash_table_replace(tree->hash, key, row); if (tree->root == NULL) { @@ -342,11 +507,13 @@ if (pr == NULL) { - if (tree->root) tree->root->prev = row; - row->next = tree->root; - tree->root = row; + GntTreeRow *r = tree->root; + while (r->next) + r = r->next; + r->next = row; + row->prev = r; - tree->list = g_list_prepend(tree->list, key); + tree->list = g_list_append(tree->list, key); } else { @@ -366,38 +533,81 @@ gpointer gnt_tree_get_selection_data(GntTree *tree) { - return g_list_nth_data(tree->list, tree->current); + if (tree->current) + return tree->current->key; /* XXX: perhaps we should just get rid of 'data' */ + return NULL; } -int gnt_tree_get_selection_index(GntTree *tree) -{ - return tree->current; -} - /* XXX: Should this also remove all the children of the row being removed? */ void gnt_tree_remove(GntTree *tree, gpointer key) { GntTreeRow *row = g_hash_table_lookup(tree->hash, key); if (row) { - int len, pos; + gboolean redraw = FALSE; - pos = g_list_index(tree->list, key); + if (get_distance(tree->top, row) >= 0 && get_distance(row, tree->bottom) >= 0) + redraw = TRUE; + /* Update root/top/current/bottom if necessary */ + if (tree->root == row) + tree->root = get_next(row); + if (tree->top == row) + { + if (tree->top != tree->root) + tree->top = get_prev(row); + else + tree->top = get_next(row); + if (tree->current == row) + tree->current = tree->top; + } + else if (tree->current == row) + { + if (tree->current != tree->root) + tree->current = get_prev(row); + else + tree->current = get_next(row); + } + else if (tree->bottom == row) + { + tree->bottom = get_prev(row); + } + + /* Fix the links */ + if (row->next) + row->next->prev = row->prev; + if (row->parent && row->parent->child == row) + row->parent->child = row->next; + if (row->prev) + row->prev->next = row->next; + g_hash_table_remove(tree->hash, key); tree->list = g_list_remove(tree->list, key); - if (pos >= tree->top && pos < tree->bottom) + if (redraw) { redraw_tree(tree); } - g_hash_table_replace(tree->hash, key, NULL); } } int gnt_tree_get_selection_visible_line(GntTree *tree) { - return (tree->current - tree->top) + + return get_distance(tree->top, tree->current) + !!(GNT_WIDGET_IS_FLAG_SET(GNT_WIDGET(tree), GNT_WIDGET_NO_BORDER)); } +void gnt_tree_change_text(GntTree *tree, gpointer key, const char *text) +{ + GntTreeRow *row = g_hash_table_lookup(tree->hash, key); + if (row) + { + g_free(row->text); + row->text = g_strdup_printf("%*s%s", TAB_SIZE * find_depth(row), "", text); + + if (get_distance(tree->top, row) >= 0 && get_distance(row, tree->bottom) > 0) + redraw_tree(tree); + } +} + + Modified: trunk/console/libgnt/gnttree.h =================================================================== --- trunk/console/libgnt/gnttree.h 2006-06-24 08:56:57 UTC (rev 16327) +++ trunk/console/libgnt/gnttree.h 2006-06-24 10:10:53 UTC (rev 16328) @@ -27,10 +27,10 @@ { GntWidget parent; - int current; /* current selection */ + GntTreeRow *current; /* current selection */ - int top; /* The index in 'list' of the topmost visible item */ - int bottom; /* The index in 'list' of the bottommost visible item */ + GntTreeRow *top; /* The topmost visible item */ + GntTreeRow *bottom; /* The bottommost visible item */ GntTreeRow *root; /* The root of all evil */ @@ -66,13 +66,13 @@ gpointer gnt_tree_get_selection_data(GntTree *tree); -int gnt_tree_get_selection_index(GntTree *tree); - void gnt_tree_remove(GntTree *tree, gpointer key); /* Returns the visible line number of the selected row */ int gnt_tree_get_selection_visible_line(GntTree *tree); +void gnt_tree_change_text(GntTree *tree, gpointer key, const char *text); + G_END_DECLS #endif /* GNT_TREE_H */ Modified: trunk/console/libgnt/gntutils.c =================================================================== --- trunk/console/libgnt/gntutils.c 2006-06-24 08:56:57 UTC (rev 16327) +++ trunk/console/libgnt/gntutils.c 2006-06-24 10:10:53 UTC (rev 16328) @@ -98,3 +98,35 @@ data2); } +void gnt_closure_marshal_VOID__POINTER_POINTER(GClosure *closure, + GValue *ret_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data) +{ + typedef void (*func) (gpointer data1, gpointer, gpointer, gpointer data2); + register func callback; + register GCClosure *cc = (GCClosure*)closure; + register gpointer data1, data2; + + g_return_if_fail(n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA(closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer(param_values + 0); + } + else + { + data1 = g_value_peek_pointer(param_values + 0); + data2 = closure->data; + } + + callback = (func) (marshal_data ? marshal_data : cc->callback); + callback(data1, + g_value_get_pointer(param_values + 1) , + g_value_get_pointer(param_values + 2) , + data2); +} + Modified: trunk/console/libgnt/gntutils.h =================================================================== --- trunk/console/libgnt/gntutils.h 2006-06-24 08:56:57 UTC (rev 16327) +++ trunk/console/libgnt/gntutils.h 2006-06-24 10:10:53 UTC (rev 16328) @@ -21,3 +21,10 @@ gpointer invocation_hint, gpointer marshal_data); +void gnt_closure_marshal_VOID__POINTER_POINTER(GClosure *closure, + GValue *ret_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-06-24 08:57:00
|
Revision: 16327 Author: rlaager Date: 2006-06-24 01:56:57 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16327&view=rev Log Message: ----------- Merged from trunk: SF Patch #1511683 from therylz "The doxygen file explaining plugin id's links to a page which no longer exists on gaim.sf.net to register for a unique username. Since the page no longer exists, I took out the link and left the suggestion that the sourceforge username be used." Modified Paths: -------------- branches/v2_0_0/doc/plugin-ids.dox Modified: branches/v2_0_0/doc/plugin-ids.dox =================================================================== --- branches/v2_0_0/doc/plugin-ids.dox 2006-06-24 08:54:33 UTC (rev 16326) +++ branches/v2_0_0/doc/plugin-ids.dox 2006-06-24 08:56:57 UTC (rev 16327) @@ -28,10 +28,7 @@ - qpe - Gaim for Qtopia plugin. The @em username must be a unique identifier for that person. It - @em should be your Gaim website user ID - (registered <a href="http://gaim.sourceforge.net/register.php">here</a>). - If for some reason you cannot register there (it shouldn't be a - problem!), you can use your SourceForge ID. Do @em not leave this field + @em should be your SourceForge ID. Do @em not leave this field blank. The @em pluginname is the name of your plugin. It can be whatever you like, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-06-24 08:54:43
|
Revision: 16326 Author: rlaager Date: 2006-06-24 01:54:33 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16326&view=rev Log Message: ----------- SF Patch #1511683 from therylz "The doxygen file explaining plugin id's links to a page which no longer exists on gaim.sf.net to register for a unique username. Since the page no longer exists, I took out the link and left the suggestion that the sourceforge username be used." Modified Paths: -------------- trunk/doc/plugin-ids.dox Modified: trunk/doc/plugin-ids.dox =================================================================== --- trunk/doc/plugin-ids.dox 2006-06-24 06:47:39 UTC (rev 16325) +++ trunk/doc/plugin-ids.dox 2006-06-24 08:54:33 UTC (rev 16326) @@ -28,10 +28,7 @@ - qpe - Gaim for Qtopia plugin. The @em username must be a unique identifier for that person. It - @em should be your Gaim website user ID - (registered <a href="http://gaim.sourceforge.net/register.php">here</a>). - If for some reason you cannot register there (it shouldn't be a - problem!), you can use your SourceForge ID. Do @em not leave this field + @em should be your SourceForge ID. Do @em not leave this field blank. The @em pluginname is the name of your plugin. It can be whatever you like, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-24 06:47:41
|
Revision: 16325 Author: thekingant Date: 2006-06-23 23:47:39 -0700 (Fri, 23 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16325&view=rev Log Message: ----------- Backport SVN revision #16324 from HEAD to v2_0_0. Original commit message: Handle the oscar icon retrieval timer loop in a slightly more clear way. ViewCVS Links: ------------- http://svn.sourceforge.net/gaim/?rev=16324&view=rev Modified Paths: -------------- branches/v2_0_0/src/protocols/oscar/oscar.c Modified: branches/v2_0_0/src/protocols/oscar/oscar.c =================================================================== --- branches/v2_0_0/src/protocols/oscar/oscar.c 2006-06-24 06:47:11 UTC (rev 16324) +++ branches/v2_0_0/src/protocols/oscar/oscar.c 2006-06-24 06:47:39 UTC (rev 16325) @@ -1113,9 +1113,8 @@ od->iconconnecting = FALSE; - if (od->icontimer) - gaim_timeout_remove(od->icontimer); - od->icontimer = gaim_timeout_add(100, gaim_icon_timerfunc, gc); + if (od->icontimer == 0) + od->icontimer = gaim_timeout_add(100, gaim_icon_timerfunc, gc); } static int @@ -1815,9 +1814,8 @@ cur = cur->next; if (!cur) { od->requesticon = g_slist_append(od->requesticon, g_strdup(gaim_normalize(account, info->sn))); - if (od->icontimer) - gaim_timeout_remove(od->icontimer); - od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); + if (od->icontimer == 0) + od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); } } g_free(b16); @@ -3168,9 +3166,8 @@ od->requesticon = g_slist_remove(od->requesticon, sn); g_free(sn); - if (od->icontimer) - gaim_timeout_remove(od->icontimer); - od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); + if (od->icontimer == 0) + od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); return 1; } @@ -3220,9 +3217,8 @@ cur = cur->next; } - if (od->icontimer) - gaim_timeout_remove(od->icontimer); - od->icontimer = gaim_timeout_add(250, gaim_icon_timerfunc, gc); + if (od->icontimer == 0) + od->icontimer = gaim_timeout_add(250, gaim_icon_timerfunc, gc); return 1; } @@ -3233,6 +3229,8 @@ aim_userinfo_t *userinfo; FlapConnection *conn; + od->icontimer = 0; + conn = flap_connection_getbytype(od, SNAC_FAMILY_BART); if (!conn) { if (!od->iconconnecting) { @@ -3285,7 +3283,9 @@ g_free(sn); } - return TRUE; + od->icontimer = gaim_timeout_add(100, gaim_icon_timerfunc, gc); + + return FALSE; } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-24 06:47:15
|
Revision: 16324 Author: thekingant Date: 2006-06-23 23:47:11 -0700 (Fri, 23 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16324&view=rev Log Message: ----------- Handle the oscar icon retrieval timer loop in a slightly more clear way. Modified Paths: -------------- trunk/src/protocols/oscar/oscar.c Modified: trunk/src/protocols/oscar/oscar.c =================================================================== --- trunk/src/protocols/oscar/oscar.c 2006-06-24 06:21:02 UTC (rev 16323) +++ trunk/src/protocols/oscar/oscar.c 2006-06-24 06:47:11 UTC (rev 16324) @@ -1113,9 +1113,8 @@ od->iconconnecting = FALSE; - if (od->icontimer) - gaim_timeout_remove(od->icontimer); - od->icontimer = gaim_timeout_add(100, gaim_icon_timerfunc, gc); + if (od->icontimer == 0) + od->icontimer = gaim_timeout_add(100, gaim_icon_timerfunc, gc); } static int @@ -1815,9 +1814,8 @@ cur = cur->next; if (!cur) { od->requesticon = g_slist_append(od->requesticon, g_strdup(gaim_normalize(account, info->sn))); - if (od->icontimer) - gaim_timeout_remove(od->icontimer); - od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); + if (od->icontimer == 0) + od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); } } g_free(b16); @@ -3169,9 +3167,8 @@ od->requesticon = g_slist_remove(od->requesticon, sn); g_free(sn); - if (od->icontimer) - gaim_timeout_remove(od->icontimer); - od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); + if (od->icontimer == 0) + od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); return 1; } @@ -3221,9 +3218,8 @@ cur = cur->next; } - if (od->icontimer) - gaim_timeout_remove(od->icontimer); - od->icontimer = gaim_timeout_add(250, gaim_icon_timerfunc, gc); + if (od->icontimer == 0) + od->icontimer = gaim_timeout_add(250, gaim_icon_timerfunc, gc); return 1; } @@ -3234,6 +3230,8 @@ aim_userinfo_t *userinfo; FlapConnection *conn; + od->icontimer = 0; + conn = flap_connection_getbytype(od, SNAC_FAMILY_BART); if (!conn) { if (!od->iconconnecting) { @@ -3286,7 +3284,9 @@ g_free(sn); } - return TRUE; + od->icontimer = gaim_timeout_add(100, gaim_icon_timerfunc, gc); + + return FALSE; } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-24 06:21:08
|
Revision: 16323 Author: thekingant Date: 2006-06-23 23:21:02 -0700 (Fri, 23 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16323&view=rev Log Message: ----------- Backport SVN revision #16320 from HEAD to v2_0_0 Original commit message: sf patch #1511450, from Wan Hing Wah Fix a segfault when catching certain signals because the wrong parameters were passed to those signals. My bad. ViewCVS Links: ------------- http://svn.sourceforge.net/gaim/?rev=16320&view=rev Modified Paths: -------------- branches/v2_0_0/src/conversation.c Modified: branches/v2_0_0/src/conversation.c =================================================================== --- branches/v2_0_0/src/conversation.c 2006-06-23 20:42:25 UTC (rev 16322) +++ branches/v2_0_0/src/conversation.c 2006-06-24 06:21:02 UTC (rev 16323) @@ -58,7 +58,7 @@ gaim_conv_im_stop_typing_timeout(im); gaim_signal_emit(gaim_conversations_get_handle(), - "buddy-typing-stopped", c); + "buddy-typing-stopped", c->account, c->name); return FALSE; } @@ -83,7 +83,7 @@ serv_send_typing(gc, name, GAIM_TYPED); gaim_signal_emit(gaim_conversations_get_handle(), - "buddy-typed", conv); + "buddy-typed", conv->account, conv->name); gaim_debug(GAIM_DEBUG_MISC, "conversation", "typed...\n"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-23 20:42:30
|
Revision: 16322 Author: sadrul Date: 2006-06-23 13:42:25 -0700 (Fri, 23 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16322&view=rev Log Message: ----------- Fix a crash. Modified Paths: -------------- trunk/console/gntblist.c trunk/console/libgnt/gnttree.c Modified: trunk/console/gntblist.c =================================================================== --- trunk/console/gntblist.c 2006-06-23 19:41:31 UTC (rev 16321) +++ trunk/console/gntblist.c 2006-06-23 20:42:25 UTC (rev 16322) @@ -17,8 +17,6 @@ GntWidget *tooltip; GaimBlistNode *tnode; /* Who is the tooltip being displayed for? */ - - GaimBuddyList *list; } GGBlist; GGBlist *ggblist; @@ -134,7 +132,7 @@ static void buddy_signed_off(GaimBuddy *buddy, GGBlist *ggblist) { - node_remove(ggblist->list, (GaimBlistNode*)buddy); + node_remove(gaim_get_blist(), (GaimBlistNode*)buddy); } GaimBlistUiOps *gg_blist_get_ui_ops() @@ -246,7 +244,6 @@ ggblist = g_new0(GGBlist, 1); gaim_get_blist()->ui_data = ggblist; - ggblist->list = gaim_get_blist(); ggblist->window = gnt_box_new(FALSE, FALSE); gnt_box_set_toplevel(GNT_BOX(ggblist->window), TRUE); Modified: trunk/console/libgnt/gnttree.c =================================================================== --- trunk/console/libgnt/gnttree.c 2006-06-23 19:41:31 UTC (rev 16321) +++ trunk/console/libgnt/gnttree.c 2006-06-23 20:42:25 UTC (rev 16322) @@ -231,6 +231,9 @@ { GntTreeRow *row = data; + if (!row) + return; + g_free(row->text); g_free(row); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-23 19:41:47
|
Revision: 16321 Author: sadrul Date: 2006-06-23 12:41:31 -0700 (Fri, 23 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16321&view=rev Log Message: ----------- Sean suggested displaying a tooltip in the buddylist (http://gaim.sourceforge.net/sean/gntmock.png). This (http://img157.imageshack.us/img157/1793/q4jb.png) is close. You can press Escape to hide the tooltip. I haven't yet managed to refresh widgets when other widgets covering it are destroyed. So some parts of the border around the buddylist gets erased. I am going to try to fix it. Modified Paths: -------------- trunk/console/gntblist.c trunk/console/libgnt/gnt-skel.c trunk/console/libgnt/gntbox.c trunk/console/libgnt/gntbox.h trunk/console/libgnt/gntentry.c trunk/console/libgnt/gntlabel.c trunk/console/libgnt/gntmain.c trunk/console/libgnt/gnttree.c trunk/console/libgnt/gnttree.h trunk/console/libgnt/gntwidget.c trunk/console/libgnt/test.c Modified: trunk/console/gntblist.c =================================================================== --- trunk/console/gntblist.c 2006-06-23 16:59:12 UTC (rev 16320) +++ trunk/console/gntblist.c 2006-06-23 19:41:31 UTC (rev 16321) @@ -15,6 +15,9 @@ GntWidget *window; GntWidget *tree; + GntWidget *tooltip; + GaimBlistNode *tnode; /* Who is the tooltip being displayed for? */ + GaimBuddyList *list; } GGBlist; @@ -29,6 +32,14 @@ } static void +remove_tooltip(GGBlist *ggblist) +{ + gnt_widget_destroy(ggblist->tooltip); + ggblist->tooltip = NULL; + ggblist->tnode = NULL; +} + +static void node_remove(GaimBuddyList *list, GaimBlistNode *node) { GGBlist *ggblist = list->ui_data; @@ -46,6 +57,11 @@ if (gaim_blist_get_group_online_count(group) == 0) node_remove(list, (GaimBlistNode*)group); } + + if (ggblist->tnode == node) + { + remove_tooltip(ggblist); + } } static void @@ -90,9 +106,8 @@ GaimBlistNode *node = (GaimBlistNode *)group; if (node->ui_data) return; - gnt_tree_add_row_after(GNT_TREE(ggblist->tree), group, + node->ui_data = gnt_tree_add_row_after(GNT_TREE(ggblist->tree), group, group->name, NULL, NULL); - node->ui_data = GINT_TO_POINTER(TRUE); } static void @@ -103,11 +118,11 @@ if (node->ui_data) return; - node->ui_data = GINT_TO_POINTER(TRUE); group = gaim_buddy_get_group(buddy); add_group(group, ggblist); - gnt_tree_add_row_after(GNT_TREE(ggblist->tree), buddy, gaim_buddy_get_alias(buddy), group, NULL); + node->ui_data = gnt_tree_add_row_after(GNT_TREE(ggblist->tree), buddy, + gaim_buddy_get_alias(buddy), group, NULL); } static void @@ -133,14 +148,108 @@ gnt_widget_set_focus(widget, FALSE); } +static void +selection_changed(GntWidget *widget, int old, int current, GGBlist *ggblist) +{ + GaimBlistNode *node; + GntTree *tree = GNT_TREE(widget); + int x, y, top, width; + GString *str; + GaimPlugin *prpl; + GaimPluginProtocolInfo *prpl_info; + GaimAccount *account; + GntWidget *box, *label; + char *title; + + if (ggblist->tooltip) + { + remove_tooltip(ggblist); + } + + node = gnt_tree_get_selection_data(tree); + if (!node) + return; + + str = g_string_new(""); + + if (GAIM_BLIST_NODE_IS_BUDDY(node)) + { + GaimBuddy *buddy = (GaimBuddy *)node; + account = gaim_buddy_get_account(buddy); + + g_string_append_printf(str, _("Account: %s"), gaim_account_get_username(account)); + + prpl = gaim_find_prpl(gaim_account_get_protocol_id(account)); + prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl); + if (prpl_info && prpl_info->tooltip_text) + { + GString *tip = g_string_new(""); + char *strip, *br; + prpl_info->tooltip_text(buddy, tip, TRUE); + + br = gaim_strreplace(tip->str, "\n", "<br>"); + strip = gaim_markup_strip_html(br); + g_string_append(str, strip); + g_string_free(tip, TRUE); + g_free(strip); + g_free(br); + } + + title = g_strdup(gaim_buddy_get_name(buddy)); + } + else + { + g_string_free(str, TRUE); + return; + } + + gnt_widget_get_position(widget, &x, &y); + gnt_widget_get_size(widget, &width, NULL); + top = gnt_tree_get_selection_visible_line(tree); + + x += width; + y += top - 1; + + box = gnt_box_new(FALSE, FALSE); + gnt_box_set_toplevel(GNT_BOX(box), TRUE); + GNT_WIDGET_SET_FLAGS(box, GNT_WIDGET_NO_SHADOW); + gnt_box_set_title(GNT_BOX(box), title); + + gnt_box_add_widget(GNT_BOX(box), GNT_WIDGET(gnt_label_new(str->str))); + + gnt_widget_set_position(box, x, y); + gnt_widget_draw(box); + + g_string_free(str, TRUE); + ggblist->tooltip = box; + ggblist->tnode = node; +} + +static gboolean +key_pressed(GntWidget *widget, const char *text, GGBlist *ggblist) +{ + if (text[0] == 27 && text[1] == 0) + { + /* Escape was pressed */ + if (ggblist->tooltip) + { + gnt_widget_destroy(ggblist->tooltip); + ggblist->tooltip = NULL; + return TRUE; + } + } + return FALSE; +} + void gg_blist_init() { ggblist = g_new0(GGBlist, 1); gaim_get_blist()->ui_data = ggblist; + ggblist->list = gaim_get_blist(); ggblist->window = gnt_box_new(FALSE, FALSE); - GNT_WIDGET_UNSET_FLAGS(ggblist->window, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); + gnt_box_set_toplevel(GNT_BOX(ggblist->window), TRUE); gnt_box_set_title(GNT_BOX(ggblist->window), _("Buddy List")); gnt_box_set_pad(GNT_BOX(ggblist->window), 0); @@ -156,14 +265,19 @@ gaim_signal_connect(gaim_blist_get_handle(), "buddy-signed-off", gg_blist_get_handle(), GAIM_CALLBACK(buddy_signed_off), ggblist); - g_signal_connect(G_OBJECT(ggblist->tree), "activate", G_CALLBACK(selection_activate), ggblist); +#if 0 + /* These I plan to use to indicate unread-messages etc. */ + gaim_signal_connect(gaim_conversations_get_handle(), "received-im-msg", gg_blist_get_handle(), + GAIM_CALLBACK(received_im_msg), list); + gaim_signal_connect(gaim_conversations_get_handle(), "sent-im-msg", gg_blist_get_handle(), + GAIM_CALLBACK(sent_im_msg), NULL); - /*gaim_signal_connect(gaim_conversations_get_handle(), "received-im-msg", gg_blist_get_handle(),*/ - /*GAIM_CALLBACK(received_im_msg), list);*/ - /*gaim_signal_connect(gaim_conversations_get_handle(), "sent-im-msg", gg_blist_get_handle(),*/ - /*GAIM_CALLBACK(sent_im_msg), NULL);*/ + gaim_signal_connect(gaim_conversations_get_handle(), "received-chat-msg", gg_blist_get_handle(), + GAIM_CALLBACK(received_chat_msg), list); +#endif - /*gaim_signal_connect(gaim_conversations_get_handle(), "received-chat-msg", gg_blist_get_handle(),*/ - /*GAIM_CALLBACK(received_chat_msg), list);*/ + g_signal_connect(G_OBJECT(ggblist->tree), "selection_changed", G_CALLBACK(selection_changed), ggblist); + g_signal_connect(G_OBJECT(ggblist->tree), "key_pressed", G_CALLBACK(key_pressed), ggblist); + g_signal_connect(G_OBJECT(ggblist->tree), "activate", G_CALLBACK(selection_activate), ggblist); } Modified: trunk/console/libgnt/gnt-skel.c =================================================================== --- trunk/console/libgnt/gnt-skel.c 2006-06-23 16:59:12 UTC (rev 16320) +++ trunk/console/libgnt/gnt-skel.c 2006-06-23 19:41:31 UTC (rev 16321) @@ -39,7 +39,7 @@ } static void -gnt_skel_class_init(GntWidgetClass *klass) +gnt_skel_class_init(GntSkelClass *klass) { GObjectClass *obj_class = G_OBJECT_CLASS(klass); Modified: trunk/console/libgnt/gntbox.c =================================================================== --- trunk/console/libgnt/gntbox.c 2006-06-23 16:59:12 UTC (rev 16320) +++ trunk/console/libgnt/gntbox.c 2006-06-23 19:41:31 UTC (rev 16321) @@ -267,7 +267,7 @@ } static void -gnt_box_class_init(GntWidgetClass *klass) +gnt_box_class_init(GntBoxClass *klass) { GObjectClass *obj_class = G_OBJECT_CLASS(klass); @@ -351,3 +351,12 @@ /* XXX: Perhaps redraw if already showing? */ } +void gnt_box_set_toplevel(GntBox *box, gboolean set) +{ + GntWidget *widget = GNT_WIDGET(box); + if (set) + GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); + else + GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); +} + Modified: trunk/console/libgnt/gntbox.h =================================================================== --- trunk/console/libgnt/gntbox.h 2006-06-23 16:59:12 UTC (rev 16320) +++ trunk/console/libgnt/gntbox.h 2006-06-23 19:41:31 UTC (rev 16321) @@ -55,6 +55,8 @@ void gnt_box_set_pad(GntBox *box, int pad); +void gnt_box_set_toplevel(GntBox *box, gboolean set); + G_END_DECLS #endif /* GNT_BOX_H */ Modified: trunk/console/libgnt/gntentry.c =================================================================== --- trunk/console/libgnt/gntentry.c 2006-06-23 16:59:12 UTC (rev 16320) +++ trunk/console/libgnt/gntentry.c 2006-06-23 19:41:31 UTC (rev 16321) @@ -138,7 +138,7 @@ } static void -gnt_entry_class_init(GntWidgetClass *klass) +gnt_entry_class_init(GntEntryClass *klass) { GObjectClass *obj_class = G_OBJECT_CLASS(klass); Modified: trunk/console/libgnt/gntlabel.c =================================================================== --- trunk/console/libgnt/gntlabel.c 2006-06-23 16:59:12 UTC (rev 16320) +++ trunk/console/libgnt/gntlabel.c 2006-06-23 19:41:31 UTC (rev 16321) @@ -57,7 +57,7 @@ } static void -gnt_label_class_init(GntWidgetClass *klass) +gnt_label_class_init(GntLabelClass *klass) { GObjectClass *obj_class = G_OBJECT_CLASS(klass); Modified: trunk/console/libgnt/gntmain.c =================================================================== --- trunk/console/libgnt/gntmain.c 2006-06-23 16:59:12 UTC (rev 16320) +++ trunk/console/libgnt/gntmain.c 2006-06-23 19:41:31 UTC (rev 16321) @@ -90,7 +90,6 @@ setlocale(LC_ALL, ""); initscr(); start_color(); - /*use_default_colors();*/ gnt_init_colors(); max_x = getmaxx(stdscr); Modified: trunk/console/libgnt/gnttree.c =================================================================== --- trunk/console/libgnt/gnttree.c 2006-06-23 16:59:12 UTC (rev 16320) +++ trunk/console/libgnt/gnttree.c 2006-06-23 19:41:31 UTC (rev 16321) @@ -1,8 +1,10 @@ #include "gnttree.h" +#include "gntutils.h" enum { - SIGS = 1, + SIG_SELECTION_CHANGED, + SIGS, }; #define TAB_SIZE 3 @@ -113,10 +115,18 @@ DEBUG; } +static void +tree_selection_changed(GntTree *tree, int old, int current) +{ + g_signal_emit(tree, signals[SIG_SELECTION_CHANGED], 0, old, current); +} + static gboolean gnt_tree_key_pressed(GntWidget *widget, const char *text) { GntTree *tree = GNT_TREE(widget); + int old = tree->current; + if (text[0] == 27) { if (strcmp(text+1, GNT_KEY_DOWN) == 0 && tree->current < g_list_length(tree->list) - 1) @@ -141,6 +151,9 @@ gnt_widget_activate(widget); } + if (old != tree->current) + tree_selection_changed(tree, old, tree->current); + return FALSE; } @@ -154,7 +167,7 @@ } static void -gnt_tree_class_init(GntWidgetClass *klass) +gnt_tree_class_init(GntTreeClass *klass) { GObjectClass *obj_class = G_OBJECT_CLASS(klass); @@ -165,6 +178,15 @@ parent_class->size_request = gnt_tree_size_request; parent_class->key_pressed = gnt_tree_key_pressed; + signals[SIG_SELECTION_CHANGED] = + g_signal_new("selection-changed", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET(GntTreeClass, selection_changed), + NULL, NULL, + gnt_closure_marshal_VOID__INT_INT, + G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); + DEBUG; } @@ -271,7 +293,7 @@ return dep; } -void gnt_tree_add_row_after(GntTree *tree, void *key, const char *text, void *parent, void *bigbro) +GntTreeRow *gnt_tree_add_row_after(GntTree *tree, void *key, const char *text, void *parent, void *bigbro) { GntTreeRow *row = g_new0(GntTreeRow, 1), *pr = NULL; @@ -335,11 +357,13 @@ if (GNT_WIDGET_IS_FLAG_SET(GNT_WIDGET(tree), GNT_WIDGET_MAPPED)) redraw_tree(tree); + + return row; } gpointer gnt_tree_get_selection_data(GntTree *tree) { - return g_list_nth(tree->list, tree->current); + return g_list_nth_data(tree->list, tree->current); } int gnt_tree_get_selection_index(GntTree *tree) @@ -355,9 +379,6 @@ { int len, pos; - g_free(row->text); - g_free(row); - pos = g_list_index(tree->list, key); g_hash_table_remove(tree->hash, key); @@ -367,6 +388,13 @@ { redraw_tree(tree); } + g_hash_table_replace(tree->hash, key, NULL); } } +int gnt_tree_get_selection_visible_line(GntTree *tree) +{ + return (tree->current - tree->top) + + !!(GNT_WIDGET_IS_FLAG_SET(GNT_WIDGET(tree), GNT_WIDGET_NO_BORDER)); +} + Modified: trunk/console/libgnt/gnttree.h =================================================================== --- trunk/console/libgnt/gnttree.h 2006-06-23 16:59:12 UTC (rev 16320) +++ trunk/console/libgnt/gnttree.h 2006-06-23 19:41:31 UTC (rev 16321) @@ -42,6 +42,8 @@ { GntWidgetClass parent; + void (*selection_changed)(int old, int current); + void (*gnt_reserved1)(void); void (*gnt_reserved2)(void); void (*gnt_reserved3)(void); @@ -60,7 +62,7 @@ void gnt_tree_scroll(GntTree *tree, int count); -void gnt_tree_add_row_after(GntTree *tree, void *key, const char *text, void *parent, void *bigbro); +GntTreeRow *gnt_tree_add_row_after(GntTree *tree, void *key, const char *text, void *parent, void *bigbro); gpointer gnt_tree_get_selection_data(GntTree *tree); @@ -68,6 +70,9 @@ void gnt_tree_remove(GntTree *tree, gpointer key); +/* Returns the visible line number of the selected row */ +int gnt_tree_get_selection_visible_line(GntTree *tree); + G_END_DECLS #endif /* GNT_TREE_H */ Modified: trunk/console/libgnt/gntwidget.c =================================================================== --- trunk/console/libgnt/gntwidget.c 2006-06-23 16:59:12 UTC (rev 16320) +++ trunk/console/libgnt/gntwidget.c 2006-06-23 19:41:31 UTC (rev 16321) @@ -221,11 +221,12 @@ { g_return_if_fail(GNT_IS_WIDGET(obj)); + gnt_widget_hide(obj); delwin(obj->window); if(!(GNT_WIDGET_FLAGS(obj) & GNT_WIDGET_DESTROYING)) g_object_run_dispose(G_OBJECT(obj)); /* XXX: This may be the wrong place */ - gnt_screen_remove_widget(obj); + /*gnt_screen_remove_widget(obj);*/ DEBUG; } @@ -309,6 +310,7 @@ * those windows to redraw themselves by emitting the approrpiate * expose signal. */ + wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); werase(widget->window); wrefresh(widget->window); } Modified: trunk/console/libgnt/test.c =================================================================== --- trunk/console/libgnt/test.c 2006-06-23 16:59:12 UTC (rev 16320) +++ trunk/console/libgnt/test.c 2006-06-23 19:41:31 UTC (rev 16321) @@ -112,7 +112,7 @@ gnt_widget_show(hbox); - /*g_signal_connect(hbox, "key_pressed", G_CALLBACK(key_pressed), widget);*/ + g_signal_connect(hbox, "key_pressed", G_CALLBACK(key_pressed), tree); g_signal_connect(widget, "activate", G_CALLBACK(button1), hbox); g_signal_connect(widget2, "activate", G_CALLBACK(button2), hbox); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-23 16:59:20
|
Revision: 16320 Author: thekingant Date: 2006-06-23 09:59:12 -0700 (Fri, 23 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16320&view=rev Log Message: ----------- sf patch #1511450, from Wan Hing Wah Fix a segfault when catching certain signals because the wrong parameters were passed to those signals. My bad. Modified Paths: -------------- trunk/src/conversation.c Modified: trunk/src/conversation.c =================================================================== --- trunk/src/conversation.c 2006-06-23 16:02:36 UTC (rev 16319) +++ trunk/src/conversation.c 2006-06-23 16:59:12 UTC (rev 16320) @@ -58,7 +58,7 @@ gaim_conv_im_stop_typing_timeout(im); gaim_signal_emit(gaim_conversations_get_handle(), - "buddy-typing-stopped", c); + "buddy-typing-stopped", c->account, c->name); return FALSE; } @@ -83,7 +83,7 @@ serv_send_typing(gc, name, GAIM_TYPED); gaim_signal_emit(gaim_conversations_get_handle(), - "buddy-typed", conv); + "buddy-typed", conv->account, conv->name); gaim_debug(GAIM_DEBUG_MISC, "conversation", "typed...\n"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aar...@us...> - 2006-06-23 16:02:51
|
Revision: 16319 Author: aaronsheldon Date: 2006-06-23 09:02:36 -0700 (Fri, 23 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16319&view=rev Log Message: ----------- Changes to gaim_gtk_blist_get_name_markup which result in profiling indicating a 40%+ improvement in function performance (larger gains when detailed buddy is turned off because it no longer grabs PRPL info first). Modified Paths: -------------- branches/soc-2006-blist-efficiency/src/gtkblist.c Modified: branches/soc-2006-blist-efficiency/src/gtkblist.c =================================================================== --- branches/soc-2006-blist-efficiency/src/gtkblist.c 2006-06-23 14:30:27 UTC (rev 16318) +++ branches/soc-2006-blist-efficiency/src/gtkblist.c 2006-06-23 16:02:36 UTC (rev 16319) @@ -2875,7 +2875,7 @@ struct _gaim_gtk_blist_node *gtkcontactnode = NULL; char *idletime = NULL, *statustext = NULL; time_t t; - /* XXX Clean up this crap */ + /* XXX Good luck cleaning up this crap */ contact = (GaimContact*)((GaimBlistNode*)b)->parent; if(contact) @@ -2887,11 +2887,6 @@ name = gaim_buddy_get_alias(b); esc = g_markup_escape_text(name, strlen(name)); - prpl = gaim_find_prpl(gaim_account_get_protocol_id(b->account)); - - if (prpl != NULL) - prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl); - presence = gaim_buddy_get_presence(b); if (!gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons")) @@ -2907,6 +2902,11 @@ return esc; } + prpl = gaim_find_prpl(gaim_account_get_protocol_id(b->account)); + + if (prpl != NULL) + prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl); + if (prpl_info && prpl_info->status_text && b->account->gc) { char *tmp = prpl_info->status_text(b); const char *end; @@ -2957,59 +2957,62 @@ #endif } - if (gaim_prefs_get_bool("/gaim/gtk/blist/show_idle_time") && - gaim_presence_is_idle(presence)) - { - time_t idle_secs = gaim_presence_get_idle_time(presence); + if(!gaim_presence_is_online(presence) && !statustext) + statustext = g_strdup(_("Offline")); + else if (!statustext) + text = g_strdup(esc); + + if (gaim_presence_is_idle(presence)) { + if (gaim_prefs_get_bool("/gaim/gtk/blist/show_idle_time")) { + time_t idle_secs = gaim_presence_get_idle_time(presence); - if (idle_secs > 0) { - int ihrs, imin; + if (idle_secs > 0) { + int ihrs, imin; - time(&t); - ihrs = (t - idle_secs) / 3600; - imin = ((t - idle_secs) / 60) % 60; + time(&t); + ihrs = (t - idle_secs) / 3600; + imin = ((t - idle_secs) / 60) % 60; - if (ihrs) - idletime = g_strdup_printf(_("Idle %dh %02dm"), ihrs, imin); + if (ihrs) + idletime = g_strdup_printf(_("Idle %dh %02dm"), ihrs, imin); + else + idletime = g_strdup_printf(_("Idle %dm"), imin); + } else - idletime = g_strdup_printf(_("Idle %dm"), imin); + idletime = g_strdup(_("Idle")); + + if (!selected) + text = g_strdup_printf("<span color='%s'>%s</span>\n" + "<span color='%s' size='smaller'>%s%s%s</span>", + dim_grey(), esc, dim_grey(), + idletime != NULL ? idletime : "", + (idletime != NULL && statustext != NULL) ? " - " : "", + statustext != NULL ? statustext : ""); } - else - idletime = g_strdup(_("Idle")); + else if (!selected && !statustext) /* We handle selected text later */ + text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc); + else if (!selected && !text) + text = g_strdup_printf("<span color='%s'>%s</span>\n" + "<span color='%s' size='smaller'>%s%s%s</span>", + dim_grey(), esc, dim_grey(), + idletime != NULL ? idletime : "", + (idletime != NULL && statustext != NULL) ? " - " : "", + statustext != NULL ? statustext : ""); } - if(!gaim_presence_is_online(presence) && !statustext) - statustext = g_strdup(_("Offline")); - - if (statustext == NULL && idletime == NULL) + /* Not idle and not selected */ + else if (!selected && !text) { - if (!selected && gaim_presence_is_idle(presence)) - text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc); - else - text = g_strdup(esc); + text = g_strdup_printf("%s\n" + "<span color='%s' size='smaller'>%s%s%s</span>", + esc, dim_grey(), + idletime != NULL ? idletime : "", + (idletime != NULL && statustext != NULL) ? " - " : "", + statustext != NULL ? statustext : ""); } - else if (!selected) - { - if (gaim_presence_is_idle(presence)) - { - text = g_strdup_printf("<span color='%s'>%s</span>\n" - "<span color='%s' size='smaller'>%s%s%s</span>", - dim_grey(), esc, dim_grey(), - idletime != NULL ? idletime : "", - (idletime != NULL && statustext != NULL) ? " - " : "", - statustext != NULL ? statustext : ""); - } - else - { - text = g_strdup_printf("%s\n" - "<span color='%s' size='smaller'>%s%s%s</span>", - esc, dim_grey(), - idletime != NULL ? idletime : "", - (idletime != NULL && statustext != NULL) ? " - " : "", - statustext != NULL ? statustext : ""); - } - } - else + + /* It is selected. */ + if ((selected && !text) || (selected && idletime)) text = g_strdup_printf("%s\n" "<span size='smaller'>%s%s%s</span>", esc, @@ -3017,7 +3020,6 @@ (idletime != NULL && statustext != NULL) ? " - " : "", statustext != NULL ? statustext : ""); - g_free(idletime); g_free(statustext); g_free(esc); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |