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: <rl...@us...> - 2006-09-11 07:01:17
|
Revision: 17247 http://svn.sourceforge.net/gaim/?rev=17247&view=rev Author: rlaager Date: 2006-09-11 00:01:15 -0700 (Mon, 11 Sep 2006) Log Message: ----------- Tell configure to disable the installation of the gconf schema. Add a %post section that calls gconftool-2 to do the real installation. This is entirely untested, but is documented as The Right Way at: http://www.gnome.org/projects/gconf/ Modified Paths: -------------- trunk/gaim.spec.in Modified: trunk/gaim.spec.in =================================================================== --- trunk/gaim.spec.in 2006-09-11 06:17:14 UTC (rev 17246) +++ trunk/gaim.spec.in 2006-09-11 07:01:15 UTC (rev 17247) @@ -171,6 +171,7 @@ --libdir=%{_libdir} \ --mandir=%{_mandir} \ --sysconfdir=%{_sysconfdir} \ + --disable-schemas-install \ %{!?_with_dbus:--disable-dbus} \ %{?_without_gstreamer:--disable-gstreamer} \ %{?_without_gtkspell:--disable-gtkspell} \ @@ -243,6 +244,11 @@ %clean rm -rf %{buildroot} +%post +# From: http://www.gnome.org/projects/gconf/ +export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` +gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/gaim.schemas > /dev/null + %files -f %{name}-%{version}-coreplugins %defattr(-, root, root) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-11 06:17:16
|
Revision: 17246 http://svn.sourceforge.net/gaim/?rev=17246&view=rev Author: thekingant Date: 2006-09-10 23:17:14 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Whoops, I thought this was in the last commit but it wasn't. Add gaim.schemas to our gaim RPM Modified Paths: -------------- trunk/gaim.spec.in Modified: trunk/gaim.spec.in =================================================================== --- trunk/gaim.spec.in 2006-09-11 06:15:58 UTC (rev 17245) +++ trunk/gaim.spec.in 2006-09-11 06:17:14 UTC (rev 17246) @@ -270,6 +270,7 @@ %{_datadir}/applications/* %{_libdir}/libgaim.so.* %{_libdir}/libgnt.so.* +%{_sysconfdir}/gconf/schemas/gaim.schemas %if 0%{?_with_dbus:1} %{_libdir}/libgaim-client.so.* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-11 06:16:01
|
Revision: 17245 http://svn.sourceforge.net/gaim/?rev=17245&view=rev Author: thekingant Date: 2006-09-10 23:15:58 -0700 (Sun, 10 Sep 2006) Log Message: ----------- * Don't install gaim-notifications-example when make installing * Have gaim-notifications-example placed in the doc dir when installing Gaim from RPMs * Add the gconf schema to the Gaim RPM * Alphabetize some stuff Modified Paths: -------------- trunk/gaim.spec.in trunk/libgaim/Makefile.am Modified: trunk/gaim.spec.in =================================================================== --- trunk/gaim.spec.in 2006-09-11 04:59:22 UTC (rev 17244) +++ trunk/gaim.spec.in 2006-09-11 06:15:58 UTC (rev 17245) @@ -28,17 +28,17 @@ # Generic build requirements BuildRequires: libtool, pkgconfig, intltool, gettext +%{?_with_avahi:BuildRequires: avahi-compat-howl avahi-compat-howl-devel} +%{?_with_dbus:BuildRequires: dbus-devel >= 0.35} +%{?_with_gadugadu:BuildRequires: libgadu-devel} %{!?_without_gstreamer:BuildRequires: gstreamer-devel} -%{?_with_avahi:BuildRequires: avahi-compat-howl avahi-compat-howl-devel} +%{!?_without_gtkspell:BuildRequires: gtkspell-devel} %{?_with_howl:BuildRequires: howl-devel} -%{?_with_silc:BuildRequires: /usr/include/silc/silcclient.h} %{?_with_meanwhile:BuildRequires: meanwhile-devel} -%{?_with_gadugadu:BuildRequires: libgadu-devel} -%{?_with_tcl:BuildRequires: tcl, tk, /usr/include/tcl.h} %{?_with_mono:BuildRequires: mono-devel} -%{?_with_dbus:BuildRequires: dbus-devel >= 0.35} -%{!?_without_gtkspell:BuildRequires: gtkspell-devel} %{?_with_sasl:BuildRequires: cyrus-sasl-devel >= 2} +%{?_with_silc:BuildRequires: /usr/include/silc/silcclient.h} +%{?_with_tcl:BuildRequires: tcl, tk, /usr/include/tcl.h} # For some reason perl isn't always automatically detected as a requirement :( Requires: perl @@ -63,6 +63,11 @@ %endif %endif +%package devel +Summary: Development headers, documentation, and libraries for Gaim. +Group: Applications/Internet +Requires: pkgconfig, gaim = %{epoch}:%{version} + %if 0%{?_with_howl:1} || 0%{?_with_avahi:1} %package bonjour Summary: Bonjour plugin for Gaim @@ -70,9 +75,9 @@ Requires: gaim = %{epoch}:%{version} %endif -%if 0%{?_with_silc:1} -%package silc -Summary: SILC (Secure Internet Live Conferencing) plugin for Gaim +%if 0%{?_with_gadugadu:1} +%package gadugadu +Summary: Gadu-Gadu plugin for Gaim using the libgadu library Group: Applications/Internet Requires: gaim = %{epoch}:%{version} %endif @@ -84,32 +89,27 @@ Requires: gaim = %{epoch}:%{version} %endif -%if 0%{?_with_gadugadu:1} -%package gadugadu -Summary: Gadu-Gadu plugin for Gaim using the libgadu library +%if 0%{?_with_mono:1} +%package mono +Summary: Mono .NET plugin support for Gaim Group: Applications/Internet Requires: gaim = %{epoch}:%{version} %endif -%if 0%{?_with_tcl:1} -%package tcl -Summary: Tcl scripting support for Gaim +%if 0%{?_with_silc:1} +%package silc +Summary: SILC (Secure Internet Live Conferencing) plugin for Gaim Group: Applications/Internet Requires: gaim = %{epoch}:%{version} %endif -%if 0%{?_with_mono:1} -%package mono -Summary: Mono .NET plugin support for Gaim +%if 0%{?_with_tcl:1} +%package tcl +Summary: Tcl scripting support for Gaim Group: Applications/Internet Requires: gaim = %{epoch}:%{version} %endif -%package devel -Summary: Development headers, documentation, and libraries for Gaim. -Group: Applications/Internet -Requires: pkgconfig, gaim = %{epoch}:%{version} - %description Gaim allows you to talk to anyone using a variety of messaging protocols, including AIM, ICQ, IRC, Yahoo!, Novell Groupwise, MSN @@ -123,14 +123,19 @@ Gaim is NOT affiliated with or endorsed by America Online, Inc., Microsoft Corporation, Yahoo! Inc., or ICQ Inc. +%description devel +The gaim-devel package contains the header files, developer +documentation, and libraries required for development of gaim scripts +and plugins. + %if 0%{?_with_howl:1} || 0%{?_with_avahi:1} %description bonjour Bonjour plugin for Gaim %endif -%if 0%{?_with_silc:1} -%description silc -SILC (Secure Internet Live Conferencing) plugin for Gaim +%if 0%{?_with_gadugadu:1} +%description gadugadu +Gadu-Gadu plugin for Gaim using the libgadu library %endif %if 0%{?_with_meanwhile:1} @@ -138,28 +143,23 @@ Lotus Sametime plugin for Gaim using the Meanwhile library %endif -%if 0%{?_with_gadugadu:1} -%description gadugadu -Gadu-Gadu plugin for Gaim using the libgadu library +%if 0%{?_with_mono:1} +%description mono +Mono plugin loader for Gaim. This package will allow you to write or +use Gaim plugins written in the .NET programming language. %endif +%if 0%{?_with_silc:1} +%description silc +SILC (Secure Internet Live Conferencing) plugin for Gaim +%endif + %if 0%{?_with_tcl:1} %description tcl Tcl plugin loader for Gaim. This package will allow you to write or use Gaim plugins written in the Tcl programming language. %endif -%if 0%{?_with_mono:1} -%description mono -Mono plugin loader for Gaim. This package will allow you to write or -use Gaim plugins written in the .NET programming language. -%endif - -%description devel -The gaim-devel package contains the header files, developer -documentation, and libraries required for development of gaim scripts -and plugins. - %prep %setup -q -n %{name}-@VERSION@ @@ -171,17 +171,16 @@ --libdir=%{_libdir} \ --mandir=%{_mandir} \ --sysconfdir=%{_sysconfdir} \ - --with-ao=%{_libdir} \ + %{!?_with_dbus:--disable-dbus} \ + %{?_without_gstreamer:--disable-gstreamer} \ + %{?_without_gtkspell:--disable-gtkspell} \ + %{?_with_mono:--enable-mono} \ + %{?_with_perlmakehack:--with-perl-lib=%{buildroot}%{_prefix}} \ %{!?_with_perlmakehack:--with-perl-lib=%{_prefix}} \ - %{?_with_perlmakehack:--with-perl-lib=%{buildroot}%{_prefix}} \ + %{?_with_sasl:--enable-cyrus-sasl} \ %{?_with_silc:--with-silc-includes=%{_includedir}/silc} \ %{?_with_silc:--with-silc-libs=%{_libdir}/silc} \ - %{?_with_mono:--enable-mono} \ - %{!?_with_tcl:--disable-tcl} \ - %{!?_with_dbus:--disable-dbus} \ - %{?_without_gtkspell:--disable-gtkspell} \ - %{?_with_sasl:--enable-cyrus-sasl} \ - %{?_without_gstreamer:--disable-gstreamer} + %{!?_with_tcl:--disable-tcl} make %{?_smp_mflags} @@ -197,38 +196,39 @@ make DESTDIR=$RPM_BUILD_ROOT install %endif +# Delete files that we don't want to put in any of the RPMs rm -f $RPM_BUILD_ROOT%{_libdir}/gaim/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';' +%if 0%{!?_with_gadugadu:1} +rm -f $RPM_BUILD_ROOT%{_libdir}/gaim/libgg.so +%endif + %if 0%{!?_with_howl:1} && 0%{!?_with_avahi:1} rm -f $RPM_BUILD_ROOT%{_libdir}/gaim/libbonjour.so %endif -%if 0%{!?_with_silc:1} -rm -f $RPM_BUILD_ROOT%{_libdir}/gaim/libsilcgaim.so -%endif - %if 0%{!?_with_meanwhile:1} rm -f $RPM_BUILD_ROOT%{_libdir}/gaim/libsametime.so %endif -%if 0%{!?_with_gadugadu:1} -rm -f $RPM_BUILD_ROOT%{_libdir}/gaim/libgg.so +%if 0%{!?_with_mono:1} +rm -f $RPM_BUILD_ROOT%{_libdir}/gaim/mono.so +rm -f $RPM_BUILD_ROOT%{_libdir}/gaim/*.dll %endif +%if 0%{!?_with_silc:1} +rm -f $RPM_BUILD_ROOT%{_libdir}/gaim/libsilcgaim.so +%endif + %if 0%{!?_with_tcl:1} rm -f $RPM_BUILD_ROOT%{_libdir}/gaim/tcl.so %endif -%if 0%{!?_with_mono:1} -rm -f $RPM_BUILD_ROOT%{_libdir}/gaim/mono.so -rm -f $RPM_BUILD_ROOT%{_libdir}/gaim/*.dll -%endif - find $RPM_BUILD_ROOT%{_libdir}/gaim -type f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" | \ grep -v libbonjour.so | \ @@ -275,27 +275,37 @@ %{_libdir}/libgaim-client.so.* %{_datadir}/dbus-1/services/gaim.service %doc README.dbus +%doc libgaim/gaim-notifications-example %endif -%if 0%{?_with_howl:1} || 0%{?_with_avahi:1} -%files bonjour +%files devel %defattr(-, root, root) -%{_libdir}/gaim/libbonjour.* -%endif +%doc ChangeLog.API +%doc HACKING +%doc PLUGIN_HOWTO +%doc PROGRAMMING_NOTES -%if 0%{?_with_silc:1} -%files silc -%defattr(-, root, root) - -%{_libdir}/gaim/libsilcgaim.* +%dir %{_includedir}/gaim +%{_includedir}/gaim/*.h +%dir %{_includedir}/gaim/gnt +%{_includedir}/gaim/gnt/*.h +%dir %{_includedir}/gnt +%{_includedir}/gnt/*.h +%{_libdir}/libgaim.so +%{_libdir}/libgnt.so +%{_libdir}/pkgconfig/gaim.pc +%{_libdir}/pkgconfig/gnt.pc +%{_datadir}/aclocal/gaim.m4 +%if 0%{?_with_dbus:1} +%{_libdir}/libgaim-client.so %endif -%if 0%{?_with_meanwhile:1} -%files meanwhile +%if 0%{?_with_howl:1} || 0%{?_with_avahi:1} +%files bonjour %defattr(-, root, root) -%{_libdir}/gaim/libsametime.* +%{_libdir}/gaim/libbonjour.* %endif %if 0%{?_with_gadugadu:1} @@ -305,11 +315,11 @@ %{_libdir}/gaim/libgg.* %endif -%if 0%{?_with_tcl:1} -%files tcl +%if 0%{?_with_meanwhile:1} +%files meanwhile %defattr(-, root, root) -%{_libdir}/gaim/tcl.so +%{_libdir}/gaim/libsametime.* %endif %if 0%{?_with_mono:1} @@ -320,27 +330,18 @@ %{_libdir}/gaim/*.dll %endif -%files devel +%if 0%{?_with_silc:1} +%files silc %defattr(-, root, root) -%doc ChangeLog.API -%doc HACKING -%doc PLUGIN_HOWTO -%doc PROGRAMMING_NOTES +%{_libdir}/gaim/libsilcgaim.* +%endif -%dir %{_includedir}/gaim -%{_includedir}/gaim/*.h -%dir %{_includedir}/gaim/gnt -%{_includedir}/gaim/gnt/*.h -%dir %{_includedir}/gnt -%{_includedir}/gnt/*.h -%{_libdir}/libgaim.so -%{_libdir}/libgnt.so -%{_libdir}/pkgconfig/gaim.pc -%{_libdir}/pkgconfig/gnt.pc -%{_datadir}/aclocal/gaim.m4 -%if 0%{?_with_dbus:1} -%{_libdir}/libgaim-client.so +%if 0%{?_with_tcl:1} +%files tcl +%defattr(-, root, root) + +%{_libdir}/gaim/tcl.so %endif %changelog Modified: trunk/libgaim/Makefile.am =================================================================== --- trunk/libgaim/Makefile.am 2006-09-11 04:59:22 UTC (rev 17244) +++ trunk/libgaim/Makefile.am 2006-09-11 06:15:58 UTC (rev 17245) @@ -192,7 +192,7 @@ # scripts -bin_SCRIPTS = gaim-notifications-example gaim-remote gaim-send gaim-send-async gaim-url-handler +bin_SCRIPTS = gaim-remote gaim-send gaim-send-async gaim-url-handler endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-09-11 04:59:28
|
Revision: 17244 http://svn.sourceforge.net/gaim/?rev=17244&view=rev Author: rlaager Date: 2006-09-10 21:59:22 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Unbreak make dist Modified Paths: -------------- trunk/libgaim/gconf/Makefile.am Modified: trunk/libgaim/gconf/Makefile.am =================================================================== --- trunk/libgaim/gconf/Makefile.am 2006-09-11 04:39:08 UTC (rev 17243) +++ trunk/libgaim/gconf/Makefile.am 2006-09-11 04:59:22 UTC (rev 17244) @@ -1,6 +1,8 @@ schemadir = @GCONF_SCHEMA_FILE_DIR@ schema_DATA = gaim.schemas +EXTRA_DIST = gaim.schemas + if GCONF_SCHEMAS_INSTALL install-data-local: GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-11 04:39:16
|
Revision: 17243 http://svn.sourceforge.net/gaim/?rev=17243&view=rev Author: thekingant Date: 2006-09-10 21:39:08 -0700 (Sun, 10 Sep 2006) Log Message: ----------- I left off a \, which was causing some images not to be included in the tar.gz Modified Paths: -------------- trunk/gtk/pixmaps/status/default/Makefile.am Modified: trunk/gtk/pixmaps/status/default/Makefile.am =================================================================== --- trunk/gtk/pixmaps/status/default/Makefile.am 2006-09-11 03:58:37 UTC (rev 17242) +++ trunk/gtk/pixmaps/status/default/Makefile.am 2006-09-11 04:39:08 UTC (rev 17243) @@ -132,7 +132,7 @@ qq_97.png \ qq_98.png \ qq_99.png \ - qq_100.png + qq_100.png \ secure.png \ silc.png \ simple.png \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-11 03:58:39
|
Revision: 17242 http://svn.sourceforge.net/gaim/?rev=17242&view=rev Author: thekingant Date: 2006-09-10 20:58:37 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Add Makefile and Makefile.in to the svn:ignore property for the libgaim/gconf directory Property Changed: ---------------- trunk/libgaim/gconf/ Property changes on: trunk/libgaim/gconf ___________________________________________________________________ Name: svn:ignore + Makefile Makefile.in This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-09-11 03:39:48
|
Revision: 17241 http://svn.sourceforge.net/gaim/?rev=17241&view=rev Author: markhuetsch Date: 2006-09-10 20:39:40 -0700 (Sun, 10 Sep 2006) Log Message: ----------- We don't need to see this log. Modified Paths: -------------- trunk/libgaim/protocols/qq/qq.c Modified: trunk/libgaim/protocols/qq/qq.c =================================================================== --- trunk/libgaim/protocols/qq/qq.c 2006-09-11 02:30:59 UTC (rev 17240) +++ trunk/libgaim/protocols/qq/qq.c 2006-09-11 03:39:40 UTC (rev 17241) @@ -584,15 +584,6 @@ } */ -/* -static void _qq_menu_show_system_message(GaimPluginAction *action) -{ - GaimConnection *gc = (GaimConnection *) action->context; - g_return_if_fail ( gc != NULL ); - gaim_gtk_log_show(GAIM_LOG_IM, "systemim", gaim_connection_get_account(gc)); -} -*/ - /* TODO: re-enable this static void _qq_menu_send_file(GaimBlistNode * node, gpointer ignored) { @@ -833,11 +824,6 @@ m = g_list_append(m, act); */ - /* XXX consider re-enabling this - act = gaim_plugin_action_new(_("Show System Message"), _qq_menu_show_system_message); - m = g_list_append(m, act); - */ - /* act = gaim_plugin_action_new(_("Qun: Search a permanent Qun"), _qq_menu_search_or_add_permanent_group); m = g_list_append(m, act); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-09-11 02:31:14
|
Revision: 17240 http://svn.sourceforge.net/gaim/?rev=17240&view=rev Author: rlaager Date: 2006-09-10 19:30:59 -0700 (Sun, 10 Sep 2006) Log Message: ----------- SF Patch #1492561 from Lars T. Mikkelsen "This patch adds gaim-url-handler, a URL handler for most protocols in Gaim. The gaim-url-handler is similar to (and based on) gaim-remote, however, it uses the native URL format of each protocol. Furthermore, the patch includes a GConf schema, which allows Gnome applications to use the URL handler." With this and gaim-send/gaim-send-async, we should be able to drop gaim-remote. Please let me know if you object, or I'll remove gaim-remote shortly. For the record, I know this doesn't support 100% of the ChatZilla IRC URL spec, and I haven't investigated the XMPP URL spec beyond a casual first look. We can tweak these things later -- I figured it was important to get the bulk of the code in place. Modified Paths: -------------- trunk/COPYRIGHT trunk/ChangeLog.API trunk/acinclude.m4 trunk/configure.ac trunk/gtk/gtkconv.c trunk/libgaim/Makefile.am trunk/libgaim/conversation.c trunk/libgaim/conversation.h Added Paths: ----------- trunk/libgaim/gaim-url-handler trunk/libgaim/gconf/ trunk/libgaim/gconf/Makefile.am trunk/libgaim/gconf/gaim.schemas Modified: trunk/COPYRIGHT =================================================================== --- trunk/COPYRIGHT 2006-09-11 02:02:18 UTC (rev 17239) +++ trunk/COPYRIGHT 2006-09-11 02:30:59 UTC (rev 17240) @@ -189,6 +189,7 @@ Torrey McMahon Robert McQueen Robert Mibus +Lars T. Mikkelsen Benjamin Miller Kevin Miller Paul Miller Modified: trunk/ChangeLog.API =================================================================== --- trunk/ChangeLog.API 2006-09-11 02:02:18 UTC (rev 17239) +++ trunk/ChangeLog.API 2006-09-11 02:30:59 UTC (rev 17240) @@ -321,6 +321,8 @@ call to gaim_util_fetch_url() or gaim_util_fetch_url_request(). * GaimGtkWindow: dialogs.search (previously in GaimGtkConversation) * gaim_buddy_get_server_alias() + * gaim_conv_send_confirm() + * GaimConversationUiOps.send_confirm Signals - Changed: (See the Doxygen docs for details on all signals.) * Signal propagation now stops after a handler returns a non-NULL value. Modified: trunk/acinclude.m4 =================================================================== --- trunk/acinclude.m4 2006-09-11 02:02:18 UTC (rev 17239) +++ trunk/acinclude.m4 2006-09-11 02:30:59 UTC (rev 17240) @@ -836,3 +836,42 @@ AC_SUBST(BINRELOC_CFLAGS) AC_SUBST(BINRELOC_LIBS) ]) +dnl AM_GCONF_SOURCE_2 +dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas +dnl (i.e. pass to gconftool-2 +dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where +dnl you should install foo.schemas files +dnl + +AC_DEFUN([AM_GCONF_SOURCE_2], +[ + if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then + GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` + else + GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE + fi + + AC_ARG_WITH(gconf-source, + [ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",) + + AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE) + AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation]) + + if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then + GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' + fi + + AC_ARG_WITH(gconf-schema-file-dir, + [ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",) + + AC_SUBST(GCONF_SCHEMA_FILE_DIR) + AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files]) + + AC_ARG_ENABLE(schemas-install, + [ --disable-schemas-install Disable the schemas installation], + [case ${enableval} in + yes|no) ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;; + esac]) + AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no]) +]) Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-09-11 02:02:18 UTC (rev 17239) +++ trunk/configure.ac 2006-09-11 02:30:59 UTC (rev 17240) @@ -423,6 +423,13 @@ AC_SUBST(LIBXML_LIBS) dnl ####################################################################### +dnl # GConf schemas +dnl ####################################################################### +AC_PATH_PROG(GCONFTOOL, gconftool-2, no) +AM_CONDITIONAL(USE_GCONFTOOL, test "x$GCONFTOOL" != "xno") +AM_GCONF_SOURCE_2 + +dnl ####################################################################### dnl # Check for GStreamer dnl ####################################################################### AC_ARG_ENABLE(gstreamer, @@ -577,7 +584,7 @@ gadu_manual_check="no" fi if test "x$gadu_manual_check" = "xno"; then - PKG_CHECK_MODULES(GADU, libgadu, [ + PKG_CHECK_MODULES(LIBGADU, libgadu, [ gadu_includes="yes" gadu_libs="yes" ], [ @@ -1870,6 +1877,7 @@ gtk/plugins/perl/common/Makefile.PL gtk/plugins/ticker/Makefile gtk/sounds/Makefile + libgaim/gconf/Makefile libgaim/plugins/Makefile libgaim/plugins/mono/Makefile libgaim/plugins/mono/api/Makefile Modified: trunk/gtk/gtkconv.c =================================================================== --- trunk/gtk/gtkconv.c 2006-09-11 02:02:18 UTC (rev 17239) +++ trunk/gtk/gtkconv.c 2006-09-11 02:30:59 UTC (rev 17240) @@ -5396,6 +5396,14 @@ } +static void +gaim_gtkconv_send_confirm(GaimConversation *conv, const char *message) +{ + GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); + + gtk_imhtml_append_text(GTK_IMHTML(gtkconv->entry), message, 0); +} + /* * Makes sure all the menu items and all the buttons are hidden/shown and * sensitive/insensitive. This is called after changing tabs and when an @@ -5780,7 +5788,8 @@ gaim_gtkconv_has_focus, /* has_focus */ gaim_gtkconv_custom_smiley_add, /* custom_smiley_add */ gaim_gtkconv_custom_smiley_write, /* custom_smiley_write */ - gaim_gtkconv_custom_smiley_close /* custom_smiley_close */ + gaim_gtkconv_custom_smiley_close, /* custom_smiley_close */ + gaim_gtkconv_send_confirm, /* send_confirm */ }; GaimConversationUiOps * Modified: trunk/libgaim/Makefile.am =================================================================== --- trunk/libgaim/Makefile.am 2006-09-11 02:02:18 UTC (rev 17239) +++ trunk/libgaim/Makefile.am 2006-09-11 02:30:59 UTC (rev 17240) @@ -5,6 +5,7 @@ gaim-remote \ gaim-send \ gaim-send-async \ + gaim-url-handler \ Makefile.mingw \ win32/global.mak \ win32/libc_interface.c \ @@ -17,8 +18,12 @@ win32/win32dep.c \ win32/win32dep.h -SUBDIRS = plugins protocols +if USE_GCONFTOOL +GCONF_DIR=gconf +endif +SUBDIRS = $(GCONF_DIR) plugins protocols + gaim_coresources = \ account.c \ accountopt.c \ @@ -187,7 +192,7 @@ # scripts -bin_SCRIPTS = gaim-notifications-example gaim-remote gaim-send gaim-send-async +bin_SCRIPTS = gaim-notifications-example gaim-remote gaim-send gaim-send-async gaim-url-handler endif Modified: trunk/libgaim/conversation.c =================================================================== --- trunk/libgaim/conversation.c 2006-09-11 02:02:18 UTC (rev 17239) +++ trunk/libgaim/conversation.c 2006-09-11 02:30:59 UTC (rev 17240) @@ -28,6 +28,7 @@ #include "notify.h" #include "prefs.h" #include "prpl.h" +#include "request.h" #include "signals.h" #include "util.h" @@ -338,6 +339,8 @@ g_return_if_fail(conv != NULL); + gaim_request_close_with_handle(conv); + ops = gaim_conversation_get_ui_ops(conv); gc = gaim_conversation_get_gc(conv); name = gaim_conversation_get_name(conv); @@ -1126,7 +1129,42 @@ gaim_conv_im_send_with_flags(im, message, 0); } +static void +gaim_conv_send_confirm_cb(gpointer *data) +{ + GaimConversation *conv = data[0]; + char *message = data[1]; + + g_free(data); + common_send(conv, message, 0); +} + void +gaim_conv_send_confirm(GaimConversation *conv, const char *message) +{ + char *text; + gpointer *data; + + g_return_if_fail(conv != NULL); + g_return_if_fail(message != NULL); + + if (conv->ui_ops != NULL && conv->ui_ops->send_confirm != NULL) + { + conv->ui_ops->send_confirm(conv, message); + return; + } + + text = g_strdup_printf("You are about to send the following message:\n%s", message); + data = g_new0(gpointer, 2); + data[0] = conv; + data[1] = (gpointer)message; + + gaim_request_action(conv, NULL, _("Send Message"), text, 0, data, 2, + _("_Send Message"), G_CALLBACK(gaim_conv_send_confirm_cb), + _("Cancel"), NULL); +} + +void gaim_conv_im_send_with_flags(GaimConvIm *im, const char *message, GaimMessageFlags flags) { g_return_if_fail(im != NULL); Modified: trunk/libgaim/conversation.h =================================================================== --- trunk/libgaim/conversation.h 2006-09-11 02:02:18 UTC (rev 17239) +++ trunk/libgaim/conversation.h 2006-09-11 02:30:59 UTC (rev 17240) @@ -174,6 +174,8 @@ void (*custom_smiley_write)(GaimConversation *conv, const char *smile, const guchar *data, gsize size); void (*custom_smiley_close)(GaimConversation *conv, const char *smile); + + void (*send_confirm)(GaimConversation *conv, const char *message); }; /** @@ -758,6 +760,20 @@ void gaim_conv_im_send(GaimConvIm *im, const char *message); /** + * Sends a message to a conversation after confirming with + * the user. + * + * This function is intended for use in cases where the user + * hasn't explicitly and knowingly caused a message to be sent. + * The confirmation ensures that the user isn't sending a + * message by mistake. + * + * @param conv The conversation. + * @param message The message to send. + */ +void gaim_conv_send_confirm(GaimConversation *conv, const char *message); + +/** * Sends a message to this IM conversation with specified flags. * * @param im The IM. Added: trunk/libgaim/gaim-url-handler =================================================================== --- trunk/libgaim/gaim-url-handler (rev 0) +++ trunk/libgaim/gaim-url-handler 2006-09-11 02:30:59 UTC (rev 17240) @@ -0,0 +1,274 @@ +#!/usr/bin/python + +import dbus +import re +import sys +import time +import urllib + +obj = dbus.SessionBus().get_object("net.sf.gaim.GaimService", "/net/sf/gaim/GaimObject") +gaim = dbus.Interface(obj, "net.sf.gaim.GaimInterface") + +class CheckedObject: + def __init__(self, obj): + self.obj = obj + + def __getattr__(self, attr): + return CheckedAttribute(self, attr) + +class CheckedAttribute: + def __init__(self, cobj, attr): + self.cobj = cobj + self.attr = attr + + def __call__(self, *args): + result = self.cobj.obj.__getattr__(self.attr)(*args) + if result == 0: + raise "Error: " + self.attr + " " + str(args) + " returned " + str(result) + return result + +cgaim = CheckedObject(gaim) + +def extendlist(list, length, fill): + if len(list) < length: + return list + [fill] * (length - len(list)) + else: + return list + +def convert(value): + try: + return int(value) + except: + return value + +def findaccount(protocolname, accountname=""): + try: + # prefer connected accounts + account = cgaim.GaimAccountsFindConnected(accountname, protocolname) + return account + except: + # try to get any account and connect it + account = cgaim.GaimAccountsFindAny(accountname, protocolname) + gaim.GaimAccountSetStatusVargs(account, "online", 1) + gaim.GaimAccountConnect(account) + return account + +def goim(account, screenname, message=None): + # XXX: 1 == GAIM_CONV_TYPE_IM + conversation = cgaim.GaimConversationNew(1, account, screenname) + if message: + gaim.GaimConvSendConfirm(conversation, message) + +def gochat(account, params, message=None): + connection = cgaim.GaimAccountGetConnection(account) + gaim.ServJoinChat(connection, params) + + if message != None: + for i in range(20): + # XXX: 2 == GAIM_CONV_TYPE_CHAT + conversation = gaim.GaimFindConversationWithAccount(2, params.get("channel", params.get("room")), account) + if conversation: + gaim.GaimConvSendConfirm(conversation, message) + break + else: + time.sleep(0.5) + +def addbuddy(account, screenname, group="", alias=""): + cgaim.GaimBlistRequestAddBuddy(account, screenname, group, alias) + + +def aim(uri): + protocol = "prpl-oscar" + match = re.match(r"^(aim|icq):([^?]*)(\?(.*))", uri) + if not match: + print "Invalid aim URI: %s" % uri + return + + command = urllib.unquote(match.group(2)) + paramstring = match.group(4) + params = {} + if paramstring: + for param in paramstring.split("&"): + key, value = extendlist(param.split("=", 1), 2, "") + params[key] = urllib.unquote(value) + accountname = params.get("account", "") + screenname = params.get("screenname", "") + + account = findaccount(protocol, accountname) + + if command == "goim": + goim(account, screenname, params.get("message")) + elif command == "gochat": + gochat(account, params) + elif command == "addbuddy": + addbuddy(account, screenname, params.get("group", "")) + +def gg(uri): + protocol = "prpl-gg" + match = re.match(r"^gg:(.*)", uri) + if not match: + print "Invalid gg URI: %s" % uri + return + + screenname = urllib.unquote(match.group(1)) + account = findaccount(protocol) + goim(account, screenname) + +def icq(uri): + aim(uri) + +def irc(uri): + protocol = "prpl-irc" + match = re.match(r"^irc:(//([^/]*)/)?([^?]*)(\?(.*))?", uri) + if not match: + print "Invalid irc URI: %s" % uri + return + + server = urllib.unquote(match.group(2)) or "" + target = match.group(3) or "" + query = match.group(5) or "" + + modifiers = {} + if target: + for modifier in target.split(",")[1:]: + modifiers[modifier] = True + + isnick = modifiers.has_key("isnick") + + paramstring = match.group(5) + params = {} + if paramstring: + for param in paramstring.split("&"): + key, value = extendlist(param.split("=", 1), 2, "") + params[key] = urllib.unquote(value) + + account = findaccount(protocol) + + if (target != ""): + if (isnick): + goim(account, urllib.unquote(target.split(",")[0]), params.get("msg")) + else: + channel = urllib.unquote(target.split(",")[0]) + if channel[0] != "#": + channel = "#" + channel + gochat(account, {"server": server, "channel": channel, "password": params.get("key", "")}, params.get("msg")) + +def msnim(uri): + protocol = "prpl-msn" + match = re.match(r"^msnim:([^?]*)(\?(.*))", uri) + if not match: + print "Invalid msnim URI: %s" % uri + return + + command = urllib.unquote(match.group(1)) + paramstring = match.group(3) + params = {} + if paramstring: + for param in paramstring.split("&"): + key, value = extendlist(param.split("=", 1), 2, "") + params[key] = urllib.unquote(value) + screenname = params.get("contact", "") + + account = findaccount(protocol) + + if command == "chat": + goim(account, screenname) + elif command == "add": + addbuddy(account, screenname) + +def sip(uri): + protocol = "prpl-simple" + match = re.match(r"^sip:(.*)", uri) + if not match: + print "Invalid sip URI: %s" % uri + return + + screenname = urllib.unquote(match.group(1)) + account = findaccount(protocol) + goim(account, screenname) + +def xmpp(uri): + protocol = "prpl-jabber" + match = re.match(r"^xmpp:(//([^/?#]*))?(/?([^?#]*))(\?([^;#]*)(;([^#]*))?)?(#(.*))?", uri) + if not match: + print "Invalid xmpp URI: %s" % uri + return + + accountname = urllib.unquote(match.group(2)) or "" + screenname = urllib.unquote(match.group(4)) + command = urllib.unquote(match.group(6)) + paramstring = match.group(8) + params = {} + if paramstring: + for param in paramstring.split(";"): + key, value = extendlist(param.split("=", 1), 2, "") + params[key] = urllib.unquote(value) + + account = findaccount(protocol, accountname) + + if command == "message": + goim(account, screenname, params.get("body")) + elif command == "join": + room, server = screenname.split("@") + gochat(account, {"room": room, "server": server}) + elif command == "roster": + addbuddy(account, screenname, params.get("group", ""), params.get("name", "")) + else: + goim(account, screenname) + +def ymsgr(uri): + protocol = "prpl-yahoo" + match = re.match(r"^ymsgr:([^?]*)(\?([^&]*)(&(.*))?)", uri) + if not match: + print "Invalid ymsgr URI: %s" % uri + return + + command = urllib.unquote(match.group(1)) + screenname = urllib.unquote(match.group(3)) + paramstring = match.group(5) + params = {} + if paramstring: + for param in paramstring.split("&"): + key, value = extendlist(param.split("=", 1), 2, "") + params[key] = urllib.unquote(value) + + account = findaccount(protocol) + + if command == "sendIM": + goim(account, screenname, params.get("m")) + elif command == "chat": + gochat(account, {"room": screenname}) + elif command == "addfriend": + addbuddy(account, screenname) + + +def main(argv=sys.argv): + if len(argv) != 2: + print "Usage: %s URI" % argv[0] + print "Example: %s \"xmpp:ro...@mo...?message\"" % argv[0] + return + + uri = argv[1] + type = uri.split(":")[0] + + if type == "aim": + aim(uri) + elif type == "gg": + gg(uri) + elif type == "icq": + icq(uri) + elif type == "irc": + irc(uri) + elif type == "msnim": + msnim(uri) + elif type == "sip": + sip(uri) + elif type == "xmpp": + xmpp(uri) + elif type == "ymsgr": + ymsgr(uri) + else: + print "Unkown protocol: %s" % type + +if __name__ == "__main__": + main() Property changes on: trunk/libgaim/gaim-url-handler ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/libgaim/gconf/Makefile.am =================================================================== --- trunk/libgaim/gconf/Makefile.am (rev 0) +++ trunk/libgaim/gconf/Makefile.am 2006-09-11 02:30:59 UTC (rev 17240) @@ -0,0 +1,9 @@ +schemadir = @GCONF_SCHEMA_FILE_DIR@ +schema_DATA = gaim.schemas + +if GCONF_SCHEMAS_INSTALL +install-data-local: + GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA) +else +install-data-local: +endif Property changes on: trunk/libgaim/gconf/Makefile.am ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/libgaim/gconf/gaim.schemas =================================================================== --- trunk/libgaim/gconf/gaim.schemas (rev 0) +++ trunk/libgaim/gconf/gaim.schemas 2006-09-11 02:30:59 UTC (rev 17240) @@ -0,0 +1,276 @@ +<?xml version="1.0"?> +<gconfschemafile> + <schemalist> + <schema> + <key>/schemas/desktop/gnome/url-handlers/aim/enabled</key> + <applyto>/desktop/gnome/url-handlers/aim/enabled</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>true</default> + <locale name="C"> + <short>Whether the specified command should handle "aim" URLs</short> + <long>True if the command specified in the "command" key should handle "aim" URLs.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/aim/command</key> +im <applyto>/desktop/gnome/url-handlers/aim/command</applyto> + <owner>gaim</owner> + <type>string</type> + <default>gaim-url-handler "%s"</default> + <locale name="C"> + <short>The handler for "aim" URLs</short> + <long>The command used to handle "aim" URLs, if enabled.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/aim/needs_terminal</key> + <applyto>/desktop/gnome/url-handlers/aim/needs_terminal</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>false</default> + <locale name="C"> + <short>Run the command in a terminal</short> + <long>True if the command used to handle this type of URL should be run in a terminal.</long> + </locale> + </schema> + + <schema> + <key>/schemas/desktop/gnome/url-handlers/gg/enabled</key> + <applyto>/desktop/gnome/url-handlers/gg/enabled</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>true</default> + <locale name="C"> + <short>Whether the specified command should handle "gg" URLs</short> + <long>True if the command specified in the "command" key should handle "gg" URLs.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/gg/command</key> + <applyto>/desktop/gnome/url-handlers/gg/command</applyto> + <owner>gaim</owner> + <type>string</type> + <default>gaim-url-handler "%s"</default> + <locale name="C"> + <short>The handler for "gg" URLs</short> + <long>The command used to handle "gg" URLs, if enabled.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/gg/needs_terminal</key> + <applyto>/desktop/gnome/url-handlers/gg/needs_terminal</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>false</default> + <locale name="C"> + <short>Run the command in a terminal</short> + <long>True if the command used to handle this type of URL should be run in a terminal.</long> + </locale> + </schema> + + <schema> + <key>/schemas/desktop/gnome/url-handlers/icq/enabled</key> + <applyto>/desktop/gnome/url-handlers/icq/enabled</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>true</default> + <locale name="C"> + <short>Whether the specified command should handle "icq" URLs</short> + <long>True if the command specified in the "command" key should handle "icq" URLs.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/icq/command</key> + <applyto>/desktop/gnome/url-handlers/icq/command</applyto> + <owner>gaim</owner> + <type>string</type> + <default>gaim-url-handler "%s"</default> + <locale name="C"> + <short>The handler for "icq" URLs</short> + <long>The command used to handle "icq" URLs, if enabled.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/icq/needs_terminal</key> + <applyto>/desktop/gnome/url-handlers/icq/needs_terminal</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>false</default> + <locale name="C"> + <short>Run the command in a terminal</short> + <long>True if the command used to handle this type of URL should be run in a terminal.</long> + </locale> + </schema> + + <schema> + <key>/schemas/desktop/gnome/url-handlers/irc/enabled</key> + <applyto>/desktop/gnome/url-handlers/irc/enabled</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>true</default> + <locale name="C"> + <short>Whether the specified command should handle "irc" URLs</short> + <long>True if the command specified in the "command" key should handle "irc" URLs.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/irc/command</key> + <applyto>/desktop/gnome/url-handlers/irc/command</applyto> + <owner>gaim</owner> + <type>string</type> + <default>gaim-url-handler "%s"</default> + <locale name="C"> + <short>The handler for "irc" URLs</short> + <long>The command used to handle "irc" URLs, if enabled.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/irc/needs_terminal</key> + <applyto>/desktop/gnome/url-handlers/irc/needs_terminal</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>false</default> + <locale name="C"> + <short>Run the command in a terminal</short> + <long>True if the command used to handle this type of URL should be run in a terminal.</long> + </locale> + </schema> + + <schema> + <key>/schemas/desktop/gnome/url-handlers/msnim/enabled</key> + <applyto>/desktop/gnome/url-handlers/msnim/enabled</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>true</default> + <locale name="C"> + <short>Whether the specified command should handle "msnim" URLs</short> + <long>True if the command specified in the "command" key should handle "msnim" URLs.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/msnim/command</key> + <applyto>/desktop/gnome/url-handlers/msnim/command</applyto> + <owner>gaim</owner> + <type>string</type> + <default>gaim-url-handler "%s"</default> + <locale name="C"> + <short>The handler for "msnim" URLs</short> + <long>The command used to handle "msnim" URLs, if enabled.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/msnim/needs_terminal</key> + <applyto>/desktop/gnome/url-handlers/msnim/needs_terminal</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>false</default> + <locale name="C"> + <short>Run the command in a terminal</short> + <long>True if the command used to handle this type of URL should be run in a terminal.</long> + </locale> + </schema> + + <schema> + <key>/schemas/desktop/gnome/url-handlers/sip/enabled</key> + <applyto>/desktop/gnome/url-handlers/sip/enabled</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>true</default> + <locale name="C"> + <short>Whether the specified command should handle "sip" URLs</short> + <long>True if the command specified in the "command" key should handle "sip" URLs.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/sip/command</key> + <applyto>/desktop/gnome/url-handlers/sip/command</applyto> + <owner>gaim</owner> + <type>string</type> + <default>gaim-url-handler "%s"</default> + <locale name="C"> + <short>The handler for "sip" URLs</short> + <long>The command used to handle "sip" URLs, if enabled.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/sip/needs_terminal</key> + <applyto>/desktop/gnome/url-handlers/sip/needs_terminal</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>false</default> + <locale name="C"> + <short>Run the command in a terminal</short> + <long>True if the command used to handle this type of URL should be run in a terminal.</long> + </locale> + </schema> + + <schema> + <key>/schemas/desktop/gnome/url-handlers/xmpp/enabled</key> + <applyto>/desktop/gnome/url-handlers/xmpp/enabled</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>true</default> + <locale name="C"> + <short>Whether the specified command should handle "xmpp" URLs</short> + <long>True if the command specified in the "command" key should handle "xmpp" URLs.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/xmpp/command</key> + <applyto>/desktop/gnome/url-handlers/xmpp/command</applyto> + <owner>gaim</owner> + <type>string</type> + <default>gaim-url-handler "%s"</default> + <locale name="C"> + <short>The handler for "xmpp" URLs</short> + <long>The command used to handle "xmpp" URLs, if enabled.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/xmpp/needs_terminal</key> + <applyto>/desktop/gnome/url-handlers/xmpp/needs_terminal</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>false</default> + <locale name="C"> + <short>Run the command in a terminal</short> + <long>True if the command used to handle this type of URL should be run in a terminal.</long> + </locale> + </schema> + + <schema> + <key>/schemas/desktop/gnome/url-handlers/ymsgr/enabled</key> + <applyto>/desktop/gnome/url-handlers/ymsgr/enabled</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>true</default> + <locale name="C"> + <short>Whether the specified command should handle "ymsgr" URLs</short> + <long>True if the command specified in the "command" key should handle "ymsgr" URLs.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/ymsgr/command</key> + <applyto>/desktop/gnome/url-handlers/ymsgr/command</applyto> + <owner>gaim</owner> + <type>string</type> + <default>gaim-url-handler "%s"</default> + <locale name="C"> + <short>The handler for "ymsgr" URLs</short> + <long>The command used to handle "ymsgr" URLs, if enabled.</long> + </locale> + </schema> + <schema> + <key>/schemas/desktop/gnome/url-handlers/ymsgr/needs_terminal</key> + <applyto>/desktop/gnome/url-handlers/ymsgr/needs_terminal</applyto> + <owner>gaim</owner> + <type>bool</type> + <default>false</default> + <locale name="C"> + <short>Run the command in a terminal</short> + <long>True if the command used to handle this type of URL should be run in a terminal.</long> + </locale> + </schema> + </schemalist> +</gconfschemafile> Property changes on: trunk/libgaim/gconf/gaim.schemas ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-09-11 02:02:36
|
Revision: 17239 http://svn.sourceforge.net/gaim/?rev=17239&view=rev Author: markhuetsch Date: 2006-09-10 19:02:18 -0700 (Sun, 10 Sep 2006) Log Message: ----------- We don't need to dynamically allocate all of these buffers. Modified Paths: -------------- trunk/libgaim/protocols/qq/buddy_info.c trunk/libgaim/protocols/qq/buddy_opt.c trunk/libgaim/protocols/qq/group_search.c Modified: trunk/libgaim/protocols/qq/buddy_info.c =================================================================== --- trunk/libgaim/protocols/qq/buddy_info.c 2006-09-11 01:57:20 UTC (rev 17238) +++ trunk/libgaim/protocols/qq/buddy_info.c 2006-09-11 02:02:18 UTC (rev 17239) @@ -285,13 +285,13 @@ void qq_send_packet_get_info(GaimConnection *gc, guint32 uid, gboolean show_window) { qq_data *qd; - gchar *uid_str; + gchar uid_str[11]; qq_info_query *query; g_return_if_fail(gc != NULL && gc->proto_data != NULL && uid != 0); qd = (qq_data *) gc->proto_data; - uid_str = g_strdup_printf("%d", uid); + g_snprintf(uid_str, sizeof(uid_str), "%d", uid); qq_send_cmd(gc, QQ_CMD_GET_USER_INFO, TRUE, 0, TRUE, (guint8 *) uid_str, strlen(uid_str)); query = g_new0(qq_info_query, 1); @@ -299,8 +299,6 @@ query->show_window = show_window; query->modify_info = FALSE; qd->info_query = g_list_append(qd->info_query, query); - - g_free(uid_str); } /* set up the fields requesting personal information and send a get_info packet Modified: trunk/libgaim/protocols/qq/buddy_opt.c =================================================================== --- trunk/libgaim/protocols/qq/buddy_opt.c 2006-09-11 01:57:20 UTC (rev 17238) +++ trunk/libgaim/protocols/qq/buddy_opt.c 2006-09-11 02:02:18 UTC (rev 17239) @@ -59,15 +59,13 @@ /* send packet to remove a buddy from my buddy list */ static void _qq_send_packet_remove_buddy(GaimConnection *gc, guint32 uid) { - gchar *uid_str; + gchar uid_str[11]; g_return_if_fail(gc != NULL && uid > 0); - uid_str = g_strdup_printf("%d", uid); + g_snprintf(uid_str, sizeof(uid_str), "%d", uid); qq_send_cmd(gc, QQ_CMD_DEL_FRIEND, TRUE, 0, TRUE, (guint8 *) uid_str, strlen(uid_str)); - - g_free(uid_str); } /* try to remove myself from someone's buddy list */ @@ -89,15 +87,14 @@ { qq_data *qd; qq_add_buddy_request *req; - gchar *uid_str; + gchar uid_str[11]; g_return_if_fail(gc != NULL && gc->proto_data != NULL && uid > 0); /* we need to send the ascii code of this uid to qq server */ - uid_str = g_strdup_printf("%d", uid); + g_snprintf(uid_str, sizeof(uid_str), "%d", uid); qq_send_cmd(gc, QQ_CMD_ADD_FRIEND_WO_AUTH, TRUE, 0, TRUE, (guint8 *) uid_str, strlen(uid_str)); - g_free(uid_str); /* must be set after sending packet to get the correct send_seq */ qd = (qq_data *) gc->proto_data; @@ -110,12 +107,12 @@ /* this buddy needs authentication, text conversion is done at lowest level */ static void _qq_send_packet_buddy_auth(GaimConnection *gc, guint32 uid, const gchar response, const gchar *text) { - gchar *text_qq, *uid_str; + gchar *text_qq, uid_str[11]; guint8 bar, *cursor, *raw_data; g_return_if_fail(gc != NULL && uid != 0); - uid_str = g_strdup_printf("%d", uid); + g_snprintf(uid_str, sizeof(uid_str), "%d", uid); bar = 0x1f; raw_data = g_newa(guint8, QQ_MSG_IM_MAX); cursor = raw_data; @@ -132,7 +129,6 @@ } qq_send_cmd(gc, QQ_CMD_BUDDY_AUTH, TRUE, 0, TRUE, raw_data, cursor - raw_data); - g_free(uid_str); } static void _qq_send_packet_add_buddy_auth_with_gc_and_uid(gc_and_uid *g, const gchar *text) Modified: trunk/libgaim/protocols/qq/group_search.c =================================================================== --- trunk/libgaim/protocols/qq/group_search.c 2006-09-11 01:57:20 UTC (rev 17238) +++ trunk/libgaim/protocols/qq/group_search.c 2006-09-11 02:02:18 UTC (rev 17239) @@ -64,28 +64,22 @@ static void _qq_setup_roomlist(qq_data *qd, qq_group *group) { GaimRoomlistRoom *room; - gchar *field; + gchar field[11]; room = gaim_roomlist_room_new(GAIM_ROOMLIST_ROOMTYPE_ROOM, group->group_name_utf8, NULL); - field = g_strdup_printf("%d", group->external_group_id); + g_snprintf(field, sizeof(field), "%d", group->external_group_id); gaim_roomlist_room_add_field(qd->roomlist, room, field); - g_free(field); - field = g_strdup_printf("%d", group->creator_uid); + g_snprintf(field, sizeof(field), "%d", group->creator_uid); gaim_roomlist_room_add_field(qd->roomlist, room, field); - g_free(field); gaim_roomlist_room_add_field(qd->roomlist, room, group->group_desc_utf8); - field = g_strdup_printf("%d", group->internal_group_id); + g_snprintf(field, sizeof(field), "%d", group->internal_group_id); gaim_roomlist_room_add_field(qd->roomlist, room, field); - g_free(field); - field = g_strdup_printf("%d", group->group_type); + g_snprintf(field, sizeof(field), "%d", group->group_type); gaim_roomlist_room_add_field(qd->roomlist, room, field); - g_free(field); - field = g_strdup_printf("%d", group->auth_type); + g_snprintf(field, sizeof(field), "%d", group->auth_type); gaim_roomlist_room_add_field(qd->roomlist, room, field); - g_free(field); - field = g_strdup_printf("%d", group->group_category); + g_snprintf(field, sizeof(field), "%d", group->group_category); gaim_roomlist_room_add_field(qd->roomlist, room, field); - g_free(field); gaim_roomlist_room_add_field(qd->roomlist, room, group->group_name_utf8); gaim_roomlist_room_add(qd->roomlist, room); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-09-11 01:57:27
|
Revision: 17238 http://svn.sourceforge.net/gaim/?rev=17238&view=rev Author: markhuetsch Date: 2006-09-10 18:57:20 -0700 (Sun, 10 Sep 2006) Log Message: ----------- This was just a peculiarity of a specific user. Modified Paths: -------------- trunk/libgaim/protocols/qq/group_info.c Modified: trunk/libgaim/protocols/qq/group_info.c =================================================================== --- trunk/libgaim/protocols/qq/group_info.c 2006-09-11 01:52:12 UTC (rev 17237) +++ trunk/libgaim/protocols/qq/group_info.c 2006-09-11 01:57:20 UTC (rev 17238) @@ -305,9 +305,6 @@ g_return_if_fail(group != NULL); i = 0; - /* TODO: Something is off. I get an entry with strange values - * (including a nick of "") buried in here. I need to find more - * groups to join before I can figure this out */ /* now starts the member info, as get buddy list reply */ while (*cursor < data + len) { read_packet_dw(data, cursor, len, &member_uid); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <g-...@us...> - 2006-09-11 01:52:16
|
Revision: 17237 http://svn.sourceforge.net/gaim/?rev=17237&view=rev Author: g-off_ Date: 2006-09-10 18:52:12 -0700 (Sun, 10 Sep 2006) Log Message: ----------- 4th times a charm. Use g_build_filename (thanks rlaager). Modified Paths: -------------- trunk/gtk/plugins/cap/cap.c Modified: trunk/gtk/plugins/cap/cap.c =================================================================== --- trunk/gtk/plugins/cap/cap.c 2006-09-11 01:39:25 UTC (rev 17236) +++ trunk/gtk/plugins/cap/cap.c 2006-09-11 01:52:12 UTC (rev 17237) @@ -563,20 +563,18 @@ } static gboolean create_database_connection() { - GString *path; + gchar *path; int rc; if(_db) return TRUE; /* build the path */ - path = g_string_new(gaim_user_dir()); - g_string_append(path, G_DIR_SEPARATOR_S); - g_string_append(path, "cap.db"); + path = g_build_filename(gaim_user_dir(), "cap.db", (gchar *)NULL); /* make database connection here */ - rc = sqlite3_open(path->str, &_db); - g_string_free(path, TRUE); + rc = sqlite3_open(path, &_db); + g_free(path); if(rc != SQLITE_OK) return FALSE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <g-...@us...> - 2006-09-11 01:39:30
|
Revision: 17236 http://svn.sourceforge.net/gaim/?rev=17236&view=rev Author: g-off_ Date: 2006-09-10 18:39:25 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Remove // comments. Modified Paths: -------------- trunk/gtk/plugins/cap/cap.c trunk/gtk/plugins/cap/cap.h Modified: trunk/gtk/plugins/cap/cap.c =================================================================== --- trunk/gtk/plugins/cap/cap.c 2006-09-11 01:08:24 UTC (rev 17235) +++ trunk/gtk/plugins/cap/cap.c 2006-09-11 01:39:25 UTC (rev 17236) @@ -95,7 +95,7 @@ if(strcmp(gaim_status_get_id(get_status_for(buddy)), "offline") == 0) { - //This is kind of stupid, change it. + /* This is kind of stupid, change it. */ if(prediction == 1.0f) prediction = 0.0f; } @@ -131,8 +131,8 @@ static void destroy_stats(gpointer data) { CapStatistics *stats = data; g_free(stats->prediction); - //g_free(stats->hourly_usage); - //g_free(stats->daily_usage); + /* g_free(stats->hourly_usage); */ + /* g_free(stats->daily_usage); */ g_free(stats); } @@ -338,7 +338,7 @@ /* Gaim Signal Handlers */ -//sent-im-msg +/* sent-im-msg */ static void sent_im_msg(GaimAccount *account, const char *receiver, const char *message) { GaimBuddy *buddy = gaim_find_buddy(account, receiver); guint interval = gaim_prefs_get_int("/plugins/gtk/cap/max_msg_difference") * 1000 * 60; @@ -354,17 +354,17 @@ stats->timeout_source_id = g_timeout_add(interval, max_message_difference_cb, stats); } -//received-im-msg +/* received-im-msg */ static void received_im_msg(GaimAccount *account, char *sender, char *message, GaimConversation *conv, GaimMessageFlags flags) { GaimBuddy *buddy = gaim_find_buddy(account, sender); - //guint words = word_count(message); + /* guint words = word_count(message); */ CapStatistics *stats = get_stats_for(buddy); - //insert_word_count(sender, buddy_name, words); + /* insert_word_count(sender, buddy_name, words); */ - //If we are waiting for a response from a prior message - // then cancel the timeout callback. + /* If we are waiting for a response from a prior message + * then cancel the timeout callback. */ if(stats->timeout_source_id != 0) { gaim_debug_info("cap", "Cancelling timeout callback\n"); g_source_remove(stats->timeout_source_id); @@ -373,24 +373,25 @@ insert_cap_success(stats); - stats->last_message = -1; //Reset the last_message value - stats->last_message_status_id = NULL; //Reset the last status id value + /* Reset the last_message value */ + stats->last_message = -1; + /* Reset the last status id value */ + stats->last_message_status_id = NULL; } -//buddy-status-changed +/* buddy-status-changed */ static void buddy_status_changed(GaimBuddy *buddy, GaimStatus *old_status, GaimStatus *status) { CapStatistics *stats = get_stats_for(buddy); insert_status_change_from_gaim_status(stats, status); } -//buddy-signed-on +/* buddy-signed-on */ static void buddy_signed_on(GaimBuddy *buddy) { CapStatistics *stats = get_stats_for(buddy); /* If the statistic object existed but doesn't have a buddy pointer associated * with it then reassociate one with it. The pointer being null is a result - * of a buddy with existing stats signing off and Gaim sticking around. - */ + * of a buddy with existing stats signing off and Gaim sticking around. */ if(!stats->buddy) { stats->buddy = buddy; } @@ -398,7 +399,7 @@ insert_status_change(stats); } -//buddy-signed-off +/* buddy-signed-off */ static void buddy_signed_off(GaimBuddy *buddy) { CapStatistics *stats = get_stats_for(buddy); @@ -407,7 +408,7 @@ * them up again and continue using their statistics. */ insert_status_change(stats); - //stats->buddy = NULL; + /* stats->buddy = NULL; */ stats->last_seen = time(NULL); } @@ -429,12 +430,12 @@ *menu = g_list_append(*menu, menu_action); } -//drawing-tooltip +/* drawing-tooltip */ static void drawing_tooltip(GaimBlistNode *node, GString *text, gboolean full) { if(node->type == GAIM_BLIST_BUDDY_NODE) { GaimBuddy *buddy = (GaimBuddy *)node; CapStatistics *stats = get_stats_for(buddy); - // get the probability that this buddy will respond and add to the tooltip + /* get the probability that this buddy will respond and add to the tooltip */ if(stats->prediction->probability >= 0.0) { g_string_append_printf(text, "\n<b>%s</b> %3.0f %%", _("Response Probability:"), 100 * stats->prediction->probability); @@ -444,7 +445,7 @@ } } -//signed-on +/* signed-on */ static void signed_on(GaimConnection *gc) { GaimAccount *account = gaim_connection_get_account(gc); const char *my_gaim_name = gaim_account_get_username(account); @@ -461,7 +462,7 @@ if(last_offline) { if(difftime(*last_offline, time(NULL)) > gaim_prefs_get_int("/plugins/gtk/cap/max_seen_difference") * 60) { - //reset all of the last_message times to -1 + /* reset all of the last_message times to -1 */ g_hash_table_foreach(_my_offline_times, reset_all_last_message_times, NULL); } g_hash_table_remove(_my_offline_times, my_name); @@ -469,7 +470,7 @@ g_free(my_name); } -//signed-off +/* signed-off */ static void signed_off(GaimConnection *gc) { /* Here we record the time you (the user) sign off of an account. * The account username is the key in the hashtable and the sign off time_t @@ -568,18 +569,18 @@ if(_db) return TRUE; - //build the path + /* build the path */ path = g_string_new(gaim_user_dir()); g_string_append(path, G_DIR_SEPARATOR_S); g_string_append(path, "cap.db"); - //make database connection here + /* make database connection here */ rc = sqlite3_open(path->str, &_db); g_string_free(path, TRUE); if(rc != SQLITE_OK) return FALSE; - //Add tables here + /* Add tables here */ create_tables(); gaim_debug_info("cap", "Database connection successfully made.\n"); return TRUE; @@ -592,7 +593,7 @@ } static guint word_count(const gchar *string) { - //TODO: doesn't really work, should use regex instead (#include <regex.h>) + /*TODO: doesn't really work, should use regex instead (#include <regex.h>)*/ gchar **result = g_strsplit_set(string, " ", -1); guint count = g_strv_length(result); @@ -634,9 +635,9 @@ } static void insert_word_count(const char *sender, const char *receiver, guint count) { - //TODO! - //dbi_result result; - //result = dbi_conn_queryf(_conn, "insert into cap_message values(\'%s\', \'%s\', %d, now());", sender, receiver, count); + /* TODO! */ + /* dbi_result result; */ + /* result = dbi_conn_queryf(_conn, "insert into cap_message values(\'%s\', \'%s\', %d, now());", sender, receiver, count); */ } /* Callbacks */ @@ -691,8 +692,8 @@ gaim_signal_connect(gaim_blist_get_handle(), "buddy-signed-off", plugin, GAIM_CALLBACK(buddy_signed_off), NULL); - //gaim_signal_connect(gaim_blist_get_handle(), "blist-node-extended-menu", plugin, - // GAIM_CALLBACK(blist_node_extended_menu), NULL); + /*gaim_signal_connect(gaim_blist_get_handle(), "blist-node-extended-menu", plugin, + GAIM_CALLBACK(blist_node_extended_menu), NULL);*/ gaim_signal_connect(gaim_gtk_blist_get_handle(), "drawing-tooltip", plugin, GAIM_CALLBACK(drawing_tooltip), NULL); @@ -742,8 +743,8 @@ gaim_signal_disconnect(gaim_blist_get_handle(), "buddy-signed-off", plugin, GAIM_CALLBACK(buddy_signed_off)); - //gaim_signal_disconnect(gaim_blist_get_handle(), "blist-node-extended-menu", plugin, - // GAIM_CALLBACK(blist_node_extended_menu)); + /*gaim_signal_disconnect(gaim_blist_get_handle(), "blist-node-extended-menu", plugin, + GAIM_CALLBACK(blist_node_extended_menu));*/ gaim_signal_disconnect(gaim_gtk_blist_get_handle(), "drawing-tooltip", plugin, GAIM_CALLBACK(drawing_tooltip)); @@ -770,13 +771,13 @@ static gboolean plugin_unload(GaimPlugin *plugin) { gaim_debug_info("cap", "CAP plugin unloading\n"); - //clean up memory allocations + /* clean up memory allocations */ if(_buddy_stats) { g_hash_table_foreach(_buddy_stats, write_stats_on_unload, NULL); g_hash_table_destroy(_buddy_stats); } - //close database connection + /* close database connection */ destroy_database_connection(); return TRUE; Modified: trunk/gtk/plugins/cap/cap.h =================================================================== --- trunk/gtk/plugins/cap/cap.h 2006-09-11 01:08:24 UTC (rev 17235) +++ trunk/gtk/plugins/cap/cap.h 2006-09-11 01:39:25 UTC (rev 17236) @@ -88,23 +88,23 @@ static void insert_cap_failure(CapStatistics *stats); static gboolean max_message_difference_cb(gpointer data); /* Gaim Signal Handlers */ -//sent-im-msg +/* sent-im-msg */ static void sent_im_msg(GaimAccount *account, const char *receiver, const char *message); -//received-im-msg +/* received-im-msg */ static void received_im_msg(GaimAccount *account, char *sender, char *message, GaimConversation *conv, GaimMessageFlags flags); -//buddy-status-changed +/* buddy-status-changed */ static void buddy_status_changed(GaimBuddy *buddy, GaimStatus *old_status, GaimStatus *status); -//buddy-signed-on +/* buddy-signed-on */ static void buddy_signed_on(GaimBuddy *buddy); -//buddy-signed-off +/* buddy-signed-off */ static void buddy_signed_off(GaimBuddy *buddy); static void buddy_idle(GaimBuddy *buddy, gboolean old_idle, gboolean idle); static void blist_node_extended_menu(GaimBlistNode *node, GList **menu); -//drawing-tooltip +/* drawing-tooltip */ static void drawing_tooltip(GaimBlistNode *node, GString *text, gboolean full); -//signed-on +/* signed-on */ static void signed_on(GaimConnection *gc); -//signed-off +/* signed-off */ static void signed_off(GaimConnection *gc); static void reset_all_last_message_times(gpointer key, gpointer value, gpointer user_data); static GaimStatus * get_status_for(GaimBuddy *buddy); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-11 01:08:26
|
Revision: 17235 http://svn.sourceforge.net/gaim/?rev=17235&view=rev Author: thekingant Date: 2006-09-10 18:08:24 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Changes to account for shuffling around of some docs and for gnt Modified Paths: -------------- trunk/gaim.spec.in Modified: trunk/gaim.spec.in =================================================================== --- trunk/gaim.spec.in 2006-09-11 01:07:45 UTC (rev 17234) +++ trunk/gaim.spec.in 2006-09-11 01:08:24 UTC (rev 17235) @@ -246,8 +246,15 @@ %files -f %{name}-%{version}-coreplugins %defattr(-, root, root) -%doc doc/the_penguin.txt doc/CREDITS NEWS COPYING AUTHORS COPYRIGHT -%doc README ChangeLog +%doc AUTHORS +%doc COPYING +%doc COPYRIGHT +%doc ChangeLog +%doc NEWS +%doc README +%doc README.SVN +%doc doc/FAQ +%doc doc/the_penguin.txt %doc %{_mandir}/man1/* %doc %{_mandir}/man3*/* @@ -261,10 +268,13 @@ %dir %{_datadir}/sounds/gaim %{_datadir}/sounds/gaim/* %{_datadir}/applications/* +%{_libdir}/libgaim.so.* +%{_libdir}/libgnt.so.* %if 0%{?_with_dbus:1} %{_libdir}/libgaim-client.so.* %{_datadir}/dbus-1/services/gaim.service +%doc README.dbus %endif %if 0%{?_with_howl:1} || 0%{?_with_avahi:1} @@ -313,12 +323,21 @@ %files devel %defattr(-, root, root) -%doc plugins/HOWTO -%doc HACKING PROGRAMMING_NOTES +%doc ChangeLog.API +%doc HACKING +%doc PLUGIN_HOWTO +%doc PROGRAMMING_NOTES %dir %{_includedir}/gaim %{_includedir}/gaim/*.h +%dir %{_includedir}/gaim/gnt +%{_includedir}/gaim/gnt/*.h +%dir %{_includedir}/gnt +%{_includedir}/gnt/*.h +%{_libdir}/libgaim.so +%{_libdir}/libgnt.so %{_libdir}/pkgconfig/gaim.pc +%{_libdir}/pkgconfig/gnt.pc %{_datadir}/aclocal/gaim.m4 %if 0%{?_with_dbus:1} %{_libdir}/libgaim-client.so This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-11 01:07:49
|
Revision: 17234 http://svn.sourceforge.net/gaim/?rev=17234&view=rev Author: thekingant Date: 2006-09-10 18:07:45 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Install gaim-notifications-example in the bin directory instead of a docs directory. Is this a good idea? Maybe we shouldn't install it anywhere (and let rpms and dpkgs put it in the docs directory?) Modified Paths: -------------- trunk/libgaim/Makefile.am Modified: trunk/libgaim/Makefile.am =================================================================== --- trunk/libgaim/Makefile.am 2006-09-11 00:52:18 UTC (rev 17233) +++ trunk/libgaim/Makefile.am 2006-09-11 01:07:45 UTC (rev 17234) @@ -187,11 +187,8 @@ # scripts -bin_SCRIPTS = gaim-remote gaim-send gaim-send-async +bin_SCRIPTS = gaim-notifications-example gaim-remote gaim-send gaim-send-async -exampledir = $(datadir)/doc/@PACKAGE@/examples -example_DATA = gaim-notifications-example - endif lib_LTLIBRARIES = libgaim.la $(libgaim_client_lib) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <g-...@us...> - 2006-09-11 00:52:25
|
Revision: 17233 http://svn.sourceforge.net/gaim/?rev=17233&view=rev Author: g-off_ Date: 2006-09-10 17:52:18 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Use OS specific path separator and free the GString when done with it. Modified Paths: -------------- trunk/gtk/plugins/cap/cap.c Modified: trunk/gtk/plugins/cap/cap.c =================================================================== --- trunk/gtk/plugins/cap/cap.c 2006-09-11 00:31:48 UTC (rev 17232) +++ trunk/gtk/plugins/cap/cap.c 2006-09-11 00:52:18 UTC (rev 17233) @@ -568,10 +568,14 @@ if(_db) return TRUE; + //build the path + path = g_string_new(gaim_user_dir()); + g_string_append(path, G_DIR_SEPARATOR_S); + g_string_append(path, "cap.db"); + //make database connection here - path = g_string_new(gaim_user_dir()); - g_string_append(path, "/cap.db"); rc = sqlite3_open(path->str, &_db); + g_string_free(path, TRUE); if(rc != SQLITE_OK) return FALSE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-11 00:31:52
|
Revision: 17232 http://svn.sourceforge.net/gaim/?rev=17232&view=rev Author: thekingant Date: 2006-09-10 17:31:48 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Patch from Casey Harkins to get rid of an assertion failure at startup. Goooooooooo charkins! Modified Paths: -------------- trunk/gtk/gtkblist.c Modified: trunk/gtk/gtkblist.c =================================================================== --- trunk/gtk/gtkblist.c 2006-09-11 00:28:35 UTC (rev 17231) +++ trunk/gtk/gtkblist.c 2006-09-11 00:31:48 UTC (rev 17232) @@ -4082,6 +4082,7 @@ gaim_gtk_blist_refresh(list); gaim_gtk_blist_restore_position(); gtk_widget_show_all(GTK_WIDGET(gtkblist->vbox)); + gtk_widget_realize(GTK_WIDGET(gtkblist->window)); gaim_blist_set_visible(gaim_prefs_get_bool("/gaim/gtk/blist/list_visible")); /* start the refresh timer */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <g-...@us...> - 2006-09-11 00:28:48
|
Revision: 17231 http://svn.sourceforge.net/gaim/?rev=17231&view=rev Author: g-off_ Date: 2006-09-10 17:28:35 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Switched from using libdbi to using sqlite3. Results in easier configuration (no need to setup database server/create database/add tables). Also Gtk Gaim no longer needs to link against libdbi. This should make the plugin more easily distributable and thus hopefully it can be included in binary releases of Gaim (fingers crossed). Modified Paths: -------------- trunk/configure.ac trunk/gtk/Makefile.am trunk/gtk/plugins/cap/Makefile.am trunk/gtk/plugins/cap/cap.c trunk/gtk/plugins/cap/cap.h Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-09-10 22:33:28 UTC (rev 17230) +++ trunk/configure.ac 2006-09-11 00:28:35 UTC (rev 17231) @@ -324,12 +324,10 @@ fi dnl ####################################################################### - dnl # Check for libdbi (for the Contact Availability Prediction plugin) + dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin) dnl ####################################################################### if test "x$enable_cap" = "xyes"; then - AC_CHECK_HEADERS(dbi/dbi.h, , enable_cap="no") - AC_CHECK_LIB(dbi, dbi_result_field_is_null, CAP_LIBS="-ldbi", enable_cap="no") - AC_SUBST(CAP_LIBS) + PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3, , enable_cap="no") fi else # GTK Modified: trunk/gtk/Makefile.am =================================================================== --- trunk/gtk/Makefile.am 2006-09-10 22:33:28 UTC (rev 17230) +++ trunk/gtk/Makefile.am 2006-09-11 00:28:35 UTC (rev 17231) @@ -161,7 +161,6 @@ $(STARTUP_NOTIFICATION_LIBS) \ $(LIBXML_LIBS) \ $(GTK_LIBS) \ - $(CAP_LIBS) \ $(top_builddir)/libgaim/libgaim.la AM_CPPFLAGS = \ Modified: trunk/gtk/plugins/cap/Makefile.am =================================================================== --- trunk/gtk/plugins/cap/Makefile.am 2006-09-10 22:33:28 UTC (rev 17230) +++ trunk/gtk/plugins/cap/Makefile.am 2006-09-11 00:28:35 UTC (rev 17231) @@ -15,10 +15,8 @@ endif -CAP_LIBS = -ldl -ldbi +cap_la_LIBADD = $(SQLITE3_LIBS) -cap_la_LIBADD = $(CAP_LIBS) - AM_CPPFLAGS = \ -DDATADIR=\"$(datadir)\" \ -DVERSION=\"$(VERSION)\" \ @@ -26,4 +24,4 @@ -I$(top_srcdir)/gtk \ $(DEBUG_CFLAGS) \ $(GTK_CFLAGS) \ - $(CAP_CFLAGS) + $(SQLITE3_CFLAGS) Modified: trunk/gtk/plugins/cap/cap.c =================================================================== --- trunk/gtk/plugins/cap/cap.c 2006-09-10 22:33:28 UTC (rev 17230) +++ trunk/gtk/plugins/cap/cap.c 2006-09-11 00:28:35 UTC (rev 17231) @@ -21,29 +21,6 @@ #include "cap.h" -static char * quote_string(const char *str) { - gchar *quoted_str = NULL; - quoted_str = g_strdup(str); - dbi_driver_quote_string(_driver, "ed_str); - return quoted_str; -} - -static void generate_minute_stats(CapStatistics *statistics) { - gchar *buddy_name = quote_string(statistics->buddy->name); - gchar *protocol_id = quote_string(gaim_account_get_protocol_id(statistics->buddy->account)); - gchar *account_id = quote_string(gaim_account_get_username(statistics->buddy->account)); - dbi_result result = dbi_conn_queryf(_conn, "select minute_val, success_count, failed_count from cap_msg_count where buddy=%s account=%s and protocol=%s;", buddy_name, account_id, protocol_id); - - while(dbi_result_next_row(result)) { - int minute_val = dbi_result_get_int(result, "minute_val"); - int success_count = dbi_result_get_int(result, "success_count"); - int failed_count = dbi_result_get_int(result, "failed_count"); - double ratio = ((double)success_count/(double)(success_count + failed_count)); - statistics->minute_stats[minute_val] = ratio; - } - dbi_result_free(result); -} - static void generate_prediction(CapStatistics *statistics) { if(statistics->buddy) { if(statistics->prediction == NULL) @@ -56,86 +33,67 @@ static double generate_prediction_for(GaimBuddy *buddy) { double prediction = 1.0f; gboolean generated = FALSE; - gchar *buddy_name = quote_string(buddy->name); - gchar *protocol_id = quote_string(gaim_account_get_protocol_id(buddy->account)); - gchar *account_id = quote_string(gaim_account_get_username(buddy->account)); - gchar *status_id = quote_string(gaim_status_get_id(get_status_for(buddy))); + gchar *buddy_name = buddy->name; + const gchar *protocol_id = gaim_account_get_protocol_id(buddy->account); + const gchar *account_id = gaim_account_get_username(buddy->account); + const gchar *status_id = gaim_status_get_id(get_status_for(buddy)); time_t t = time(NULL); struct tm *current_time = localtime(&t); int current_minute = current_time->tm_min + current_time->tm_hour * 60; int threshold = gaim_prefs_get_int("/plugins/gtk/cap/threshold"); int min_minute = (current_minute - threshold) % 1440; int max_minute = (current_minute + threshold) % 1440; - dbi_result result; + char *sql; + sqlite3_stmt *stmt = NULL; + const char *tail = NULL; + int rc; - result = dbi_conn_queryf(_conn, "select success_count, failed_count from cap_msg_count where buddy=%s and account=%s and protocol=%s and minute_val>=%d and minute_val<=%d;", buddy_name, account_id, protocol_id, min_minute, max_minute); - if(result) { + + sql = sqlite3_mprintf("select sum(success_count) as successes, sum(failed_count) as failures " + "from cap_msg_count where " + "buddy=%Q and account=%Q and protocol=%Q and minute_val>=%d and minute_val<=%d;", + buddy_name, account_id, protocol_id, min_minute, max_minute); + rc = sqlite3_prepare(_db, sql, -1, &stmt, &tail); + if(rc == SQLITE_OK) { int successes = 0; int failures = 0; - while(dbi_result_next_row(result)) { - if(!dbi_result_field_is_null(result, "success_count")) - successes += dbi_result_get_int(result, "success_count"); - - if(!dbi_result_field_is_null(result, "failed_count")) - failures += dbi_result_get_int(result, "failed_count"); + if(stmt != NULL) { + if(sqlite3_step(stmt) == SQLITE_ROW) { + successes = sqlite3_column_int(stmt, 0); + failures = sqlite3_column_int(stmt, 1); + if(failures + successes > 0) { + prediction *= ((double)successes/((double)(successes+failures))); + generated = TRUE; + } + } + sqlite3_finalize(stmt); } - if(failures + successes > 0) { - prediction *= ((double)successes/((double)(successes + failures))); - generated = TRUE; - } - dbi_result_free(result); } + sqlite3_free(sql); - -/* - * Note to self: apparently when using a function like sum results in not being able to get - * the values for fields using libdbi...why? the way I'm doing it above sucks, find a fix. - result = dbi_conn_queryf(_conn, "select sum(success_count) as successes, sum(failed_count) as failures from cap_msg_count where buddy=%s and account=%s and protocol=%s and minute_val>=%d and minute_val<=%d;", buddy_name, account_id, protocol_id, min_minute, max_minute); - gaim_debug_info("cap", "select sum(success_count) as successes, sum(failed_count) as failures from cap_msg_count where buddy=%s and account=%s and protocol=%s and minute_val>=%d and minute_val<=%d;\n", buddy_name, account_id, protocol_id, min_minute, max_minute); - - if(result) { - int failures; - int successes; - int rc = dbi_result_get_numrows(result); - dbi_result_next_row(result); - gaim_debug_info("cap", "Result code: %d\n", rc); - failures = dbi_result_get_int_idx(result, 1);//"failures"); - successes = dbi_result_get_int_idx(result, 2); //"successes"); - gaim_debug_info("cap", "Successes = %d; Failures = %d\n", successes, failures); - dbi_result_get_fields(result, "successes.%i failures.%i", &successes, &failures); - gaim_debug_info("cap", "Successes = %d; Failures = %d\n", successes, failures); - if(failures + successes > 0.0) - prediction *= ((double)successes/((double)(successes + failures))); - gaim_debug_info("cap", "After message value prediction is %0.4f.\n", prediction); - dbi_result_free(result); - } -*/ - - result = dbi_conn_queryf(_conn, "select success_count, failed_count from cap_status_count where buddy=%s and account=%s and protocol=%s and status=%s;", buddy_name, account_id, protocol_id, status_id); - if(result) { + sql = sqlite3_mprintf("select sum(success_count) as successes, sum(failed_count) as failures " + "from cap_status_count where " + "buddy=%Q and account=%Q and protocol=%Q and status=%Q;", + buddy_name, account_id, protocol_id, status_id); + rc = sqlite3_prepare(_db, sql, -1, &stmt, &tail); + if(rc == SQLITE_OK) { int successes = 0; int failures = 0; - - dbi_result_next_row(result); - - if(!dbi_result_field_is_null(result, "success_count")) - successes = dbi_result_get_int(result, "success_count"); - - if(!dbi_result_field_is_null(result, "failed_count")) - failures = dbi_result_get_int(result, "failed_count"); - - if(successes + failures > 0) { - prediction *= ((double)successes/(double)(successes + failures)); - generated = TRUE; + if(stmt != NULL) { + if(sqlite3_step(stmt) == SQLITE_ROW) { + successes = sqlite3_column_int(stmt, 0); + failures = sqlite3_column_int(stmt, 1); + if(failures + successes > 0) { + prediction *= ((double)successes/((double)(successes+failures))); + generated = TRUE; + } + } + sqlite3_finalize(stmt); } - dbi_result_free(result); } + sqlite3_free(sql); - free(buddy_name); - free(account_id); - free(protocol_id); - free(status_id); - + if(strcmp(gaim_status_get_id(get_status_for(buddy)), "offline") == 0) { //This is kind of stupid, change it. if(prediction == 1.0f) @@ -150,12 +108,10 @@ static CapStatistics * get_stats_for(GaimBuddy *buddy) { gchar *buddy_name; - gchar *q_buddy_name = quote_string(buddy->name); CapStatistics *stats; buddy_name = g_strdup(buddy->name); stats = g_hash_table_lookup(_buddy_stats, buddy_name); if(!stats) { - dbi_result result; stats = g_malloc(sizeof(CapStatistics)); stats->last_message = -1; stats->last_message_status_id = NULL; @@ -163,37 +119,11 @@ stats->prediction = NULL; g_hash_table_insert(_buddy_stats, buddy_name, stats); stats->buddy = buddy; - /* Setup the last seen online time from database or -1 if no time available. */ - result = dbi_conn_queryf(_conn, - //"select max(event_time) as last_event_time from cap_status where buddy=\'%s\' and status!=\'offline\';", - "select event_time from cap_status where buddy=\'%s\' and status!=\'offline\' order by event_time desc;", - q_buddy_name); - if(result && dbi_result_get_numrows(result) > 0) { - dbi_result_next_row(result); - stats->last_seen = dbi_result_get_datetime(result, "event_time"); - } else { - stats->last_seen = -1; - } - dbi_result_free(result); - /* Setup the last messaged time to be a 'useable' value for comparisons. */ - //result = dbi_conn_queryf(conn, "", ); - /* Setup the last status id to nothing */ - // --> Better approach would be to get the last status available in db and use it. - result = dbi_conn_queryf(_conn, - "select status, max(event_time) from cap_status where buddy=\'%s\' group by status;", - buddy->name); - if(result && dbi_result_get_numrows(result) > 0) { - dbi_result_next_row(result); - stats->last_status_id = dbi_result_get_string_copy(result, "status"); - } else { - stats->last_status_id = ""; - } - dbi_result_free(result); - //TODO: populate stats from database + stats->last_seen = -1; + stats->last_status_id = ""; } else { g_free(buddy_name); } - free(q_buddy_name); generate_prediction(stats); return stats; } @@ -206,43 +136,161 @@ g_free(stats); } -static gboolean remove_stats_for(GaimBuddy *buddy) { - gboolean success = TRUE; - //GString *buddy_name = g_string_new(buddy->name); - gchar *buddy_name = g_strdup(buddy->name); - success = g_hash_table_remove(_buddy_stats, buddy_name); - g_free(buddy_name); - return success; -} +static void +insert_cap_msg_count_success(const char *buddy_name, const char *account, const char *protocol, int minute) { + int rc; + sqlite3_stmt *stmt; + const char *tail; + char *sql_select = sqlite3_mprintf("SELECT * FROM cap_msg_count WHERE " + "buddy=%Q AND account=%Q AND protocol=%Q AND minute_val=%d;", + buddy_name, account, protocol, minute); + char *sql_ins_up = NULL; -static dbi_result insert_cap_msg_count_success(const char *buddy_name, const char *account, const char *protocol, int minute) { - gaim_debug_info("cap", "Insert cap_msg_count success: %s %s %s %d\n", buddy_name, account, protocol, minute); - return dbi_conn_queryf(_conn, "insert into cap_msg_count (buddy, account, protocol, minute_val, success_count, failed_count) values (%s, %s, %s, %d, %d, %d) on duplicate key update success_count=success_count+1;", buddy_name, account, protocol, minute, 1, 0); + gaim_debug_info("cap", "%s\n", sql_select); + + sqlite3_prepare(_db, sql_select, -1, &stmt, &tail); + + rc = sqlite3_step(stmt); + + if(rc == SQLITE_DONE) { + sql_ins_up = sqlite3_mprintf("INSERT INTO cap_msg_count VALUES (%Q, %Q, %Q, %d, %d, %d);", + buddy_name, account, protocol, minute, 1, 0); + } else if(rc == SQLITE_ROW) { + sql_ins_up = sqlite3_mprintf("UPDATE cap_msg_count SET success_count=success_count+1 WHERE " + "buddy=%Q AND account=%Q AND protocol=%Q AND minute_val=%d;", + buddy_name, account, protocol, minute); + } else { + gaim_debug_info("cap", "%d\n", rc); + sqlite3_finalize(stmt); + sqlite3_free(sql_select); + return; + } + + sqlite3_finalize(stmt); + sqlite3_free(sql_select); + + sqlite3_exec(_db, sql_ins_up, NULL, NULL, NULL); + sqlite3_free(sql_ins_up); } -static dbi_result insert_cap_status_count_success(const char *buddy_name, const char *account, const char *protocol, const char *status_id) { - gaim_debug_info("cap", "Insert cap_status_count success: %s %s %s %s\n", buddy_name, account, protocol, status_id); - return dbi_conn_queryf(_conn, "insert into cap_status_count (buddy, account, protocol, status, success_count, failed_count) values(%s, %s, %s, %s, %d, %d) on duplicate key update success_count=success_count+1;", buddy_name, account, protocol, status_id, 1, 0); +static void +insert_cap_status_count_success(const char *buddy_name, const char *account, const char *protocol, const char *status_id) { + int rc; + sqlite3_stmt *stmt; + const char *tail; + char *sql_select = sqlite3_mprintf("SELECT * FROM cap_status_count WHERE " + "buddy=%Q AND account=%Q AND protocol=%Q AND status=%Q;", + buddy_name, account, protocol, status_id); + char *sql_ins_up = NULL; + + gaim_debug_info("cap", "%s\n", sql_select); + + sqlite3_prepare(_db, sql_select, -1, &stmt, &tail); + + rc = sqlite3_step(stmt); + + if(rc == SQLITE_DONE) { + sql_ins_up = sqlite3_mprintf("INSERT INTO cap_status_count VALUES (%Q, %Q, %Q, %Q, %d, %d);", + buddy_name, account, protocol, status_id, 1, 0); + } else if(rc == SQLITE_ROW) { + sql_ins_up = sqlite3_mprintf("UPDATE cap_status_count SET success_count=success_count+1 WHERE " + "buddy=%Q AND account=%Q AND protocol=%Q AND status=%Q;", + buddy_name, account, protocol, status_id); + } else { + gaim_debug_info("cap", "%d\n", rc); + sqlite3_finalize(stmt); + sqlite3_free(sql_select); + return; + } + + sqlite3_finalize(stmt); + sqlite3_free(sql_select); + + sqlite3_exec(_db, sql_ins_up, NULL, NULL, NULL); + sqlite3_free(sql_ins_up); } -static dbi_result insert_cap_msg_count_failed(const char *buddy_name, const char *account, const char *protocol, int minute) { - gaim_debug_info("cap", "Insert cap_msg_count failed: %s %s %s %d\n", buddy_name, account, protocol, minute); - return dbi_conn_queryf(_conn, "insert into cap_msg_count (buddy, account, protocol, minute_val, success_count, failed_count) values (%s, %s, %s, %d, %d, %d) on duplicate key update failed_count=failed_count+1;", buddy_name, account, protocol, minute, 0, 1); +static void +insert_cap_msg_count_failed(const char *buddy_name, const char *account, const char *protocol, int minute) { + int rc; + sqlite3_stmt *stmt; + const char *tail; + char *sql_select = sqlite3_mprintf("SELECT * FROM cap_msg_count WHERE " + "buddy=%Q AND account=%Q AND protocol=%Q AND minute_val=%d;", + buddy_name, account, protocol, minute); + char *sql_ins_up = NULL; + + gaim_debug_info("cap", "%s\n", sql_select); + + sqlite3_prepare(_db, sql_select, -1, &stmt, &tail); + + rc = sqlite3_step(stmt); + + if(rc == SQLITE_DONE) { + sql_ins_up = sqlite3_mprintf("INSERT INTO cap_msg_count VALUES (%Q, %Q, %Q, %d, %d, %d);", + buddy_name, account, protocol, minute, 0, 1); + } else if(rc == SQLITE_ROW) { + sql_ins_up = sqlite3_mprintf("UPDATE cap_msg_count SET failed_count=failed_count+1 WHERE " + "buddy=%Q AND account=%Q AND protocol=%Q AND minute_val=%d;", + buddy_name, account, protocol, minute); + } else { + gaim_debug_info("cap", "%d\n", rc); + sqlite3_finalize(stmt); + sqlite3_free(sql_select); + return; + } + + sqlite3_finalize(stmt); + sqlite3_free(sql_select); + + sqlite3_exec(_db, sql_ins_up, NULL, NULL, NULL); + sqlite3_free(sql_ins_up); } -static dbi_result insert_cap_status_count_failed(const char *buddy_name, const char *account, const char *protocol, const char *status_id) { - gaim_debug_info("cap", "Insert cap_status_count failed: %s %s %s %s\n", buddy_name, account, protocol, status_id); - return dbi_conn_queryf(_conn, "insert into cap_status_count (buddy, account, protocol, status, success_count, failed_count) values(%s, %s, %s, %s, %d, %d) on duplicate key update failed_count=failed_count+1;", buddy_name, account, protocol, status_id, 0, 1); +static void +insert_cap_status_count_failed(const char *buddy_name, const char *account, const char *protocol, const char *status_id) { + int rc; + sqlite3_stmt *stmt; + const char *tail; + char *sql_select = sqlite3_mprintf("SELECT * FROM cap_status_count WHERE " + "buddy=%Q AND account=%Q AND protocol=%Q AND status=%Q;", + buddy_name, account, protocol, status_id); + char *sql_ins_up = NULL; + + gaim_debug_info("cap", "%s\n", sql_select); + + sqlite3_prepare(_db, sql_select, -1, &stmt, &tail); + + rc = sqlite3_step(stmt); + + if(rc == SQLITE_DONE) { + sql_ins_up = sqlite3_mprintf("INSERT INTO cap_status_count VALUES (%Q, %Q, %Q, %Q, %d, %d);", + buddy_name, account, protocol, status_id, 0, 1); + } else if(rc == SQLITE_ROW) { + sql_ins_up = sqlite3_mprintf("UPDATE cap_status_count SET failed_count=failed_count+1 WHERE " + "buddy=%Q AND account=%Q AND protocol=%Q AND status=%Q;", + buddy_name, account, protocol, status_id); + } else { + gaim_debug_info("cap", "%d\n", rc); + sqlite3_finalize(stmt); + sqlite3_free(sql_select); + return; + } + + sqlite3_finalize(stmt); + sqlite3_free(sql_select); + + sqlite3_exec(_db, sql_ins_up, NULL, NULL, NULL); + sqlite3_free(sql_ins_up); } static void insert_cap_success(CapStatistics *stats) { - dbi_result result; - gchar *buddy_name = quote_string(stats->buddy->name); - gchar *protocol_id = quote_string(gaim_account_get_protocol_id(stats->buddy->account)); - gchar *account_id = quote_string(gaim_account_get_username(stats->buddy->account)); - gchar *status_id = (stats->last_message_status_id) ? - quote_string(stats->last_message_status_id) : - quote_string(gaim_status_get_id(get_status_for(stats->buddy))); + gchar *buddy_name = stats->buddy->name; + const gchar *protocol_id = gaim_account_get_protocol_id(stats->buddy->account); + const gchar *account_id = gaim_account_get_username(stats->buddy->account); + const gchar *status_id = (stats->last_message_status_id) ? + stats->last_message_status_id : + gaim_status_get_id(get_status_for(stats->buddy)); struct tm *current_time; int minute; @@ -254,49 +302,30 @@ } minute = current_time->tm_min + current_time->tm_hour * 60; - result = insert_cap_msg_count_success(buddy_name, account_id, protocol_id, minute); - if(result) - dbi_result_free(result); + insert_cap_msg_count_success(buddy_name, account_id, protocol_id, minute); - result = insert_cap_status_count_success(buddy_name, account_id, protocol_id, status_id); - if(result) - dbi_result_free(result); + insert_cap_status_count_success(buddy_name, account_id, protocol_id, status_id); stats->last_message = -1; stats->last_message_status_id = NULL; - - free(status_id); - free(protocol_id); - free(account_id); - free(buddy_name); } static void insert_cap_failure(CapStatistics *stats) { - dbi_result result; - gchar *buddy_name = quote_string(stats->buddy->name); - gchar *protocol_id = quote_string(gaim_account_get_protocol_id(stats->buddy->account)); - gchar *account_id = quote_string(gaim_account_get_username(stats->buddy->account)); - gchar *status_id = (stats->last_message_status_id) ? - quote_string(stats->last_message_status_id) : - quote_string(gaim_status_get_id(get_status_for(stats->buddy))); + gchar *buddy_name = stats->buddy->name; + const gchar *protocol_id = gaim_account_get_protocol_id(stats->buddy->account); + const gchar *account_id = gaim_account_get_username(stats->buddy->account); + const gchar *status_id = (stats->last_message_status_id) ? + stats->last_message_status_id : + gaim_status_get_id(get_status_for(stats->buddy)); struct tm *current_time = localtime(&stats->last_message); int minute = current_time->tm_min + current_time->tm_hour * 60; - result = insert_cap_msg_count_failed(buddy_name, account_id, protocol_id, minute); - if(result) - dbi_result_free(result); + insert_cap_msg_count_failed(buddy_name, account_id, protocol_id, minute); - result = insert_cap_status_count_failed(buddy_name, account_id, protocol_id, status_id); - if(result) - dbi_result_free(result); + insert_cap_status_count_failed(buddy_name, account_id, protocol_id, status_id); stats->last_message = -1; stats->last_message_status_id = NULL; - - free(status_id); - free(protocol_id); - free(account_id); - free(buddy_name); } static gboolean max_message_difference_cb(gpointer data) { @@ -326,10 +355,10 @@ } //received-im-msg -static void received_im_msg(GaimAccount *account, char *sender, char *message, - GaimConversation *conv, GaimMessageFlags flags) { +static void +received_im_msg(GaimAccount *account, char *sender, char *message, GaimConversation *conv, GaimMessageFlags flags) { GaimBuddy *buddy = gaim_find_buddy(account, sender); - guint words = word_count(message); + //guint words = word_count(message); CapStatistics *stats = get_stats_for(buddy); //insert_word_count(sender, buddy_name, words); @@ -407,7 +436,8 @@ CapStatistics *stats = get_stats_for(buddy); // get the probability that this buddy will respond and add to the tooltip if(stats->prediction->probability >= 0.0) { - g_string_append_printf(text, "\n<b>%s</b> %0.4f", _("Response Probability:"), stats->prediction->probability); + g_string_append_printf(text, "\n<b>%s</b> %3.0f %%", _("Response Probability:"), + 100 * stats->prediction->probability); } else { g_string_append_printf(text, "\n<b>%s</b> ???", _("Response Probability:")); } @@ -421,13 +451,13 @@ gchar *my_name = g_strdup(my_gaim_name); time_t *last_offline = g_hash_table_lookup(_my_offline_times, my_name); - gchar *account_id = quote_string(gaim_account_get_username(account)); - gchar *protocol_id = quote_string(gaim_account_get_protocol_id(account)); - dbi_result result; + const gchar *account_id = gaim_account_get_username(account); + const gchar *protocol_id = gaim_account_get_protocol_id(account); + char *sql; - result = dbi_conn_queryf(_conn, "insert into cap_my_usage values(%s, %s, %d, now());", account_id, protocol_id, 1); - if(result) - dbi_result_free(result); + sql = sqlite3_mprintf("insert into cap_my_usage values(%Q, %Q, %d, now());", account_id, protocol_id, 1); + sqlite3_exec(_db, sql, NULL, NULL, NULL); + sqlite3_free(sql); if(last_offline) { if(difftime(*last_offline, time(NULL)) > gaim_prefs_get_int("/plugins/gtk/cap/max_seen_difference") * 60) { @@ -448,39 +478,18 @@ const char *my_gaim_name = gaim_account_get_username(account); gchar *my_name = g_strdup(my_gaim_name); time_t *offline_time = g_malloc(sizeof(time_t)); - gchar *account_id = quote_string(gaim_account_get_username(account)); - gchar *protocol_id = quote_string(gaim_account_get_protocol_id(account)); - dbi_result result; + const gchar *account_id = gaim_account_get_username(account); + const gchar *protocol_id = gaim_account_get_protocol_id(account); + char *sql; - result = dbi_conn_queryf(_conn, "insert into cap_my_usage values(%s, %s, %d, now());", account_id, protocol_id, 0); - if(result) - dbi_result_free(result); + sql = sqlite3_mprintf("insert into cap_my_usage values(%Q, %Q, %d, now());", account_id, protocol_id, 0); + sqlite3_exec(_db, sql, NULL, NULL, NULL); + sqlite3_free(sql); time(offline_time); g_hash_table_insert(_my_offline_times, my_name, offline_time); } -static const gchar * get_error_msg() { - if(error_msg) - return error_msg->str; - else - return NULL; -} - -static void set_error_msg(const gchar *msg) { - if(!error_msg) - error_msg = g_string_new(msg); - else - g_string_assign(error_msg, msg); -} - -static void append_error_msg(const gchar *msg) { - if(!error_msg) - set_error_msg(msg); - else - g_string_append(error_msg, msg); -} - static void reset_all_last_message_times(gpointer key, gpointer value, gpointer user_data) { CapStatistics *stats = value; stats->last_message = -1; @@ -493,52 +502,89 @@ } static void create_tables() { + int rc; + rc = sqlite3_exec(_db, + "CREATE TABLE IF NOT EXISTS cap_status (" + " buddy varchar(60) not null," + " account varchar(60) not null," + " protocol varchar(60) not null," + " status varchar(60) not null," + " event_time datetime not null," + " primary key (buddy, account, protocol, event_time)" + ");", + NULL, NULL, NULL); + + rc = sqlite3_exec(_db, + "create table if not exists cap_message (" + " sender varchar(60) not null," + " receiver varchar(60) not null," + " account varchar(60) not null," + " protocol varchar(60) not null," + " word_count integer not null," + " event_time datetime not null," + " primary key (sender, account, protocol, receiver, event_time)" + ");", + NULL, NULL, NULL); + + rc = sqlite3_exec(_db, + "create table if not exists cap_msg_count (" + " buddy varchar(60) not null," + " account varchar(60) not null," + " protocol varchar(60) not null," + " minute_val int not null," + " success_count int not null," + " failed_count int not null," + " primary key (buddy, account, protocol, minute_val)" + ");", + NULL, NULL, NULL); + + rc = sqlite3_exec(_db, + "create table if not exists cap_status_count (" + " buddy varchar(60) not null," + " account varchar(60) not null," + " protocol varchar(60) not null," + " status varchar(60) not null," + " success_count int not null," + " failed_count int not null," + " primary key (buddy, account, protocol, status)" + ");", + NULL, NULL, NULL); + + rc = sqlite3_exec(_db, + "create table if not exists cap_my_usage (" + " account varchar(60) not null," + " protocol varchar(60) not null," + " online tinyint not null," + " event_time datetime not null," + " primary key(account, protocol, online, event_time)" + ");", + NULL, NULL, NULL); } static gboolean create_database_connection() { + GString *path; int rc; - int driver_type; - if(_conn) + if(_db) return TRUE; //make database connection here - _conn = dbi_conn_new(gaim_prefs_get_string("/plugins/gtk/cap/db_driver")); - if(!_conn) + path = g_string_new(gaim_user_dir()); + g_string_append(path, "/cap.db"); + rc = sqlite3_open(path->str, &_db); + if(rc != SQLITE_OK) return FALSE; - _driver = dbi_conn_get_driver(_conn); - gaim_debug_info("cap", "Using driver: %s\n", gaim_prefs_get_string("/plugins/gtk/cap/db_driver")); - if(strcmp(gaim_prefs_get_string("/plugins/gtk/cap/db_driver"), "mysql") == 0) { - driver_type = MYSQL; - dbi_conn_set_option(_conn, "host", gaim_prefs_get_string("/plugins/gtk/cap/mysql/db_host")); - dbi_conn_set_option(_conn, "username", gaim_prefs_get_string("/plugins/gtk/cap/mysql/db_user")); - dbi_conn_set_option(_conn, "password", gaim_prefs_get_string("/plugins/gtk/cap/mysql/db_password")); - dbi_conn_set_option(_conn, "dbname", gaim_prefs_get_string("/plugins/gtk/cap/mysql/db_name")); - dbi_conn_set_option(_conn, "encoding", "auto"); - dbi_conn_set_option_numeric(_conn, "port", gaim_prefs_get_int("/plugins/gtk/cap/mysql/db_port")); - } - if(dbi_conn_connect(_conn) < 0) { - const char *err_msg = ""; - //rc = dbi_conn_error(_conn, &err_msg); - rc = dbi_conn_error(_conn, NULL); - gaim_debug_error("cap", "CAP could not create database connection. %d\n", rc); - //set_error_msg(_("Could not create database connection. Reason: ")); - //append_error_msg(err_msg); - _conn = NULL; - return FALSE; - } else { - //Add tables here - create_tables(); - } + //Add tables here + create_tables(); gaim_debug_info("cap", "Database connection successfully made.\n"); return TRUE; } static void destroy_database_connection() { - if(_conn) - dbi_conn_close(_conn); + if(_db) + sqlite3_close(_db); - _conn = NULL; + _db = NULL; } static guint word_count(const gchar *string) { @@ -551,53 +597,17 @@ return count; } -/* If the difference in time between the present time and the time that - * you last sent a message to a buddy is less than some value then return - * true, otherwise return false. - * The difference can either be + or - the max_difference. - * max_difference is in seconds - */ -static gboolean last_message_time_in_range(CapStatistics *statistics, gdouble max_difference) { - time_t now = time(NULL); - gdouble difference = 0.0; - //If there is no last_message time then it is considered in range - if(statistics->last_message == -1) { - return TRUE; - } - //Compute the difference between now and the last_message - difference = difftime(statistics->last_message, now); - //Absolute value - difference = (difference < 0.0) ? -difference : difference; - //If the difference is less than the maximum then we are good and its in range, otherwise not - if(difference <= max_difference) - return TRUE; - else - return FALSE; -} - -static gboolean last_seen_time_in_range(CapStatistics *statistics, gdouble max_difference) { - time_t now = time(NULL); - gdouble difference = 0.0; - if(statistics->last_seen == -1) - return FALSE; - difference = difftime(statistics->last_seen, now); - difference = (difference < 0.0) ? -difference : difference; - if(difference < max_difference) - return TRUE; - else - return FALSE; -} - static void insert_status_change(CapStatistics *statistics) { insert_status_change_from_gaim_status(statistics, get_status_for(statistics->buddy)); } static void insert_status_change_from_gaim_status(CapStatistics *statistics, GaimStatus *status) { - dbi_result result; - gchar *status_id; - gchar *buddy_name; - gchar *protocol_id; - gchar *account_id; + char *sql; + int rc; + const gchar *status_id; + const gchar *buddy_name; + const gchar *protocol_id; + const gchar *account_id; /* It would seem that some protocols receive periodic updates of the buddies status. * Check to make sure the last status is not the same as current status to prevent @@ -605,27 +615,18 @@ if(strcmp(statistics->last_status_id, gaim_status_get_id(status)) == 0) return; - status_id = quote_string(gaim_status_get_id(status)); - buddy_name = quote_string(statistics->buddy->name); - protocol_id = quote_string(gaim_account_get_protocol_id(statistics->buddy->account)); - account_id = quote_string(gaim_account_get_username(statistics->buddy->account)); + status_id = gaim_status_get_id(status); + buddy_name = statistics->buddy->name; + protocol_id = gaim_account_get_protocol_id(statistics->buddy->account); + account_id = gaim_account_get_username(statistics->buddy->account); statistics->last_status_id = gaim_status_get_id(status); + gaim_debug_info("cap", "Executing: insert into cap_status (buddy, account, protocol, status, event_time) values(%s, %s, %s, %s, now());\n", buddy_name, account_id, protocol_id, status_id); - result = dbi_conn_queryf(_conn, "insert into cap_status (buddy, account, protocol, status, event_time) values(%s, %s, %s, %s, now());", buddy_name, account_id, protocol_id, status_id); - if(result) - dbi_result_free(result); - else { - const char *err = ""; - dbi_conn_error(_conn, &err); - gaim_debug_error("cap", "Could not insert status change event into database. %s\n", err); - } - - free(status_id); - free(buddy_name); - free(protocol_id); - free(account_id); + sql = sqlite3_mprintf("insert into cap_status values (%Q, %Q, %Q, %Q, now());", buddy_name, account_id, protocol_id, status_id); + rc = sqlite3_exec(_db, sql, NULL, NULL, NULL); + sqlite3_free(sql); } static void insert_word_count(const char *sender, const char *receiver, guint count) { @@ -658,25 +659,9 @@ */ _my_offline_times = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); - if(gaim_prefs_exists("/plugins/gtk/cap/libdbi_drivers")) - _num_drivers = dbi_initialize(gaim_prefs_get_string("/plugins/gtk/cap/libdbi_drivers")); - else - _num_drivers = dbi_initialize(NULL); - - if(_num_drivers == -1) { - gaim_debug_error("cap", "Error initializing dbi.\n"); - gaim_prefs_set_bool("/plugins/gtk/cap/configured", FALSE); - _dbi_initialized = FALSE; - } else { - _dbi_initialized = TRUE; + if(create_database_connection()) { + add_plugin_functionality(plugin); } - - - if(gaim_prefs_get_bool("/plugins/gtk/cap/configured") && gaim_prefs_get_bool("/plugins/gtk/cap/connected")) { - if(create_database_connection()) { - add_plugin_functionality(plugin); - } - } return TRUE; } @@ -788,71 +773,18 @@ } //close database connection - dbi_conn_close(_conn); - _conn = NULL; - dbi_shutdown(); + destroy_database_connection(); return TRUE; } -static GtkWidget * get_config_frame(GaimPlugin *plugin) { - CapPrefsUI *ui = create_cap_prefs_ui(); - - /* Since we are editing the database setup we will disable the plugin. - * This will prevent database updates from occuring while there is potentially - * no connection to the database. - */ - remove_plugin_functionality(_plugin_pointer); - - return ui->ret; -} - -static void cap_prefs_ui_destroy_cb(GtkObject *object, gpointer user_data) { - CapPrefsUI *ui = user_data; - if(_conn) { - add_plugin_functionality(_plugin_pointer); - } - g_free(ui); -} - static CapPrefsUI * create_cap_prefs_ui() { CapPrefsUI *ui = g_malloc(sizeof(CapPrefsUI)); ui->ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width(GTK_CONTAINER(ui->ret), 10); - ui->db_vbox = gaim_gtk_make_frame(ui->ret, _("Database Configuration")); ui->cap_vbox = gaim_gtk_make_frame(ui->ret, _("Statistics Configuration")); - /* dbd path input folder selector button */ - ui->dbd_label = gtk_label_new(_("libdbi driver path:")); - gtk_misc_set_alignment(GTK_MISC(ui->dbd_label), 0, 0.5); - ui->dbd_input = gtk_file_chooser_button_new(_("libdbi Drivers Path"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); - ui->dbd_button = gtk_button_new_with_label(_("Verify")); - ui->dbd_hbox = gtk_hbox_new(FALSE, 18); - gtk_box_pack_start(GTK_BOX(ui->dbd_hbox), ui->dbd_label, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(ui->dbd_hbox), ui->dbd_input, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(ui->dbd_hbox), ui->dbd_button, FALSE, FALSE, 0); - - /* Setup the driver selection widget */ - ui->driver_choice = gtk_combo_box_new_text(); - - ui->driver_vbox = gtk_vbox_new(FALSE, 18); - ui->driver_label = gtk_label_new(_("Driver:")); - gtk_misc_set_alignment(GTK_MISC(ui->driver_label), 0, 0.5); - ui->driver_select_hbox = gtk_hbox_new(FALSE, 18); - ui->driver_connect_button = gtk_toggle_button_new_with_label(_("Connected")); - - gtk_box_pack_start(GTK_BOX(ui->driver_select_hbox), ui->driver_label, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(ui->driver_select_hbox), ui->driver_choice, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(ui->driver_select_hbox), ui->driver_connect_button, FALSE, FALSE, 0); - - ui->driver_config = gtk_expander_new_with_mnemonic(_("Configure")); - ui->driver_config_hbox = gtk_hbox_new(FALSE, 18); - gtk_box_pack_start(GTK_BOX(ui->driver_config_hbox), ui->driver_config, FALSE, FALSE, 0); - - gtk_box_pack_start(GTK_BOX(ui->driver_vbox), ui->driver_select_hbox, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(ui->driver_vbox), ui->driver_config_hbox, FALSE, FALSE, 0); - /* msg_difference spinner */ ui->msg_difference_label = gtk_label_new(_("Maximum response timeout:")); gtk_misc_set_alignment(GTK_MISC(ui->msg_difference_label), 0, 0.5); @@ -914,16 +846,11 @@ /* Config window - lay it out */ - gtk_box_pack_start(GTK_BOX(ui->db_vbox), ui->dbd_hbox, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(ui->db_vbox), ui->driver_vbox, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(ui->cap_vbox), ui->table_layout, FALSE, FALSE, 0); /* Set the input areas to contain the configuration values from * gaim prefs. */ - if(gaim_prefs_exists("/plugins/gtk/cap/libdbi_drivers")) { - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(ui->dbd_input), gaim_prefs_get_string("/plugins/gtk/cap/libdbi_drivers")); - } if(gaim_prefs_exists("/plugins/gtk/cap/max_msg_difference")) { int max_msg_diff = gaim_prefs_get_int("/plugins/gtk/cap/max_msg_difference"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(ui->msg_difference_input), max_msg_diff); @@ -941,15 +868,6 @@ g_signal_connect(G_OBJECT(ui->ret), "destroy", G_CALLBACK(cap_prefs_ui_destroy_cb), ui); - g_signal_connect(G_OBJECT(ui->driver_choice), "changed", - G_CALLBACK(driver_choice_changed_cb), ui); - - g_signal_connect(G_OBJECT(ui->driver_config), "notify::expanded", - G_CALLBACK(driver_config_expanded_cb), ui); - - g_signal_connect(G_OBJECT(ui->driver_connect_button), "toggled", - G_CALLBACK(connect_toggled_cb), ui); - g_signal_connect(G_OBJECT(ui->msg_difference_input), "value-changed", G_CALLBACK(numeric_spinner_prefs_cb), "/plugins/gtk/cap/max_msg_difference"); @@ -959,244 +877,21 @@ g_signal_connect(G_OBJECT(ui->threshold_input), "value-changed", G_CALLBACK(numeric_spinner_prefs_cb), "/plugins/gtk/cap/threshold"); - g_signal_connect(G_OBJECT(ui->dbd_button), "clicked", - G_CALLBACK(driver_location_verify_cb), ui); - - /* libdbi was not successfully initialized so disable the driver selection. - * Also disable the configuration for the database. - */ - if(!_dbi_initialized || _num_drivers <= 0) { - /* Since DBI is not available disable database configuration */ - gtk_widget_set_sensitive(ui->driver_choice, FALSE); - gtk_widget_set_sensitive(ui->driver_config, FALSE); - gtk_widget_set_sensitive(ui->driver_connect_button, FALSE); - } else { - set_driver_choice_options(GTK_COMBO_BOX(ui->driver_choice)); - } - - if(_conn) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ui->driver_connect_button), TRUE); - gtk_widget_set_sensitive(ui->driver_choice, FALSE); - gtk_widget_set_sensitive(ui->driver_config, FALSE); - } else { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ui->driver_connect_button), FALSE); - } - return ui; } -static void driver_choice_changed_cb(GtkComboBox *widget, gpointer user_data) { +static void cap_prefs_ui_destroy_cb(GtkObject *object, gpointer user_data) { CapPrefsUI *ui = user_data; - if(strcmp(gtk_combo_box_get_active_text(GTK_COMBO_BOX(ui->driver_choice)), "mysql") == 0) { - gtk_widget_set_sensitive(ui->driver_config, TRUE); - gtk_widget_set_sensitive(ui->driver_connect_button, TRUE); - } else { - gtk_widget_set_sensitive(ui->driver_config, FALSE); - gtk_widget_set_sensitive(ui->driver_connect_button, FALSE); + if(_db) { + add_plugin_functionality(_plugin_pointer); } + g_free(ui); } -static void driver_config_expanded_cb(GObject *object, GParamSpec *param_spec, gpointer user_data) { - CapPrefsUI *ui = user_data; - GtkExpander *expander; - gchar *driver = gtk_combo_box_get_active_text(GTK_COMBO_BOX(ui->driver_choice)); - expander = GTK_EXPANDER(object); - if(gtk_expander_get_expanded(expander)) { - if(strcmp(driver, "mysql") == 0) { - gtk_container_add(GTK_CONTAINER(expander), get_mysql_config()); - } - } else { - gtk_container_remove(GTK_CONTAINER(expander), gtk_bin_get_child(GTK_BIN(expander))); - } -} - -static void connect_toggled_cb(GtkToggleButton *togglebutton, gpointer user_data) { - CapPrefsUI *ui = user_data; - if(gtk_toggle_button_get_active(togglebutton)) { - //connect - if(create_database_connection()) { - gtk_widget_set_sensitive(GTK_WIDGET(ui->driver_choice), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(ui->driver_config), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(ui->dbd_input), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(ui->dbd_button), FALSE); - gaim_prefs_set_bool("/plugins/gtk/cap/connected", TRUE); - } else { - gtk_toggle_button_set_active(togglebutton, FALSE); - } - } else { - //disconnect - destroy_database_connection(); - gtk_widget_set_sensitive(GTK_WIDGET(ui->driver_choice), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(ui->driver_config), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(ui->dbd_input), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(ui->dbd_button), TRUE); - gaim_prefs_set_bool("/plugins/gtk/cap/connected", FALSE); - } -} - static void numeric_spinner_prefs_cb(GtkSpinButton *spinbutton, gpointer user_data) { gaim_prefs_set_int(user_data, gtk_spin_button_get_value_as_int(spinbutton)); } -static void driver_location_verify_cb(GtkButton *button, gpointer user_data) { - CapPrefsUI *ui = user_data; - gchar *path = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(ui->dbd_input)); - - if(_dbi_initialized) - dbi_shutdown(); - - gaim_prefs_set_string("/plugins/gtk/cap/libdbi_drivers", path); - _num_drivers = dbi_initialize(path); - if(_num_drivers == -1) { - _dbi_initialized = FALSE; - } else { - _dbi_initialized = TRUE; - } - if(_num_drivers > 0) { - gtk_widget_set_sensitive(GTK_WIDGET(ui->driver_choice), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(ui->driver_config), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(ui->driver_connect_button), TRUE); - set_driver_choice_options(GTK_COMBO_BOX(ui->driver_choice)); - } else { - gtk_widget_set_sensitive(GTK_WIDGET(ui->driver_choice), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(ui->driver_config), FALSE); - gtk_expander_set_expanded(GTK_EXPANDER(ui->driver_config), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(ui->driver_connect_button), FALSE); - } -} - -static gboolean text_entry_prefs_cb(GtkWidget *widget, GdkEventFocus *event, gpointer user_data) { - gaim_prefs_set_string(user_data, gtk_entry_get_text(GTK_ENTRY(widget))); - return FALSE; -} - -void set_driver_choice_options(GtkComboBox *chooser) { - dbi_driver driver = NULL; - GtkListStore *list_store; - gint index = 0; - gint selected = 0; - - list_store = GTK_LIST_STORE(gtk_combo_box_get_model(chooser)); - gtk_list_store_clear(list_store); - - if(!_dbi_initialized) - return; - - while((driver = dbi_driver_list(driver)) != NULL) { - gtk_combo_box_append_text(chooser, dbi_driver_get_name(driver)); - if(strcmp(dbi_driver_get_name(driver), gaim_prefs_get_string("/plugins/gtk/cap/db_driver")) == 0) { - selected = index; - } - ++index; - } - gtk_combo_box_set_active(chooser, selected); -} - -static GtkWidget * get_mysql_config() { - GtkWidget *config_area = gtk_table_new(5, 2, FALSE); - GtkWidget *username_label = gtk_label_new(_("Username:")); - GtkWidget *username_input = gtk_entry_new(); - GtkWidget *password_label = gtk_label_new(_("Password:")); - GtkWidget *password_input = gtk_entry_new(); - GtkWidget *host_label = gtk_label_new(_("Host:")); - GtkWidget *host_input = gtk_entry_new(); - GtkWidget *db_label = gtk_label_new(_("Database:")); - GtkWidget *db_input = gtk_entry_new(); - GtkWidget *port_label = gtk_label_new(_("Port:")); - GtkWidget *port_input = gtk_spin_button_new_with_range(0, 10000, 1); - - gtk_entry_set_visibility(GTK_ENTRY(password_input), FALSE); - - gtk_misc_set_alignment(GTK_MISC(username_label), 0, 0.5); - gtk_misc_set_padding(GTK_MISC(username_label), 10, 0); - - gtk_misc_set_alignment(GTK_MISC(password_label), 0, 0.5); - gtk_misc_set_padding(GTK_MISC(password_label), 10, 0); - - gtk_misc_set_alignment(GTK_MISC(host_label), 0, 0.5); - gtk_misc_set_padding(GTK_MISC(host_label), 10, 0); - - gtk_misc_set_alignment(GTK_MISC(db_label), 0, 0.5); - gtk_misc_set_padding(GTK_MISC(db_label), 10, 0); - - gtk_misc_set_alignment(GTK_MISC(port_label), 0, 0.5); - gtk_misc_set_padding(GTK_MISC(port_label), 10, 0); - - gtk_table_attach(GTK_TABLE(config_area), host_label, 0, 1, 0, 1, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_table_attach(GTK_TABLE(config_area), host_input, 1, 2, 0, 1, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_table_attach(GTK_TABLE(config_area), port_label, 0, 1, 1, 2, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_table_attach(GTK_TABLE(config_area), port_input, 1, 2, 1, 2, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_table_attach(GTK_TABLE(config_area), db_label, 0, 1, 2, 3, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_table_attach(GTK_TABLE(config_area), db_input, 1, 2, 2, 3, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_table_attach(GTK_TABLE(config_area), username_label, 0, 1, 3, 4, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_table_attach(GTK_TABLE(config_area), username_input, 1, 2, 3, 4, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_table_attach(GTK_TABLE(config_area), password_label, 0, 1, 4, 5, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_table_attach(GTK_TABLE(config_area), password_input, 1, 2, 4, 5, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - //Initialize with data - if(gaim_prefs_exists("/plugins/gtk/cap/mysql/db_host")) { - gtk_entry_set_text(GTK_ENTRY(host_input), gaim_prefs_get_string("/plugins/gtk/cap/mysql/db_host")); - } else { - gtk_entry_set_text(GTK_ENTRY(host_input), "localhost"); - } - if(gaim_prefs_exists("/plugins/gtk/cap/mysql/db_port")) { - gtk_spin_button_set_value(GTK_SPIN_BUTTON(port_input), gaim_prefs_get_int("/plugins/gtk/cap/mysql/db_port")); - } else { - gtk_spin_button_set_value(GTK_SPIN_BUTTON(port_input), 3306); - } - if(gaim_prefs_exists("/plugins/gtk/cap/mysql/db_user")) { - gtk_entry_set_text(GTK_ENTRY(username_input), gaim_prefs_get_string("/plugins/gtk/cap/mysql/db_user")); - } else { - gtk_entry_set_text(GTK_ENTRY(username_input), "root"); - } - if(gaim_prefs_exists("/plugins/gtk/cap/mysql/db_password")) { - gtk_entry_set_text(GTK_ENTRY(password_input), gaim_prefs_get_string("/plugins/gtk/cap/mysql/db_password")); - } else { - gtk_entry_set_text(GTK_ENTRY(password_input), ""); - } - if(gaim_prefs_exists("/plugins/gtk/cap/mysql/db_name")) { - gtk_entry_set_text(GTK_ENTRY(db_input), gaim_prefs_get_string("/plugins/gtk/cap/mysql/db_name")); - } else { - gtk_entry_set_text(GTK_ENTRY(db_input), "cap"); - } - - //Add callbacks - g_signal_connect(G_OBJECT(host_input), "focus-out-event", - G_CALLBACK(text_entry_prefs_cb), "/plugins/gtk/cap/mysql/db_host"); - g_signal_connect(G_OBJECT(port_input), "value-changed", - G_CALLBACK(numeric_spinner_prefs_cb), "/plugins/gtk/cap/mysql/db_port"); - g_signal_connect(G_OBJECT(username_input), "focus-out-event", - G_CALLBACK(text_entry_prefs_cb), "/plugins/gtk/cap/mysql/db_user"); - g_signal_connect(G_OBJECT(password_input), "focus-out-event", - G_CALLBACK(text_entry_prefs_cb), "/plugins/gtk/cap/mysql/db_password"); - g_signal_connect(G_OBJECT(db_input), "focus-out-event", - G_CALLBACK(text_entry_prefs_cb), "/plugins/gtk/cap/mysql/db_name"); - - gtk_widget_show_all(config_area); - - return config_area; -} - static GaimGtkPluginUiInfo ui_info = { get_config_frame, 0 /* page_num (reserved) */ @@ -1228,19 +923,22 @@ NULL }; +static GtkWidget * get_config_frame(GaimPlugin *plugin) { + CapPrefsUI *ui = create_cap_prefs_ui(); + + /* + * Prevent database stuff from occuring since we are editing values + */ + remove_plugin_functionality(_plugin_pointer); + + return ui->ret; +} + static void init_plugin(GaimPlugin *plugin) { gaim_prefs_add_none("/plugins/gtk/cap"); gaim_prefs_add_int("/plugins/gtk/cap/max_seen_difference", 1); gaim_prefs_add_int("/plugins/gtk/cap/max_msg_difference", 10); gaim_prefs_add_int("/plugins/gtk/cap/threshold", 5); - gaim_prefs_add_bool("/plugins/gtk/cap/configured", FALSE); - gaim_prefs_add_string("/plugins/gtk/cap/db_driver", "mysql"); - gaim_prefs_add_none("/plugins/gtk/cap/mysql"); - gaim_prefs_add_string("/plugins/gtk/cap/mysql/db_host", "localhost"); - gaim_prefs_add_int("/plugins/gtk/cap/mysql/db_port", 3306); - gaim_prefs_add_string("/plugins/gtk/cap/mysql/db_user", "root"); - gaim_prefs_add_string("/plugins/gtk/cap/mysql/db_password", ""); - gaim_prefs_add_string("/plugins/gtk/cap/mysql/db_name", "cap"); } GAIM_INIT_PLUGIN(cap, init_plugin, info); Modified: trunk/gtk/plugins/cap/cap.h =================================================================== --- trunk/gtk/plugins/cap/cap.h 2006-09-10 22:33:28 UTC (rev 17230) +++ trunk/gtk/plugins/cap/cap.h 2006-09-11 00:28:35 UTC (rev 17231) @@ -39,100 +39,30 @@ #include "util.h" -#include <dbi/dbi.h> #include <glib.h> #include <time.h> +#include <sqlite3.h> #include "cap_statistics.h" #define CAP_PLUGIN_ID "gtk-g-off_-cap" /* Variables used throughout lifetime of the plugin */ GaimPlugin *_plugin_pointer; -dbi_conn _conn = NULL; /**< The database connection */ -dbi_driver _driver = NULL; /**< The database driver */ +sqlite3 *_db; /**< The database */ + GHashTable *_buddy_stats = NULL; GHashTable *_my_offline_times = NULL; -GString *error_msg = NULL; gboolean _signals_connected; -gboolean _dbi_initialized; -int _num_drivers; +gboolean _sqlite_initialized; -enum driver_types {MYSQL}; - -/* Function definitions */ -static char * quote_string(const char *str); -static gboolean plugin_load(GaimPlugin *plugin); -static void add_plugin_functionality(GaimPlugin *plugin); -static void cancel_conversation_timeouts(gpointer key, gpointer value, gpointer user_data); -static void remove_plugin_functionality(GaimPlugin *plugin); -static gboolean plugin_unload(GaimPlugin *plugin); -static void init_plugin(GaimPlugin *plugin); -static void generate_prediction(CapStatistics *statistics); -static double generate_prediction_for(GaimBuddy *buddy); -static CapStatistics * get_stats_for(GaimBuddy *buddy); -static void destroy_stats(gpointer data); -static gboolean remove_stats_for(GaimBuddy *buddy); -static dbi_result insert_cap_msg_count_success(const char *buddy_name, const char *account, const char *protocol, int minute); -static dbi_result insert_cap_status_count_success(const char *buddy_name, const char *account, const char *protocol, const char *status_id); -static dbi_result insert_cap_msg_count_failed(const char *buddy_name, const char *account, const char *protocol, int minute); -static dbi_result insert_cap_status_count_failed(const char *buddy_name, const char *account, const char *protocol, const char *status_id); -static void insert_cap_success(CapStatistics *stats); -static void insert_cap_failure(CapStatistics *stats); -static gboolean max_message_difference_cb(gpointer data); - -/* Various CAP helper functions */ -static const gchar * get_error_msg(void); -static void set_error_msg(const gchar *msg); -static void reset_all_last_message_times(gpointer key, gpointer value, gpointer user_data); -static GaimStatus * get_status_for(GaimBuddy *buddy); -static void create_tables(void); -static gboolean create_database_connection(void); -static void destroy_database_connection(void); -static guint word_count(const gchar *string); -static gboolean last_message_time_in_range(CapStatistics *statistics, gdouble max_difference); -static gboolean last_seen_time_in_range(CapStatistics *statistics, gdouble max_difference); -static void insert_status_change(CapStatistics *statistics); -static void insert_status_change_from_gaim_status(CapStatistics *statistics, GaimStatus *status); -static void insert_word_count(const char *sender, const char *receiver, guint count); - -/* Gaim Signal Handlers */ -static void sent_im_msg(GaimAccount *account, const char *receiver, const char *message); -static void received_im_msg(GaimAccount *account, char *sender, char *message, - GaimConversation *conv, GaimMessageFlags flags); -static void buddy_status_changed(GaimBuddy *buddy, GaimStatus *old_status, GaimStatus *status); -static void buddy_signed_on(GaimBuddy *buddy); -static void buddy_signed_off(GaimBuddy *buddy); -static void buddy_idle(GaimBuddy *buddy, gboolean old_idle, gboolean idle); -static void blist_node_extended_menu(GaimBlistNode *node, GList **menu); -static void drawing_tooltip(GaimBlistNode *node, GString *text, gboolean full); -static void signed_on(GaimConnection *gc); -static void signed_off(GaimConnection *gc); - -/* Call backs */ -void display_statistics_action_cb(GaimBlistNode *node, gpointer data); - /* Prefs UI */ typedef struct _CapPrefsUI CapPrefsUI; -struct _CapPrefsUI { +struct _CapPrefsUI { GtkWidget *ret; - GtkWidget *db_vbox; GtkWidget *cap_vbox; GtkWidget *table_layout; - GtkWidget *driver_vbox; - GtkWidget *driver_select_hbox; - GtkWidget *driver_choice; - GtkWidget *driver_label; - GtkWidget *driver_config_hbox; - GtkWidget *driver_config; - GtkWidget *driver_connect_button; - - GtkWidget *dbd_label; - GtkWidget *dbd_input; - GtkWidget *dbd_hbox; - GtkWidget *dbd_button; - GtkWidget *threshold_label; GtkWidget *threshold_input; GtkWidget *threshold_minutes_label; @@ -146,18 +76,56 @@ GtkWidget *last_seen_minutes_label; }; -static GtkWidget * get_config_frame(GaimPlugin *plugin); +static void generate_prediction(CapStatistics *statistics); +static double generate_prediction_for(GaimBuddy *buddy); +static CapStatistics * get_stats_for(GaimBuddy *buddy); +static void destroy_stats(gpointer data); +static void insert_cap_msg_count_success(const char *buddy_name, const char *account, const char *protocol, int minute); +static void insert_cap_status_count_success(const char *buddy_name, const char *account, const char *protocol, const char *status_id); +static void insert_cap_msg_count_failed(const char *buddy_name, const char *account, const char *protocol, int minute); +static void insert_cap_status_count_failed(const char *buddy_name, const char *account, const char *protocol, const char *status_id); +static void insert_cap_success(CapStatistics *stats); +static void insert_cap_failure(CapStatistics *stats); +static gboolean max_message_difference_cb(gpointer data); +/* Gaim Signal Handlers */ +//sent-im-msg +static void sent_im_msg(GaimAccount *account, const char *receiver, const char *message); +//received-im-msg +static void received_im_msg(GaimAccount *account, char *sender, char *message, GaimConversation *conv, GaimMessageFlags flags); +//buddy-status-changed +static void buddy_status_changed(GaimBuddy *buddy, GaimStatus *old_status, GaimStatus *status); +//buddy-signed-on +static void buddy_signed_on(GaimBuddy *buddy); +//buddy-signed-off +static void buddy_signed_off(GaimBuddy *buddy); +static void buddy_idle(GaimBuddy *buddy, gboolean old_idle, gboolean idle); +static void blist_node_extended_menu(GaimBlistNode *node, GList **menu); +//drawing-tooltip +static void drawing_tooltip(GaimBlistNode *node, GString *text, gboolean full); +//signed-on +static void signed_on(GaimConnection *gc); +//signed-off +static void signed_off(GaimConnection *gc); +static void reset_all_last_message_times(gpointer key, gpointer value, gpointer user_data); +static GaimStatus * get_status_for(GaimBuddy *buddy); +static void create_tables(); +static gboolean create_database_connection(); +static void destroy_database_connection(); +static guint word_count(const gchar *string); +static void insert_status_change(CapStatistics *statistics); +static void insert_status_change_from_gaim_status(CapStatistics *statistics, GaimStatus *status); +static void insert_word_count(const char *sender, const char *receiver, guint count); +void display_statistics_action_cb(GaimBlistNode *node, gpointer data); +static gboolean plugin_load(GaimPlugin *plugin); +static void add_plugin_functionality(GaimPlugin *plugin); +static void cancel_conversation_timeouts(gpointer key, gpointer value, gpointer user_data); +static void remove_plugin_functionality(GaimPlugin *plugin); +static void write_stats_on_unload(gpointer key, gpointer value, gpointer user_data); +static gboolean plugin_unload(GaimPlugin *plugin); +static CapPrefsUI * create_cap_prefs_ui(); static void cap_prefs_ui_destroy_cb(GtkObject *object, gpointer user_data); -static CapPrefsUI * create_cap_prefs_ui(void); - -static void driver_choice_changed_cb(GtkComboBox *widget, gpointer user_data); -static void driver_config_expanded_cb(GObject *object, GParamSpec *param_spec, gpointer user_data); -static void connect_toggled_cb(GtkToggleButton *togglebutton, gpointer user_data); static void numeric_spinner_prefs_cb(GtkSpinButton *spinbutton, gpointer user_data); -static void driver_location_verify_cb(GtkButton *button, gpointer user_data); -static gboolean text_entry_prefs_cb(GtkWidget *widget, GdkEventFocus *event, gpointer user_data); +static GtkWidget * get_config_frame(GaimPlugin *plugin); +static void init_plugin(GaimPlugin *plugin); -static void set_driver_choice_options(GtkComboBox *chooser); -static GtkWidget * get_mysql_config(void); - #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-10 22:33:31
|
Revision: 17230 http://svn.sourceforge.net/gaim/?rev=17230&view=rev Author: thekingant Date: 2006-09-10 15:33:28 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Evan, see if this fixes the MSN get info crashes for you. Basically canceled DNS requests weren't being removed from the queue, then Gaim would pop them off the queue, but since the request had been canceled the memory was free'd and is now invalid. Modified Paths: -------------- trunk/libgaim/dnsquery.c Modified: trunk/libgaim/dnsquery.c =================================================================== --- trunk/libgaim/dnsquery.c 2006-09-10 21:21:21 UTC (rev 17229) +++ trunk/libgaim/dnsquery.c 2006-09-10 22:33:28 UTC (rev 17230) @@ -851,6 +851,8 @@ gaim_dnsquery_destroy(GaimDnsQueryData *query_data) { #if defined(__unix__) || defined(__APPLE__) + g_queue_remove(queued_requests, query_data); + if (query_data->resolver != NULL) /* * Ideally we would tell our resolver child to stop resolving This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-10 21:21:24
|
Revision: 17229 http://svn.sourceforge.net/gaim/?rev=17229&view=rev Author: thekingant Date: 2006-09-10 14:21:21 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Include the qq faces in the tar.gz Modified Paths: -------------- trunk/gtk/pixmaps/status/default/Makefile.am Modified: trunk/gtk/pixmaps/status/default/Makefile.am =================================================================== --- trunk/gtk/pixmaps/status/default/Makefile.am 2006-09-10 21:16:20 UTC (rev 17228) +++ trunk/gtk/pixmaps/status/default/Makefile.am 2006-09-10 21:21:21 UTC (rev 17229) @@ -33,16 +33,6 @@ op.png \ pending.png \ qq.png \ - secure.png \ - silc.png \ - simple.png \ - unavailable.png \ - voice.png \ - wireless.png \ - yahoo.png \ - zephyr.png - -QQ_FACES = \ qq_1.png \ qq_2.png \ qq_3.png \ @@ -143,7 +133,15 @@ qq_98.png \ qq_99.png \ qq_100.png + secure.png \ + silc.png \ + simple.png \ + unavailable.png \ + voice.png \ + wireless.png \ + yahoo.png \ + zephyr.png gaimstatuspixdir = $(datadir)/pixmaps/gaim/status/default -gaimstatuspix_DATA = $(EXTRA_DIST) $(QQ_FACES) +gaimstatuspix_DATA = $(EXTRA_DIST) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2006-09-10 21:16:24
|
Revision: 17228 http://svn.sourceforge.net/gaim/?rev=17228&view=rev Author: evands Date: 2006-09-10 14:16:20 -0700 (Sun, 10 Sep 2006) Log Message: ----------- MSN Get Info always crashes for me in dnsquery.c on the second time it's done. The crash location likes to move around, so it's probably a memory stomper, but we're not sure yet. In any case, MSN was since [17060] not displaying User Info in most (all?) situations because it was treating the connection as invalid if error_message == NULL, when that should be (error_message != NULL). This doesn't change the crash, but the first attempt does display info now. Modified Paths: -------------- trunk/libgaim/protocols/msn/msn.c Modified: trunk/libgaim/protocols/msn/msn.c =================================================================== --- trunk/libgaim/protocols/msn/msn.c 2006-09-10 20:46:47 UTC (rev 17227) +++ trunk/libgaim/protocols/msn/msn.c 2006-09-10 21:16:20 UTC (rev 17228) @@ -1856,8 +1856,8 @@ char *tooltip_text = info2_data->tooltip_text; /* Make sure the connection is still valid if we got here by fetching a photo url */ - if (error_message == NULL || url_text != NULL || - g_list_find(gaim_connections_get_all(), info_data->gc) == NULL) + if (url_text && (error_message != NULL || + g_list_find(gaim_connections_get_all(), info_data->gc) == NULL)) { gaim_debug_warning("msn", "invalid connection. ignoring buddy photo info.\n"); g_free(stripped); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-10 20:46:54
|
Revision: 17227 http://svn.sourceforge.net/gaim/?rev=17227&view=rev Author: thekingant Date: 2006-09-10 13:46:47 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Include gaim.h and gntgaim.h in the tar.gz file Modified Paths: -------------- trunk/console/Makefile.am trunk/libgaim/Makefile.am Modified: trunk/console/Makefile.am =================================================================== --- trunk/console/Makefile.am 2006-09-10 20:14:43 UTC (rev 17226) +++ trunk/console/Makefile.am 2006-09-10 20:46:47 UTC (rev 17227) @@ -24,6 +24,7 @@ gntconn.h \ gntconv.h \ gntdebug.h \ + gntgaim.h \ gntnotify.h \ gntplugin.h \ gntprefs.h \ Modified: trunk/libgaim/Makefile.am =================================================================== --- trunk/libgaim/Makefile.am 2006-09-10 20:14:43 UTC (rev 17226) +++ trunk/libgaim/Makefile.am 2006-09-10 20:46:47 UTC (rev 17227) @@ -83,6 +83,7 @@ desktopitem.h \ eventloop.h \ ft.h \ + gaim.h \ idle.h \ imgstore.h \ log.h \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-10 20:14:47
|
Revision: 17226 http://svn.sourceforge.net/gaim/?rev=17226&view=rev Author: thekingant Date: 2006-09-10 13:14:43 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Fix two Makefiles to include the correct files in EXTRA_DIST Modified Paths: -------------- trunk/Makefile.am trunk/doc/Makefile.am Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2006-09-10 20:12:24 UTC (rev 17225) +++ trunk/Makefile.am 2006-09-10 20:14:43 UTC (rev 17226) @@ -1,22 +1,26 @@ EXTRA_DIST = \ COPYRIGHT \ + ChangeLog.API \ + ChangeLog.win32 \ Doxyfile.in \ + HACKING \ + Makefile.mingw \ + PLUGIN_HOWTO \ + PROGRAMMING_NOTES \ + README.SVN \ + README.dbus \ + README.mingw \ + VERSION.in \ gaim.pc.in \ gaim.spec.in \ gaim.apspec.in \ gaim.desktop.in \ gaim.service.in \ gaim-installer.nsi \ - HACKING \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ - PROGRAMMING_NOTES \ - ChangeLog.win32 \ config.h.mingw \ - Makefile.mingw \ - README.mingw \ - VERSION.in \ gtk/plugins/win32/transparency/Makefile.mingw \ gtk/plugins/win32/transparency/win2ktrans.c \ gtk/plugins/win32/winprefs/gtkappbar.c \ Modified: trunk/doc/Makefile.am =================================================================== --- trunk/doc/Makefile.am 2006-09-10 20:12:24 UTC (rev 17225) +++ trunk/doc/Makefile.am 2006-09-10 20:14:43 UTC (rev 17226) @@ -2,7 +2,6 @@ EXTRA_DIST = \ C-HOWTO.dox \ - CREDITS \ FAQ \ PERL-HOWTO.dox \ TCL-HOWTO.dox \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-10 20:12:33
|
Revision: 17225 http://svn.sourceforge.net/gaim/?rev=17225&view=rev Author: thekingant Date: 2006-09-10 13:12:24 -0700 (Sun, 10 Sep 2006) Log Message: ----------- This is a better name Added Paths: ----------- trunk/PLUGIN_HOWTO Removed Paths: ------------- trunk/PLUGINS_HOWTO Deleted: trunk/PLUGINS_HOWTO =================================================================== --- trunk/PLUGINS_HOWTO 2006-09-10 20:08:19 UTC (rev 17224) +++ trunk/PLUGINS_HOWTO 2006-09-10 20:12:24 UTC (rev 17225) @@ -1,20 +0,0 @@ -For information on writing a plugin for Gaim, go -http://gaim.sourceforge.net/api/ and see the HOWTOs in the -"Related Pages" section. - -You can also generate this documentation locally by installing -doxygen and graphviz dot, then running "make docs" in the Gaim -source tree. The documentation will be in the docs/html directory. - -This next paragraph is old and possibly out of date: -Compilation of the plugins is fairly straight-forward; there is a -Makefile in this directory that has a rule for making the .so file -from a .c file. No modification of the Makefile should be necessary, -unless if you simply want to type 'make' to have it made; otherwise, -'make filename.so' will take filename.c and make the .so plugin from -it. If you need to link in with extra libraries, you can set the -environment variable PLUGIN_LIBS to be the libraries you want to link -with. - -It should be possible to compile plugins outside of the Gaim source -tree, which is a much cleaner solution. Copied: trunk/PLUGIN_HOWTO (from rev 17224, trunk/PLUGINS_HOWTO) =================================================================== --- trunk/PLUGIN_HOWTO (rev 0) +++ trunk/PLUGIN_HOWTO 2006-09-10 20:12:24 UTC (rev 17225) @@ -0,0 +1,20 @@ +For information on writing a plugin for Gaim, go +http://gaim.sourceforge.net/api/ and see the HOWTOs in the +"Related Pages" section. + +You can also generate this documentation locally by installing +doxygen and graphviz dot, then running "make docs" in the Gaim +source tree. The documentation will be in the docs/html directory. + +This next paragraph is old and possibly out of date: +Compilation of the plugins is fairly straight-forward; there is a +Makefile in this directory that has a rule for making the .so file +from a .c file. No modification of the Makefile should be necessary, +unless if you simply want to type 'make' to have it made; otherwise, +'make filename.so' will take filename.c and make the .so plugin from +it. If you need to link in with extra libraries, you can set the +environment variable PLUGIN_LIBS to be the libraries you want to link +with. + +It should be possible to compile plugins outside of the Gaim source +tree, which is a much cleaner solution. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-10 20:08:21
|
Revision: 17224 http://svn.sourceforge.net/gaim/?rev=17224&view=rev Author: thekingant Date: 2006-09-10 13:08:19 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Remove the svn:executable property from these files Property Changed: ---------------- trunk/doc/oscar/On_Sending_Files_via_OSCAR.odt trunk/doc/oscar/On_Sending_Files_via_OSCAR.pdf trunk/doc/oscar/Receive_Codepaths.odg trunk/doc/oscar/Send_Codepaths.odg Property changes on: trunk/doc/oscar/On_Sending_Files_via_OSCAR.odt ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/doc/oscar/On_Sending_Files_via_OSCAR.pdf ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/doc/oscar/Receive_Codepaths.odg ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/doc/oscar/Send_Codepaths.odg ___________________________________________________________________ Name: svn:executable - * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-09-10 20:06:06
|
Revision: 17223 http://svn.sourceforge.net/gaim/?rev=17223&view=rev Author: thekingant Date: 2006-09-10 13:05:53 -0700 (Sun, 10 Sep 2006) Log Message: ----------- Move doc/HOWTO to PLUGINS_HOWTO. Someone should add a section to the bottom of our C Plugin HOWTO that describes how to compile a C plugin outside of the Gaim source tree, and give a really small example Makefile Added Paths: ----------- trunk/PLUGINS_HOWTO Removed Paths: ------------- trunk/doc/HOWTO Copied: trunk/PLUGINS_HOWTO (from rev 17218, trunk/doc/HOWTO) =================================================================== --- trunk/PLUGINS_HOWTO (rev 0) +++ trunk/PLUGINS_HOWTO 2006-09-10 20:05:53 UTC (rev 17223) @@ -0,0 +1,20 @@ +For information on writing a plugin for Gaim, go +http://gaim.sourceforge.net/api/ and see the HOWTOs in the +"Related Pages" section. + +You can also generate this documentation locally by installing +doxygen and graphviz dot, then running "make docs" in the Gaim +source tree. The documentation will be in the docs/html directory. + +This next paragraph is old and possibly out of date: +Compilation of the plugins is fairly straight-forward; there is a +Makefile in this directory that has a rule for making the .so file +from a .c file. No modification of the Makefile should be necessary, +unless if you simply want to type 'make' to have it made; otherwise, +'make filename.so' will take filename.c and make the .so plugin from +it. If you need to link in with extra libraries, you can set the +environment variable PLUGIN_LIBS to be the libraries you want to link +with. + +It should be possible to compile plugins outside of the Gaim source +tree, which is a much cleaner solution. Deleted: trunk/doc/HOWTO =================================================================== --- trunk/doc/HOWTO 2006-09-10 20:04:20 UTC (rev 17222) +++ trunk/doc/HOWTO 2006-09-10 20:05:53 UTC (rev 17223) @@ -1,83 +0,0 @@ -Everything in this file should be considered old and potentially out of -date. For more reliable information, install doxygen and graphiz dot, -then run -make docs -in the gaim source tree. This will produce html docs in gaim/docs/html -that will provide an api reference and in the related pages section, -information on perl and c plugins. - - -Ok, this howto is going to be really short and sweet and to the point. - -First off, before you do anything else, in all of the files for your plugin, -put the lines - -#define GAIM_PLUGINS -#include "gaim.h" - -I mean this. Without this, all kinds of things will not work correctly. If you -really want to know exactly what this does, read ../src/gaim.h and learn. But -if you don't want to do that, just know that it's important. - -Now that you've put that there, make sure gaim.h is in your include path. - -Ok, now you're ready to write the plugin. - -The only function that is required is gaim_plugin_init(GModule *). This gets -called as soon as it gets loaded (sort of - man dlopen for more details). If -your function never returns, it will crash gaim! If your plugin uses up all -the memory in the system, it will crash gaim! Once your plugin gets loaded, -it effectively becomes a part of gaim, and anything that goes wrong will look -like it is a problem with gaim itself. I write bugfree code! :) Therefore, it -is your problem, not mine. (I'm usually nice and willing to help you with your -problems though.) - -The GModule* that gets passed to gaim_plugin_init is the handle for the plugin. -DO NOT CHANGE THIS POINTER! Bad things will happen. You've been warned. It's -needed for connecting to signals and things. It's a good idea to remember it -somehow. - -gaim_plugin_init should return a char*. If the char* returned is not NULL, it -is interpreted as an error, and used as an error message. See the ChangeLog -file in this directory for more details. - -You can basically do anything you want in the plugin. You can make function -calls, change public widgets, display new widgets, things like that. But the -really neat thing is you can do things at events. For example, when one of -your buddies signs on, you can instantly send them a message. You can modify -the incoming and outgoing text. You can do all kinds of crazy things. Whatever -you want. Check out SIGNALS for more information. - -Plugins can share globals with gaim, but will not share with other plugins. -This is so if you have a global variable GtkWidget *window in your plugin and -J. Random Hacker also has the same name on a global variable, you won't be -constantly overwriting each others' variables. Unfortunately, this also means -that plugins will have difficulty working together. But then again, that's -what shared memory is for. - -Plugins can be configured. This makes it so they don't have to be recompiled -in order to change things internal to them, and it's also just a cool feature -to have :). It's optional; to allow your plugin to be configured, add a -function called gaim_plugin_config(). The advised course of action is to have -it pop up a dialog window; but it's your plugin. - -When your plugin gets unloaded, gaim will try to call gaim_plugin_remove(). It -doesn't have to be there, but it's nice if, say, you create a window, and when -the plugin gets unloaded, it removes the window. Also, all the callbacks you -have attached to gaim signals will be removed. - -Plugins can also unload themselves. To do this, call gaim_plugin_unload(GModule *) -(the GModule* is the handle passed to gaim_plugin_init). When your plugin gets -unloaded, gaim will remove all of your callbacks. It will not call your -gaim_plugin_remove function, however, since it will assume you have already -done the necessary cleanup. - -Compilation of the plugins is fairly straight-forward; there is a Makefile in -this directory that has a rule for making the .so file from a .c file. No -modification of the Makefile should be necessary, unless if you simply want -to type 'make' to have it made; otherwise, 'make filename.so' will take -filename.c and make the .so plugin from it. If you need to link in with extra -libraries, you can set the environment variable PLUGIN_LIBS to be the libraries -you want to link with. - -There are a few examples in this directory. Enjoy. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |