diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-11-02 16:25:03 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-11-02 16:25:03 +0800 |
commit | 9c73777f2268b5bf2622f893e2a3ba7d0f720572 (patch) | |
tree | f81b79f19b87f84b4429d329b3fc0f9ff7946060 | |
parent | 236c15d106b4e740d4e3996e0649334ca8e13876 (diff) | |
download | gsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.tar.gz gsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.tar.zst gsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.zip |
First big sync of my GNOME 2 porting work (incomplete, and still
pretty broken).
Weeeeee!
svn path=/trunk/; revision=18503
103 files changed, 1301 insertions, 1380 deletions
@@ -1,3 +1,15 @@ +2002-11-01 Ettore Perazzoli <ettore@ximian.com> + + * configure.in: Update to use Autoconf 2.53. Remove checks for + scrollkeeper. Remove intl/Makefile and macros/Makefile from + AC_OUTPUT list. Set up GETTEXT_PACKAGE. Removed + AM_ACLOCAL_INCLUDE(macros). Added AM_PATH_ORBIT2. + (EVO_SET_COMPILE_FLAGS): Use PKG_CHECK_MODULES. + (IDL_INCLUDES): New, -I params to pass to $(ORBIT_IDL) when + compiling IDL files into stubs. + + * autogen.sh: Changed to use gnome-autogen.sh. + 2002-10-30 Ettore Perazzoli <ettore@ximian.com> * configure.in: 1.1.90.99. diff --git a/Makefile.am b/Makefile.am index c66a8aaff6..608f766574 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,34 +23,17 @@ EXTRA_DIST = \ $(confexec_DATA:.sh=.sh.in) SUBDIRS = \ - intl \ - macros \ data \ - po \ e-util \ libical \ widgets \ - shell \ - camel \ - filter \ - libversit \ - libwombat \ - addressbook \ - composer \ - mail \ - calendar \ - wombat \ - importers \ - my-evolution \ art \ - sounds \ ui \ default_user \ views \ - tools \ - doc \ - help \ - omf-install + tools + +# omf-install %Conf.sh: %Conf.sh.in Makefile sed -e 's?\@EVOLUTION_LIBDIR\@?$(EVOLUTION_LIBDIR)?g' \ diff --git a/acconfig.h b/acconfig.h index 0d2011510f..7ce1a5993f 100644 --- a/acconfig.h +++ b/acconfig.h @@ -26,6 +26,7 @@ #undef HAVE_BROKEN_SPOOL #undef ENABLE_PEDANTIC_PGPMIME #undef HAVE_KDE_APPLNK +#undef GETTEXT_PACKAGE /* db3 version */ #undef EVOLUTION_DB_VERSION_MAJOR diff --git a/acinclude.m4 b/acinclude.m4 index be1d20c998..b6bd8e473a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -167,4 +167,20 @@ AC_DEFUN(EVO_LDAP_CHECK, [ AC_SUBST(LDAP_LIBS) fi AM_CONDITIONAL(ENABLE_LDAP, test $with_openldap != no) -])
\ No newline at end of file +]) + +# EVO_PTHREAD_CHECK +AC_DEFUN([EVO_PTHREAD_CHECK],[ + PTHREAD_LIB="" + AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread", + [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads", + [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r", + [AC_CHECK_LIB(pthread, __pthread_attr_init_system, PTHREAD_LIB="-lpthread", + [AC_CHECK_FUNC(pthread_create)] + )] + )] + )] + ) + AC_SUBST(PTHREAD_LIB) + AC_PROVIDE([EVO_PTHREAD_CHECK]) +]) diff --git a/autogen.sh b/autogen.sh index eec4b5f56d..8d96b80beb 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,10 +1,24 @@ #!/bin/sh # Run this to generate all the initial makefiles, etc. +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + srcdir=`dirname $0` test -z "$srcdir" && srcdir=. -PKG_NAME="evolution" +PKG_NAME="Evolution" +(test -f $srcdir/configure.in \ + && test -f $srcdir/ChangeLog \ + && test -d $srcdir/shell) || { + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" + echo " top-level $PKG_NAME directory" + exit 1 +} -. $srcdir/macros/autogen.sh +which gnome-autogen.sh || { + echo "You need to install gnome-common from the GNOME CVS" + exit 1 +} +USE_GNOME2_MACROS=1 . gnome-autogen.sh diff --git a/configure.in b/configure.in index c54c12f031..4d9c87070e 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,9 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(camel) + +AC_INIT(Evolution, 1.3.0.99, http://bugzilla.ximian.com/enter_bug.cgi?product=Evolution) +AC_CONFIG_SRCDIR(README) +AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) + AM_CONFIG_HEADER(config.h) if test -f libversit/CVS/Repository; then @@ -17,41 +21,9 @@ if test -f libversit/CVS/Repository; then esac fi -EVOLUTION_MAJOR_VERSION=1 -EVOLUTION_MINOR_VERSION=1 -EVOLUTION_MICRO_VERSION=90 -EVOLUTION_NANO_VERSION=99 -VERSION=$EVOLUTION_MAJOR_VERSION.$EVOLUTION_MINOR_VERSION.$EVOLUTION_MICRO_VERSION.$EVOLUTION_NANO_VERSION -PACKAGE=evolution - -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) -AC_SUBST(VERSION) - AC_CANONICAL_HOST - AC_DEFINE_UNQUOTED(VERSION_COMMENT, "(Preview Release)") -SCROLLKEEPER_REQUIRED=0.1.4 -AC_SUBST(SCROLLKEEPER_REQUIRED) - -dnl Check for scrollkeeper -AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no) -if test x$SCROLLKEEPER_CONFIG = xno; then - AC_MSG_ERROR(Couldn't find scrollkeeper-config -- please install the scrollkeeper package) -fi -SCROLLKEEPER_LOCALSTATE_DIR=`scrollkeeper-config --pkglocalstatedir` -AC_SUBST(SCROLLKEEPER_LOCALSTATE_DIR) - -dnl Test whether jw is installed -AC_PATH_PROG(JW,jw,no) -if test x$JW = xno; then - HAVE_JW="no" -else - HAVE_JW="yes" -fi -AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes") -AC_SUBST(HAVE_JW) - dnl Initialize maintainer mode AM_MAINTAINER_MODE @@ -71,17 +43,23 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET +dnl Test whether jw is installed +AC_PATH_PROG(JW,jw,no) +if test x$JW = xno; then + HAVE_JW="no" +else + HAVE_JW="yes" +fi +AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes") +AC_SUBST(HAVE_JW) + dnl Initialize xml-i18n-tools AM_PROG_XML_I18N_TOOLS dnl Initialize libtool AM_PROG_LIBTOOL -AM_ACLOCAL_INCLUDE(macros) -GNOME_INIT() -GNOME_COMPILE_WARNINGS -GNOME_X_CHECKS -EVO_CHECK_LIB(gnome-libs, gnome, 1.2.9) +dnl alloca() AC_CHECK_HEADERS(alloca.h) dnl check for socklen_t (in Unix98) @@ -97,8 +75,16 @@ AC_DEFINE(socklen_t,size_t)], [ AC_MSG_RESULT(int) AC_DEFINE(socklen_t,int)])]) +dnl +dnl Gettext +dnl + ALL_LINGUAS="az bg ca cs da de el en_AU en_GB es et eu fi fr ga gl hu it ja ko lt lv nl nn no pl pt pt_BR ro ru sk sl sv tr uk vi zh_CN zh_TW" -AM_GNOME_GETTEXT + +GETTEXT_PACKAGE=evolution-1.4 +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE") + localedir='$(prefix)/$(DATADIRNAME)/locale' AC_SUBST(localedir) @@ -471,33 +457,33 @@ else fi AM_CONDITIONAL(ENABLE_NNTP, test x$enable_nntp = xyes) + dnl ************************************************** dnl * Posix thread support dnl ************************************************** -dnl Hah! Threads are no longer an option -dnl AC_ARG_WITH(threads, [ --with-threads Include thread support],[ -dnl FIXME: support more thread types, pth at least - -GLIB_CONFIG=${GLIB_CONFIG-glib-config} -GNOME_PTHREAD_CHECK +dnl GLIB_CONFIG=${GLIB_CONFIG-glib-config} +dnl GNOME_PTHREAD_CHECK -if test "x$PTHREAD_LIB" = "x" ; then - AC_MSG_ERROR([POSIX threads are currently required for Evolution]) -fi +dnl if test "x$PTHREAD_LIB" = "x" ; then +dnl AC_MSG_ERROR([POSIX threads are currently required for Evolution]) +dnl fi dnl dnl Notice that this is a hack, and we wont be able to use this forever, but dnl at least for some time dnl -THREADS_LIBS="$PTHREAD_LIB `$GLIB_CONFIG --libs gthread`" -THREADS_CFLAGS="`$GLIB_CONFIG --cflags gthread`" +EVO_PTHREAD_CHECK + +THREADS_LIBS="$PTHREAD_LIB" +THREADS_CFLAGS="$PTHREAD_CFLAGS" AC_SUBST(THREADS_LIBS) AC_SUBST(THREADS_CFLAGS) AC_DEFINE(ENABLE_THREADS) + dnl ************************************************** dnl * File locking dnl ************************************************** @@ -525,6 +511,7 @@ else fi fi + dnl ************************************************** dnl * sendmail operation dnl ************************************************** @@ -543,6 +530,7 @@ fi AC_MSG_RESULT($with_broken_spool) + dnl *************************************************************** dnl Whether to build shlib components (instead of out-of-proc ones) dnl *************************************************************** @@ -567,29 +555,24 @@ AC_SUBST(OAF_SHLIB_TYPE) AC_SUBST(OAF_SHLIB_PREFIX) AC_SUBST(OAF_SHLIB_SUFFIX) -dnl *************** -dnl GNOME Libraries -dnl *************** -EVO_CHECK_LIB(Bonobo, bonobox, 1.0.3) -EVO_CHECK_LIB(OAF, oaf, 0.6.10) -EVO_CHECK_LIB(libglade, libglade, 0.14) -EVO_CHECK_LIB(gdk-pixbuf with GNOME canvas support, gnomecanvaspixbuf, 0.18.0) -EVO_CHECK_LIB(GNOME-VFS, vfs, 1.0.5) -EVO_CHECK_LIB(libxml, xml, 1.8.17, 2.0) -EVO_CHECK_LIB(bonobo-conf, bonobo_conf, 0.11) - -EVO_CHECK_LIB(GAL, gal, 0.21) -PKG_CHECK_MODULES(GTKHTML, gtkhtml-1.1 >= 1.1.4) -AC_SUBST(GTKHTML_CFLAGS) -AC_SUBST(GTKHTML_LIBS) -GTKHTML_DATADIR=`$PKG_CONFIG --variable gtkhtml_datadir gtkhtml-1.1` -AC_SUBST(GTKHTML_DATADIR) -EVO_CHECK_LIB(Libsoup, soup, 0.7) - -AM_PATH_GCONF(1.0,,,gconf gconf-gtk) -if test "x$GCONF_CFLAGS" = "x" ; then - AC_MSG_ERROR(Evolution requires GConf to be installed) -fi + +dnl ********* +dnl Libraries +dnl ********* + +dnl EVO_CHECK_LIB(GAL, gal, 0.21) +dnl PKG_CHECK_MODULES(GTKHTML, gtkhtml-1.1 >= 1.1.4) +dnl AC_SUBST(GTKHTML_CFLAGS) +dnl AC_SUBST(GTKHTML_LIBS) +dnl GTKHTML_DATADIR=`$PKG_CONFIG --variable gtkhtml_datadir gtkhtml-1.1` +dnl AC_SUBST(GTKHTML_DATADIR) + +dnl EVO_CHECK_LIB(Libsoup, soup, 0.7) + +dnl AM_PATH_GCONF(1.0,,,gconf gconf-gtk) +dnl if test "x$GCONF_CFLAGS" = "x" ; then +dnl AC_MSG_ERROR(Evolution requires GConf to be installed) +dnl fi dnl ****************************** dnl Pilot checking @@ -950,6 +933,8 @@ AM_CONDITIONAL(HAVE_DTAPPINTEGRATE, test "x$DTAPPINTEGRATE" != "xno") dnl **************************************************** dnl GNOME_PREFIX is is needed by shell/evolution-nognome dnl **************************************************** +dnl +dnl FIXME this doesn't work with GNOME 2. GNOME_PREFIX="`gnome-config --prefix`" AC_SUBST(GNOME_PREFIX) @@ -1027,93 +1012,104 @@ dnl ************************* dnl CFLAGS and LIBS and stuff dnl ************************* +AM_PATH_ORBIT2 + +AC_MSG_CHECKING(for CORBA include paths) +IDL_INCLUDES="-I "`pkg-config --variable=idldir libbonobo-2.0`" -I "`pkg-config --variable=idldir bonobo-activation-2.0` +AC_MSG_RESULT($IDL_INCLUDES) +AC_SUBST(IDL_INCLUDES) + +AM_PATH_GLIB_2_0 + dnl Utility macro to set compiler flags for a specific lib. AC_DEFUN(EVO_SET_COMPILE_FLAGS, [ deps="$2" extra_cflags="$3" extra_libs="$4" - $1_CFLAGS="\$(WERROR) `gnome-config --cflags $deps` $extra_cflags" - $1_LIBS="`gnome-config --libs $deps` $extra_libs" + PKG_CHECK_MODULES(foo, $deps) + $1_CFLAGS="$foo_CFLAGS \$(WERROR) $extra_cflags" + $1_LIBS="$foo_LIBS $extra_libs" ]) dnl --- Flags to get all the GNOME stuff -FULL_GNOME_DEPS="bonobo_conf bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs" +FULL_GNOME_DEPS="libbonoboui-2.0 gnome-vfs-2.0 libgnomeui-2.0 libglade-2.0 libgnomecanvas-2.0 libxml-2.0 gconf-2.0 gal-2.0" -EVO_SET_COMPILE_FLAGS(GNOME_FULL, $FULL_GNOME_DEPS, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS}) +EVO_SET_COMPILE_FLAGS(GNOME_FULL, $FULL_GNOME_DEPS) AC_SUBST(GNOME_FULL_CFLAGS) AC_SUBST(GNOME_FULL_LIBS) dnl --- Flags for the various libraries we build -EVO_SET_COMPILE_FLAGS(CAMEL, gal xml, - $THREADS_CFLAGS $KRB4_CFLAGS $NSS_CFLAGS $NSPR_CFLAGS $OPENSSL_CFLAGS, - $THREADS_LIBS $KRB4_LDFLAGS $NSS_LDFLAGS $NSPR_LDFLAGS $OPENSSL_LDFLAGS) -AC_SUBST(CAMEL_CFLAGS) -AC_SUBST(CAMEL_LIBS) +dnl EVO_SET_COMPILE_FLAGS(CAMEL, gal xml, +dnl $THREADS_CFLAGS $KRB4_CFLAGS $NSS_CFLAGS $NSPR_CFLAGS $OPENSSL_CFLAGS, +dnl $THREADS_LIBS $KRB4_LDFLAGS $NSS_LDFLAGS $NSPR_LDFLAGS $OPENSSL_LDFLAGS) +dnl AC_SUBST(CAMEL_CFLAGS) +dnl AC_SUBST(CAMEL_LIBS) -EVO_SET_COMPILE_FLAGS(E_NAME, bonobox gal oaf) +EVO_SET_COMPILE_FLAGS(E_NAME, libgnomeui-2.0 libbonoboui-2.0 gal-2.0) AC_SUBST(E_NAME_CFLAGS) AC_SUBST(E_NAME_LIBS) -EVO_SET_COMPILE_FLAGS(E_UTIL, bonobox gal oaf libglade bonobo_conf soup, $GCONF_CFLAGS $THREADS_CFLAGS, $GCONF_LIBS $THREADS_LIBS) +EVO_SET_COMPILE_FLAGS(E_UTIL, gconf-2.0 libbonoboui-2.0 libglade-2.0 gal-2.0 libgnomeui-2.0 libgnome-2.0 libgnomecanvas-2.0, $THREADS_CFLAGS, $THREADS_LIBS) AC_SUBST(E_UTIL_CFLAGS) AC_SUBST(E_UTIL_LIBS) -EVO_SET_COMPILE_FLAGS(E_WIDGETS, bonobo_conf bonobox_print gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs) -AC_SUBST(E_WIDGETS_CFLAGS) -AC_SUBST(E_WIDGETS_LIBS) - -EVO_SET_COMPILE_FLAGS(IMPORTERS, bonobo_conf bonobox_print gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs) -AC_SUBST(IMPORTERS_CFLAGS) -AC_SUBST(IMPORTERS_LIBS) - +dnl +dnl EVO_SET_COMPILE_FLAGS(E_WIDGETS, bonobo_conf bonobox_print gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs) +dnl AC_SUBST(E_WIDGETS_CFLAGS) +dnl AC_SUBST(E_WIDGETS_LIBS) +dnl +dnl EVO_SET_COMPILE_FLAGS(IMPORTERS, bonobo_conf bonobox_print gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs) +dnl AC_SUBST(IMPORTERS_CFLAGS) +dnl AC_SUBST(IMPORTERS_LIBS) +dnl dnl libibex is now deprecated dnl EVO_SET_COMPILE_FLAGS(LIBIBEX, bonobo_conf bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs, dnl $THREADS_CFLAGS, $THREADS_LIBS) dnl AC_SUBST(LIBIBEX_CFLAGS) dnl AC_SUBST(LIBIBEX_LIBS) - -EVO_SET_COMPILE_FLAGS(LIBFILTER, bonobo gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade) -AC_SUBST(LIBFILTER_CFLAGS) -AC_SUBST(LIBFILTER_LIBS) +dnl +dnl EVO_SET_COMPILE_FLAGS(LIBFILTER, bonobo gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade) +dnl AC_SUBST(LIBFILTER_CFLAGS) +dnl AC_SUBST(LIBFILTER_LIBS) dnl --- evolution (shell) flags -EVO_SET_COMPILE_FLAGS(SHELL, bonobo_conf bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS}) +EVO_SET_COMPILE_FLAGS(SHELL, libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 gal-2.0 libglade-2.0 gnome-vfs-2.0, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS}) AC_SUBST(SHELL_CFLAGS) AC_SUBST(SHELL_LIBS) dnl --- evolution-addressbook flags -EVOLUTION_ADDRESSBOOK_DEPS="bonobo_conf bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs" +dnl EVOLUTION_ADDRESSBOOK_DEPS="bonobo_conf bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs" -EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS}) -AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS) -AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS) +dnl EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS}) +dnl AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS) +dnl AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS) -EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK_CONDUIT, gpilot $EVOLUTION_ADDRESSBOOK_DEPS, $PISOCK_CFLAGS) -AC_SUBST(EVOLUTION_ADDRESSBOOK_CONDUIT_CFLAGS) -AC_SUBST(EVOLUTION_ADDRESSBOOK_CONDUIT_LIBS) +dnl EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK_CONDUIT, gpilot $EVOLUTION_ADDRESSBOOK_DEPS, $PISOCK_CFLAGS) +dnl AC_SUBST(EVOLUTION_ADDRESSBOOK_CONDUIT_CFLAGS) +dnl AC_SUBST(EVOLUTION_ADDRESSBOOK_CONDUIT_LIBS) dnl -- evolution-executive-summary flags -EVO_SET_COMPILE_FLAGS(EVOLUTION_EXECUTIVE_SUMMARY, - bonobo_conf bonobox bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf soup vfs, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS}) -AC_SUBST(EVOLUTION_EXECUTIVE_SUMMARY_CFLAGS) -AC_SUBST(EVOLUTION_EXECUTIVE_SUMMARY_LIBS) +dnl EVO_SET_COMPILE_FLAGS(EVOLUTION_EXECUTIVE_SUMMARY, +dnl bonobo_conf bonobox bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf soup vfs, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS}) +dnl AC_SUBST(EVOLUTION_EXECUTIVE_SUMMARY_CFLAGS) +dnl AC_SUBST(EVOLUTION_EXECUTIVE_SUMMARY_LIBS) dnl --- evolution-calendar flags -EVOLUTION_CALENDAR_DEPS="bonobo_conf bonobox bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs" +dnl EVOLUTION_CALENDAR_DEPS="bonobo_conf bonobox bonobox_print gal gdk_pixbuf gnomecanvaspixbuf gnomeui libglade oaf vfs" -EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS}) -AC_SUBST(EVOLUTION_CALENDAR_CFLAGS) -AC_SUBST(EVOLUTION_CALENDAR_LIBS) +dnl EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS}) +dnl AC_SUBST(EVOLUTION_CALENDAR_CFLAGS) +dnl AC_SUBST(EVOLUTION_CALENDAR_LIBS) -EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR_CONDUIT, gpilot $EVOLUTION_CALENDAR_DEPS, $PISOCK_CFLAGS) -AC_SUBST(EVOLUTION_CALENDAR_CONDUIT_CFLAGS) -AC_SUBST(EVOLUTION_CALENDAR_CONDUIT_LIBS) +dnl EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR_CONDUIT, gpilot $EVOLUTION_CALENDAR_DEPS, $PISOCK_CFLAGS) +dnl AC_SUBST(EVOLUTION_CALENDAR_CONDUIT_CFLAGS) +dnl AC_SUBST(EVOLUTION_CALENDAR_CONDUIT_LIBS) dnl --- evolution-mail flags @@ -1124,18 +1120,18 @@ dnl ****************************** privlibdir='$(pkglibdir)/'$EVOLUTION_MAJOR_VERSION.$EVOLUTION_MINOR_VERSION AC_SUBST(privlibdir) -camel_providerdir="$privlibdir/camel-providers" -AC_SUBST(camel_providerdir) +dnl camel_providerdir="$privlibdir/camel-providers" +dnl AC_SUBST(camel_providerdir) -EVO_SET_COMPILE_FLAGS(EVOLUTION_MAIL, $FULL_GNOME_DEPS soup, $GCONF_CFLAGS $THREADS_CFLAGS ${GTKHTML_CFLAGS}, $GCONF_LIBS $THREADS_LIBS ${GTKHTML_LIBS}) -AC_SUBST(EVOLUTION_MAIL_CFLAGS) -AC_SUBST(EVOLUTION_MAIL_LIBS) +dnl EVO_SET_COMPILE_FLAGS(EVOLUTION_MAIL, $FULL_GNOME_DEPS soup, $GCONF_CFLAGS $THREADS_CFLAGS ${GTKHTML_CFLAGS}, $GCONF_LIBS $THREADS_LIBS ${GTKHTML_LIBS}) +dnl AC_SUBST(EVOLUTION_MAIL_CFLAGS) +dnl AC_SUBST(EVOLUTION_MAIL_LIBS) dnl -- wombat flags -EVO_SET_COMPILE_FLAGS(WOMBAT, $FULL_GNOME_DEPS, $LDAP_CFLAGS, $LDAP_LIBS) -AC_SUBST(WOMBAT_CFLAGS) -AC_SUBST(WOMBAT_LIBS) +dnl EVO_SET_COMPILE_FLAGS(WOMBAT, $FULL_GNOME_DEPS, $LDAP_CFLAGS, $LDAP_LIBS) +dnl AC_SUBST(WOMBAT_CFLAGS) +dnl AC_SUBST(WOMBAT_LIBS) ################################################## # Check for gtk-doc. @@ -1239,51 +1235,7 @@ AC_SUBST(EVOLUTION_DIR) AC_OUTPUT([ Makefile -addressbook/Makefile -addressbook/backend/Makefile -addressbook/backend/ebook/Makefile -addressbook/backend/idl/Makefile -addressbook/backend/pas/Makefile -addressbook/conduit/Makefile -addressbook/gui/Makefile -addressbook/gui/component/Makefile -addressbook/gui/component/select-names/Makefile -addressbook/gui/contact-editor/Makefile -addressbook/gui/contact-list-editor/Makefile -addressbook/gui/merging/Makefile -addressbook/gui/search/Makefile -addressbook/gui/widgets/Makefile -addressbook/printing/Makefile art/Makefile -calendar/Makefile -calendar/cal-client/Makefile -calendar/cal-util/Makefile -calendar/conduits/Makefile -calendar/conduits/calendar/Makefile -calendar/conduits/todo/Makefile -calendar/gui/Makefile -calendar/gui/alarm-notify/Makefile -calendar/gui/dialogs/Makefile -calendar/idl/Makefile -calendar/importers/Makefile -calendar/pcs/Makefile -camel/Makefile -camel/providers/Makefile -camel/providers/imap/Makefile -camel/providers/local/Makefile -camel/providers/nntp/Makefile -camel/providers/pop3/Makefile -camel/providers/sendmail/Makefile -camel/providers/smtp/Makefile -camel/tests/Makefile -camel/tests/folder/Makefile -camel/tests/lib/Makefile -camel/tests/message/Makefile -camel/tests/mime-filter/Makefile -camel/tests/misc/Makefile -camel/tests/smime/Makefile -camel/tests/stream/Makefile -composer/Makefile data/Makefile data/cde_app_root/Makefile data/cde_app_root/dt/Makefile @@ -1306,33 +1258,12 @@ default_user/local/Outbox/Makefile default_user/local/Sent/Makefile default_user/local/Tasks/Makefile default_user/local/Trash/Makefile -doc/Makefile -doc/devel/Makefile -doc/devel/calendar/Makefile -doc/devel/calendar/cal-client/Makefile -doc/devel/calendar/cal-util/Makefile e-util/Makefile e-util/ename/Makefile -filter/Makefile -help/Makefile -help/C/Makefile -help/no/Makefile -importers/Makefile -intl/Makefile -libversit/Makefile -libwombat/Makefile -macros/Makefile -mail/Makefile -mail/importers/Makefile -my-evolution/Makefile -omf-install/Makefile -po/Makefile.in shell/Makefile shell/evolution-nognome shell/glade/Makefile shell/importer/Makefile -sounds/Makefile -tools/Makefile ui/Makefile views/Makefile views/addressbook/Makefile @@ -1343,7 +1274,6 @@ widgets/Makefile widgets/e-timezone-dialog/Makefile widgets/menus/Makefile widgets/misc/Makefile -wombat/Makefile my-evolution/GNOME_Evolution_Summary.oaf.in ]) diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 93bdab7959..1513ec4426 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,36 @@ +2002-11-02 Ettore Perazzoli <ettore@ximian.com> + + * ename/Makefile.am (INCLUDES): Removed -I$(includedir). + + * ename/test-ename-western-gtk.c: #include + <libgnomeui/gnome-ui-init.h> instead of <libgnomeui/gnome-init.h>. + (create_window): Added GTK_SIGNAL_FUNC() cast. + (main): Use gnome_program_init(). + + * e-db3-utils.c: Do not #include <libgnome/gnome-defs.h>. + + * e-request.c: Do not #include <libgnomeui/gnome-stock.h>. + + * e-memory.c (e_memchunk_clean): Replace GSearchFunc with + GCompareFunc. + + * e-iterator.c (e_iterator_class_init): GTK2-ified. + (ECI_CLASS): Likewise. + + * e-html-utils.c: Do not #include <gal/unicode/gunicode.h>. + + * e-gui-utils.c: Don't #include <libgnome/gnome-defs.h>. + (e_create_image_widget): Pass NULL to gdk_pixbuf_new_from_file() + for the error arg. + + * e-corba-utils.h: #include <orbit/orbit.h> instead of + <orb/orbit.h>. + + * Makefile.am: Removed bonobo-factory-util.c, + bonobo-factory-util.h, e-categories-master-list-wombat.h, + e-categories-master-list-wombat.c, e-dialog-utils.c, + e-dialog-utils.h, e-proxy.c e-proxy.h for now. + 2002-11-02 Rodrigo Moya <rodrigo@ximian.com> * e-config-listener.[ch]: ported to GConf and GObject. diff --git a/e-util/Makefile.am b/e-util/Makefile.am index 00b7db92e2..19ff7b0e53 100644 --- a/e-util/Makefile.am +++ b/e-util/Makefile.am @@ -19,13 +19,7 @@ privlib_LTLIBRARIES = libeutil.la libedb3util.la libeconduit.la noinst_LTLIBRARIES = libeutil-static.la libeconduit-static.la eutilinclude_HEADERS = \ - e-bonobo-factory-util.h \ - e-categories-master-list-wombat.h \ - e-categories-config.h \ - e-component-listener.h \ - e-config-listener.h \ e-corba-utils.h \ - e-dialog-utils.h \ e-dialog-widgets.h \ e-gtk-utils.h \ e-gui-utils.h \ @@ -38,9 +32,7 @@ eutilinclude_HEADERS = \ e-memory.h \ e-mktemp.h \ e-msgport.h \ - e-passwords.h \ e-path.h \ - e-proxy.h \ e-request.h \ e-sexp.h \ e-time-utils.h \ @@ -49,13 +41,7 @@ eutilinclude_HEADERS = \ libeutil_la_SOURCES = \ $(eutilinclude_HEADERS) \ - e-bonobo-factory-util.c \ - e-categories-master-list-wombat.c \ - e-categories-config.c \ - e-component-listener.c \ - e-config-listener.c \ e-corba-utils.c \ - e-dialog-utils.c \ e-dialog-widgets.c \ e-gtk-utils.c \ e-gui-utils.c \ @@ -68,15 +54,23 @@ libeutil_la_SOURCES = \ e-memory.c \ e-mktemp.c \ e-msgport.c \ - e-passwords.c \ e-path.c \ - e-proxy.c \ e-request.c \ e-sexp.c \ e-time-utils.c \ e-url.c \ md5-utils.c +# FIXME TODO +# e-categories-config.c +# e-categories-master-list-wombat.[ch] +# e-component-listener.c +# e-config-listener.c +# e-dialog-utils.c +# e-passwords.c +# e-proxy.c +# bonobo-factory-util.[ch] + libeutil_la_LIBADD = $(E_UTIL_LIBS) libeutil_static_la_SOURCES = $(libeutil_la_SOURCES) diff --git a/e-util/e-categories-config.h b/e-util/e-categories-config.h index 99dc02be23..2ec8019044 100644 --- a/e-util/e-categories-config.h +++ b/e-util/e-categories-config.h @@ -14,7 +14,6 @@ #include <glib.h> #include <gdk/gdk.h> #include <gtk/gtkentry.h> -#include <libgnome/gnome-defs.h> BEGIN_GNOME_DECLS diff --git a/e-util/e-categories-master-list-wombat.c b/e-util/e-categories-master-list-wombat.c index 29318dec04..74fd1047bd 100644 --- a/e-util/e-categories-master-list-wombat.c +++ b/e-util/e-categories-master-list-wombat.c @@ -16,7 +16,7 @@ #include <parser.h> #include <gal/util/e-i18n.h> #include <gal/util/e-xml-utils.h> -#include <bonobo-conf/bonobo-config-database.h> + #include <bonobo/bonobo-moniker-util.h> #include <bonobo/bonobo-exception.h> #include <bonobo/bonobo-listener.h> diff --git a/e-util/e-corba-utils.h b/e-util/e-corba-utils.h index 32cf1df0ee..b48a6e2dab 100644 --- a/e-util/e-corba-utils.h +++ b/e-util/e-corba-utils.h @@ -22,7 +22,7 @@ #ifndef E_CORBA_UTILS_H #define E_CORBA_UTILS_H -#include <orb/orbit.h> +#include <orbit/orbit.h> const CORBA_char *e_safe_corba_string (const char *s); CORBA_char *e_safe_corba_string_dup (const char *s); diff --git a/e-util/e-db3-utils.c b/e-util/e-db3-utils.c index c1da265453..3326f32a6e 100644 --- a/e-util/e-db3-utils.c +++ b/e-util/e-db3-utils.c @@ -10,7 +10,6 @@ #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-util.h> #if DB_VERSION_MAJOR != 3 || \ diff --git a/e-util/e-gui-utils.c b/e-util/e-gui-utils.c index 70007cf07a..b7be21a6d9 100644 --- a/e-util/e-gui-utils.c +++ b/e-util/e-gui-utils.c @@ -15,10 +15,9 @@ #include <glib.h> #include <gtk/gtksignal.h> #include <gtk/gtkalignment.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-util.h> #include <gdk-pixbuf/gdk-pixbuf.h> -#include <gdk-pixbuf/gnome-canvas-pixbuf.h> +#include <libgnomecanvas/gnome-canvas-pixbuf.h> GtkWidget *e_create_image_widget(gchar *name, gchar *string1, gchar *string2, @@ -33,7 +32,7 @@ GtkWidget *e_create_image_widget(gchar *name, filename = g_strdup(string1); else filename = g_concat_dir_and_file(EVOLUTION_IMAGES, string1); - pixbuf = gdk_pixbuf_new_from_file(filename); + pixbuf = gdk_pixbuf_new_from_file(filename, NULL); width = gdk_pixbuf_get_width(pixbuf); height = gdk_pixbuf_get_height(pixbuf); diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c index 65d455a39a..12aee18d2b 100644 --- a/e-util/e-html-utils.c +++ b/e-util/e-html-utils.c @@ -22,7 +22,6 @@ #include <stdio.h> #include <string.h> #include <glib.h> -#include <gal/unicode/gunicode.h> #include "e-html-utils.h" diff --git a/e-util/e-iterator.c b/e-util/e-iterator.c index 8bd14ee6c8..9abf424356 100644 --- a/e-util/e-iterator.c +++ b/e-util/e-iterator.c @@ -12,7 +12,7 @@ #include <gtk/gtksignal.h> #include "e-iterator.h" -#define ECI_CLASS(object) (E_ITERATOR_CLASS(GTK_OBJECT((object))->klass)) +#define ECI_CLASS(object) (E_ITERATOR_CLASS(GTK_CLASS_TYPE (object))) static void e_iterator_init (EIterator *card); static void e_iterator_class_init (EIteratorClass *klass); @@ -72,13 +72,11 @@ e_iterator_class_init (EIteratorClass *klass) e_iterator_signals [INVALIDATE] = gtk_signal_new ("invalidate", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EIteratorClass, invalidate), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, e_iterator_signals, LAST_SIGNAL); - klass->invalidate = NULL; klass->get = NULL; klass->reset = NULL; diff --git a/e-util/e-memory.c b/e-util/e-memory.c index 17385fa7ba..cf32147d75 100644 --- a/e-util/e-memory.c +++ b/e-util/e-memory.c @@ -294,7 +294,7 @@ e_memchunk_clean(MemChunk *m) /* now, scan all free nodes, and count them in their tree node */ while (f) { - ci = g_tree_search(tree, (GSearchFunc)tree_search, f); + ci = g_tree_search(tree, (GCompareFunc) tree_search, f); if (ci) { ci->count += f->atoms; } else { diff --git a/e-util/e-request.c b/e-util/e-request.c index a54b46bf9d..71fcacc3ea 100644 --- a/e-util/e-request.c +++ b/e-util/e-request.c @@ -27,11 +27,11 @@ #include "e-request.h" #include <libgnomeui/gnome-dialog.h> -#include <libgnomeui/gnome-stock.h> #include <gal/widgets/e-unicode.h> #include <gtk/gtklabel.h> #include <gtk/gtkentry.h> +#include <gtk/gtkbox.h> /** diff --git a/e-util/e-time-utils.c b/e-util/e-time-utils.c index ecc3fc9602..2161c7addb 100644 --- a/e-util/e-time-utils.c +++ b/e-util/e-time-utils.c @@ -25,7 +25,6 @@ #include <string.h> #include <ctype.h> #include <glib.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include "e-time-utils.h" diff --git a/e-util/ename/Makefile.am b/e-util/ename/Makefile.am index 480502141e..aeec2d834f 100644 --- a/e-util/ename/Makefile.am +++ b/e-util/ename/Makefile.am @@ -6,7 +6,6 @@ INCLUDES = \ -I. \ -I.. \ -I$(top_builddir) \ - -I$(includedir) \ $(E_NAME_CFLAGS) ename_libs = \ diff --git a/e-util/ename/test-ename-western-gtk.c b/e-util/ename/test-ename-western-gtk.c index 8ae0ef8770..4ab32c2f92 100644 --- a/e-util/ename/test-ename-western-gtk.c +++ b/e-util/ename/test-ename-western-gtk.c @@ -1,7 +1,7 @@ #include <gtk/gtkmain.h> #include <gtk/gtktable.h> #include <libgnomeui/gnome-app.h> -#include <libgnomeui/gnome-init.h> +#include <libgnomeui/gnome-ui-init.h> #include <gal/widgets/e-unicode.h> #include "e-name-western.h" @@ -141,13 +141,13 @@ create_window (void) name = e_name_western_parse ("The Honorable Doctor van Jacobsen, Albert Roderick \"The Clenched Fist\" Jr, MD, PhD, Esquire"); fill_entries (); - gtk_signal_connect (GTK_OBJECT (full), "changed", full_changed_cb, NULL); + gtk_signal_connect (GTK_OBJECT (full), "changed", GTK_SIGNAL_FUNC (full_changed_cb), NULL); } int main (int argc, char **argv) { - gnome_init ("Test EName", "Test EName", argc, argv); + gnome_program_init ("Test EName", "Test EName", LIBGNOMEUI_MODULE, argc, argv, NULL); create_window (); diff --git a/shell/.cvsignore b/shell/.cvsignore index f60b8850ac..4fc1a6f8fd 100644 --- a/shell/.cvsignore +++ b/shell/.cvsignore @@ -19,3 +19,4 @@ evolution-nognome evolution-test-component evolution.pure libeshell.la +e-shell-marshal.* diff --git a/shell/ChangeLog b/shell/ChangeLog index 19d008983d..ff25dda60f 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,231 @@ +2002-11-02 Ettore Perazzoli <ettore@ximian.com> + + * e-shell-config-autocompletion.c: No bonobo-conf; removed member + db in struct EvolutionAutocompletionConfig and replaced with a + config_listener arg. + (e_shell_config_autocompletion_create_widget): Init it here. + (config_control_destroy_callback): Unref it here. + (config_control_apply_callback): Updated to use the + config_listener. + + * e-shell-config.c (e_shell_config_factory_register): Use + bonobo_generic_factory_new() instead of + bonobo_generic_factory_new_multi(). + + * e-shell-about-box.c (impl_realize): Pass NULL as the error arg + to gdk_pixbuf_new_from_file(). + (timeout_callback): Use gtk_style_get_font() to retrieve the + style's font instead of style->font. + (impl_draw): Removed. + (impl_expose_event): Do the drawing of the pixmap here. + + * e-setup.c (e_setup_check_db): Removed. + (e_setup_check_config): New, version using EConfigListener instead + of bonobo-conf. + + * e-setup.h: #include "e-util/e-config-listener.h" instead of + <bonobo-conf/bonobo-config-database.h>. + + * e-local-storage.c (construct): Use _() instead of U_(). + (setup_stock_folders): Likewise. + + * e-icon-factory.c (load_icon): Pass NULL as the error arg to + gdk_pixbuf_new_from_file(). + + * e-folder-type-registry.c (folder_type_new): Pass NULL as the + error arg to gdk_pixbuf_new_from_file(). + + * e-folder-dnd-bridge.c (find_matching_target_for_drag_context): + GdkAtom is not an integer anymore; update accordingly. + + * e-corba-storage.c (async_folder_cb): Constified args + appropriately to match BonoboListenerCallbackFn. + (async_folder_discovery_cb): Likewise. + (cancel_discover_shared_folder): BONOBO_EX_ID() -> + BONOBO_EX_REPOID(). + (e_corba_storage_show_folder_properties): Likewise. + + * e-corba-storage-registry.h, e-corba-storage-registry.c: + BonoboXObjectified. + + * e-corba-config-page.c: Removed member listener_id in struct + ECorbaConfigPagePrivate. + (init): Don't init. + (setup_listener): Bonobo_EventSource_addListener doesn't return an + ID anymore. + (impl_destroy): Just pass the listener to + Bonobo_EventSource_removeListener. + (setup_listener): BONOBO_EX_REPOID() instead of BONOBO_EX_ID(). + (impl_apply): Likewise. + (listener_event_callback): Constified args appropriately to match + BonoboListenerCallbackFn. + (e_corba_config_page_construct): Likewise. + + * e-component-registry.c (wait_for_corba_object_to_die): Pass NULL + for the exception arg to bonobo_unknown_ping(). + + * e-shell-view.h: <bonobo/bonobo-window.h>, not + <bonobo/bonobo-win.h>. + + * e-shell.c: Replace member db in EShellPrivate with an + EConfigListener config_listener. + (destroy): Do not call e_shell_disconnect_db(). Unref + EConfigListener. Destroy settings_dialog if not NULL. Pass + config_listener to e_setup_check_db(). + (e_shell_get_config_db): Removed. + (e_shell_get_config_listener): New. + (e_shell_construct): Set up the config_listener, instead of the + Bonobo_ConfigDatabase. + + * e-shell.h: #include <bonobo-activation/bonobo-activation.h> + instead of <liboaf/oaf.h>. No + <bonobo-conf/bonobo-config-database.h>. + + * e-component-registry.c: #include + <bonobo-activation/bonobo-activation.h> instead of <liboaf/oaf.h>. + + * e-activity-handler.c (task_widget_button_press_event_callback): + Use BONOBO_EX() and BONOBO_EX_REPOID(). + (impl_operationStarted): Don't use GTK_OBJECT_DESTROYED() [needs + to be fixed later]. + (impl_operationProgressing): Likewise. + (impl_operationFinished): Likewise. + (impl_requestDialog): Likewise. + + * evolution-wizard.c (evolution_wizard_class_init): GLIB2-ified. + + * evolution-wizard.h: Remove BEGIN_GNOME_DECLS/END_GNOME_DECLS. + + * evolution-storage.c: Chagned to use generated marshallers + instead of custom ones or GAL's. + + * eshell-marshal.list: New. + * Makefile.am: Added rule to build eshell-marshal.[ch] and link + them in. + + * evolution-storage.h, evolution-storage.c: BonoboXObjectified. + + * evolution-storage-set-view-listener.c (class_init): GLIB2-ified. + + * evolution-storage-listener.c (class_init): GLIB2-ified. + + * evolution-shell-view.h, evolution-shell-view.c: + BonoboXObjectified. + + * evolution-shell-component-utils.c: #include + <bonobo-activation/bonobo-activation.h>. + (e_pixmaps_update): Pass NULL as the error arg to + gdk_pixbuf_new_from_file(). + (e_activation_failure_dialog): Bonobo_GeneralError instead of + OAF_GeneralError. + (e_get_activation_failure_msg): Likewise. + + * evolution-shell-component-dnd.h, evolution-shell-component-dnd.c: + BonoboXObjectified. + + * evolution-shell-component.c: #include <unistd.h>. + (owner_ping_callback): Pass NULL for the opt_ev arg to + bonobo_unknown_ping(). + (impl_populateFolderContextMenu): Pass NULL for the opt_ev arg to + bonobo_ui_component_set_container(). + (class_init): GLIB2-ified. + + * e-component-registry.c (component_free): Use g_object_unref() on + the EvolutionShellComponentClient instead of + bonobo_object_unref(). + (register_component): Likewise. + (component_new): Likewise, use g_object_ref() instead of + bonobo_object_ref(). + + * evolution-shell-component-client.c: New member corba_objref in + EvolutionShellComponentClientPrivate. + (init): Init to CORBA_OBJECT_NIL. + (impl_destroy): Unref. Also CORBA_OBJECT_NILify all the pointers + to unreffed objects. + (corba_exception_to_result): Use BONOBO_EX_REPOID(ev) instead of + ev->_repo_id. + (evolution_shell_component_client_construct): Set the corba_objref + pointer, do not call bonobo_object_client_construct(). + (evolution_shell_component_client_new): Use + bonobo_activation_activate_from_id() here instead of + oaf_activate_from_id(). + + * evolution-shell-component-client.h, + evolution-shell-component-client.c: Derive from GObject instead of + BonoboObjectClient. + + * evolution-shell-client.c + (evolution_shell_client_create_storage_set_view): Use + BONOBO_EX_REPOID() instead of BONOBO_EX_ID(). + + * evolution-folder-selector-button.c (destroy): g_object_unref the + EvolutionShellClient instead of bonobo_object_unref(). + (evolution_folder_selector_button_construct): Likewise. + + * e-folder-list.c (e_folder_list_destroy): g_object_unref the + EvolutionShellClient instead of bonobo_object_unref(). + (e_folder_list_construct): g_object_ref the EvolutionShellClient + instead of bonobo_object_ref(). + + * evolution-shell-client.c: New member corba_objref in + EvolutionShellClientPrivate. + (init): Init to CORBA_OBJECT_NIL. + (destroy): Unref/release. + (query_shell_interface): Use BONOBO_EX() and BONOBO_EX_REPOID() + instead of ._major and ._repo_id. + (destroy): Likewise. + (evolution_shell_client_get_local_storage): Likewise. + + * evolution-shell-client.h: Derive from GObject instead of + BonoboObjectClient. + + * evolution-session.c (corba_class_init): Get klass arg. + (class_init): Pass klass arg. GLIB2-ified. + (evolution_session_construct): Removed. + (evolution_session_new): Just return what gtk_type_new() returns. + + * evolution-session.h, evolution-session.c: Derive from + BonoboXObject. + + * evolution-folder-selector-button.c (init): Make icon a GtkImage + instead of a BonoboUIToolbarIcon. + (set_folder, class_init): GLIB2-ified. + + * evolution-config-control.c (class_init): GLIB2-ified. + + * evolution-activity-client.c (corba_update_progress): Use + BONOBO_EX_REPOID() instead of ._major and ._repo_id. + (evolution_activity_client_request_dialog): Likewise. + (impl_destroy): Likewise. + (class_init): GLIB2-ified. + + * e-folder-list.c: #include <gtk/gtframe.h> and #include + <string.h>. + (e_folder_list_destroy): bonobo_object_unref(), not + bonobo_object_client_unref(). + (e_folder_list_init): Pass NULL as the domain to glade_xml_new(). + + * e-folder-list.h: #include <gtk/gtkvbox.h>. + + * e-folder.c (impl_remove): Renamed from remove(). + (impl_get_physical_uri): Renamed from get_physical_uri(). + (impl_load_info): Renamed from load_info(). + (impl_save_info): Renamed from save_info(). + (class_init): GLIB2-ified. + + * Evolution-Session.idl: #include <Bonobo.idl>, not <Bonobo.h>. + * Evolution-Offline.idl: Likewise. + * Evolution-ShellComponent.idl: Likewise. + * Evolution-ShellComponentDnd.idl: Likewise. + * Evolution-Storage.idl: Likewise. + + * Makefile.am: Do not compile the importer directory for now. + + * evolution-wizard.c (evolution_wizard_set_buttons_sensitive): + ORBit2-ize type names. + (evolution_wizard_set_show_finish): Likewise. + (evolution_wizard_set_page): Likewise. + 2002-10-28 Ettore Perazzoli <ettore@ximian.com> * e-shell-settings-dialog.c (set_dialog_size): Increase the width diff --git a/shell/Evolution-Offline.idl b/shell/Evolution-Offline.idl index 46821d72bb..4c3f3f7392 100644 --- a/shell/Evolution-Offline.idl +++ b/shell/Evolution-Offline.idl @@ -8,7 +8,7 @@ * Copyright (C) 2001 Ximian, Inc. */ -#include <Bonobo.h> +#include <Bonobo.idl> module GNOME { module Evolution { diff --git a/shell/Evolution-Session.idl b/shell/Evolution-Session.idl index eeb6116740..35eb9ea427 100644 --- a/shell/Evolution-Session.idl +++ b/shell/Evolution-Session.idl @@ -8,7 +8,7 @@ * Copyright (C) 2000, 2001 Ximian, Inc. */ -#include <Bonobo.h> +#include <Bonobo.idl> module GNOME { module Evolution { diff --git a/shell/Evolution-ShellComponent.idl b/shell/Evolution-ShellComponent.idl index 9441b73b79..bb9b4ae682 100644 --- a/shell/Evolution-ShellComponent.idl +++ b/shell/Evolution-ShellComponent.idl @@ -8,7 +8,7 @@ * Copyright (C) 2000, 2001, 2002 Ximian, Inc. */ -#include <Bonobo.h> +#include <Bonobo.idl> module GNOME { module Evolution { diff --git a/shell/Evolution-ShellComponentDnd.idl b/shell/Evolution-ShellComponentDnd.idl index c0c4c5a469..064f233417 100644 --- a/shell/Evolution-ShellComponentDnd.idl +++ b/shell/Evolution-ShellComponentDnd.idl @@ -9,7 +9,7 @@ * Copyright (C) 2001 Ximian, Inc. */ -#include <Bonobo.h> +#include <Bonobo.idl> module GNOME { module Evolution { diff --git a/shell/Evolution-Storage.idl b/shell/Evolution-Storage.idl index 45aa3cb884..26313b6825 100644 --- a/shell/Evolution-Storage.idl +++ b/shell/Evolution-Storage.idl @@ -8,7 +8,7 @@ * Copyright (C) 2000, 2001 Ximian, Inc. */ -#include <Bonobo.h> +#include <Bonobo.idl> module GNOME { module Evolution { diff --git a/shell/Makefile.am b/shell/Makefile.am index 93fead1d0e..8d92499d89 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -1,6 +1,8 @@ -SUBDIRS = glade importer +SUBDIRS = glade -INCLUDES = -O \ +# FIXME importer + +INCLUDES = \ -I$(top_srcdir)/widgets \ -I$(top_srcdir)/widgets/misc \ -I$(top_srcdir)/libical/src/libical \ @@ -42,8 +44,7 @@ IDL_GENERATED = \ Evolution-impl.o: Evolution.h $(IDL_GENERATED): $(IDLS) - $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \ - $(srcdir)/Evolution.idl + $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) $(srcdir)/Evolution.idl # SelectNames CORBA stuff @@ -57,8 +58,7 @@ SELECT_NAMES_IDL_GENERATED = \ Evolution-Addressbook-SelectNames-stubs.c $(SELECT_NAMES_IDL_GENERATED): $(SELECT_NAMES_IDL) - $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \ - $(SELECT_NAMES_IDL) + $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) $(SELECT_NAMES_IDL) # IDL install @@ -114,6 +114,7 @@ libeshell_la_SOURCES = \ evolution-storage-set-view-listener.c \ evolution-storage.c \ evolution-wizard.c \ + e-shell-marshal.c \ $(eshellinclude_HEADERS) # Evolution executable @@ -265,6 +266,23 @@ icons = \ check-filled.xpm \ check-missing.xpm + +# GLib marshalling cruft + +e-shell-marshal.h: e-shell-marshal.list + ( @GLIB_GENMARSHAL@ --prefix=e_shell_marshal e-shell-marshal.list --header > e-shell-marshal.tmp \ + && mv e-shell-marshal.tmp e-shell-marshal.h ) \ + || ( rm -f e-shell-marshal.tmp && exit 1 ) + +e-shell-marshal.c: e-shell-marshal.h + ( @GLIB_GENMARSHAL@ --prefix=e_shell_marshal e-shell-marshal.list --body > e-shell-marshal.tmp \ + && mv e-shell-marshal.tmp e-shell-marshal.c ) \ + || ( rm -f e-shell-marshal.tmp && exit 1 ) + +MARSHAL_GENERATED = e-shell-marshal.c e-shell-marshal.h + +# Extra dist stuff + EXTRA_DIST = \ $(IDLS) \ $(oaf_in_files) \ @@ -289,7 +307,7 @@ evolution.pure: evolution endif CLEANFILES = $(IDL_GENERATED) $(SELECT_NAMES_IDL_GENERATED) -BUILT_SOURCES = $(IDL_GENERATED) $(SELECT_NAMES_IDL_GENERATED) +BUILT_SOURCES = $(IDL_GENERATED) $(SELECT_NAMES_IDL_GENERATED) $(MARSHAL_GENERATED) dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) diff --git a/shell/e-activity-handler.c b/shell/e-activity-handler.c index f7bc09919d..efddecdb3c 100644 --- a/shell/e-activity-handler.c +++ b/shell/e-activity-handler.c @@ -37,6 +37,8 @@ #include <gal/util/e-util.h> #include <gal/widgets/e-popup-menu.h> +#include <bonobo/bonobo-exception.h> + #define PARENT_TYPE bonobo_x_object_get_type () static BonoboXObjectClass *parent_class = NULL; @@ -207,9 +209,9 @@ task_widget_button_press_event_callback (GtkWidget *widget, null_value->_type = TC_null; Bonobo_Listener_event (activity_info->event_listener, "Clicked", null_value, &ev); - if (ev._major != CORBA_NO_EXCEPTION) + if (BONOBO_EX (&ev) != CORBA_NO_EXCEPTION) g_warning ("EActivityHandler: Cannot report `Clicked' event -- %s", - ev._repo_id); + BONOBO_EX_REPOID (&ev)); CORBA_free (null_value); @@ -369,7 +371,8 @@ impl_operationStarted (PortableServer_Servant servant, activity_handler = E_ACTIVITY_HANDLER (bonobo_object_from_servant (servant)); - if (GTK_OBJECT_DESTROYED (activity_handler) || activity_handler->priv == NULL) + /* FIXME */ + if (/* GTK_OBJECT_DESTROYED (activity_handler) || */ activity_handler->priv == NULL) return; priv = activity_handler->priv; @@ -419,7 +422,8 @@ impl_operationProgressing (PortableServer_Servant servant, activity_handler = E_ACTIVITY_HANDLER (bonobo_object_from_servant (servant)); - if (GTK_OBJECT_DESTROYED (activity_handler) || activity_handler->priv == NULL) + /* FIXME */ + if (/* GTK_OBJECT_DESTROYED (activity_handler) || */ activity_handler->priv == NULL) return; priv = activity_handler->priv; @@ -462,7 +466,8 @@ impl_operationFinished (PortableServer_Servant servant, activity_handler = E_ACTIVITY_HANDLER (bonobo_object_from_servant (servant)); - if (GTK_OBJECT_DESTROYED (activity_handler) || activity_handler->priv == NULL) + /* FIXME */ + if (/* GTK_OBJECT_DESTROYED (activity_handler) || */ activity_handler->priv == NULL) return; priv = activity_handler->priv; @@ -490,7 +495,8 @@ impl_requestDialog (PortableServer_Servant servant, activity_handler = E_ACTIVITY_HANDLER (bonobo_object_from_servant (servant)); - if (GTK_OBJECT_DESTROYED (activity_handler) || activity_handler->priv == NULL) + /* FIXME */ + if (/* GTK_OBJECT_DESTROYED (activity_handler) || */ activity_handler->priv == NULL) return GNOME_Evolution_Activity_DIALOG_ACTION_ERROR; /* FIXME implement. */ diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c index a4da4af714..39f3f42cf6 100644 --- a/shell/e-component-registry.c +++ b/shell/e-component-registry.c @@ -31,6 +31,8 @@ #include <gal/util/e-util.h> +#include <bonobo-activation/bonobo-activation.h> + #include "Evolution.h" #include "e-shell-utils.h" @@ -93,7 +95,7 @@ wait_for_corba_object_to_die (Bonobo_Unknown corba_objref, count = 1; while (1) { - alive = bonobo_unknown_ping (corba_objref); + alive = bonobo_unknown_ping (corba_objref, NULL); if (! alive) break; @@ -112,7 +114,7 @@ component_new (const char *id, { Component *new; - bonobo_object_ref (BONOBO_OBJECT (client)); + g_object_ref (client); new = g_new (Component, 1); new->id = g_strdup (id); @@ -141,7 +143,7 @@ component_free (Component *component) retval = FALSE; CORBA_exception_free (&ev); - bonobo_object_unref (BONOBO_OBJECT (component->client)); + g_object_unref (component->client); wait_for_corba_object_to_die ((Bonobo_Unknown) corba_shell_component, component->id); CORBA_Object_release (corba_shell_component, &ev); @@ -236,7 +238,7 @@ register_component (EComponentRegistry *component_registry, supported_types = GNOME_Evolution_ShellComponent__get_supportedTypes (component_corba_interface, &my_ev); if (my_ev._major != CORBA_NO_EXCEPTION || supported_types->_length == 0) { - bonobo_object_unref (BONOBO_OBJECT (client)); + g_object_unref (client); CORBA_exception_free (&my_ev); return FALSE; } @@ -245,7 +247,7 @@ register_component (EComponentRegistry *component_registry, component = component_new (id, client); g_hash_table_insert (priv->component_id_to_component, component->id, component); - bonobo_object_unref (BONOBO_OBJECT (client)); + g_object_unref (client); for (i = 0; i < supported_types->_length; i++) { const GNOME_Evolution_FolderType *type; diff --git a/shell/e-corba-config-page.c b/shell/e-corba-config-page.c index f9b49bcdab..bf51097b4a 100644 --- a/shell/e-corba-config-page.c +++ b/shell/e-corba-config-page.c @@ -43,7 +43,6 @@ struct _ECorbaConfigPagePrivate { GNOME_Evolution_ConfigControl config_control_interface; BonoboListener *listener; - Bonobo_EventSource_ListenerId listener_id; Bonobo_EventSource event_source; }; @@ -53,8 +52,8 @@ struct _ECorbaConfigPagePrivate { static void listener_event_callback (BonoboListener *listener, - char *event_name, - CORBA_any *any, + const char *event_name, + const CORBA_any *any, CORBA_Environment *ev, void *data) { @@ -80,18 +79,18 @@ setup_listener (ECorbaConfigPage *corba_config_page, event_source = GNOME_Evolution_ConfigControl__get_eventSource (config_control_interface, &ev); if (BONOBO_EX (&ev)) { - g_warning ("Cannot get eventSource interface for ConfigPage -- %s", BONOBO_EX_ID (&ev)); + g_warning ("Cannot get eventSource interface for ConfigPage -- %s", BONOBO_EX_REPOID (&ev)); } else { priv->listener = bonobo_listener_new (listener_event_callback, corba_config_page); - priv->listener_id = Bonobo_EventSource_addListener (event_source, - bonobo_object_corba_objref (BONOBO_OBJECT (priv->listener)), - &ev); + Bonobo_EventSource_addListener (event_source, + bonobo_object_corba_objref (BONOBO_OBJECT (priv->listener)), + &ev); if (! BONOBO_EX (&ev)) { priv->config_control_interface = config_control_interface; priv->event_source = event_source; } else { - g_warning ("Cannot add listener for ConfigPage -- %s", BONOBO_EX_ID (&ev)); + g_warning ("Cannot add listener for ConfigPage -- %s", BONOBO_EX_REPOID (&ev)); bonobo_object_unref (BONOBO_OBJECT (priv->listener)); priv->listener = NULL; @@ -122,7 +121,9 @@ impl_destroy (GtkObject *object) bonobo_object_release_unref (priv->config_control_interface, &ev); if (priv->listener != NULL) { - Bonobo_EventSource_removeListener (priv->event_source, priv->listener_id, &ev); + Bonobo_EventSource_removeListener (priv->event_source, + bonobo_object_corba_objref (BONOBO_OBJECT (priv->listener)), + &ev); bonobo_object_unref (BONOBO_OBJECT (priv->listener)); bonobo_object_release_unref (priv->event_source, &ev); @@ -155,7 +156,7 @@ impl_apply (EConfigPage *config_page) GNOME_Evolution_ConfigControl_apply (priv->config_control_interface, &ev); if (BONOBO_EX (&ev)) - g_warning ("Cannot apply settings -- %s", BONOBO_EX_ID (&ev)); + g_warning ("Cannot apply settings -- %s", BONOBO_EX_REPOID (&ev)); CORBA_exception_free (&ev); } @@ -186,7 +187,6 @@ init (ECorbaConfigPage *corba_config_page) priv = g_new (ECorbaConfigPagePrivate, 1); priv->config_control_interface = CORBA_OBJECT_NIL; priv->listener = NULL; - priv->listener_id = (Bonobo_EventSource_ListenerId) 0; priv->event_source = CORBA_OBJECT_NIL; corba_config_page->priv = priv; @@ -208,7 +208,7 @@ e_corba_config_page_construct (ECorbaConfigPage *corba_config_page, control = GNOME_Evolution_ConfigControl__get_control (corba_object, &ev); if (BONOBO_EX (&ev)) { - g_warning ("Can't get control from ::ConfigControl -- %s", BONOBO_EX_ID (&ev)); + g_warning ("Can't get control from ::ConfigControl -- %s", BONOBO_EX_REPOID (&ev)); CORBA_exception_init (&ev); return FALSE; } diff --git a/shell/e-corba-storage-registry.c b/shell/e-corba-storage-registry.c index cfdfce65ae..d50dfa33ee 100644 --- a/shell/e-corba-storage-registry.c +++ b/shell/e-corba-storage-registry.c @@ -34,9 +34,11 @@ #include <bonobo/bonobo-exception.h> #include <gal/util/e-util.h> +#include <string.h> + -#define PARENT_TYPE BONOBO_OBJECT_TYPE -static BonoboObjectClass *parent_class = NULL; +#define PARENT_TYPE BONOBO_X_OBJECT_TYPE +static BonoboXObjectClass *parent_class = NULL; struct _ECorbaStorageRegistryPrivate { EStorageSet *storage_set; @@ -47,31 +49,6 @@ struct _ECorbaStorageRegistryPrivate { /* CORBA interface implementation. */ -static POA_GNOME_Evolution_StorageRegistry__vepv storage_registry_vepv; - -static POA_GNOME_Evolution_StorageRegistry * -create_servant (void) -{ - POA_GNOME_Evolution_StorageRegistry *servant; - CORBA_Environment ev; - - servant = (POA_GNOME_Evolution_StorageRegistry *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &storage_registry_vepv; - - CORBA_exception_init (&ev); - - POA_GNOME_Evolution_StorageRegistry__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - static void listener_notify (Bonobo_Listener listener, GNOME_Evolution_StorageRegistry_MessageType type, @@ -432,18 +409,15 @@ destroy (GtkObject *object) /* Initialization. */ static void -corba_class_init (void) +class_init (ECorbaStorageRegistryClass *klass) { - POA_GNOME_Evolution_StorageRegistry__vepv *vepv; + GtkObjectClass *object_class; POA_GNOME_Evolution_StorageRegistry__epv *epv; - PortableServer_ServantBase__epv *base_epv; - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; + object_class = GTK_OBJECT_CLASS (klass); + object_class->destroy = destroy; - epv = g_new0 (POA_GNOME_Evolution_StorageRegistry__epv, 1); + epv = & klass->epv; epv->addStorage = impl_StorageRegistry_addStorage; epv->getStorageList = impl_StorageRegistry_getStorageList; epv->getStorageByName = impl_StorageRegistry_getStorageByName; @@ -452,23 +426,7 @@ corba_class_init (void) epv->removeListener = impl_StorageRegistry_removeListener; epv->getFolderByUri = impl_StorageRegistry_getFolderByUri; - vepv = &storage_registry_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->GNOME_Evolution_StorageRegistry_epv = epv; -} - -static void -class_init (ECorbaStorageRegistryClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; - parent_class = gtk_type_class (PARENT_TYPE); - - corba_class_init (); } static void @@ -486,16 +444,11 @@ init (ECorbaStorageRegistry *corba_storage_registry) void e_corba_storage_registry_construct (ECorbaStorageRegistry *corba_storage_registry, - GNOME_Evolution_StorageRegistry corba_object, EStorageSet *storage_set) { ECorbaStorageRegistryPrivate *priv; - g_return_if_fail (corba_storage_registry != NULL); g_return_if_fail (E_IS_CORBA_STORAGE_REGISTRY (corba_storage_registry)); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - - bonobo_object_construct (BONOBO_OBJECT (corba_storage_registry), corba_object); priv = corba_storage_registry->priv; @@ -507,25 +460,19 @@ ECorbaStorageRegistry * e_corba_storage_registry_new (EStorageSet *storage_set) { ECorbaStorageRegistry *corba_storage_registry; - POA_GNOME_Evolution_StorageRegistry *servant; - GNOME_Evolution_StorageRegistry corba_object; g_return_val_if_fail (storage_set != NULL, NULL); g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL); - servant = create_servant (); - if (servant == NULL) - return NULL; - corba_storage_registry = gtk_type_new (e_corba_storage_registry_get_type ()); - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (corba_storage_registry), - servant); - - e_corba_storage_registry_construct (corba_storage_registry, corba_object, storage_set); + e_corba_storage_registry_construct (corba_storage_registry, storage_set); return corba_storage_registry; } -E_MAKE_TYPE (e_corba_storage_registry, "ECorbaStorageRegistry", ECorbaStorageRegistry, class_init, init, PARENT_TYPE) +E_MAKE_X_TYPE (e_corba_storage_registry, "ECorbaStorageRegistry", ECorbaStorageRegistry, + class_init, init, PARENT_TYPE, + POA_GNOME_Evolution_StorageRegistry__init, + GTK_STRUCT_OFFSET (ECorbaStorageRegistryClass, epv)) diff --git a/shell/e-corba-storage-registry.h b/shell/e-corba-storage-registry.h index fc6c4084a7..338ee92340 100644 --- a/shell/e-corba-storage-registry.h +++ b/shell/e-corba-storage-registry.h @@ -23,7 +23,7 @@ #ifndef __E_CORBA_STORAGE_REGISTRY_H__ #define __E_CORBA_STORAGE_REGISTRY_H__ -#include <bonobo/bonobo-object.h> +#include <bonobo/bonobo-xobject.h> #include "Evolution.h" #include "e-storage-set.h" @@ -45,19 +45,20 @@ typedef struct _ECorbaStorageRegistryPrivate ECorbaStorageRegistryPrivate; typedef struct _ECorbaStorageRegistryClass ECorbaStorageRegistryClass; struct _ECorbaStorageRegistry { - BonoboObject parent; + BonoboXObject parent; ECorbaStorageRegistryPrivate *priv; }; struct _ECorbaStorageRegistryClass { - BonoboObjectClass parent_class; + BonoboXObjectClass parent_class; + + POA_GNOME_Evolution_StorageRegistry__epv epv; }; GtkType e_corba_storage_registry_get_type (void); void e_corba_storage_registry_construct (ECorbaStorageRegistry *corba_storage_registry, - GNOME_Evolution_StorageRegistry corba_object, EStorageSet *storage_set); ECorbaStorageRegistry *e_corba_storage_registry_new (EStorageSet *storage_set); diff --git a/shell/e-corba-storage.c b/shell/e-corba-storage.c index 31e8c424f1..e90411b7d9 100644 --- a/shell/e-corba-storage.c +++ b/shell/e-corba-storage.c @@ -35,9 +35,12 @@ #include <bonobo/bonobo-main.h> #include <bonobo/bonobo-exception.h> +#include <bonobo/bonobo-listener.h> #include <gdk/gdkx.h> +#include <string.h> + #define PARENT_TYPE E_TYPE_STORAGE static EStorageClass *parent_class = NULL; @@ -285,8 +288,10 @@ struct async_folder_closure { }; static void -async_folder_cb (BonoboListener *listener, char *event_name, - CORBA_any *any, CORBA_Environment *ev, +async_folder_cb (BonoboListener *listener, + const char *event_name, + const CORBA_any *any, + CORBA_Environment *ev, gpointer user_data) { struct async_folder_closure *closure = user_data; @@ -506,8 +511,10 @@ supports_shared_folders (EStorage *storage) } static void -async_folder_discovery_cb (BonoboListener *listener, char *event_name, - CORBA_any *any, CORBA_Environment *ev, +async_folder_discovery_cb (BonoboListener *listener, + const char *event_name, + const CORBA_any *any, + CORBA_Environment *ev, gpointer user_data) { struct async_folder_closure *closure = user_data; @@ -582,7 +589,7 @@ cancel_discover_shared_folder (EStorage *storage, GNOME_Evolution_Storage_cancelDiscoverSharedFolder (priv->storage_interface, owner, folder_name, &ev); if (BONOBO_EX (&ev)) - g_warning ("Error invoking cancelDiscoverSharedFolder -- %s", BONOBO_EX_ID (&ev)); + g_warning ("Error invoking cancelDiscoverSharedFolder -- %s", BONOBO_EX_REPOID (&ev)); CORBA_exception_free (&ev); } @@ -829,7 +836,7 @@ e_corba_storage_show_folder_properties (ECorbaStorage *corba_storage, GDK_WINDOW_XWINDOW (parent_window), &ev); if (BONOBO_EX (&ev)) - g_warning ("Error in Storage::showFolderProperties -- %s", BONOBO_EX_ID (&ev)); + g_warning ("Error in Storage::showFolderProperties -- %s", BONOBO_EX_REPOID (&ev)); CORBA_exception_free (&ev); } diff --git a/shell/e-folder-dnd-bridge.c b/shell/e-folder-dnd-bridge.c index e17bf86146..fabddb1fb8 100644 --- a/shell/e-folder-dnd-bridge.c +++ b/shell/e-folder-dnd-bridge.c @@ -36,6 +36,8 @@ #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> +#include <string.h> + /* Callbacks for folder operations. */ @@ -157,12 +159,12 @@ find_matching_target_for_drag_context (EStorageSet *storage_set, for (p = drag_context->targets; p != NULL; p = p->next) { char *possible_type; - possible_type = gdk_atom_name (GPOINTER_TO_INT (p->data)); + possible_type = gdk_atom_name (*((GdkAtom *) p->data)); if (strcmp (possible_type, E_FOLDER_DND_PATH_TARGET_TYPE) == 0) { g_free (possible_type); if (atom_return != NULL) - *atom_return = GPOINTER_TO_INT (p->data); + *atom_return = *((GdkAtom *) p->data); return E_FOLDER_DND_PATH_TARGET_TYPE; } @@ -175,7 +177,7 @@ find_matching_target_for_drag_context (EStorageSet *storage_set, g_free (possible_type); if (atom_return != NULL) - *atom_return = GPOINTER_TO_INT (p->data); + *atom_return = *((GdkAtom *) p->data); return accepted_type; } @@ -416,7 +418,7 @@ handle_data_received_non_path (GdkDragContext *context, corba_context.suggestedAction = convert_gdk_drag_action_to_corba (context->suggested_action); corba_data.format = selection_data->format; - corba_data.target = selection_data->target; + corba_data.target = 0; /* selection_data->target FIXME */ corba_data.bytes._release = FALSE; diff --git a/shell/e-folder-list.c b/shell/e-folder-list.c index a86461f303..7291d7fde6 100644 --- a/shell/e-folder-list.c +++ b/shell/e-folder-list.c @@ -22,17 +22,26 @@ */ #include <config.h> -#include <libgnomeui/gnome-canvas-rect-ellipse.h> -#include "e-folder-list.h" -#include <gal/e-table/e-table-memory-store.h> -#include <gal/widgets/e-unicode.h> -#include <gal/widgets/e-gui-utils.h> -#include <gal/widgets/e-option-menu.h> + +#include <string.h> + +#include <gtk/gtkframe.h> + #include <libgnome/gnome-i18n.h> + #include <gnome-xml/parser.h> #include <gnome-xml/xmlmemory.h> -#include <gal/util/e-xml-utils.h> + #include <glade/glade.h> + +#include <gal/e-table/e-table-memory-store.h> +#include <gal/util/e-xml-utils.h> +#include <gal/widgets/e-unicode.h> +#include <gal/widgets/e-gui-utils.h> +#include <gal/widgets/e-option-menu.h> + +#include "e-folder-list.h" + #include "Evolution.h" static GtkVBoxClass *parent_class = NULL; @@ -130,12 +139,14 @@ e_folder_list_changed (EFolderList *efl) static void e_folder_list_destroy (GtkObject *object) { - EFolderList *efl = E_FOLDER_LIST(object); + EFolderList *efl = E_FOLDER_LIST (object); if (efl->priv->gui) - gtk_object_unref(GTK_OBJECT(efl->priv->gui)); + gtk_object_unref (GTK_OBJECT (efl->priv->gui)); + if (efl->priv->client) - bonobo_object_client_unref(BONOBO_OBJECT_CLIENT(efl->priv->client), NULL); + g_object_unref (efl->priv->client); + g_free (efl->priv); efl->priv = NULL; @@ -400,7 +411,7 @@ e_folder_list_init (EFolderList *efl) efl->priv = g_new (EFolderListPrivate, 1); - gui = glade_xml_new (EVOLUTION_GLADEDIR "/e-folder-list.glade", NULL); + gui = glade_xml_new (EVOLUTION_GLADEDIR "/e-folder-list.glade", NULL, NULL); efl->priv->gui = gui; efl->priv->title = NULL; @@ -555,8 +566,9 @@ e_folder_list_new (EvolutionShellClient *client, char *xml) GtkWidget* e_folder_list_construct (EFolderList *efl, EvolutionShellClient *client, char *xml) { + g_object_ref (client); efl->priv->client = client; - bonobo_object_ref (BONOBO_OBJECT (efl->priv->client)); + efl->priv->corba_storage_registry = evolution_shell_client_get_storage_registry_interface (client); e_folder_list_set_xml (efl, xml); return GTK_WIDGET (efl); diff --git a/shell/e-folder-list.h b/shell/e-folder-list.h index d3890812ac..4259ea4a71 100644 --- a/shell/e-folder-list.h +++ b/shell/e-folder-list.h @@ -25,6 +25,9 @@ #define __E_FOLDER_LIST_H__ #include <gal/e-table/e-table-scrolled.h> + +#include <gtk/gtkvbox.h> + #include "evolution-shell-client.h" #ifdef __cplusplus diff --git a/shell/e-folder-type-registry.c b/shell/e-folder-type-registry.c index 04ab30824a..e0f0719a20 100644 --- a/shell/e-folder-type-registry.c +++ b/shell/e-folder-type-registry.c @@ -106,13 +106,13 @@ folder_type_new (const char *name, if (icon_path == NULL) new->icon_pixbuf = NULL; else - new->icon_pixbuf = gdk_pixbuf_new_from_file (icon_path); + new->icon_pixbuf = gdk_pixbuf_new_from_file (icon_path, NULL); g_free (icon_path); icon_path = e_shell_get_icon_path (icon_name, TRUE); if (icon_path != NULL) { - new->mini_icon_pixbuf = gdk_pixbuf_new_from_file (icon_path); + new->mini_icon_pixbuf = gdk_pixbuf_new_from_file (icon_path, NULL); } else { if (new->icon_pixbuf != NULL) new->mini_icon_pixbuf = gdk_pixbuf_ref (new->icon_pixbuf); @@ -317,10 +317,8 @@ e_folder_type_registry_set_handler_for_type (EFolderTypeRegistry *folder_type_r const char *type_name, EvolutionShellComponentClient *handler) { - g_return_val_if_fail (folder_type_registry != NULL, FALSE); g_return_val_if_fail (E_IS_FOLDER_TYPE_REGISTRY (folder_type_registry), FALSE); - g_return_val_if_fail (handler != NULL, FALSE); - g_return_val_if_fail (BONOBO_IS_OBJECT_CLIENT (handler), FALSE); + g_return_val_if_fail (EVOLUTION_IS_SHELL_COMPONENT_CLIENT (handler), FALSE); return set_handler (folder_type_registry, type_name, handler); } diff --git a/shell/e-folder.c b/shell/e-folder.c index 2910963deb..54587eac3a 100644 --- a/shell/e-folder.c +++ b/shell/e-folder.c @@ -78,7 +78,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; /* EFolder methods. */ static gboolean -save_info (EFolder *folder) +impl_save_info (EFolder *folder) { g_warning ("`%s' does not implement `EFolder::save_info()'", gtk_type_name (GTK_OBJECT_TYPE (folder))); @@ -86,7 +86,7 @@ save_info (EFolder *folder) } static gboolean -load_info (EFolder *folder) +impl_load_info (EFolder *folder) { g_warning ("`%s' does not implement `EFolder::load_info()'", gtk_type_name (GTK_OBJECT_TYPE (folder))); @@ -94,7 +94,7 @@ load_info (EFolder *folder) } static gboolean -remove (EFolder *folder) +impl_remove (EFolder *folder) { g_warning ("`%s' does not implement `EFolder::remove()'", gtk_type_name (GTK_OBJECT_TYPE (folder))); @@ -102,7 +102,7 @@ remove (EFolder *folder) } static const char * -get_physical_uri (EFolder *folder) +impl_get_physical_uri (EFolder *folder) { return folder->priv->physical_uri; } @@ -144,24 +144,22 @@ class_init (EFolderClass *klass) signals[CHANGED] = gtk_signal_new ("changed", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EFolderClass, changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); signals[NAME_CHANGED] = gtk_signal_new ("name_changed", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EFolderClass, name_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - - klass->save_info = save_info; - klass->load_info = load_info; - klass->remove = remove; - klass->get_physical_uri = get_physical_uri; + klass->save_info = impl_save_info; + klass->load_info = impl_load_info; + klass->remove = impl_remove; + klass->get_physical_uri = impl_get_physical_uri; } static void diff --git a/shell/e-icon-factory.c b/shell/e-icon-factory.c index 75ce7377bf..740aefdbf0 100644 --- a/shell/e-icon-factory.c +++ b/shell/e-icon-factory.c @@ -94,11 +94,11 @@ load_icon (const char *icon_name) char *path; path = g_strconcat (EVOLUTION_IMAGES, "/", icon_name, "-mini.png", NULL); - small_pixbuf = gdk_pixbuf_new_from_file (path); + small_pixbuf = gdk_pixbuf_new_from_file (path, NULL); g_free (path); path = g_strconcat (EVOLUTION_IMAGES, "/", icon_name, ".png", NULL); - large_pixbuf = gdk_pixbuf_new_from_file (path); + large_pixbuf = gdk_pixbuf_new_from_file (path, NULL); g_free (path); if (large_pixbuf == NULL || small_pixbuf == NULL) diff --git a/shell/e-local-folder.c b/shell/e-local-folder.c index 2e25bf0279..734246d28d 100644 --- a/shell/e-local-folder.c +++ b/shell/e-local-folder.c @@ -48,8 +48,8 @@ #include <gnome-xml/parser.h> #include <gnome-xml/xmlmemory.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-util.h> + #include <gal/util/e-util.h> #include <gal/util/e-xml-utils.h> diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c index c5a19876c4..ebd534e4a6 100644 --- a/shell/e-local-storage.c +++ b/shell/e-local-storage.c @@ -38,15 +38,17 @@ #include <sys/param.h> #include <sys/types.h> #include <sys/stat.h> +#include <unistd.h> #include <dirent.h> #include <gtk/gtksignal.h> -#include <libgnome/gnome-defs.h> + #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> + #include <gal/util/e-util.h> #include <gal/widgets/e-unicode.h> -#include <gal/util/e-unicode-i18n.h> + #include "e-util/e-path.h" #include "e-local-folder.h" #include "e-shell-constants.h" @@ -173,14 +175,14 @@ setup_folder_as_stock (ELocalStorage *local_storage, static void setup_stock_folders (ELocalStorage *local_storage) { - setup_folder_as_stock (local_storage, "/Calendar", U_("Calendar"), NULL); - setup_folder_as_stock (local_storage, "/Contacts", U_("Contacts"), NULL); - setup_folder_as_stock (local_storage, "/Drafts", U_("Drafts"), NULL); - setup_folder_as_stock (local_storage, "/Inbox", U_("Inbox"), "inbox"); - setup_folder_as_stock (local_storage, "/Outbox", U_("Outbox"), "outbox"); - setup_folder_as_stock (local_storage, "/Sent", U_("Sent"), NULL); - setup_folder_as_stock (local_storage, "/Tasks", U_("Tasks"), NULL); - setup_folder_as_stock (local_storage, "/Trash", U_("Trash"), NULL); + setup_folder_as_stock (local_storage, "/Calendar", _("Calendar"), NULL); + setup_folder_as_stock (local_storage, "/Contacts", _("Contacts"), NULL); + setup_folder_as_stock (local_storage, "/Drafts", _("Drafts"), NULL); + setup_folder_as_stock (local_storage, "/Inbox", _("Inbox"), "inbox"); + setup_folder_as_stock (local_storage, "/Outbox", _("Outbox"), "outbox"); + setup_folder_as_stock (local_storage, "/Sent", _("Sent"), NULL); + setup_folder_as_stock (local_storage, "/Tasks", _("Tasks"), NULL); + setup_folder_as_stock (local_storage, "/Trash", _("Trash"), NULL); } static gboolean @@ -1099,7 +1101,7 @@ construct (ELocalStorage *local_storage, EFolder *root_folder; int base_path_len; - root_folder = e_folder_new (U_("Local Folders"), "noselect", ""); + root_folder = e_folder_new (_("Local Folders"), "noselect", ""); e_storage_construct (E_STORAGE (local_storage), E_LOCAL_STORAGE_NAME, root_folder); diff --git a/shell/e-setup.c b/shell/e-setup.c index ee5227f789..220f68b4d5 100644 --- a/shell/e-setup.c +++ b/shell/e-setup.c @@ -34,10 +34,8 @@ #include <unistd.h> #include <gtk/gtklabel.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> -#include <libgnomeui/gnome-stock.h> #include <gal/widgets/e-gui-utils.h> #include "e-local-folder.h" @@ -418,41 +416,34 @@ e_setup (const char *evolution_directory) void -e_setup_check_db (Bonobo_ConfigDatabase db, const char *evolution_directory) +e_setup_check_config (EConfigListener *listener, + const char *evolution_directory) { char *uri; - if (bonobo_config_get_string_with_default (db, "/DefaultFolders/mail_path", NULL, NULL) == NULL) { - bonobo_config_set_string (db, "/DefaultFolders/mail_path", - E_LOCAL_INBOX_URI, NULL); + if (e_config_listener_get_string_with_default (listener, "/DefaultFolders/mail_path", NULL, NULL) == NULL) { + e_config_listener_set_string (listener, "/DefaultFolders/mail_path", E_LOCAL_INBOX_URI); uri = g_strconcat ("file://", evolution_directory, "/local", strrchr (E_LOCAL_INBOX_URI, '/'), NULL); - bonobo_config_set_string (db, "/DefaultFolders/mail_uri", - uri, NULL); + e_config_listener_set_string (listener, "/DefaultFolders/mail_uri", uri); g_free (uri); - bonobo_config_set_string (db, "/DefaultFolders/contacts_path", - E_LOCAL_CONTACTS_URI, NULL); + e_config_listener_set_string (listener, "/DefaultFolders/contacts_path", E_LOCAL_CONTACTS_URI); uri = g_strconcat ("file://", evolution_directory, "/local", strrchr (E_LOCAL_CONTACTS_URI, '/'), NULL); - bonobo_config_set_string (db, "/DefaultFolders/contacts_uri", - uri, NULL); + e_config_listener_set_string (listener, "/DefaultFolders/contacts_uri", uri); g_free (uri); - bonobo_config_set_string (db, "/DefaultFolders/calendar_path", - E_LOCAL_CALENDAR_URI, NULL); + e_config_listener_set_string (listener, "/DefaultFolders/calendar_path", E_LOCAL_CALENDAR_URI); uri = g_strconcat ("file://", evolution_directory, "/local", strrchr (E_LOCAL_CALENDAR_URI, '/'), NULL); - bonobo_config_set_string (db, "/DefaultFolders/calendar_uri", - uri, NULL); + e_config_listener_set_string (listener, "/DefaultFolders/calendar_uri", uri); g_free (uri); - bonobo_config_set_string (db, "/DefaultFolders/tasks_path", - E_LOCAL_TASKS_URI, NULL); + e_config_listener_set_string (listener, "/DefaultFolders/tasks_path", E_LOCAL_TASKS_URI); uri = g_strconcat ("file://", evolution_directory, "/local", strrchr (E_LOCAL_TASKS_URI, '/'), NULL); - bonobo_config_set_string (db, "/DefaultFolders/tasks_uri", - uri, NULL); + e_config_listener_set_string (listener, "/DefaultFolders/tasks_uri", uri); g_free (uri); } } diff --git a/shell/e-setup.h b/shell/e-setup.h index cf839044af..e9b228dc1c 100644 --- a/shell/e-setup.h +++ b/shell/e-setup.h @@ -23,12 +23,13 @@ #ifndef _E_SETUP_H #define _E_SETUP_H +#include "e-util/e-config-listener.h" + #include <glib.h> -#include <bonobo-conf/bonobo-config-database.h> -gboolean e_setup (const char *evolution_directory); +gboolean e_setup (const char *evolution_directory); -void e_setup_check_db (Bonobo_ConfigDatabase db, - const char *evolution_directory); +void e_setup_check_config (EConfigListener *config_listener, + const char *evolution_directory); #endif /* _E_SETUP_H */ diff --git a/shell/e-shell-about-box.c b/shell/e-shell-about-box.c index 1e102fa19f..22dd0a7829 100644 --- a/shell/e-shell-about-box.c +++ b/shell/e-shell-about-box.c @@ -145,6 +145,7 @@ timeout_callback (void *data) EShellAboutBoxPrivate *priv; GdkRectangle redraw_rect; GtkWidget *widget; + GdkFont *font; int line_height; int first_line; int y; @@ -155,7 +156,8 @@ timeout_callback (void *data) widget = GTK_WIDGET (about_box); - line_height = widget->style->font->ascent + widget->style->font->descent; + font = gtk_style_get_font (widget->style); + line_height = font->ascent + font->descent; if (priv->text_y_offset < TEXT_HEIGHT) { y = TEXT_Y_OFFSET + (TEXT_HEIGHT - priv->text_y_offset); @@ -181,9 +183,9 @@ timeout_callback (void *data) else line = _(priv->permuted_text[first_line + i]); - x = TEXT_X_OFFSET + (TEXT_WIDTH - gdk_string_width (widget->style->font, line)) / 2; + x = TEXT_X_OFFSET + (TEXT_WIDTH - gdk_string_width (font, line)) / 2; - gdk_draw_string (priv->pixmap, widget->style->font, priv->clipped_gc, x, y, line); + gdk_draw_string (priv->pixmap, font, priv->clipped_gc, x, y, line); y += line_height; } @@ -266,7 +268,7 @@ impl_realize (GtkWidget *widget) about_box = E_SHELL_ABOUT_BOX (widget); priv = about_box->priv; - background_pixbuf = gdk_pixbuf_new_from_file (IMAGE_PATH); + background_pixbuf = gdk_pixbuf_new_from_file (IMAGE_PATH, NULL); g_assert (background_pixbuf != NULL); g_assert (gdk_pixbuf_get_width (background_pixbuf) == WIDTH); g_assert (gdk_pixbuf_get_height (background_pixbuf) == HEIGHT); @@ -325,32 +327,22 @@ impl_unrealize (GtkWidget *widget) } } -static void -impl_draw (GtkWidget *widget, - GdkRectangle *area) -{ - EShellAboutBox *about_box; - EShellAboutBoxPrivate *priv; - - if (! GTK_WIDGET_DRAWABLE (widget)) - return; - - about_box = E_SHELL_ABOUT_BOX (widget); - priv = about_box->priv; - - gdk_draw_pixmap (widget->window, widget->style->black_gc, priv->pixmap, - area->x, area->y, - area->x, area->y, area->width, area->height); -} - static int impl_expose_event (GtkWidget *widget, GdkEventExpose *event) { + EShellAboutBoxPrivate *priv; + if (! GTK_WIDGET_DRAWABLE (widget)) return FALSE; - gtk_widget_draw (widget, &event->area); + priv = E_SHELL_ABOUT_BOX (widget)->priv; + + gdk_draw_pixmap (widget->window, widget->style->black_gc, + priv->pixmap, + event->area.x, event->area.y, + event->area.x, event->area.y, + event->area.width, event->area.height); return TRUE; } @@ -369,7 +361,6 @@ class_init (GtkObjectClass *object_class) widget_class->size_request = impl_size_request; widget_class->realize = impl_realize; widget_class->unrealize = impl_unrealize; - widget_class->draw = impl_draw; widget_class->expose_event = impl_expose_event; } diff --git a/shell/e-shell-config-autocompletion.c b/shell/e-shell-config-autocompletion.c index 4627061248..51c6728dc8 100644 --- a/shell/e-shell-config-autocompletion.c +++ b/shell/e-shell-config-autocompletion.c @@ -32,11 +32,11 @@ #include "Evolution.h" -#include <bonobo-conf/Bonobo_Config.h> #include <bonobo/bonobo-exception.h> #include <libgnome/gnome-i18n.h> #include <gtk/gtkwidget.h> +#include <gtk/gtksignal.h> typedef struct { @@ -44,7 +44,7 @@ typedef struct { GtkWidget *control_widget; - Bonobo_ConfigDatabase db; + EConfigListener *config_listener; EvolutionShellClient *shell_client; } EvolutionAutocompletionConfig; @@ -60,6 +60,9 @@ config_control_destroy_callback (EvolutionConfigControl *config_control, EvolutionAutocompletionConfig *ac) { bonobo_object_unref (BONOBO_OBJECT (ac->shell_client)); + + g_object_unref (ac->config_listener); + g_free (ac); } @@ -69,15 +72,10 @@ config_control_apply_callback (EvolutionConfigControl *config_control, EvolutionAutocompletionConfig *ac) { char *xml; - CORBA_Environment ev; - - CORBA_exception_init (&ev); xml = e_folder_list_get_xml (E_FOLDER_LIST (ac->control_widget)); - bonobo_config_set_string (ac->db, "/Addressbook/Completion/uris", xml, &ev); + e_config_listener_set_string (ac->config_listener, "/Addressbook/Completion/uris", xml); g_free (xml); - - CORBA_exception_free (&ev); } GtkWidget * @@ -90,14 +88,16 @@ e_shell_config_autocompletion_create_widget (EShell *shell, EvolutionConfigContr static const char *possible_types[] = { "contacts/*", NULL }; ac = g_new0 (EvolutionAutocompletionConfig, 1); - ac->db = e_shell_get_config_db (shell); + ac->config_listener = e_config_listener_new (); CORBA_exception_init (&ev); shell_dup = CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (shell)), &ev); ac->shell_client = evolution_shell_client_new (shell_dup); - xml = bonobo_config_get_string (ac->db, "/Addressbook/Completion/uris", &ev); + xml = e_config_listener_get_string_with_default (ac->config_listener, + "/Addressbook/Completion/uris", + NULL, NULL); ac->control_widget = e_folder_list_new (ac->shell_client, xml); g_free (xml); diff --git a/shell/e-shell-config.c b/shell/e-shell-config.c index 94fadeb5e8..19928c1db6 100644 --- a/shell/e-shell-config.c +++ b/shell/e-shell-config.c @@ -56,10 +56,9 @@ e_shell_config_factory_register (EShell *shell) g_return_val_if_fail (E_IS_SHELL (shell), FALSE); - factory = bonobo_generic_factory_new_multi ( - E_SHELL_CONFIG_FACTORY_OAFIID, - config_control_factory_cb, - shell); + factory = bonobo_generic_factory_new (E_SHELL_CONFIG_FACTORY_OAFIID, + config_control_factory_cb, + shell); if (factory == NULL) { g_warning ("Cannot register factory %s", E_SHELL_CONFIG_FACTORY_OAFIID); diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h index 1b6697d558..72c76fbd2c 100644 --- a/shell/e-shell-view.h +++ b/shell/e-shell-view.h @@ -25,7 +25,7 @@ #include "e-task-bar.h" -#include <bonobo/bonobo-win.h> +#include <bonobo/bonobo-window.h> #include <bonobo/bonobo-ui-component.h> #include <bonobo/bonobo-ui-container.h> diff --git a/shell/e-shell.c b/shell/e-shell.c index 203f3bbec4..b5d6cc5b97 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -125,7 +125,7 @@ struct _EShellPrivate { GtkWidget *settings_dialog; /* Configuration Database */ - Bonobo_ConfigDatabase db; + EConfigListener *config_listener; /* Whether the shell is succesfully initialized. This is needed during the start-up sequence, to avoid CORBA calls to do make wrong things @@ -1037,8 +1037,6 @@ destroy (GtkObject *object) priv->is_initialized = FALSE; - e_shell_disconnect_db (shell); - if (priv->iid != NULL) oaf_active_server_unregister (priv->iid, bonobo_object_corba_objref (BONOBO_OBJECT (shell))); @@ -1098,6 +1096,16 @@ destroy (GtkObject *object) e_free_string_list (priv->crash_type_names); + if (priv->settings_dialog != NULL) { + gtk_object_destroy (priv->settings_dialog); + priv->settings_dialog = NULL; + } + + if (priv->config_listener != NULL) { + g_object_unref (priv->config_listener); + priv->config_listener = NULL; + } + g_free (priv); (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); @@ -1254,25 +1262,9 @@ e_shell_construct (EShell *shell, cannot register their own storages. */ if (! setup_corba_storages (shell)) return FALSE; - - CORBA_exception_init (&ev); - - priv->db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev); - if (BONOBO_EX (&ev) || priv->db == CORBA_OBJECT_NIL) { - g_warning ("Cannot access Bonobo/ConfigDatabase on wombat: (%s)", ev._repo_id); - - /* Make sure the DB object is NIL so we don't mess up - (`bonobo_get_object()' might return an undefined value in - the case of an exception). */ - priv->db = CORBA_OBJECT_NIL; - - CORBA_exception_free (&ev); - return E_SHELL_CONSTRUCT_RESULT_NOCONFIGDB; - } - e_setup_check_db (priv->db, local_directory); - - CORBA_exception_free (&ev); + e_setup_check_db (priv->config_listener, local_directory); + /* Now we can register into OAF. Notice that we shouldn't be registering into OAF until we are sure we can complete. */ @@ -2106,11 +2098,11 @@ e_shell_show_settings (EShell *shell, const char *type, EShellView *shell_view) Bonobo_ConfigDatabase -e_shell_get_config_db (EShell *shell) +e_shell_get_config_listener (EShell *shell) { g_return_val_if_fail (E_IS_SHELL (shell), CORBA_OBJECT_NIL); - return shell->priv->db; + return shell->priv->config_listener; } EComponentRegistry * diff --git a/shell/e-shell.h b/shell/e-shell.h index 5e1cb6590e..6f3edb93f6 100644 --- a/shell/e-shell.h +++ b/shell/e-shell.h @@ -23,9 +23,10 @@ #ifndef _E_SHELL_H_ #define _E_SHELL_H_ -#include <liboaf/liboaf.h> /* For the registration stuff. */ +#include "e-util/e-config-listener.h" + +#include <bonobo-activation/bonobo-activation.h> #include <bonobo/bonobo-xobject.h> -#include <bonobo-conf/bonobo-config-database.h> #ifdef __cplusplus extern "C" { @@ -135,7 +136,6 @@ gboolean e_shell_restore_from_settings (EShell *shell, void e_shell_destroy_all_views (EShell *shell); void e_shell_unregister_all (EShell *shell); -void e_shell_disconnect_db (EShell *shell); void e_shell_component_maybe_crashed (EShell *shell, const char *uri, @@ -156,7 +156,7 @@ void e_shell_show_settings (EShell *shell, const char *type, EShellView *shell_view); -Bonobo_ConfigDatabase e_shell_get_config_db (EShell *shell); +EConfigListener *e_shell_get_config_listener (EShell *shell); EComponentRegistry *e_shell_get_component_registry (EShell *shell); EShellUserCreatableItemsHandler *e_shell_get_user_creatable_items_handler (EShell *shell); diff --git a/shell/evolution-activity-client.c b/shell/evolution-activity-client.c index 6ecea011d7..b5babd2780 100644 --- a/shell/evolution-activity-client.c +++ b/shell/evolution-activity-client.c @@ -37,6 +37,7 @@ #include <gtk/gtkmain.h> #include <bonobo/bonobo-listener.h> +#include <bonobo/bonobo-exception.h> #include <gal/util/e-util.h> @@ -99,11 +100,11 @@ corba_update_progress (EvolutionActivityClient *activity_client, progress, &ev); - if (ev._major == CORBA_NO_EXCEPTION) { + if (! BONOBO_EX (&ev)) { retval = TRUE; } else { g_warning ("EvolutionActivityClient: Error updating progress -- %s", - ev._repo_id); + BONOBO_EX_REPOID (&ev)); retval = FALSE; } @@ -136,8 +137,8 @@ update_timeout_callback (void *data) static void listener_callback (BonoboListener *listener, - char *event_name, - CORBA_any *any, + const char *event_name, + const CORBA_any *any, CORBA_Environment *ev, void *data) { @@ -175,9 +176,9 @@ impl_destroy (GtkObject *object) GNOME_Evolution_Activity_operationFinished (priv->activity_interface, priv->activity_id, &ev); - if (ev._major != CORBA_NO_EXCEPTION) + if (BONOBO_EX (&ev)) g_warning ("EvolutionActivityClient: Error reporting completion of operation -- %s", - ev._repo_id); + BONOBO_EX_REPOID (&ev)); CORBA_Object_release (priv->activity_interface, &ev); } @@ -208,7 +209,7 @@ class_init (EvolutionActivityClientClass *klass) signals[SHOW_DETAILS] = gtk_signal_new ("show_details", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionActivityClientClass, show_details), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -216,12 +217,10 @@ class_init (EvolutionActivityClientClass *klass) signals[CANCEL] = gtk_signal_new ("cancel", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionActivityClientClass, cancel), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } @@ -411,8 +410,8 @@ evolution_activity_client_request_dialog (EvolutionActivityClient *activity_clie priv->activity_id, dialog_type, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("EvolutionActivityClient: Error requesting a dialog -- %s", ev._repo_id); + if (BONOBO_EX (&ev) != CORBA_NO_EXCEPTION) { + g_warning ("EvolutionActivityClient: Error requesting a dialog -- %s", BONOBO_EX_REPOID (&ev)); retval = GNOME_Evolution_Activity_DIALOG_ACTION_ERROR; } diff --git a/shell/evolution-config-control.c b/shell/evolution-config-control.c index c5c4bba09a..37845bcb80 100644 --- a/shell/evolution-config-control.c +++ b/shell/evolution-config-control.c @@ -136,13 +136,11 @@ class_init (EvolutionConfigControlClass *class) epv->_get_eventSource = impl__get_eventSource; signals[APPLY] = gtk_signal_new ("apply", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionConfigControlClass, apply), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - parent_class = gtk_type_class (PARENT_TYPE); } diff --git a/shell/evolution-folder-selector-button.c b/shell/evolution-folder-selector-button.c index 19fd5a69ae..b4fc4493b4 100644 --- a/shell/evolution-folder-selector-button.c +++ b/shell/evolution-folder-selector-button.c @@ -23,13 +23,18 @@ #endif #include "evolution-folder-selector-button.h" -#include <bonobo/bonobo-ui-toolbar-icon.h> + #include <gal/util/e-util.h> #include <gal/widgets/e-unicode.h> + #include <gtk/gtkhbox.h> +#include <gtk/gtkimage.h> #include <gtk/gtklabel.h> + #include <libgnome/gnome-i18n.h> +#include <string.h> + struct _EvolutionFolderSelectorButtonPrivate { EvolutionShellClient *shell_client; @@ -89,14 +94,15 @@ set_folder (EvolutionFolderSelectorButton *folder_selector_button, priv->selected_folder = folder; if (!folder) { - bonobo_ui_toolbar_icon_clear (BONOBO_UI_TOOLBAR_ICON (priv->icon)); + /* FIXME: Will this work? */ + gtk_image_set_from_pixbuf (GTK_IMAGE (priv->icon), NULL); gtk_label_set_text (GTK_LABEL (priv->label), _("<click here to select a folder>")); return; } pixbuf = evolution_shell_client_get_pixbuf_for_type (priv->shell_client, folder->type, TRUE); - bonobo_ui_toolbar_icon_set_pixbuf (BONOBO_UI_TOOLBAR_ICON (priv->icon), pixbuf); + gtk_image_set_from_pixbuf (GTK_IMAGE (priv->icon), pixbuf); gdk_pixbuf_unref (pixbuf); folder_lname = e_utf8_to_gtk_string (w, folder->displayName); @@ -163,6 +169,7 @@ clicked (GtkButton *button) (const char **)priv->possible_types, &return_folder); +#if 0 /* FIXME */ /* If the parent gets destroyed despite our best efforts (eg, * because its own parent got destroyed), then the folder * selector button will have been destroyed too and we need @@ -172,6 +179,7 @@ clicked (GtkButton *button) gtk_object_unref (GTK_OBJECT (parent_window)); return; } +#endif gtk_widget_set_sensitive (GTK_WIDGET (parent_window), TRUE); gtk_object_unref (GTK_OBJECT (parent_window)); @@ -201,7 +209,7 @@ destroy (GtkObject *object) folder_selector_button = EVOLUTION_FOLDER_SELECTOR_BUTTON (object); priv = folder_selector_button->priv; - bonobo_object_unref (BONOBO_OBJECT (priv->shell_client)); + g_object_unref (priv->shell_client); g_free (priv->title); for (i = 0; priv->possible_types[i]; i++) g_free (priv->possible_types[i]); @@ -232,24 +240,23 @@ class_init (EvolutionFolderSelectorButtonClass *klass) signals[POPPED_UP] = gtk_signal_new ("popped_up", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionFolderSelectorButtonClass, popped_up), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); signals[SELECTED] = gtk_signal_new ("selected", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionFolderSelectorButtonClass, selected), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); signals[CANCELED] = gtk_signal_new ("canceled", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionFolderSelectorButtonClass, canceled), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } static void @@ -260,7 +267,7 @@ init (EvolutionFolderSelectorButton *folder_selector_button) priv = g_new0 (EvolutionFolderSelectorButtonPrivate, 1); - priv->icon = bonobo_ui_toolbar_icon_new (); + priv->icon = gtk_image_new (); priv->label = gtk_label_new (""); gtk_label_set_justify (GTK_LABEL (priv->label), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.0); @@ -304,7 +311,7 @@ evolution_folder_selector_button_construct (EvolutionFolderSelectorButton *folde priv = folder_selector_button->priv; priv->shell_client = shell_client; - bonobo_object_ref (BONOBO_OBJECT (shell_client)); + g_object_ref (shell_client); priv->corba_storage_registry = evolution_shell_client_get_storage_registry_interface (shell_client); priv->title = g_strdup (title); diff --git a/shell/evolution-session.c b/shell/evolution-session.c index 3c9647981f..01603f993a 100644 --- a/shell/evolution-session.c +++ b/shell/evolution-session.c @@ -32,8 +32,8 @@ #include "evolution-session.h" -#define PARENT_TYPE bonobo_object_get_type () -static BonoboObjectClass *parent_class = NULL; +#define PARENT_TYPE bonobo_x_object_get_type () +static BonoboXObjectClass *parent_class = NULL; struct _EvolutionSessionPrivate { int dummy; @@ -92,28 +92,14 @@ impl_GNOME_Evolution_Session_loadConfiguration (PortableServer_Servant servant, /* Initialization. */ -static POA_GNOME_Evolution_Session__vepv GNOME_Evolution_Session_vepv; - static void -corba_class_init (void) +corba_class_init (EvolutionSessionClass *klass) { - POA_GNOME_Evolution_Session__vepv *vepv; - POA_GNOME_Evolution_Session__epv *epv; - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; + POA_GNOME_Evolution_Session__epv *epv = & (EVOLUTION_SESSION_CLASS (klass)->epv); epv = g_new0 (POA_GNOME_Evolution_Session__epv, 1); epv->saveConfiguration = impl_GNOME_Evolution_Session_saveConfiguration; epv->loadConfiguration = impl_GNOME_Evolution_Session_loadConfiguration; - - vepv = &GNOME_Evolution_Session_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->GNOME_Evolution_Session_epv = epv; } static void @@ -122,14 +108,14 @@ class_init (EvolutionSessionClass *klass) GtkObjectClass *object_class; object_class = GTK_OBJECT_CLASS (klass); - parent_class = gtk_type_class (bonobo_object_get_type ()); + parent_class = gtk_type_class (PARENT_TYPE); object_class->destroy = impl_destroy; signals[LOAD_CONFIGURATION] = gtk_signal_new ("load_configuration", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionSessionClass, load_configuration), gtk_marshal_NONE__STRING, GTK_TYPE_NONE, 1, @@ -137,15 +123,13 @@ class_init (EvolutionSessionClass *klass) signals[SAVE_CONFIGURATION] = gtk_signal_new ("save_configuration", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionSessionClass, save_configuration), gtk_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - - corba_class_init (); + corba_class_init (klass); } static void @@ -159,55 +143,14 @@ init (EvolutionSession *session) } -static GNOME_Evolution_Session -create_corba_session (BonoboObject *object) -{ - POA_GNOME_Evolution_Session *servant; - CORBA_Environment ev; - - servant = (POA_GNOME_Evolution_Session *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &GNOME_Evolution_Session_vepv; - - CORBA_exception_init (&ev); - - POA_GNOME_Evolution_Session__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return CORBA_OBJECT_NIL; - } - - CORBA_exception_free (&ev); - return (GNOME_Evolution_Session) bonobo_object_activate_servant (object, servant); -} - -void -evolution_session_construct (EvolutionSession *session, - CORBA_Object corba_session) -{ - g_return_if_fail (session != NULL); - g_return_if_fail (corba_session != CORBA_OBJECT_NIL); - - bonobo_object_construct (BONOBO_OBJECT (session), corba_session); -} - EvolutionSession * evolution_session_new (void) { - EvolutionSession *session; - GNOME_Evolution_Session corba_session; - - session = gtk_type_new (evolution_session_get_type ()); - - corba_session = create_corba_session (BONOBO_OBJECT (session)); - if (corba_session == CORBA_OBJECT_NIL) { - bonobo_object_unref (BONOBO_OBJECT (session)); - return NULL; - } - - evolution_session_construct (session, corba_session); - return session; + return gtk_type_new (evolution_session_get_type ()); } -E_MAKE_TYPE (evolution_session, "EvolutionSession", EvolutionSession, class_init, init, PARENT_TYPE) +E_MAKE_X_TYPE (evolution_session, "EvolutionSession", EvolutionSession, + class_init, init, PARENT_TYPE, + POA_GNOME_Evolution_Session__init, + GTK_STRUCT_OFFSET (EvolutionSessionClass, epv)) diff --git a/shell/evolution-session.h b/shell/evolution-session.h index a0a36fa810..1310ad9256 100644 --- a/shell/evolution-session.h +++ b/shell/evolution-session.h @@ -23,7 +23,7 @@ #ifndef __EVOLUTION_SESSION_H__ #define __EVOLUTION_SESSION_H__ -#include <bonobo/bonobo-object.h> +#include <bonobo/bonobo-xobject.h> #ifdef __cplusplus extern "C" { @@ -42,13 +42,15 @@ typedef struct _EvolutionSessionPrivate EvolutionSessionPrivate; typedef struct _EvolutionSessionClass EvolutionSessionClass; struct _EvolutionSession { - BonoboObject parent; + BonoboXObject parent; EvolutionSessionPrivate *priv; }; struct _EvolutionSessionClass { - BonoboObjectClass parent_class; + BonoboXObjectClass parent_class; + + POA_GNOME_Evolution_Session__epv epv; void (* save_configuration) (EvolutionSession *session, const char *prefix); void (* load_configuration) (EvolutionSession *session, const char *prefix); @@ -56,8 +58,6 @@ struct _EvolutionSessionClass { GtkType evolution_session_get_type (void); -void evolution_session_construct (EvolutionSession *session, - CORBA_Object corba_session); EvolutionSession *evolution_session_new (void); #ifdef __cplusplus diff --git a/shell/evolution-shell-client.c b/shell/evolution-shell-client.c index f7fb368399..1d2db19203 100644 --- a/shell/evolution-shell-client.c +++ b/shell/evolution-shell-client.c @@ -39,14 +39,16 @@ struct _EvolutionShellClientPrivate { + GNOME_Evolution_Shell corba_objref; + GNOME_Evolution_Activity activity_interface; GNOME_Evolution_Shortcuts shortcuts_interface; GNOME_Evolution_StorageRegistry storage_registry_interface; GHashTable *icons; }; -#define PARENT_TYPE bonobo_object_client_get_type () -static BonoboObjectClientClass *parent_class = NULL; +#define PARENT_TYPE G_TYPE_OBJECT +static GObjectClass *parent_class = NULL; /* Easy-to-use wrapper for Evolution::user_select_folder. */ @@ -80,9 +82,9 @@ query_shell_interface (EvolutionShellClient *shell_client, interface_object = Bonobo_Unknown_queryInterface (bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)), interface_name, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { + if (BONOBO_EX (&ev)) { g_warning ("EvolutionShellClient: Error querying interface %s on %p -- %s", - interface_name, shell_client, ev._repo_id); + interface_name, shell_client, BONOBO_EX_REPOID (&ev)); interface_object = CORBA_OBJECT_NIL; } else if (CORBA_Object_is_nil (interface_object, &ev)) { g_warning ("No interface %s for ShellClient %p", interface_name, shell_client); @@ -278,12 +280,21 @@ destroy (GtkObject *object) CORBA_exception_init (&ev); + if (priv->corba_objref != CORBA_OBJECT_NIL) { + Bonobo_Unknown_unref (priv->corba_objref, &ev); + if (ev._major != CORBA_NO_EXCEPTION) + g_warning ("EvolutionShellClient::destroy: " + "Error unreffing the ::Shell interface -- %s\n", + BONOBO_EX_REPOID (&ev)); + CORBA_Object_release (priv->corba_objref, &ev); + } + if (priv->activity_interface != CORBA_OBJECT_NIL) { Bonobo_Unknown_unref (priv->activity_interface, &ev); if (ev._major != CORBA_NO_EXCEPTION) g_warning ("EvolutionShellClient::destroy: " "Error unreffing the ::Activity interface -- %s\n", - ev._repo_id); + BONOBO_EX_REPOID (&ev)); CORBA_Object_release (priv->activity_interface, &ev); } @@ -292,7 +303,7 @@ destroy (GtkObject *object) if (ev._major != CORBA_NO_EXCEPTION) g_warning ("EvolutionShellClient::destroy: " "Error unreffing the ::Shortcuts interface -- %s\n", - ev._repo_id); + BONOBO_EX_REPOID (&ev)); CORBA_Object_release (priv->shortcuts_interface, &ev); } @@ -301,7 +312,7 @@ destroy (GtkObject *object) if (ev._major != CORBA_NO_EXCEPTION) g_warning ("EvolutionShellClient::destroy: " "Error unreffing the ::StorageRegistry interface -- %s\n", - ev._repo_id); + BONOBO_EX_REPOID (&ev)); CORBA_Object_release (priv->storage_registry_interface, &ev); } @@ -334,6 +345,7 @@ init (EvolutionShellClient *shell_client) EvolutionShellClientPrivate *priv; priv = g_new (EvolutionShellClientPrivate, 1); + priv->corba_objref = CORBA_OBJECT_NIL; priv->activity_interface = CORBA_OBJECT_NIL; priv->shortcuts_interface = CORBA_OBJECT_NIL; priv->storage_registry_interface = CORBA_OBJECT_NIL; @@ -360,11 +372,13 @@ evolution_shell_client_construct (EvolutionShellClient *shell_client, g_return_if_fail (EVOLUTION_IS_SHELL_CLIENT (shell_client)); g_return_if_fail (corba_shell != CORBA_OBJECT_NIL); - bonobo_object_construct (BONOBO_OBJECT (shell_client), (CORBA_Object) corba_shell); - priv = shell_client->priv; g_return_if_fail (priv->activity_interface == CORBA_OBJECT_NIL); + /* (Notice that we don't ref or duplicate, since this is what the old + BonoboObject did.) */ + priv->corba_objref = corba_shell; + priv->activity_interface = query_shell_interface (shell_client, "IDL:GNOME/Evolution/Activity:1.0"); priv->shortcuts_interface = query_shell_interface (shell_client, "IDL:GNOME/Evolution/Shortcuts:1.0"); priv->storage_registry_interface = query_shell_interface (shell_client, "IDL:GNOME/Evolution/StorageRegistry:1.0"); @@ -396,6 +410,20 @@ evolution_shell_client_new (GNOME_Evolution_Shell corba_shell) return shell_client; } +/** + * evolution_shell_client_corba_objref: + * @shell_client: + * + * Return value: Return the CORBA objref associated with this shell client. + **/ +GNOME_Evolution_Shell +evolution_shell_client_corba_objref (EvolutionShellClient *shell_client) +{ + g_return_val_if_fail (EVOLUTION_IS_SHELL_CLIENT (shell_client), CORBA_OBJECT_NIL); + + return shell_client->priv->corba_objref; +} + /** * evolution_shell_client_user_select_folder: @@ -525,7 +553,8 @@ evolution_shell_client_get_local_storage (EvolutionShellClient *shell_client) corba_local_storage = GNOME_Evolution_Shell_getLocalStorage (corba_shell, &ev); if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("evolution_shell_client_get_local_storage() failing -- %s ???", ev._repo_id); + g_warning ("evolution_shell_client_get_local_storage() failing -- %s ???", + BONOBO_EX_REPOID (&ev)); CORBA_exception_free (&ev); return CORBA_OBJECT_NIL; } @@ -623,7 +652,7 @@ evolution_shell_client_create_storage_set_view (EvolutionShellClient *shell_clie control = GNOME_Evolution_Shell_createStorageSetView (corba_shell, ev); if (BONOBO_EX (ev)) { - g_warning ("Cannot create StorageSetView -- %s", BONOBO_EX_ID (ev)); + g_warning ("Cannot create StorageSetView -- %s", BONOBO_EX_REPOID (ev)); CORBA_exception_free (&my_ev); return NULL; } diff --git a/shell/evolution-shell-client.h b/shell/evolution-shell-client.h index 3122c4312c..18fe144929 100644 --- a/shell/evolution-shell-client.h +++ b/shell/evolution-shell-client.h @@ -23,10 +23,11 @@ #ifndef __EVOLUTION_SHELL_CLIENT_H__ #define __EVOLUTION_SHELL_CLIENT_H__ -#include <bonobo/bonobo-object-client.h> #include <gtk/gtkwindow.h> #include <gdk-pixbuf/gdk-pixbuf.h> +#include <glib-object.h> + #include "Evolution.h" #ifdef __cplusplus @@ -46,13 +47,13 @@ typedef struct _EvolutionShellClientPrivate EvolutionShellClientPrivate; typedef struct _EvolutionShellClientClass EvolutionShellClientClass; struct _EvolutionShellClient { - BonoboObjectClient parent; + GObject base; EvolutionShellClientPrivate *priv; }; struct _EvolutionShellClientClass { - BonoboObjectClientClass parent_class; + GObjectClass parent_class; }; @@ -61,6 +62,8 @@ void evolution_shell_client_construct (EvolutionShe GNOME_Evolution_Shell corba_shell); EvolutionShellClient *evolution_shell_client_new (GNOME_Evolution_Shell shell); +GNOME_Evolution_Shell evolution_shell_client_corba_objref (EvolutionShellClient *shell_client); + void evolution_shell_client_user_select_folder (EvolutionShellClient *shell_client, GtkWindow *parent, const char *title, diff --git a/shell/evolution-shell-component-client.c b/shell/evolution-shell-component-client.c index 9276c6fa0f..3ea637410b 100644 --- a/shell/evolution-shell-component-client.c +++ b/shell/evolution-shell-component-client.c @@ -28,8 +28,9 @@ #include <gtk/gtksignal.h> #include <gtk/gtktypeutils.h> -#include <liboaf/liboaf.h> +#include <bonobo-activation/bonobo-activation.h> +#include <bonobo/bonobo-exception.h> #include <bonobo/bonobo-main.h> #include <bonobo/bonobo-widget.h> @@ -40,10 +41,12 @@ char *evolution_debug_log; -#define PARENT_TYPE BONOBO_OBJECT_CLIENT_TYPE -static BonoboObjectClass *parent_class = NULL; +#define PARENT_TYPE G_TYPE_OBJECT +static GObjectClass *parent_class = NULL; struct _EvolutionShellComponentClientPrivate { + GNOME_Evolution_ShellComponent corba_objref; + char *id; EvolutionShellComponentClientCallback callback; @@ -71,21 +74,21 @@ corba_exception_to_result (const CORBA_Environment *ev) return EVOLUTION_SHELL_COMPONENT_OK; if (ev->_major == CORBA_USER_EXCEPTION) { - if (strcmp (ev->_repo_id, ex_GNOME_Evolution_ShellComponent_AlreadyOwned) == 0) + if (strcmp (BONOBO_EX_REPOID (ev), ex_GNOME_Evolution_ShellComponent_AlreadyOwned) == 0) return EVOLUTION_SHELL_COMPONENT_ALREADYOWNED; - if (strcmp (ev->_repo_id, ex_GNOME_Evolution_ShellComponent_OldOwnerHasDied) == 0) + if (strcmp (BONOBO_EX_REPOID (ev), ex_GNOME_Evolution_ShellComponent_OldOwnerHasDied) == 0) return EVOLUTION_SHELL_COMPONENT_OLDOWNERHASDIED; - if (strcmp (ev->_repo_id, ex_GNOME_Evolution_ShellComponent_NotOwned) == 0) + if (strcmp (BONOBO_EX_REPOID (ev), ex_GNOME_Evolution_ShellComponent_NotOwned) == 0) return EVOLUTION_SHELL_COMPONENT_NOTOWNED; - if (strcmp (ev->_repo_id, ex_GNOME_Evolution_ShellComponent_NotFound) == 0) + if (strcmp (BONOBO_EX_REPOID (ev), ex_GNOME_Evolution_ShellComponent_NotFound) == 0) return EVOLUTION_SHELL_COMPONENT_NOTFOUND; - if (strcmp (ev->_repo_id, ex_GNOME_Evolution_ShellComponent_UnsupportedType) == 0) + if (strcmp (BONOBO_EX_REPOID (ev), ex_GNOME_Evolution_ShellComponent_UnsupportedType) == 0) return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE; - if (strcmp (ev->_repo_id, ex_GNOME_Evolution_ShellComponent_InternalError) == 0) + if (strcmp (BONOBO_EX_REPOID (ev), ex_GNOME_Evolution_ShellComponent_InternalError) == 0) return EVOLUTION_SHELL_COMPONENT_INTERNALERROR; - if (strcmp (ev->_repo_id, ex_GNOME_Evolution_ShellComponent_Busy) == 0) + if (strcmp (BONOBO_EX_REPOID (ev), ex_GNOME_Evolution_ShellComponent_Busy) == 0) return EVOLUTION_SHELL_COMPONENT_BUSY; - if (strcmp (ev->_repo_id, ex_GNOME_Evolution_ShellComponent_UnsupportedSchema) == 0) + if (strcmp (BONOBO_EX_REPOID (ev), ex_GNOME_Evolution_ShellComponent_UnsupportedSchema) == 0) return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDSCHEMA; return EVOLUTION_SHELL_COMPONENT_UNKNOWNERROR; @@ -302,34 +305,52 @@ impl_destroy (GtkObject *object) shell_component_client = EVOLUTION_SHELL_COMPONENT_CLIENT (object); priv = shell_component_client->priv; + if (priv == NULL) + return; + g_free (priv->id); + priv->id = NULL; - if (priv->callback != NULL) + if (priv->callback != NULL) { dispatch_callback (shell_component_client, EVOLUTION_SHELL_COMPONENT_INTERRUPTED); + priv->callback = NULL; + } CORBA_exception_init (&ev); + if (priv->corba_objref != CORBA_OBJECT_NIL) { + Bonobo_Unknown_unref (priv->corba_objref, &ev); + CORBA_Object_release (priv->corba_objref, &ev); + priv->corba_objref = CORBA_OBJECT_NIL; + } + if (priv->dnd_source_folder_interface != CORBA_OBJECT_NIL) { Bonobo_Unknown_unref (priv->dnd_source_folder_interface, &ev); CORBA_Object_release (priv->dnd_source_folder_interface, &ev); + priv->dnd_source_folder_interface = CORBA_OBJECT_NIL; } if (priv->dnd_destination_folder_interface != CORBA_OBJECT_NIL) { Bonobo_Unknown_unref (priv->dnd_destination_folder_interface, &ev); CORBA_Object_release (priv->dnd_destination_folder_interface, &ev); + priv->dnd_destination_folder_interface = CORBA_OBJECT_NIL; } if (priv->offline_interface != CORBA_OBJECT_NIL) { Bonobo_Unknown_unref (priv->offline_interface, &ev); CORBA_Object_release (priv->offline_interface, &ev); + priv->offline_interface = CORBA_OBJECT_NIL; } - if (priv->listener_interface != CORBA_OBJECT_NIL) + if (priv->listener_interface != CORBA_OBJECT_NIL) { destroy_listener_interface (shell_component_client); + priv->listener_interface = CORBA_OBJECT_NIL; + } CORBA_exception_free (&ev); g_free (priv); + shell_component_client->priv = NULL; (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -353,6 +374,8 @@ init (EvolutionShellComponentClient *shell_component_client) priv = g_new (EvolutionShellComponentClientPrivate, 1); + priv->corba_objref = CORBA_OBJECT_NIL; + priv->id = NULL; priv->listener_interface = CORBA_OBJECT_NIL; @@ -383,10 +406,8 @@ evolution_shell_component_client_construct (EvolutionShellComponentClient *shell g_return_if_fail (corba_object != CORBA_OBJECT_NIL); priv = shell_component_client->priv; + priv->corba_objref = corba_object; priv->id = g_strdup (id); - - bonobo_object_client_construct (BONOBO_OBJECT_CLIENT (shell_component_client), - corba_object); } EvolutionShellComponentClient * @@ -407,7 +428,7 @@ evolution_shell_component_client_new (const char *id, else local_ev = ev; - corba_object = oaf_activate_from_id ((char *) id, 0, NULL, ev); + corba_object = bonobo_activation_activate_from_id ((char *) id, 0, NULL, ev); if (ev->_major != CORBA_NO_EXCEPTION || corba_object == NULL) { CORBA_exception_free (&static_ev); return NULL; diff --git a/shell/evolution-shell-component-client.h b/shell/evolution-shell-component-client.h index 0c302b38e5..584d04703c 100644 --- a/shell/evolution-shell-component-client.h +++ b/shell/evolution-shell-component-client.h @@ -23,7 +23,8 @@ #ifndef EVOLUTION_SHELL_COMPONENT_CLIENT_H #define EVOLUTION_SHELL_COMPONENT_CLIENT_H -#include <bonobo/bonobo-object-client.h> +#include <glib-object.h> + #include <bonobo/bonobo-ui-container.h> #include <bonobo/bonobo-ui-component.h> @@ -46,13 +47,13 @@ typedef struct _EvolutionShellComponentClientPrivate EvolutionShellComponentClie typedef struct _EvolutionShellComponentClientClass EvolutionShellComponentClientClass; struct _EvolutionShellComponentClient { - BonoboObjectClient parent; + GObject parent; EvolutionShellComponentClientPrivate *priv; }; struct _EvolutionShellComponentClientClass { - BonoboObjectClientClass parent_class; + GObjectClass parent_class; }; typedef void (* EvolutionShellComponentClientCallback) (EvolutionShellComponentClient *shell_component_client, diff --git a/shell/evolution-shell-component-dnd.c b/shell/evolution-shell-component-dnd.c index c2d2d247a8..7648d98677 100644 --- a/shell/evolution-shell-component-dnd.c +++ b/shell/evolution-shell-component-dnd.c @@ -20,15 +20,16 @@ * Author: Chris Toshok */ -#include <gal/util/e-util.h> - #include "Evolution.h" #include "evolution-shell-component-dnd.h" +#include <gal/util/e-util.h> + +#include <gtk/gtkobject.h> -#define PARENT_TYPE (bonobo_object_get_type ()) +#define PARENT_TYPE (bonobo_x_object_get_type ()) -static BonoboObjectClass *parent_class; +static BonoboXObjectClass *parent_class; /* Source Folder stuff */ @@ -54,7 +55,7 @@ dnd_source_destroy (GtkObject *object) g_free (priv); - GTK_OBJECT_CLASS (parent_class)->destroy (object); + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void @@ -122,54 +123,6 @@ impl_GNOME_Evolution_ShellComponentDnd_SourceFolder_endDrag (PortableServer_Serv priv->end_drag (folder, source_context, priv->user_data); } -static POA_GNOME_Evolution_ShellComponentDnd_SourceFolder__vepv SourceFolder_vepv; - -static POA_GNOME_Evolution_ShellComponentDnd_SourceFolder * -create_dnd_source_servant (void) -{ - POA_GNOME_Evolution_ShellComponentDnd_SourceFolder *servant; - CORBA_Environment ev; - - servant = (POA_GNOME_Evolution_ShellComponentDnd_SourceFolder *)g_new0 (BonoboObjectServant, 1); - servant->vepv = &SourceFolder_vepv; - - CORBA_exception_init (&ev); - POA_GNOME_Evolution_ShellComponentDnd_SourceFolder__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - -static void -source_corba_class_init (void) -{ - POA_GNOME_Evolution_ShellComponentDnd_SourceFolder__vepv *vepv; - POA_GNOME_Evolution_ShellComponentDnd_SourceFolder__epv *epv; - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; - - epv = g_new0 (POA_GNOME_Evolution_ShellComponentDnd_SourceFolder__epv, 1); - epv->beginDrag = impl_GNOME_Evolution_ShellComponentDnd_SourceFolder_beginDrag; - epv->getData = impl_GNOME_Evolution_ShellComponentDnd_SourceFolder_getData; - epv->deleteData = impl_GNOME_Evolution_ShellComponentDnd_SourceFolder_deleteData; - epv->endDrag = impl_GNOME_Evolution_ShellComponentDnd_SourceFolder_endDrag; - - vepv = &SourceFolder_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->GNOME_Evolution_ShellComponentDnd_SourceFolder_epv = epv; -} - static void evolution_shell_component_dnd_source_folder_class_init (EvolutionShellComponentDndSourceFolderClass *klass) { @@ -178,9 +131,12 @@ evolution_shell_component_dnd_source_folder_class_init (EvolutionShellComponentD object_class = GTK_OBJECT_CLASS (klass); object_class->destroy = dnd_source_destroy; - parent_class = gtk_type_class (PARENT_TYPE); + klass->epv.beginDrag = impl_GNOME_Evolution_ShellComponentDnd_SourceFolder_beginDrag; + klass->epv.getData = impl_GNOME_Evolution_ShellComponentDnd_SourceFolder_getData; + klass->epv.deleteData = impl_GNOME_Evolution_ShellComponentDnd_SourceFolder_deleteData; + klass->epv.endDrag = impl_GNOME_Evolution_ShellComponentDnd_SourceFolder_endDrag; - source_corba_class_init (); + parent_class = gtk_type_class (PARENT_TYPE); } static void @@ -193,36 +149,14 @@ evolution_shell_component_dnd_source_folder_init (EvolutionShellComponentDndSour folder->priv = priv; } - -E_MAKE_TYPE (evolution_shell_component_dnd_source_folder, "EvolutionShellComponentDndSourceFolder", - EvolutionShellComponentDndSourceFolder, evolution_shell_component_dnd_source_folder_class_init, - evolution_shell_component_dnd_source_folder_init, PARENT_TYPE); - -static void -evolution_shell_component_dnd_source_folder_construct (EvolutionShellComponentDndSourceFolder *dnd_source, - DndSourceFolderBeginDragFn begin_drag, - DndSourceFolderGetDataFn get_data, - DndSourceFolderDeleteDataFn delete_data, - DndSourceFolderEndDragFn end_drag, - gpointer user_data, - GNOME_Evolution_ShellComponentDnd_SourceFolder corba_object) -{ - DndSourceFolderPrivate *priv; - - g_return_if_fail (dnd_source != NULL); - g_return_if_fail (IS_EVOLUTION_SHELL_COMPONENT_DND_SOURCE_FOLDER (dnd_source)); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - - priv = dnd_source->priv; - - priv->begin_drag = begin_drag; - priv->get_data = get_data; - priv->delete_data = delete_data; - priv->end_drag = end_drag; - priv->user_data = user_data; - - bonobo_object_construct (BONOBO_OBJECT (dnd_source), corba_object); -} +E_MAKE_X_TYPE (evolution_shell_component_dnd_source_folder, + "EvolutionShellComponentDndSourceFolder", + EvolutionShellComponentDndSourceFolder, + evolution_shell_component_dnd_source_folder_class_init, + evolution_shell_component_dnd_source_folder_init, + PARENT_TYPE, + POA_GNOME_Evolution_ShellComponentDnd_SourceFolder__init, + GTK_STRUCT_OFFSET (EvolutionShellComponentDndSourceFolderClass, epv)) EvolutionShellComponentDndSourceFolder* evolution_shell_component_dnd_source_folder_new (DndSourceFolderBeginDragFn begin_drag, @@ -232,27 +166,20 @@ evolution_shell_component_dnd_source_folder_new (DndSourceFolderBeginDragFn begi gpointer user_data) { EvolutionShellComponentDndSourceFolder *dnd_source; - POA_GNOME_Evolution_ShellComponentDnd_SourceFolder *servant; - GNOME_Evolution_ShellComponentDnd_SourceFolder corba_object; g_return_val_if_fail (begin_drag != NULL, NULL); g_return_val_if_fail (get_data != NULL, NULL); g_return_val_if_fail (delete_data != NULL, NULL); g_return_val_if_fail (end_drag != NULL, NULL); - servant = create_dnd_source_servant(); - if (servant == NULL) - return NULL; - dnd_source = gtk_type_new (evolution_shell_component_dnd_source_folder_get_type ()); - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (dnd_source), - servant); - - evolution_shell_component_dnd_source_folder_construct (dnd_source, - begin_drag, get_data, - delete_data, end_drag, - user_data, - corba_object); + + dnd_source->priv->begin_drag = begin_drag; + dnd_source->priv->get_data = get_data; + dnd_source->priv->delete_data = delete_data; + dnd_source->priv->end_drag = end_drag; + dnd_source->priv->user_data = user_data; + return dnd_source; } @@ -321,52 +248,6 @@ impl_GNOME_Evolution_ShellComponentDnd_DestinationFolder_handleDrop (PortableSer return priv->handle_drop (folder, physical_uri, folder_type, destination_context, action, data, priv->user_data); } -static POA_GNOME_Evolution_ShellComponentDnd_DestinationFolder__vepv DestinationFolder_vepv; - -static POA_GNOME_Evolution_ShellComponentDnd_DestinationFolder * -create_dnd_destination_servant (void) -{ - POA_GNOME_Evolution_ShellComponentDnd_DestinationFolder *servant; - CORBA_Environment ev; - - servant = (POA_GNOME_Evolution_ShellComponentDnd_DestinationFolder *)g_new0 (BonoboObjectServant, 1); - servant->vepv = &DestinationFolder_vepv; - - CORBA_exception_init (&ev); - POA_GNOME_Evolution_ShellComponentDnd_DestinationFolder__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - -static void -destination_corba_class_init (void) -{ - POA_GNOME_Evolution_ShellComponentDnd_DestinationFolder__vepv *vepv; - POA_GNOME_Evolution_ShellComponentDnd_DestinationFolder__epv *epv; - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; - - epv = g_new0 (POA_GNOME_Evolution_ShellComponentDnd_DestinationFolder__epv, 1); - epv->handleMotion = impl_GNOME_Evolution_ShellComponentDnd_DestinationFolder_handleMotion; - epv->handleDrop = impl_GNOME_Evolution_ShellComponentDnd_DestinationFolder_handleDrop; - - vepv = &DestinationFolder_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->GNOME_Evolution_ShellComponentDnd_DestinationFolder_epv = epv; -} - static void evolution_shell_component_dnd_destination_folder_class_init (EvolutionShellComponentDndDestinationFolderClass *klass) { @@ -375,9 +256,10 @@ evolution_shell_component_dnd_destination_folder_class_init (EvolutionShellCompo object_class = GTK_OBJECT_CLASS (klass); object_class->destroy = dnd_destination_destroy; - parent_class = gtk_type_class (PARENT_TYPE); + klass->epv.handleMotion = impl_GNOME_Evolution_ShellComponentDnd_DestinationFolder_handleMotion; + klass->epv.handleDrop = impl_GNOME_Evolution_ShellComponentDnd_DestinationFolder_handleDrop; - destination_corba_class_init (); + parent_class = gtk_type_class (PARENT_TYPE); } static void @@ -391,56 +273,31 @@ evolution_shell_component_dnd_destination_folder_init (EvolutionShellComponentDn } -E_MAKE_TYPE (evolution_shell_component_dnd_destination_folder, "EvolutionShellComponentDndDestinationFolder", - EvolutionShellComponentDndDestinationFolder, evolution_shell_component_dnd_destination_folder_class_init, - evolution_shell_component_dnd_destination_folder_init, PARENT_TYPE); - -static void -evolution_shell_component_dnd_destination_folder_construct (EvolutionShellComponentDndDestinationFolder *dnd_destination, - DndDestinationFolderHandleMotionFn handle_motion, - DndDestinationFolderHandleDropFn handle_drop, - gpointer user_data, - GNOME_Evolution_ShellComponentDnd_DestinationFolder corba_object) -{ - DndDestinationFolderPrivate *priv; - - g_return_if_fail (dnd_destination != NULL); - g_return_if_fail (IS_EVOLUTION_SHELL_COMPONENT_DND_DESTINATION_FOLDER (dnd_destination)); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - - priv = dnd_destination->priv; +E_MAKE_X_TYPE (evolution_shell_component_dnd_destination_folder, + "EvolutionShellComponentDndDestinationFolder", + EvolutionShellComponentDndDestinationFolder, + evolution_shell_component_dnd_destination_folder_class_init, + evolution_shell_component_dnd_destination_folder_init, + PARENT_TYPE, + POA_GNOME_Evolution_ShellComponentDnd_DestinationFolder__init, + GTK_STRUCT_OFFSET (EvolutionShellComponentDndDestinationFolderClass, epv)) - priv->handle_motion = handle_motion; - priv->handle_drop = handle_drop; - priv->user_data = user_data; - - bonobo_object_construct (BONOBO_OBJECT (dnd_destination), corba_object); -} - -EvolutionShellComponentDndDestinationFolder* +EvolutionShellComponentDndDestinationFolder * evolution_shell_component_dnd_destination_folder_new (DndDestinationFolderHandleMotionFn handle_motion, DndDestinationFolderHandleDropFn handle_drop, gpointer user_data) { EvolutionShellComponentDndDestinationFolder *dnd_destination; - POA_GNOME_Evolution_ShellComponentDnd_DestinationFolder *servant; - GNOME_Evolution_ShellComponentDnd_DestinationFolder corba_object; g_return_val_if_fail (handle_motion != NULL, NULL); g_return_val_if_fail (handle_drop != NULL, NULL); - servant = create_dnd_destination_servant(); - if (servant == NULL) - return NULL; - dnd_destination = gtk_type_new (evolution_shell_component_dnd_destination_folder_get_type ()); - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (dnd_destination), - servant); - evolution_shell_component_dnd_destination_folder_construct (dnd_destination, - handle_motion, handle_drop, - user_data, - corba_object); + dnd_destination->priv->handle_motion = handle_motion; + dnd_destination->priv->handle_drop = handle_drop; + dnd_destination->priv->user_data = user_data; + return dnd_destination; } diff --git a/shell/evolution-shell-component-dnd.h b/shell/evolution-shell-component-dnd.h index 78df2b6ee2..c97c625d3c 100644 --- a/shell/evolution-shell-component-dnd.h +++ b/shell/evolution-shell-component-dnd.h @@ -23,7 +23,9 @@ #ifndef EVOLUTION_SHELL_COMPONENT_DND_H #define EVOLUTION_SHELL_COMPONENT_DND_H -#include <bonobo/bonobo-object.h> +#include <bonobo/bonobo-xobject.h> +#include <gtk/gtktypeutils.h> + #include "Evolution.h" #ifdef cplusplus @@ -63,12 +65,14 @@ typedef void (*DndSourceFolderEndDragFn)(EvolutionShellComponentDndSourceFolder gpointer closure); struct _EvolutionShellComponentDndSourceFolder { - BonoboObject object; + BonoboXObject object; DndSourceFolderPrivate *priv; }; struct _EvolutionShellComponentDndSourceFolderClass { - BonoboObjectClass parent_class; + BonoboXObjectClass parent_class; + + POA_GNOME_Evolution_ShellComponentDnd_SourceFolder__epv epv; }; GtkType evolution_shell_component_dnd_source_folder_get_type (void); @@ -108,12 +112,14 @@ typedef CORBA_boolean (*DndDestinationFolderHandleDropFn)(EvolutionShellComponen gpointer closure); struct _EvolutionShellComponentDndDestinationFolder { - BonoboObject object; + BonoboXObject object; DndDestinationFolderPrivate *priv; }; struct _EvolutionShellComponentDndDestinationFolderClass { - BonoboObjectClass parent_class; + BonoboXObjectClass parent_class; + + POA_GNOME_Evolution_ShellComponentDnd_DestinationFolder__epv epv; }; GtkType evolution_shell_component_dnd_destination_folder_get_type (void); diff --git a/shell/evolution-shell-component-utils.c b/shell/evolution-shell-component-utils.c index b9e5215e69..17434f6dea 100644 --- a/shell/evolution-shell-component-utils.c +++ b/shell/evolution-shell-component-utils.c @@ -25,13 +25,12 @@ #include "evolution-shell-component-utils.h" -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> #include <bonobo/bonobo-ui-util.h> #include <bonobo/bonobo-moniker-util.h> #include <bonobo/bonobo-exception.h> -#include <liboaf/oaf.h> +#include <bonobo-activation/bonobo-activation.h> #include <gal/widgets/e-gui-utils.h> static void free_pixmaps (void); @@ -58,7 +57,7 @@ void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache) path = g_concat_dir_and_file (EVOLUTION_IMAGES, pixcache [i].fname); - pixbuf = gdk_pixbuf_new_from_file (path); + pixbuf = gdk_pixbuf_new_from_file (path, NULL); if (pixbuf == NULL) { g_warning ("Cannot load image -- %s", path); } else { @@ -122,14 +121,14 @@ e_activation_failure_dialog (GtkWindow *parent, const char *msg, CORBA_Object_release (object, &ev); } errmsg = g_strdup_printf (_("%s\n\nUnknown error."), msg); - } else if (strcmp (CORBA_exception_id (&ev), ex_OAF_GeneralError) != 0) { + } else if (strcmp (CORBA_exception_id (&ev), ex_Bonobo_GeneralError) != 0) { char *bonobo_err = bonobo_exception_get_text (&ev); errmsg = g_strdup_printf (_("%s\n\nThe error from the " "component system is:\n%s"), msg, bonobo_err); g_free (bonobo_err); } else { - OAF_GeneralError *errval = CORBA_exception_value (&ev); + Bonobo_GeneralError *errval = CORBA_exception_value (&ev); errmsg = g_strdup_printf (_("%s\n\nThe error from the " "activation system is:\n%s"), @@ -158,10 +157,10 @@ e_get_activation_failure_msg (CORBA_Environment *ev) if (CORBA_exception_id (ev) == NULL) return NULL; - if (strcmp (CORBA_exception_id (ev), ex_OAF_GeneralError) != 0) { + if (strcmp (CORBA_exception_id (ev), ex_Bonobo_GeneralError) != 0) { return bonobo_exception_get_text (ev); } else { - const OAF_GeneralError *oaf_general_error; + const Bonobo_GeneralError *oaf_general_error; oaf_general_error = CORBA_exception_value (ev); return g_strdup (oaf_general_error->description); diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c index 44f7e42c3d..6c286d19c1 100644 --- a/shell/evolution-shell-component.c +++ b/shell/evolution-shell-component.c @@ -29,6 +29,7 @@ #include "e-shell-corba-icon-utils.h" #include <fcntl.h> +#include <unistd.h> #include <glib.h> #include <gtk/gtksignal.h> @@ -224,7 +225,7 @@ owner_ping_callback (void *data) CORBA_exception_init (&ev); owner_objref = CORBA_Object_duplicate (owner_objref, &ev); - alive = bonobo_unknown_ping (owner_objref); + alive = bonobo_unknown_ping (owner_objref, NULL); CORBA_Object_release (owner_objref, &ev); CORBA_exception_free (&ev); @@ -658,7 +659,7 @@ impl_populateFolderContextMenu (PortableServer_Servant servant, } priv->uic = bonobo_ui_component_new_default (); - bonobo_ui_component_set_container (priv->uic, corba_uih); + bonobo_ui_component_set_container (priv->uic, corba_uih, NULL); bonobo_object_release_unref (corba_uih, NULL); (* priv->populate_folder_context_menu_fn) (shell_component, priv->uic, physical_uri, type, priv->closure); @@ -868,7 +869,7 @@ class_init (EvolutionShellComponentClass *klass) signals[OWNER_SET] = gtk_signal_new ("owner_set", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, owner_set), gtk_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, @@ -877,7 +878,7 @@ class_init (EvolutionShellComponentClass *klass) signals[OWNER_DIED] = gtk_signal_new ("owner_died", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, owner_died), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -885,7 +886,7 @@ class_init (EvolutionShellComponentClass *klass) signals[OWNER_UNSET] = gtk_signal_new ("owner_unset", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, owner_unset), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -893,7 +894,7 @@ class_init (EvolutionShellComponentClass *klass) signals[DEBUG] = gtk_signal_new ("debug", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, debug), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -901,7 +902,7 @@ class_init (EvolutionShellComponentClass *klass) signals[INTERACTIVE] = gtk_signal_new ("interactive", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, interactive), gtk_marshal_NONE__BOOL, GTK_TYPE_NONE, 1, @@ -910,7 +911,7 @@ class_init (EvolutionShellComponentClass *klass) signals[HANDLE_EXTERNAL_URI] = gtk_signal_new ("handle_external_uri", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, handle_external_uri), gtk_marshal_NONE__STRING, GTK_TYPE_NONE, 1, @@ -919,7 +920,7 @@ class_init (EvolutionShellComponentClass *klass) signals[USER_CREATE_NEW_ITEM] = gtk_signal_new ("user_create_new_item", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, user_create_new_item), gtk_marshal_NONE__POINTER_POINTER_POINTER, GTK_TYPE_NONE, 3, @@ -930,14 +931,12 @@ class_init (EvolutionShellComponentClass *klass) signals[SEND_RECEIVE] = gtk_signal_new ("send_receive", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, send_receive), gtk_marshal_NONE__BOOL, GTK_TYPE_NONE, 1, GTK_TYPE_BOOL); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - parent_class = gtk_type_class (PARENT_TYPE); epv->_get_supportedTypes = impl__get_supportedTypes; diff --git a/shell/evolution-shell-view.c b/shell/evolution-shell-view.c index 8925438b5a..fc700876e4 100644 --- a/shell/evolution-shell-view.c +++ b/shell/evolution-shell-view.c @@ -31,8 +31,8 @@ #include "evolution-shell-view.h" -#define PARENT_TYPE bonobo_object_get_type () -static BonoboObjectClass *parent_class = NULL; +#define PARENT_TYPE bonobo_x_object_get_type () +static BonoboXObjectClass *parent_class = NULL; struct _EvolutionShellViewPrivate { int dummy; @@ -52,30 +52,6 @@ static int signals[LAST_SIGNAL] = { 0 }; /* CORBA interface implementation. */ -static POA_GNOME_Evolution_ShellView__vepv ShellView_vepv; - -static POA_GNOME_Evolution_ShellView * -create_servant (void) -{ - POA_GNOME_Evolution_ShellView *servant; - CORBA_Environment ev; - - servant = (POA_GNOME_Evolution_ShellView *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &ShellView_vepv; - CORBA_exception_init (&ev); - - POA_GNOME_Evolution_ShellView__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - static void impl_ShellView_set_message (PortableServer_Servant servant, const CORBA_char *message, @@ -162,18 +138,15 @@ destroy (GtkObject *object) static void -corba_class_init (void) +class_init (EvolutionShellViewClass *klass) { - POA_GNOME_Evolution_ShellView__vepv *vepv; POA_GNOME_Evolution_ShellView__epv *epv; - PortableServer_ServantBase__epv *base_epv; + GtkObjectClass *object_class; - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; + object_class = GTK_OBJECT_CLASS (klass); + object_class->destroy = destroy; - epv = g_new0 (POA_GNOME_Evolution_ShellView__epv, 1); + epv = &klass->epv; epv->setMessage = impl_ShellView_set_message; epv->unsetMessage = impl_ShellView_unset_message; epv->changeCurrentView = impl_ShellView_change_current_view; @@ -181,24 +154,10 @@ corba_class_init (void) epv->setFolderBarLabel = impl_ShellView_set_folder_bar_label; epv->showSettings = impl_ShellView_show_settings; - vepv = &ShellView_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->GNOME_Evolution_ShellView_epv = epv; -} - -static void -class_init (EvolutionShellViewClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; - signals[SET_MESSAGE] = gtk_signal_new ("set_message", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellViewClass, set_message), gtk_marshal_NONE__POINTER_INT, GTK_TYPE_NONE, 2, @@ -208,7 +167,7 @@ class_init (EvolutionShellViewClass *klass) signals[UNSET_MESSAGE] = gtk_signal_new ("unset_message", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellViewClass, unset_message), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -216,7 +175,7 @@ class_init (EvolutionShellViewClass *klass) signals[CHANGE_VIEW] = gtk_signal_new ("change_current_view", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellViewClass, change_current_view), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, @@ -225,7 +184,7 @@ class_init (EvolutionShellViewClass *klass) signals[SET_TITLE] = gtk_signal_new ("set_title", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellViewClass, set_title), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, @@ -234,7 +193,7 @@ class_init (EvolutionShellViewClass *klass) signals[SET_FOLDER_BAR_LABEL] = gtk_signal_new ("set_folder_bar_label", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellViewClass, set_folder_bar_label), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, @@ -243,16 +202,12 @@ class_init (EvolutionShellViewClass *klass) signals[SHOW_SETTINGS] = gtk_signal_new ("show_settings", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionShellViewClass, show_settings), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - - parent_class = gtk_type_class (bonobo_object_get_type ()); - - corba_class_init (); + parent_class = gtk_type_class (bonobo_x_object_get_type ()); } static void @@ -267,22 +222,6 @@ init (EvolutionShellView *shell_view) } -/** - * evolution_shell_view_construct: - * @shell_view: - * @corba_object: - * - * Construct @shell_view with the specified @corba_object. - **/ -void -evolution_shell_view_construct (EvolutionShellView *shell_view, - GNOME_Evolution_ShellView corba_object) -{ - g_return_if_fail (shell_view != NULL); - g_return_if_fail (EVOLUTION_IS_SHELL_VIEW (shell_view)); - - bonobo_object_construct (BONOBO_OBJECT (shell_view), corba_object); -} /** * evolution_shell_view_new: @@ -294,22 +233,11 @@ evolution_shell_view_construct (EvolutionShellView *shell_view, EvolutionShellView * evolution_shell_view_new (void) { - POA_GNOME_Evolution_ShellView *servant; - GNOME_Evolution_ShellView corba_object; - EvolutionShellView *new; - - servant = create_servant (); - if (servant == NULL) - return NULL; - - new = gtk_type_new (evolution_shell_view_get_type ()); - - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (new), servant); - - evolution_shell_view_construct (new, corba_object); - - return new; + return gtk_type_new (evolution_shell_view_get_type ()); } -E_MAKE_TYPE (evolution_shell_view, "EvolutionShellView", EvolutionShellView, class_init, init, PARENT_TYPE) +E_MAKE_X_TYPE (evolution_shell_view, "EvolutionShellView", EvolutionShellView, + class_init, init, PARENT_TYPE, + POA_GNOME_Evolution_ShellView__init, + GTK_STRUCT_OFFSET (EvolutionShellViewClass, epv)) diff --git a/shell/evolution-shell-view.h b/shell/evolution-shell-view.h index bcf38fd417..38dddd00a5 100644 --- a/shell/evolution-shell-view.h +++ b/shell/evolution-shell-view.h @@ -24,7 +24,8 @@ #define __EVOLUTION_SHELL_VIEW_H__ #include <glib.h> -#include <bonobo/bonobo-object.h> +#include <bonobo/bonobo-xobject.h> + #include "Evolution.h" #ifdef __cplusplus @@ -44,13 +45,13 @@ typedef struct _EvolutionShellViewPrivate EvolutionShellViewPrivate; typedef struct _EvolutionShellViewClass EvolutionShellViewClass; struct _EvolutionShellView { - BonoboObject parent; + BonoboXObject parent; EvolutionShellViewPrivate *priv; }; struct _EvolutionShellViewClass { - BonoboObjectClass parent_class; + BonoboXObjectClass parent_class; /* Signals. */ @@ -60,12 +61,12 @@ struct _EvolutionShellViewClass { void (* set_title) (EvolutionShellView *shell_view, const char *message); void (* set_folder_bar_label) (EvolutionShellView *shell_view, const char *text); void (* show_settings) (EvolutionShellView *shell_view); + + POA_GNOME_Evolution_ShellView__epv epv; }; GtkType evolution_shell_view_get_type (void); -void evolution_shell_view_construct (EvolutionShellView *shell_view, - GNOME_Evolution_ShellView corba_object); EvolutionShellView *evolution_shell_view_new (void); #ifdef __cplusplus diff --git a/shell/evolution-storage-listener.c b/shell/evolution-storage-listener.c index 1f08f5fff8..9d1c225f02 100644 --- a/shell/evolution-storage-listener.c +++ b/shell/evolution-storage-listener.c @@ -259,14 +259,14 @@ class_init (EvolutionStorageListenerClass *klass) signals[DESTROYED] = gtk_signal_new ("destroyed", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageListenerClass, destroyed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); signals[NEW_FOLDER] = gtk_signal_new ("new_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageListenerClass, new_folder), gtk_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, @@ -275,7 +275,7 @@ class_init (EvolutionStorageListenerClass *klass) signals[UPDATE_FOLDER] = gtk_signal_new ("update_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageListenerClass, update_folder), gtk_marshal_NONE__POINTER_INT, GTK_TYPE_NONE, 2, @@ -284,7 +284,7 @@ class_init (EvolutionStorageListenerClass *klass) signals[REMOVED_FOLDER] = gtk_signal_new ("removed_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageListenerClass, removed_folder), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, @@ -292,15 +292,13 @@ class_init (EvolutionStorageListenerClass *klass) signals[HAS_SUBFOLDERS] = gtk_signal_new ("has_subfolders", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageListenerClass, has_subfolders), gtk_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, GTK_TYPE_STRING, GTK_TYPE_STRING); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - corba_class_init (); } diff --git a/shell/evolution-storage-set-view-listener.c b/shell/evolution-storage-set-view-listener.c index 310a2f2844..e5e52fe797 100644 --- a/shell/evolution-storage-set-view-listener.c +++ b/shell/evolution-storage-set-view-listener.c @@ -201,20 +201,18 @@ class_init (EvolutionStorageSetViewListenerClass *klass) signals[FOLDER_SELECTED] = gtk_signal_new ("folder_selected", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageSetViewListenerClass, folder_selected), gtk_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); signals[FOLDER_TOGGLED] = gtk_signal_new ("folder_toggled", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageSetViewListenerClass, folder_toggled), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - corba_class_init (); } diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c index 15be4e761e..3f01e23c7c 100644 --- a/shell/evolution-storage.c +++ b/shell/evolution-storage.c @@ -33,6 +33,8 @@ #include "e-shell-constants.h" #include "e-shell-corba-icon-utils.h" +#include "e-shell-marshal.h" + #include <gal/util/e-util.h> #include <gtk/gtksignal.h> @@ -43,7 +45,7 @@ #define PARENT_TYPE BONOBO_OBJECT_TYPE -static BonoboObjectClass *parent_class = NULL; +static BonoboXObjectClass *parent_class = NULL; struct _FolderPropertyItem { char *label; @@ -231,31 +233,6 @@ folder_destroy_notify (EFolderTree *tree, /* CORBA interface implementation. */ -static POA_GNOME_Evolution_Storage__vepv Storage_vepv; - -static POA_GNOME_Evolution_Storage * -create_servant (void) -{ - POA_GNOME_Evolution_Storage *servant; - CORBA_Environment ev; - - servant = (POA_GNOME_Evolution_Storage *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &Storage_vepv; - - CORBA_exception_init (&ev); - - POA_GNOME_Evolution_Storage__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - static CORBA_char * impl_Storage__get_name (PortableServer_Servant servant, CORBA_Environment *ev) @@ -686,82 +663,40 @@ destroy (GtkObject *object) static void -corba_class_init (void) -{ - POA_GNOME_Evolution_Storage__vepv *vepv; - - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; - - vepv = &Storage_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->GNOME_Evolution_Storage_epv = evolution_storage_get_epv (); -} - -/* The worst signal marshaller in Scotland */ -typedef void (*GtkSignal_NONE__POINTER_POINTER_POINTER_POINTER_POINTER) (GtkObject *, - gpointer, gpointer, gpointer, gpointer, gpointer, - gpointer user_data); - -static void -e_marshal_NONE__POINTER_POINTER_POINTER_POINTER_POINTER (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args) -{ - GtkSignal_NONE__POINTER_POINTER_POINTER_POINTER_POINTER rfunc; - - rfunc = (GtkSignal_NONE__POINTER_POINTER_POINTER_POINTER_POINTER) func; - (*rfunc) (object, - GTK_VALUE_POINTER (args[0]), - GTK_VALUE_POINTER (args[1]), - GTK_VALUE_POINTER (args[2]), - GTK_VALUE_POINTER (args[3]), - GTK_VALUE_POINTER (args[4]), - func_data); -} - -typedef void (*GtkSignal_NONE__POINTER_POINTER_POINTER) (GtkObject *, - gpointer, gpointer, gpointer, - gpointer user_data); - -static void -e_marshal_NONE__POINTER_POINTER_POINTER (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args) -{ - GtkSignal_NONE__POINTER_POINTER_POINTER rfunc; - - rfunc = (GtkSignal_NONE__POINTER_POINTER_POINTER) func; - (*rfunc) (object, - GTK_VALUE_POINTER (args[0]), - GTK_VALUE_POINTER (args[1]), - GTK_VALUE_POINTER (args[2]), - func_data); -} - -static void class_init (EvolutionStorageClass *klass) { + POA_GNOME_Evolution_Storage__epv *epv; GtkObjectClass *object_class; object_class = GTK_OBJECT_CLASS (klass); object_class->destroy = destroy; - parent_class = gtk_type_class (bonobo_object_get_type ()); + epv = & klass->epv; + epv->_get_name = impl_Storage__get_name; + epv->_get_hasSharedFolders = impl_Storage__get_hasSharedFolders; + epv->getFolderAtPath = impl_Storage_getFolderAtPath; + epv->_get_folderList = impl_Storage__get_folderList; + epv->asyncCreateFolder = impl_Storage_asyncCreateFolder; + epv->asyncRemoveFolder = impl_Storage_asyncRemoveFolder; + epv->asyncXferFolder = impl_Storage_asyncXferFolder; + epv->asyncOpenFolder = impl_Storage_asyncOpenFolder; + epv->updateFolder = impl_Storage_updateFolder; + epv->asyncDiscoverSharedFolder = impl_Storage_asyncDiscoverSharedFolder; + epv->cancelDiscoverSharedFolder = impl_Storage_cancelDiscoverSharedFolder; + epv->asyncRemoveSharedFolder = impl_Storage_asyncRemoveSharedFolder; + epv->addListener = impl_Storage_addListener; + epv->removeListener = impl_Storage_removeListener; + epv->showFolderProperties = impl_Storage_showFolderProperties; + epv->_get_folderPropertyItems = impl_Storage__get_folderPropertyItems; + + parent_class = gtk_type_class (PARENT_TYPE); signals[CREATE_FOLDER] = gtk_signal_new ("create_folder", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageClass, create_folder), - e_marshal_NONE__POINTER_POINTER_POINTER_POINTER_POINTER, + e_shell_marshal_NONE__POINTER_POINTER_POINTER_POINTER_POINTER, GTK_TYPE_NONE, 5, GTK_TYPE_POINTER, GTK_TYPE_STRING, @@ -771,10 +706,10 @@ class_init (EvolutionStorageClass *klass) signals[REMOVE_FOLDER] = gtk_signal_new ("remove_folder", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageClass, remove_folder), - e_marshal_NONE__POINTER_POINTER_POINTER, + e_shell_marshal_NONE__POINTER_POINTER_POINTER, GTK_TYPE_NONE, 3, GTK_TYPE_POINTER, GTK_TYPE_STRING, @@ -782,10 +717,10 @@ class_init (EvolutionStorageClass *klass) signals[XFER_FOLDER] = gtk_signal_new ("xfer_folder", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageClass, xfer_folder), - e_marshal_NONE__POINTER_POINTER_POINTER_BOOL, + e_shell_marshal_NONE__POINTER_POINTER_POINTER_BOOL, GTK_TYPE_NONE, 4, GTK_TYPE_POINTER, GTK_TYPE_STRING, @@ -794,29 +729,29 @@ class_init (EvolutionStorageClass *klass) signals[UPDATE_FOLDER] = gtk_signal_new ("update_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageClass, update_folder), - gtk_marshal_NONE__POINTER_INT, + e_shell_marshal_NONE__POINTER_INT, GTK_TYPE_NONE, 2, GTK_TYPE_STRING, GTK_TYPE_INT); signals[OPEN_FOLDER] = gtk_signal_new ("open_folder", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageClass, open_folder), - gtk_marshal_NONE__POINTER, + e_shell_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); signals[DISCOVER_SHARED_FOLDER] = gtk_signal_new ("discover_shared_folder", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageClass, discover_shared_folder), - e_marshal_NONE__POINTER_POINTER_POINTER, + e_shell_marshal_NONE__POINTER_POINTER_POINTER, GTK_TYPE_NONE, 3, GTK_TYPE_POINTER, GTK_TYPE_STRING, @@ -824,38 +759,34 @@ class_init (EvolutionStorageClass *klass) signals[CANCEL_DISCOVER_SHARED_FOLDER] = gtk_signal_new ("cancel_discover_shared_folder", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageClass, cancel_discover_shared_folder), - gtk_marshal_NONE__POINTER_POINTER, + e_shell_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, GTK_TYPE_STRING, GTK_TYPE_STRING); signals[REMOVE_SHARED_FOLDER] = gtk_signal_new ("remove_shared_folder", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageClass, remove_shared_folder), - gtk_marshal_NONE__POINTER_POINTER, + e_shell_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, GTK_TYPE_STRING, GTK_TYPE_POINTER); signals[SHOW_FOLDER_PROPERTIES] = gtk_signal_new ("show_folder_properties", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionStorageClass, show_folder_properties), - gtk_marshal_NONE__POINTER_INT_INT, + e_shell_marshal_NONE__POINTER_INT_INT, GTK_TYPE_NONE, 3, GTK_TYPE_STRING, GTK_TYPE_INT, GTK_TYPE_INT); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - - corba_class_init (); } static void @@ -875,56 +806,20 @@ init (EvolutionStorage *storage) } -POA_GNOME_Evolution_Storage__epv * -evolution_storage_get_epv (void) -{ - POA_GNOME_Evolution_Storage__epv *epv; - - epv = g_new0 (POA_GNOME_Evolution_Storage__epv, 1); - epv->_get_name = impl_Storage__get_name; - epv->_get_hasSharedFolders = impl_Storage__get_hasSharedFolders; - epv->getFolderAtPath = impl_Storage_getFolderAtPath; - epv->_get_folderList = impl_Storage__get_folderList; - epv->asyncCreateFolder = impl_Storage_asyncCreateFolder; - epv->asyncRemoveFolder = impl_Storage_asyncRemoveFolder; - epv->asyncXferFolder = impl_Storage_asyncXferFolder; - epv->asyncOpenFolder = impl_Storage_asyncOpenFolder; - epv->updateFolder = impl_Storage_updateFolder; - epv->asyncDiscoverSharedFolder = impl_Storage_asyncDiscoverSharedFolder; - epv->cancelDiscoverSharedFolder = impl_Storage_cancelDiscoverSharedFolder; - epv->asyncRemoveSharedFolder = impl_Storage_asyncRemoveSharedFolder; - epv->addListener = impl_Storage_addListener; - epv->removeListener = impl_Storage_removeListener; - epv->showFolderProperties = impl_Storage_showFolderProperties; - epv->_get_folderPropertyItems = impl_Storage__get_folderPropertyItems; - - return epv; -} - void evolution_storage_construct (EvolutionStorage *storage, - GNOME_Evolution_Storage corba_object, const char *name, gboolean has_shared_folders) { EvolutionStoragePrivate *priv; - CORBA_Environment ev; - g_return_if_fail (storage != NULL); g_return_if_fail (EVOLUTION_IS_STORAGE (storage)); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); g_return_if_fail (name != NULL); g_return_if_fail (name[0] != '\0'); - CORBA_exception_init (&ev); - - bonobo_object_construct (BONOBO_OBJECT (storage), corba_object); - priv = storage->priv; priv->name = g_strdup (name); priv->has_shared_folders = !! has_shared_folders; - - CORBA_exception_free (&ev); } EvolutionStorage * @@ -932,20 +827,13 @@ evolution_storage_new (const char *name, gboolean has_shared_folders) { EvolutionStorage *new; - POA_GNOME_Evolution_Storage *servant; - GNOME_Evolution_Storage corba_object; g_return_val_if_fail (name != NULL, NULL); g_return_val_if_fail (name[0] != '\0', NULL); - servant = create_servant (); - if (servant == NULL) - return NULL; - new = gtk_type_new (evolution_storage_get_type ()); - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (new), servant); - evolution_storage_construct (new, corba_object, name, has_shared_folders); + evolution_storage_construct (new, name, has_shared_folders); return new; } @@ -1428,4 +1316,7 @@ evolution_storage_add_property_item (EvolutionStorage *evolution_storage, } -E_MAKE_TYPE (evolution_storage, "EvolutionStorage", EvolutionStorage, class_init, init, PARENT_TYPE) +E_MAKE_X_TYPE (evolution_storage, "EvolutionStorage", EvolutionStorage, + class_init, init, PARENT_TYPE, + POA_GNOME_Evolution_Storage__init, + GTK_STRUCT_OFFSET (EvolutionStorageClass, epv)) diff --git a/shell/evolution-storage.h b/shell/evolution-storage.h index 439c883246..027b85b7ae 100644 --- a/shell/evolution-storage.h +++ b/shell/evolution-storage.h @@ -23,12 +23,14 @@ #ifndef __EVOLUTION_STORAGE_H__ #define __EVOLUTION_STORAGE_H__ -#include <glib.h> -#include <bonobo/bonobo-object.h> - #include "Evolution.h" +#include <glib.h> + #include <gdk-pixbuf/gdk-pixbuf.h> +#include <gtk/gtktypeutils.h> + +#include <bonobo/bonobo-xobject.h> #ifdef __cplusplus extern "C" { @@ -74,13 +76,13 @@ enum _EvolutionStorageResult { typedef enum _EvolutionStorageResult EvolutionStorageResult; struct _EvolutionStorage { - BonoboObject parent; + BonoboXObject parent; EvolutionStoragePrivate *priv; }; struct _EvolutionStorageClass { - BonoboObjectClass parent_class; + BonoboXObjectClass parent_class; /* signals */ void (*create_folder) (EvolutionStorage *storage, @@ -125,14 +127,13 @@ struct _EvolutionStorageClass { const char *path, unsigned int itemNumber, unsigned long parentWindowId); + + POA_GNOME_Evolution_Storage__epv epv; }; -POA_GNOME_Evolution_Storage__epv *evolution_storage_get_epv (void); - GtkType evolution_storage_get_type (void); void evolution_storage_construct (EvolutionStorage *storage, - GNOME_Evolution_Storage corba_object, const char *name, gboolean has_shared_folders); EvolutionStorage *evolution_storage_new (const char *name, diff --git a/shell/evolution-wizard.c b/shell/evolution-wizard.c index 07ad4fe0b0..9b036e517a 100644 --- a/shell/evolution-wizard.c +++ b/shell/evolution-wizard.c @@ -171,38 +171,36 @@ evolution_wizard_class_init (EvolutionWizardClass *klass) object_class->destroy = evolution_wizard_destroy; signals[NEXT] = gtk_signal_new ("next", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionWizardClass, next), gtk_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); signals[PREPARE] = gtk_signal_new ("prepare", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionWizardClass, prepare), gtk_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); signals[BACK] = gtk_signal_new ("back", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionWizardClass, back), gtk_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); signals[FINISH] = gtk_signal_new ("finish", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionWizardClass, finish), gtk_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); signals[CANCEL] = gtk_signal_new ("cancel", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionWizardClass, cancel), gtk_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); signals[HELP] = gtk_signal_new ("help", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EvolutionWizardClass, help), gtk_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - parent_class = gtk_type_class (PARENT_TYPE); epv->_get_pageCount = impl_GNOME_Evolution_Wizard__get_pageCount; @@ -296,7 +294,7 @@ evolution_wizard_set_buttons_sensitive (EvolutionWizard *wizard, } s = back_sensitive << 2 | next_sensitive << 1 | cancel_sensitive; - any._type = (CORBA_TypeCode) TC_short; + any._type = (CORBA_TypeCode) TC_CORBA_short; any._value = &s; bonobo_event_source_notify_listeners (priv->event_source, @@ -331,7 +329,7 @@ evolution_wizard_set_show_finish (EvolutionWizard *wizard, } b = show_finish; - any._type = (CORBA_TypeCode) TC_boolean; + any._type = (CORBA_TypeCode) TC_CORBA_boolean; any._value = &b; bonobo_event_source_notify_listeners (priv->event_source, @@ -369,7 +367,7 @@ evolution_wizard_set_page (EvolutionWizard *wizard, } s = page_number; - any._type = (CORBA_TypeCode) TC_short; + any._type = (CORBA_TypeCode) TC_CORBA_short; any._value = &s; bonobo_event_source_notify_listeners (priv->event_source, diff --git a/shell/evolution-wizard.h b/shell/evolution-wizard.h index 617d7bb3a5..fe51ab13d7 100644 --- a/shell/evolution-wizard.h +++ b/shell/evolution-wizard.h @@ -9,12 +9,11 @@ #ifndef __EVOLUTION_WIZARD_H__ #define __EVOLUTION_WIZARD_H__ +#include <bonobo/bonobo-xobject.h> #include <bonobo/bonobo-control.h> #include <bonobo/bonobo-event-source.h> -#include <Evolution.h> - -BEGIN_GNOME_DECLS +#include "Evolution.h" typedef struct _EvolutionWizard EvolutionWizard; typedef struct _EvolutionWizardPrivate EvolutionWizardPrivate; @@ -81,6 +80,4 @@ void evolution_wizard_set_page (EvolutionWizard *wizard, BonoboEventSource * evolution_wizard_get_event_source (EvolutionWizard *wizard); -END_GNOME_DECLS - #endif /* __EVOLUTION_WIZARD_H__ */ diff --git a/widgets/ChangeLog b/widgets/ChangeLog index d96c40de8e..6a3a93ae75 100644 --- a/widgets/ChangeLog +++ b/widgets/ChangeLog @@ -1,3 +1,18 @@ +2002-11-01 Ettore Perazzoli <ettore@ximian.com> + + * menus/gal-view-menus.c (build_stuff): Add some casts. + +2002-10-30 Ettore Perazzoli <ettore@ximian.com> + + * e-timezone-dialog/e-timezone-dialog.c + (e_timezone_dialog_construct): Pass NULL as the domain arg to + glade_xml_new(). + (e_timezone_dialog_get_timezone): Make arg display_name const. + (find_selected_point): Constify local variable timezone. + + * e-timezone-dialog/e-timezone-dialog.h: Do not #include + <libgnome/gnome-defs.h>. + 2002-08-15 Mike Kestner <mkestner@ximian.com> * menus/gal-view-menus.c (build_stuff): ref/unref the gvm diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c index 6b99bf4689..fa2b994012 100644 --- a/widgets/e-timezone-dialog/e-timezone-dialog.c +++ b/widgets/e-timezone-dialog/e-timezone-dialog.c @@ -246,8 +246,7 @@ e_timezone_dialog_construct (ETimezoneDialog *etd) /* Load the content widgets */ - priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/e-timezone-dialog.glade", - NULL); + priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/e-timezone-dialog.glade", NULL, NULL); if (!priv->xml) { g_message ("e_timezone_dialog_construct(): Could not load the Glade XML file!"); goto error; @@ -546,7 +545,7 @@ get_zone_from_point (ETimezoneDialog *etd, It will be in the GTK+ encoding, i.e. not UTF-8. */ char* e_timezone_dialog_get_timezone (ETimezoneDialog *etd, - char **display_name) + const char **display_name) { ETimezoneDialogPrivate *priv; @@ -612,7 +611,7 @@ find_selected_point (ETimezoneDialog *etd) { ETimezoneDialogPrivate *priv; icalarray *zones; - char *current_zone; + const char *current_zone; EMapPoint *point = NULL; int i; diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.h b/widgets/e-timezone-dialog/e-timezone-dialog.h index 00283b4bc4..f81791bb6f 100644 --- a/widgets/e-timezone-dialog/e-timezone-dialog.h +++ b/widgets/e-timezone-dialog/e-timezone-dialog.h @@ -22,7 +22,6 @@ #ifndef __E_TIMEZONE_DIALOG_H__ #define __E_TIMEZONE_DIALOG_H__ -#include <libgnome/gnome-defs.h> #include <gtk/gtkwidget.h> #include <ical.h> @@ -64,7 +63,7 @@ ETimezoneDialog* e_timezone_dialog_new (void); so you need to convert it back to English before trying to load it. It will be in the GTK+ encoding, i.e. not UTF-8. */ char* e_timezone_dialog_get_timezone (ETimezoneDialog *etd, - char **display_name); + const char **display_name); /* Sets the TZID and displayed name of the timezone. The TZID may be NULL for a 'local time' (i.e. display_name is NULL or "") or if it is a builtin diff --git a/widgets/menus/gal-view-menus.c b/widgets/menus/gal-view-menus.c index 1595e6f144..dc9f581e0c 100644 --- a/widgets/menus/gal-view-menus.c +++ b/widgets/menus/gal-view-menus.c @@ -433,7 +433,7 @@ build_stuff (GalViewMenus *gvm, { char *xml; - gtk_object_ref (gvm); + gtk_object_ref (GTK_OBJECT (gvm)); gal_view_menus_unmerge (gvm, ev); @@ -447,7 +447,7 @@ build_stuff (GalViewMenus *gvm, set_radio (gvm, ev); - gtk_object_unref (gvm); + gtk_object_unref (GTK_OBJECT (gvm)); } void diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 94109a5bd9..c8ebe00d0c 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,141 @@ +2002-11-01 Ettore Perazzoli <ettore@ximian.com> + + * test-title-bar.c: #include <libgnomeui/gnome-ui-init.h> instead + of <libgnomeui/gnome-init.h>. + (main): Use a GtkLabel, not a GtkText. + + * test-dropdown-button.c: #include <libgnomeui/gnome-ui-init.h> + instead of <libgnomeui/gnome-init.h>, and + <libgnomeui/gnome-stock-icons.h> instead of + <libgnomeui/gnome-stock.h>. + + * test-dateedit.c: #include <libgnomeui/gnome-ui-init.h> instead + of <libgnomeui/gnome-init.h>. + (main): Use gnome_program_init(). + + * test-calendar.c: #include <libgnomeui/gnome-ui-init.h>. + + * e-url-entry.c (button_clicked_cb): Pass NULL as the error arg to + gnome_url_show(). + + * e-title-bar.c (class_init): GTK2-ified. Use GTK_TYPE_POINTER + instead of GTK_TYPE_GDK_EVENT. + + * e-search-bar.c: Removed #include <libgnome/gnome-defs.h>. + #include <string.h>. + (class_init): GTK2-ified. + (e_search_bar_set_menu): Use GTK_OBJECT_GET_CLASS. + (e_search_bar_set_option): Likewise. + + * e-messagebox.c (e_message_box_class_init): Updated to put + finalize in GObjectClass intead of GtkObjectClass. + (e_message_box_finalize): Likewise. + (e_message_box_construct): Just check if pixmap is NULL, instead + of pixmap->pixmap. + + * e-messagebox.h: No {BEGIN,END}_GNOME_DECLS. + (e_message_box_get_type): Fix prototype, should return GtkType + instead of guint. + + * e-map.c: Removed e_map_signals, which was unused. + (e_map_finalize): Update for the fact that finalize is now in + GObjectClass. + (e_map_class_init): Likewise. Also GTK2-ify. + (e_map_draw): Removed. + (load_map_background): Pass NULL as the gdk_pixbuf_new_from_file() + error arg. + + * e-dropdown-button.c (menu_position_cb): Added arg push_in. + + * e-dateedit.c (e_date_edit_class_init): GTK2-ified. + (e_date_edit_show_date_popup): Constify local variable. + (e_date_edit_check_date_changed): Likewise. + (e_date_edit_check_time_changed): Likewise. + (e_date_edit_check_date_changed): Likewise. + (field_set_to_none): Constify arg text. + (e_date_edit_parse_date): Constify arg date_text. + (e_date_edit_parse_time): Constify arg time_text. + + * e-dateedit.h: No {BEGIN,END}_GNOME_DECLS. + + * e-combo-button.c (menu_position_func): New arg push_in. + (impl_draw): Removed. + (class_init): GTK2-ified. + (init): style->xthickness instead of style->klass->xthickness. + + * e-config-page.c (class_init): GTK2-ified. + + * e-clipped-label.c (e_clipped_label_size_request): Use + gtk_style_get_font(). + (e_clipped_label_recalc_chars_displayed): Likewise. + (e_clipped_label_expose): Likewise. + + * e-charset-picker.c: No #include <libgnome/gnome-defs.h> or + <libgnome/gnome-i18n.h> or <libgnome/gnome-stock.h>. Also no + <gal/gunicode.h>. On the other hand, #include <gtk/gtkvbox.h>. + (e_charset_picker_new): Make locale_charset const. + (e_charset_picker_bonobo_ui_populate): Make locale_charset const. + + * e-cell-percent.c: #include <stdio.h> for sscanf(). + + * e-cell-percent.h: Removed BEGIN_GNOME_DECLS, END_GNOME_DECLS. + + * e-cell-percent.c: Do not #include <libgnomeui/gnome-stock.h>. + + * e-cell-date-edit.c: Do not #include <libgnomeui/gnome-stock.h>. + Added a bunch of #includes for GTK stuff. + (e_cell_date_edit_on_ok_clicked): Constified variable. + + * e-calendar-item.c: Do not #include <libgnome/gnome-defs.h>. + (e_calendar_item_class_init): Use GTK_TYPE_POINTER instead of + GTK_TYPE_GDK_POINTER. + (e_calendar_item_class_init): GTK_CLASS_TYPE() instead of + object_class->type. + (e_calendar_item_class_init): No gtk_object_class_add_signals(). + (e_calendar_item_update): style->[xy]thickness instead of + style->klass->[xy]thickness. + (e_calendar_item_draw): Likewise. + (e_calendar_item_draw_month): Likewise. + (e_calendar_item_draw_month): Likewise. + (e_calendar_item_recalc_sizes): Likewise. + (e_calendar_item_convert_position_to_day): Likewise. + (e_calendar_item_update): Use gtk_style_get_font(). + (e_calendar_item_draw_month): Likewise. + (e_calendar_item_draw_day_numbers): Likewise. + (e_calendar_item_convert_position_to_day): Likewise. + (e_calendar_item_recalc_sizes): Likewise. + (e_calendar_item_signal_emission_idle_cb): Removed check for + GTK_OBJECT_DESTROY. + (e_calendar_item_position_menu): Add push_in arg. + + * e-calendar.c (e_calendar_draw): Remove. + (e_calendar_size_request): style->[xy]thickness instead of + style->klass->[xy]thickness. + (e_calendar_size_allocate): Likewise. + (e_calendar_get_border_size): Likewise. + (e_calendar_size_allocate): Get font from style with + gtk_style_get_font(). + + * e-calendar-item.h: #include <libgnomecanvas/gnome-canvas.h> + instead of <libgnomeui/gnome-canvas.h>. + * e-calendar.c: Likewise for + <libgnomecanvas/gnome-canvas-widget.h>. + + * Makefile.am: Don't compile e-bonobo-widget.c, e-bonobo-widget.h. + [Unused right now, so we can avoid porting until, and if, they are + needed.] + + * e-filter-bar.c: Do not #include <libgnome/gnome-defs.h>. Do not + #include <libgnomeui/gnome-stock.h>. #include <gtk/gtksignal.h>. + Also remove gal #includes. + (do_advanced): Add some GTK_SIGNAL_FUNC() casts. + (menubar_activated): Likewise. + (menubar_activated): Likewise. + +2002-10-30 Ettore Perazzoli <ettore@ximian.com> + + * e-map.h: Do not #include <libgnome/gnome-defs.h>. + 2002-10-28 Jeffrey Stedfast <fejj@ximian.com> * e-search-bar.c (clear_search): Emit a search_activated signal. diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am index 3e71f36498..7e02313f13 100644 --- a/widgets/misc/Makefile.am +++ b/widgets/misc/Makefile.am @@ -15,7 +15,6 @@ privlib_LIBRARIES = \ widgetsincludedir = $(includedir)/evolution/widgets widgetsinclude_HEADERS = \ - e-bonobo-widget.h \ e-calendar.h \ e-calendar-item.h \ e-cell-date-edit.h \ @@ -35,7 +34,6 @@ widgetsinclude_HEADERS = \ libemiscwidgets_a_SOURCES = \ $(widgetsinclude_HEADERS) \ - e-bonobo-widget.c \ e-calendar.c \ e-calendar-item.c \ e-cell-date-edit.c \ diff --git a/widgets/misc/e-bonobo-widget.c b/widgets/misc/e-bonobo-widget.c index 491c0ed7cb..7302356860 100644 --- a/widgets/misc/e-bonobo-widget.c +++ b/widgets/misc/e-bonobo-widget.c @@ -28,7 +28,7 @@ #include "e-bonobo-widget.h" -#include <gal/util/e-util.h> +#include <bonobo/bonobo-control.h> #include <gdk/gdkprivate.h> #include <gdk/gdkx.h> diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index 4a53b10e96..6a7e4494d2 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -37,7 +37,6 @@ #include <gtk/gtkmenuitem.h> #include <gtk/gtklabel.h> #include <gtk/gtksignal.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <gal/util/e-util.h> @@ -214,6 +213,7 @@ static void e_calendar_item_on_menu_item_activate(GtkWidget *menuitem, static void e_calendar_item_position_menu (GtkMenu *menu, gint *x, gint *y, + gboolean *push_in, gpointer user_data); static void e_calendar_item_date_range_changed (ECalendarItem *calitem); static void e_calendar_item_queue_signal_emission (ECalendarItem *calitem); @@ -291,10 +291,10 @@ e_calendar_item_class_init (ECalendarItemClass *class) GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2); gtk_object_add_arg_type ("ECalendarItem::font", - GTK_TYPE_GDK_FONT, GTK_ARG_READWRITE, + GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_FONT); gtk_object_add_arg_type ("ECalendarItem::week_number_font", - GTK_TYPE_GDK_FONT, GTK_ARG_READWRITE, + GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_WEEK_NUMBER_FONT); gtk_object_add_arg_type ("ECalendarItem::row_height", GTK_TYPE_INT, GTK_ARG_READABLE, @@ -339,22 +339,18 @@ e_calendar_item_class_init (ECalendarItemClass *class) e_calendar_item_signals[DATE_RANGE_CHANGED] = gtk_signal_new ("date_range_changed", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ECalendarItemClass, date_range_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); e_calendar_item_signals[SELECTION_CHANGED] = gtk_signal_new ("selection_changed", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ECalendarItemClass, selection_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, e_calendar_item_signals, - LAST_SIGNAL); - - object_class->destroy = e_calendar_item_destroy; object_class->get_arg = e_calendar_item_get_arg; object_class->set_arg = e_calendar_item_set_arg; @@ -737,8 +733,11 @@ e_calendar_item_unrealize (GnomeCanvasItem *item) colormap = gtk_widget_get_colormap (GTK_WIDGET (item->canvas)); - for (i = 0; i < E_CALENDAR_ITEM_COLOR_LAST; i++) - gdk_colors_free (colormap, &calitem->colors[i].pixel, 1, 0); + for (i = 0; i < E_CALENDAR_ITEM_COLOR_LAST; i++) { + /* FIXME: gdk_colors_free expects gulong* here but the pixel value in GdkColor + is guint32. GDK bug? */ + gdk_colors_free (colormap, (gulong *) &calitem->colors[i].pixel, 1, 0); + } if (GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize) (* GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize) (item); @@ -779,8 +778,8 @@ e_calendar_item_update (GnomeCanvasItem *item, calitem = E_CALENDAR_ITEM (item); style = GTK_WIDGET (item->canvas)->style; - xthickness = style->klass->xthickness; - ythickness = style->klass->ythickness; + xthickness = style->xthickness; + ythickness = style->ythickness; item->x1 = calitem->x1; item->y1 = calitem->y1; @@ -831,7 +830,7 @@ e_calendar_item_update (GnomeCanvasItem *item, font = calitem->font; if (!font) - font = style->font; + font = gtk_style_get_font (style); char_height = font->ascent + font->descent; calitem->month_width = calitem->min_month_width; @@ -911,10 +910,10 @@ e_calendar_item_draw (GnomeCanvasItem *canvas_item, style = GTK_WIDGET (canvas_item->canvas)->style; font = calitem->font; if (!font) - font = style->font; + font = gtk_style_get_font (style); char_height = font->ascent + font->descent; - xthickness = style->klass->xthickness; - ythickness = style->klass->ythickness; + xthickness = style->xthickness; + ythickness = style->ythickness; base_gc = style->base_gc[GTK_STATE_NORMAL]; bg_gc = style->bg_gc[GTK_STATE_NORMAL]; @@ -1010,10 +1009,10 @@ e_calendar_item_draw_month (ECalendarItem *calitem, style = widget->style; font = calitem->font; if (!font) - font = style->font; + font = gtk_style_get_font (style); char_height = font->ascent + font->descent; - xthickness = style->klass->xthickness; - ythickness = style->klass->ythickness; + xthickness = style->xthickness; + ythickness = style->ythickness; fg_gc = style->fg_gc[GTK_STATE_NORMAL]; /* Calculate the top-left position of the entire month display. */ @@ -1047,7 +1046,7 @@ e_calendar_item_draw_month (ECalendarItem *calitem, else max_x -= E_CALENDAR_ITEM_XPAD_AFTER_MONTH_NAME; - text_y = month_y + style->klass->ythickness + text_y = month_y + style->ythickness + E_CALENDAR_ITEM_YPAD_ABOVE_MONTH_NAME; clip_rect.x = month_x + min_x; clip_rect.x = MAX (0, clip_rect.x); @@ -1190,7 +1189,7 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem, style = widget->style; font = calitem->font; if (!font) - font = style->font; + font = gtk_style_get_font (style); wkfont = calitem->week_number_font; if (!wkfont) wkfont = font; @@ -1530,7 +1529,7 @@ e_calendar_item_recalc_sizes (ECalendarItem *calitem) font = calitem->font; if (!font) - font = style->font; + font = gtk_style_get_font (style); wkfont = calitem->week_number_font; if (!wkfont) wkfont = font; @@ -1588,7 +1587,7 @@ e_calendar_item_recalc_sizes (ECalendarItem *calitem) + E_CALENDAR_ITEM_XPAD_AFTER_WEEK_NUMBERS + 1; } - calitem->min_month_height = style->klass->ythickness * 2 + calitem->min_month_height = style->ythickness * 2 + E_CALENDAR_ITEM_YPAD_ABOVE_MONTH_NAME + char_height + E_CALENDAR_ITEM_YPAD_BELOW_MONTH_NAME + 1 + E_CALENDAR_ITEM_YPAD_ABOVE_DAY_LETTERS @@ -1967,9 +1966,9 @@ e_calendar_item_convert_position_to_day (ECalendarItem *calitem, item = GNOME_CANVAS_ITEM (calitem); widget = GTK_WIDGET (item->canvas); style = widget->style; - char_height = style->font->ascent + style->font->descent; - xthickness = style->klass->xthickness; - ythickness = style->klass->ythickness; + char_height = gtk_style_get_font (style)->ascent + gtk_style_get_font (style)->descent; + xthickness = style->xthickness; + ythickness = style->ythickness; *entire_week = FALSE; @@ -2848,6 +2847,7 @@ static void e_calendar_item_position_menu (GtkMenu *menu, gint *x, gint *y, + gboolean *push_in, gpointer user_data) { GtkRequisition requisition; @@ -2926,9 +2926,7 @@ e_calendar_item_signal_emission_idle_cb (gpointer data) e_calendar_item_signals[DATE_RANGE_CHANGED]); } - if (GTK_OBJECT_DESTROYED (calitem)) { - g_warning ("e_calendar_item_signal_emission_idle_cb: item destroyed"); - } else if (calitem->selection_changed) { + if (calitem->selection_changed) { calitem->selection_changed = FALSE; gtk_signal_emit (GTK_OBJECT (calitem), e_calendar_item_signals[SELECTION_CHANGED]); diff --git a/widgets/misc/e-calendar-item.h b/widgets/misc/e-calendar-item.h index b5aab144ef..e153d7a052 100644 --- a/widgets/misc/e-calendar-item.h +++ b/widgets/misc/e-calendar-item.h @@ -23,7 +23,7 @@ #ifndef _E_CALENDAR_ITEM_H_ #define _E_CALENDAR_ITEM_H_ -#include <libgnomeui/gnome-canvas.h> +#include <libgnomecanvas/gnome-canvas.h> #ifdef __cplusplus extern "C" { diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c index 94dd4a61bc..49dc391686 100644 --- a/widgets/misc/e-calendar.c +++ b/widgets/misc/e-calendar.c @@ -38,7 +38,7 @@ #include <gtk/gtkmain.h> #include <gtk/gtkpixmap.h> #include <gtk/gtksignal.h> -#include <libgnomeui/gnome-canvas-widget.h> +#include <libgnomecanvas/gnome-canvas-widget.h> #include <gal/util/e-util.h> #define E_CALENDAR_SMALL_FONT \ @@ -104,8 +104,6 @@ static void e_calendar_size_request (GtkWidget *widget, GtkRequisition *requisition); static void e_calendar_size_allocate (GtkWidget *widget, GtkAllocation *allocation); -static void e_calendar_draw (GtkWidget *widget, - GdkRectangle *area); static gint e_calendar_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, @@ -150,7 +148,6 @@ e_calendar_class_init (ECalendarClass *class) widget_class->style_set = e_calendar_style_set; widget_class->size_request = e_calendar_size_request; widget_class->size_allocate = e_calendar_size_allocate; - widget_class->draw = e_calendar_draw; widget_class->drag_motion = e_calendar_drag_motion; widget_class->drag_leave = e_calendar_drag_leave; } @@ -331,8 +328,8 @@ e_calendar_size_request (GtkWidget *widget, height = row_height * cal->min_rows; width = col_width * cal->min_cols; - requisition->width = width + style->klass->xthickness * 2; - requisition->height = height + style->klass->ythickness * 2; + requisition->width = width + style->xthickness * 2; + requisition->height = height + style->ythickness * 2; } @@ -346,9 +343,9 @@ e_calendar_size_allocate (GtkWidget *widget, gdouble xthickness, ythickness, arrow_button_size; cal = E_CALENDAR (widget); - font = widget->style->font; - xthickness = widget->style->klass->xthickness; - ythickness = widget->style->klass->ythickness; + font = gtk_style_get_font (widget->style); + xthickness = widget->style->xthickness; + ythickness = widget->style->ythickness; (*GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation); @@ -396,24 +393,6 @@ e_calendar_size_allocate (GtkWidget *widget, NULL); } - -static void -e_calendar_draw (GtkWidget *widget, - GdkRectangle *area) -{ - ECalendar *cal; - - cal = E_CALENDAR (widget); - - (*GTK_WIDGET_CLASS (parent_class)->draw) (widget, area); - - /* GnomeCanvas bug workaround to draw the GnomeCanvasWidgets. */ -#if 0 - (*GTK_WIDGET_CLASS (grandparent_class)->draw) (widget, area); -#endif -} - - void e_calendar_set_minimum_size (ECalendar *cal, gint rows, @@ -467,10 +446,10 @@ e_calendar_get_border_size (ECalendar *cal, style = GTK_WIDGET (cal)->style; if (style) { - *top = style->klass->ythickness; - *bottom = style->klass->ythickness; - *left = style->klass->xthickness; - *right = style->klass->xthickness; + *top = style->ythickness; + *bottom = style->ythickness; + *left = style->xthickness; + *right = style->xthickness; } else { *top = *bottom = *left = *right = 0; } diff --git a/widgets/misc/e-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c index 4d775617ea..b2a022a351 100644 --- a/widgets/misc/e-cell-date-edit.c +++ b/widgets/misc/e-cell-date-edit.c @@ -33,13 +33,17 @@ #include <string.h> #include <time.h> #include <glib.h> + #include <gdk/gdkkeysyms.h> +#include <gtk/gtk.h> + #include <gal/util/e-util.h> #include <gal/e-table/e-table-item.h> #include <gal/e-table/e-cell-text.h> + #include <libgnomeui/gnome-messagebox.h> -#include <libgnomeui/gnome-stock.h> #include <libgnome/gnome-i18n.h> + #include "e-util/e-time-utils.h" /* This depends on ECalendar which is why I didn't put it in gal. */ #include "e-calendar.h" @@ -740,7 +744,8 @@ e_cell_date_edit_on_ok_clicked (GtkWidget *button, GDate start_date, end_date; gboolean day_selected; struct tm date_tm; - char buffer[64], *text; + char buffer[64]; + const char *text; ETimeParseStatus status; gboolean is_date = FALSE; diff --git a/widgets/misc/e-cell-percent.c b/widgets/misc/e-cell-percent.c index 8fdd124e11..c267f7b223 100644 --- a/widgets/misc/e-cell-percent.c +++ b/widgets/misc/e-cell-percent.c @@ -32,9 +32,9 @@ #include <sys/time.h> #include <unistd.h> +#include <stdio.h> #include <gal/util/e-util.h> #include <libgnomeui/gnome-messagebox.h> -#include <libgnomeui/gnome-stock.h> #include <libgnome/gnome-i18n.h> #include "e-cell-percent.h" diff --git a/widgets/misc/e-cell-percent.h b/widgets/misc/e-cell-percent.h index 0fea27c9e6..3fdfb994df 100644 --- a/widgets/misc/e-cell-percent.h +++ b/widgets/misc/e-cell-percent.h @@ -31,8 +31,6 @@ #include <gal/e-table/e-cell-text.h> -BEGIN_GNOME_DECLS - #define E_CELL_PERCENT_TYPE (e_cell_percent_get_type ()) #define E_CELL_PERCENT(o) (GTK_CHECK_CAST ((o), E_CELL_PERCENT_TYPE, ECellPercent)) #define E_CELL_PERCENT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CELL_PERCENT_TYPE, ECellPercentClass)) @@ -50,6 +48,4 @@ typedef struct { GtkType e_cell_percent_get_type (void); ECell *e_cell_percent_new (const char *fontname, GtkJustification justify); -END_GNOME_DECLS - #endif /* _E_CELL_PERCENT_H_ */ diff --git a/widgets/misc/e-charset-picker.c b/widgets/misc/e-charset-picker.c index 5c8751149e..f2ffb3a5ef 100644 --- a/widgets/misc/e-charset-picker.c +++ b/widgets/misc/e-charset-picker.c @@ -24,18 +24,18 @@ #include "e-charset-picker.h" #include <gal/widgets/e-gui-utils.h> -#include <gal/unicode/gunicode.h> #include <iconv.h> +#include <gtk/gtkvbox.h> #include <gtk/gtklabel.h> #include <gtk/gtkmenuitem.h> #include <gtk/gtkoptionmenu.h> #include <gtk/gtksignal.h> -#include <libgnome/gnome-defs.h> -#include <libgnome/gnome-i18n.h> + #include <libgnomeui/gnome-dialog-util.h> -#include <libgnomeui/gnome-stock.h> +#include <libgnome/gnome-i18n.h> + #include <bonobo/bonobo-ui-node.h> #include <bonobo/bonobo-ui-util.h> @@ -240,7 +240,7 @@ e_charset_picker_new (const char *default_charset) { GtkWidget *menu, *item; int def, i; - char *locale_charset; + const char *locale_charset; g_get_charset (&locale_charset); if (!g_strcasecmp (locale_charset, "US-ASCII")) @@ -382,7 +382,8 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path, const char *default_charset, BonoboUIListenerFn cb, gpointer user_data) { - char *locale_charset, *encoded_label, *label; + char *encoded_label, *label; + const char *locale_charset; GString *menuitems; int def, i; diff --git a/widgets/misc/e-clipped-label.c b/widgets/misc/e-clipped-label.c index 6da313940c..adefe64048 100644 --- a/widgets/misc/e-clipped-label.c +++ b/widgets/misc/e-clipped-label.c @@ -40,7 +40,6 @@ #include <glib.h> #include <gdk/gdki18n.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> @@ -156,7 +155,7 @@ e_clipped_label_size_request (GtkWidget *widget, g_return_if_fail (requisition != NULL); label = E_CLIPPED_LABEL (widget); - font = widget->style->font; + font = gtk_style_get_font (widget->style); requisition->width = 0; requisition->height = font->ascent + font->descent @@ -194,7 +193,7 @@ e_clipped_label_expose (GtkWidget *widget, label = E_CLIPPED_LABEL (widget); misc = GTK_MISC (widget); - font = widget->style->font; + font = gtk_style_get_font (widget->style); /* If the label isn't visible or has no text, just return. */ if (!GTK_WIDGET_VISIBLE (widget) || !GTK_WIDGET_MAPPED (widget) @@ -339,7 +338,7 @@ e_clipped_label_recalc_chars_displayed (EClippedLabel *label) GdkFont *font; gint max_width, width, ch, last_width; - font = GTK_WIDGET (label)->style->font; + font = gtk_style_get_font (GTK_WIDGET (label)->style); max_width = GTK_WIDGET (label)->allocation.width - 2 * GTK_MISC (label)->xpad; diff --git a/widgets/misc/e-combo-button.c b/widgets/misc/e-combo-button.c index 9203bece01..d0def44baa 100644 --- a/widgets/misc/e-combo-button.c +++ b/widgets/misc/e-combo-button.c @@ -246,6 +246,7 @@ static void menu_position_func (GtkMenu *menu, gint *x_return, gint *y_return, + gboolean *push_in, void *data) { EComboButton *combo_button; @@ -343,26 +344,6 @@ impl_leave_notify_event (GtkWidget *widget, return FALSE; } -static void -impl_draw (GtkWidget *widget, - GdkRectangle *area) -{ - GdkRectangle child_area; - GdkRectangle tmp_area; - - if (! GTK_WIDGET_DRAWABLE (widget)) - return; - - tmp_area = *area; - tmp_area.x -= GTK_CONTAINER (widget)->border_width; - tmp_area.y -= GTK_CONTAINER (widget)->border_width; - - paint (E_COMBO_BUTTON (widget), &tmp_area); - - if (GTK_BIN (widget)->child && gtk_widget_intersect (GTK_BIN (widget)->child, &tmp_area, &child_area)) - gtk_widget_draw (GTK_BIN (widget)->child, &child_area); -} - static int impl_expose_event (GtkWidget *widget, GdkEventExpose *event) @@ -439,7 +420,6 @@ class_init (GtkObjectClass *object_class) widget_class = GTK_WIDGET_CLASS (object_class); widget_class->button_press_event = impl_button_press_event; widget_class->leave_notify_event = impl_leave_notify_event; - widget_class->draw = impl_draw; widget_class->expose_event = impl_expose_event; button_class = GTK_BUTTON_CLASS (object_class); @@ -447,12 +427,10 @@ class_init (GtkObjectClass *object_class) signals[ACTIVATE_DEFAULT] = gtk_signal_new ("activate_default", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EComboButtonClass, activate_default), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } static void @@ -473,12 +451,12 @@ init (EComboButton *combo_button) priv->label = gtk_label_new (""); gtk_box_pack_start (GTK_BOX (priv->hbox), priv->label, TRUE, TRUE, - 2 * GTK_WIDGET (combo_button)->style->klass->xthickness); + 2 * GTK_WIDGET (combo_button)->style->xthickness); gtk_widget_show (priv->label); priv->arrow_pixmap = create_arrow_pixmap_widget (); gtk_box_pack_start (GTK_BOX (priv->hbox), priv->arrow_pixmap, TRUE, TRUE, - GTK_WIDGET (combo_button)->style->klass->xthickness); + GTK_WIDGET (combo_button)->style->xthickness); gtk_widget_show (priv->arrow_pixmap); priv->icon = NULL; diff --git a/widgets/misc/e-config-page.c b/widgets/misc/e-config-page.c index 7006dc7a11..d6f74a0d14 100644 --- a/widgets/misc/e-config-page.c +++ b/widgets/misc/e-config-page.c @@ -74,19 +74,17 @@ class_init (EConfigPageClass *class) signals[APPLY] = gtk_signal_new ("apply", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EConfigPageClass, apply), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); signals[CHANGED] = gtk_signal_new ("changed", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EConfigPageClass, changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } static void diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index 5a99e3e8fc..7983aea5fd 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -54,7 +54,6 @@ #include <gtk/gtkmain.h> #include <gtk/gtksignal.h> #include <gtk/gtkvbox.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include "e-util/e-time-utils.h" #include "e-calendar.h" @@ -168,12 +167,12 @@ static void on_date_popup_date_selected (ECalendarItem *calitem, EDateEdit *dedit); static void hide_date_popup (EDateEdit *dedit); static void rebuild_time_popup (EDateEdit *dedit); -static gboolean field_set_to_none (char *text); +static gboolean field_set_to_none (const char *text); static gboolean e_date_edit_parse_date (EDateEdit *dedit, - char *date_text, + const char *date_text, struct tm *date_tm); static gboolean e_date_edit_parse_time (EDateEdit *dedit, - gchar *time_text, + const gchar *time_text, struct tm *time_tm); static void on_date_edit_time_selected (GtkList *list, EDateEdit *dedit); @@ -247,20 +246,17 @@ e_date_edit_class_init (EDateEditClass *class) date_edit_signals [CHANGED] = gtk_signal_new ("changed", - GTK_RUN_FIRST, object_class->type, - GTK_SIGNAL_OFFSET (EDateEditClass, - changed), + GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class), + GTK_SIGNAL_OFFSET (EDateEditClass, changed), gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, date_edit_signals, - LAST_SIGNAL); - object_class->destroy = e_date_edit_destroy; + object_class->destroy = e_date_edit_destroy; - widget_class->grab_focus = e_date_edit_grab_focus; + widget_class->grab_focus = e_date_edit_grab_focus; - container_class->forall = e_date_edit_forall; + container_class->forall = e_date_edit_forall; class->changed = NULL; } @@ -1167,7 +1163,7 @@ e_date_edit_show_date_popup (EDateEdit *dedit) EDateEditPrivate *priv; ECalendar *calendar; struct tm mtm; - gchar *date_text; + const gchar *date_text; GDate selected_day; gboolean clear_selection = FALSE; @@ -1431,7 +1427,7 @@ rebuild_time_popup (EDateEdit *dedit) static gboolean e_date_edit_parse_date (EDateEdit *dedit, - gchar *date_text, + const gchar *date_text, struct tm *date_tm) { if (e_time_parse_date (date_text, date_tm) != E_TIME_PARSE_OK) @@ -1443,7 +1439,7 @@ e_date_edit_parse_date (EDateEdit *dedit, static gboolean e_date_edit_parse_time (EDateEdit *dedit, - gchar *time_text, + const gchar *time_text, struct tm *time_tm) { if (field_set_to_none (time_text)) { @@ -1462,9 +1458,10 @@ e_date_edit_parse_time (EDateEdit *dedit, /* Returns TRUE if the string is empty or is "None" in the current locale. It ignores whitespace. */ static gboolean -field_set_to_none (char *text) +field_set_to_none (const char *text) { - char *pos, *none_string; + const char *pos; + const char *none_string; pos = text; while (isspace (*pos)) @@ -1644,7 +1641,7 @@ e_date_edit_update_time_combo_state (EDateEdit *dedit) EDateEditPrivate *priv; gboolean show = TRUE, show_now_button = TRUE; gboolean clear_entry = FALSE, sensitive = TRUE; - gchar *text; + const gchar *text; priv = dedit->priv; @@ -1699,7 +1696,7 @@ static void e_date_edit_check_date_changed (EDateEdit *dedit) { EDateEditPrivate *priv; - gchar *date_text; + const gchar *date_text; struct tm tmp_tm; gboolean none = FALSE, valid = TRUE, date_changed = FALSE; @@ -1737,7 +1734,7 @@ static void e_date_edit_check_time_changed (EDateEdit *dedit) { EDateEditPrivate *priv; - gchar *time_text; + const gchar *time_text; struct tm tmp_tm; gboolean none = FALSE, valid = TRUE, time_changed; diff --git a/widgets/misc/e-dateedit.h b/widgets/misc/e-dateedit.h index 8e307c5d45..dca79d3df1 100644 --- a/widgets/misc/e-dateedit.h +++ b/widgets/misc/e-dateedit.h @@ -44,11 +44,7 @@ #include <glib.h> #include <gtk/gtkhbox.h> #include <gtk/gtkwidget.h> -#include <libgnome/gnome-defs.h> -BEGIN_GNOME_DECLS - - #define E_TYPE_DATE_EDIT (e_date_edit_get_type ()) #define E_DATE_EDIT(obj) (GTK_CHECK_CAST ((obj), E_TYPE_DATE_EDIT, EDateEdit)) #define E_DATE_EDIT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_DATE_EDIT, EDateEditClass)) @@ -179,6 +175,4 @@ void e_date_edit_set_get_time_callback (EDateEdit *dedit, gpointer data, GtkDestroyNotify destroy); -END_GNOME_DECLS - #endif diff --git a/widgets/misc/e-dropdown-button.c b/widgets/misc/e-dropdown-button.c index fbd5f76c78..7a25b80859 100644 --- a/widgets/misc/e-dropdown-button.c +++ b/widgets/misc/e-dropdown-button.c @@ -52,6 +52,7 @@ static void menu_position_cb (GtkMenu *menu, int *x, int *y, + gboolean *push_in, void *data) { EDropdownButton *dropdown_button; diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c index 649f6b7d1e..5460d39ffd 100644 --- a/widgets/misc/e-filter-bar.c +++ b/widgets/misc/e-filter-bar.c @@ -25,17 +25,13 @@ #include <config.h> #include <glib.h> -#include <libgnome/gnome-defs.h> +#include <gtk/gtksignal.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-stock.h> #include "e-dropdown-button.h" #include "e-filter-bar.h" #include "filter/rule-editor.h" -#include <gal/widgets/e-unicode.h> -#include <gal/widgets/e-gui-utils.h> - #define d(x) enum { @@ -164,8 +160,8 @@ do_advanced (ESearchBar *esb) gtk_widget_show (gd); gtk_object_ref (GTK_OBJECT (rule)); gtk_object_set_data_full (GTK_OBJECT (gd), "rule", rule, (GtkDestroyNotify)gtk_object_unref); - gtk_signal_connect (GTK_OBJECT (gd), "clicked", rule_advanced_clicked, efb); - gtk_signal_connect (GTK_OBJECT (gd), "destroy", rule_editor_destroyed, efb); + gtk_signal_connect (GTK_OBJECT (gd), "clicked", GTK_SIGNAL_FUNC (rule_advanced_clicked), efb); + gtk_signal_connect (GTK_OBJECT (gd), "destroy", GTK_SIGNAL_FUNC (rule_editor_destroyed), efb); e_search_bar_set_menu_sensitive (esb, E_FILTERBAR_SAVE_ID, FALSE); gtk_widget_set_sensitive (esb->entry, FALSE); @@ -187,8 +183,10 @@ menubar_activated (ESearchBar *esb, int id, void *data) gd = (GnomeDialog *) rule_editor_new (efb->context, FILTER_SOURCE_INCOMING); efb->save_dialogue = (GtkWidget *) gd; gtk_window_set_title (GTK_WINDOW (gd), _("Search Editor")); - gtk_signal_connect (GTK_OBJECT (gd), "clicked", full_rule_editor_clicked, efb); - gtk_signal_connect (GTK_OBJECT (gd), "destroy", rule_editor_destroyed, efb); + gtk_signal_connect (GTK_OBJECT (gd), "clicked", + GTK_SIGNAL_FUNC (full_rule_editor_clicked), efb); + gtk_signal_connect (GTK_OBJECT (gd), "destroy", + GTK_SIGNAL_FUNC (rule_editor_destroyed), efb); gtk_widget_show (GTK_WIDGET (gd)); } break; @@ -219,8 +217,8 @@ menubar_activated (ESearchBar *esb, int id, void *data) gtk_widget_show (gd); gtk_object_ref (GTK_OBJECT (rule)); gtk_object_set_data_full (GTK_OBJECT (gd), "rule", rule, (GtkDestroyNotify)gtk_object_unref); - gtk_signal_connect (GTK_OBJECT (gd), "clicked", rule_editor_clicked, efb); - gtk_signal_connect (GTK_OBJECT (gd), "destroy", rule_editor_destroyed, efb); + gtk_signal_connect (GTK_OBJECT (gd), "clicked", GTK_SIGNAL_FUNC (rule_editor_clicked), efb); + gtk_signal_connect (GTK_OBJECT (gd), "destroy", GTK_SIGNAL_FUNC (rule_editor_destroyed), efb); e_search_bar_set_menu_sensitive (esb, E_FILTERBAR_SAVE_ID, FALSE); gtk_widget_set_sensitive (esb->entry, FALSE); @@ -359,7 +357,7 @@ build_items (ESearchBar *esb, ESearchBarItem *items, int type, int *start, GPtrA if (g_slist_find(gtksux, rule) == NULL) { gtk_object_ref((GtkObject *)rule); - gtk_signal_connect((GtkObject *)rule, "changed", rule_changed, efb); + gtk_signal_connect((GtkObject *)rule, "changed", GTK_SIGNAL_FUNC (rule_changed), efb); } else { gtksux = g_slist_remove(gtksux, rule); } @@ -373,7 +371,7 @@ build_items (ESearchBar *esb, ESearchBarItem *items, int type, int *start, GPtrA next = gtksux->next; rule = gtksux->data; - gtk_signal_disconnect_by_func((GtkObject *)rule, rule_changed, efb); + gtk_signal_disconnect_by_func((GtkObject *)rule, GTK_SIGNAL_FUNC (rule_changed), efb); gtk_object_unref((GtkObject *)rule); g_slist_free_1(gtksux); @@ -561,7 +559,7 @@ static void clear_rules(EFilterBar *efb, GPtrArray *rules) /* clear out any data on old rules */ for (i=0;i<rules->len;i++) { rule = rules->pdata[i]; - gtk_signal_disconnect_by_func((GtkObject *)rule, rule_changed, efb); + gtk_signal_disconnect_by_func((GtkObject *)rule, GTK_SIGNAL_FUNC (rule_changed), efb); gtk_object_unref((GtkObject *)rule); } g_ptr_array_set_size (rules, 0); @@ -577,8 +575,8 @@ destroy (GtkObject *object) bar = E_FILTER_BAR (object); - gtk_signal_disconnect_by_func(GTK_OBJECT (bar->context), context_changed, bar); - gtk_signal_disconnect_by_func(GTK_OBJECT (bar->context), context_rule_removed, bar); + gtk_signal_disconnect_by_func(GTK_OBJECT (bar->context), GTK_SIGNAL_FUNC (context_changed), bar); + gtk_signal_disconnect_by_func(GTK_OBJECT (bar->context), GTK_SIGNAL_FUNC (context_rule_removed), bar); clear_rules(bar, bar->menu_rules); clear_rules(bar, bar->option_rules); @@ -640,9 +638,9 @@ class_init (EFilterBarClass *klass) static void init (EFilterBar *efb) { - gtk_signal_connect (GTK_OBJECT (efb), "menu_activated", menubar_activated, NULL); - gtk_signal_connect (GTK_OBJECT (efb), "query_changed", option_changed, NULL); - gtk_signal_connect (GTK_OBJECT (efb), "search_activated", option_changed, NULL); + gtk_signal_connect (GTK_OBJECT (efb), "menu_activated", GTK_SIGNAL_FUNC (menubar_activated), NULL); + gtk_signal_connect (GTK_OBJECT (efb), "query_changed", GTK_SIGNAL_FUNC (option_changed), NULL); + gtk_signal_connect (GTK_OBJECT (efb), "search_activated", GTK_SIGNAL_FUNC (option_changed), NULL); efb->menu_rules = g_ptr_array_new (); efb->option_rules = g_ptr_array_new (); @@ -674,8 +672,8 @@ e_filter_bar_new (RuleContext *context, e_search_bar_construct ((ESearchBar *)bar, &item, &item); - gtk_signal_connect (GTK_OBJECT (context), "changed", context_changed, bar); - gtk_signal_connect (GTK_OBJECT (context), "rule_removed", context_rule_removed, bar); + gtk_signal_connect (GTK_OBJECT (context), "changed", GTK_SIGNAL_FUNC (context_changed), bar); + gtk_signal_connect (GTK_OBJECT (context), "rule_removed", GTK_SIGNAL_FUNC (context_rule_removed), bar); return bar; } diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c index de9d96d009..8114bead81 100644 --- a/widgets/misc/e-map.c +++ b/widgets/misc/e-map.c @@ -80,28 +80,17 @@ typedef struct EMapPrivate; -/* Signal IDs */ - -enum -{ - LAST_SIGNAL -}; - -static guint e_map_signals[LAST_SIGNAL]; - - /* Internal prototypes */ static void e_map_class_init (EMapClass *class); static void e_map_init (EMap *view); +static void e_map_finalize (GObject *object); static void e_map_destroy (GtkObject *object); -static void e_map_finalize (GtkObject *object); static void e_map_unmap (GtkWidget *widget); static void e_map_realize (GtkWidget *widget); static void e_map_unrealize (GtkWidget *widget); static void e_map_size_request (GtkWidget *widget, GtkRequisition *requisition); static void e_map_size_allocate (GtkWidget *widget, GtkAllocation *allocation); -static void e_map_draw (GtkWidget *widget, GdkRectangle *area); static gint e_map_button_press (GtkWidget *widget, GdkEventButton *event); static gint e_map_button_release (GtkWidget *widget, GdkEventButton *event); static gint e_map_motion (GtkWidget *widget, GdkEventMotion *event); @@ -170,28 +159,35 @@ e_map_get_type (void) static void e_map_class_init (EMapClass *class) { + GObjectClass *gobject_class; GtkObjectClass *object_class; GtkWidgetClass *widget_class; + gobject_class = (GObjectClass *) class; object_class = (GtkObjectClass *) class; widget_class = (GtkWidgetClass *) class; parent_class = gtk_type_class (GTK_TYPE_WIDGET); + gobject_class->finalize = e_map_finalize; + object_class->destroy = e_map_destroy; - object_class->finalize = e_map_finalize; class->set_scroll_adjustments = e_map_set_scroll_adjustments; - widget_class->set_scroll_adjustments_signal = gtk_signal_new ("set_scroll_adjustments", GTK_RUN_LAST, object_class->type, GTK_SIGNAL_OFFSET (EMapClass, set_scroll_adjustments), gtk_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT); - - gtk_object_class_add_signals (object_class, e_map_signals, LAST_SIGNAL); + widget_class->set_scroll_adjustments_signal = gtk_signal_new ("set_scroll_adjustments", + GTK_RUN_LAST, + GTK_CLASS_TYPE (object_class), + GTK_SIGNAL_OFFSET (EMapClass, set_scroll_adjustments), + gtk_marshal_NONE__POINTER_POINTER, + GTK_TYPE_NONE, 2, + GTK_TYPE_ADJUSTMENT, + GTK_TYPE_ADJUSTMENT); widget_class->unmap = e_map_unmap; widget_class->realize = e_map_realize; widget_class->unrealize = e_map_unrealize; widget_class->size_request = e_map_size_request; widget_class->size_allocate = e_map_size_allocate; - widget_class->draw = e_map_draw; widget_class->button_press_event = e_map_button_press; widget_class->button_release_event = e_map_button_release; widget_class->motion_notify_event = e_map_motion; @@ -246,7 +242,7 @@ e_map_destroy (GtkObject *object) /* Finalize handler for the map view */ static void -e_map_finalize (GtkObject *object) +e_map_finalize (GObject *object) { EMap *view; EMapPrivate *priv; @@ -278,8 +274,8 @@ e_map_finalize (GtkObject *object) g_free (priv); view->priv = NULL; - if (GTK_OBJECT_CLASS (parent_class)->finalize) - (*GTK_OBJECT_CLASS (parent_class)->finalize) (object); + if (G_OBJECT_CLASS (parent_class)->finalize) + (*G_OBJECT_CLASS (parent_class)->finalize) (object); } @@ -407,23 +403,6 @@ e_map_size_allocate (GtkWidget *widget, GtkAllocation *allocation) } -/* Draw handler for the map view */ - -static void -e_map_draw (GtkWidget *widget, GdkRectangle *area) -{ - EMap *view; - - g_return_if_fail (widget != NULL); - g_return_if_fail (IS_E_MAP (widget)); - g_return_if_fail (area != NULL); - - view = E_MAP (widget); - - request_paint_area (view, area); -} - - /* Button press handler for the map view */ static gint @@ -991,15 +970,15 @@ load_map_background (EMap *view, gchar *name) priv = view->priv; - pb0 = gdk_pixbuf_new_from_file (name); -/* pb0 = tool_load_image (name);*/ - if (!pb0) return (FALSE); + pb0 = gdk_pixbuf_new_from_file (name, NULL); + if (!pb0) + return FALSE; if (priv->map_pixbuf) gdk_pixbuf_unref (priv->map_pixbuf); priv->map_pixbuf = pb0; update_render_pixbuf (view, GDK_INTERP_BILINEAR, TRUE); - return (TRUE); + return TRUE; } diff --git a/widgets/misc/e-map.h b/widgets/misc/e-map.h index 1a2bb3ba1b..bf4deb2ca1 100644 --- a/widgets/misc/e-map.h +++ b/widgets/misc/e-map.h @@ -23,7 +23,6 @@ #ifndef E_MAP_H #define E_MAP_H -#include <libgnome/gnome-defs.h> #include <gtk/gtkwidget.h> #define TYPE_E_MAP (e_map_get_type ()) diff --git a/widgets/misc/e-messagebox.c b/widgets/misc/e-messagebox.c index 711ea8d174..9607e2fa92 100644 --- a/widgets/misc/e-messagebox.c +++ b/widgets/misc/e-messagebox.c @@ -29,7 +29,6 @@ #include <gtk/gtkcheckbutton.h> #include <gtk/gtkhbox.h> #include <gtk/gtklabel.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-triggers.h> #include <libgnome/gnome-util.h> @@ -47,8 +46,8 @@ struct _EMessageBoxPrivate { static void e_message_box_class_init (EMessageBoxClass *klass); static void e_message_box_init (EMessageBox *messagebox); +static void e_message_box_finalize (GObject *object); static void e_message_box_destroy (GtkObject *object); -static void e_message_box_finalize (GtkObject *object); static GnomeDialogClass *parent_class; @@ -77,13 +76,16 @@ e_message_box_get_type (void) static void e_message_box_class_init (EMessageBoxClass *klass) { + GObjectClass *gobject_class; GtkObjectClass *object_class; - object_class = (GtkObjectClass *)klass; + gobject_class = (GObjectClass *) klass; + object_class = (GtkObjectClass *) klass; parent_class = gtk_type_class (gnome_dialog_get_type ()); + gobject_class->finalize = e_message_box_finalize; + object_class->destroy = e_message_box_destroy; - object_class->finalize = e_message_box_finalize; } static void @@ -93,23 +95,23 @@ e_message_box_init (EMessageBox *message_box) } static void -e_message_box_destroy (GtkObject *object) -{ - /* remember, destroy can be run multiple times! */ - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -e_message_box_finalize (GtkObject *object) +e_message_box_finalize (GObject *object) { EMessageBox *mbox = E_MESSAGE_BOX (object); g_free (mbox->_priv); mbox->_priv = NULL; - if (GTK_OBJECT_CLASS (parent_class)->finalize) - (* GTK_OBJECT_CLASS (parent_class)->finalize) (object); + if (G_OBJECT_CLASS (parent_class)->finalize) + (* G_OBJECT_CLASS (parent_class)->finalize) (object); +} + +static void +e_message_box_destroy (GtkObject *object) +{ + /* remember, destroy can be run multiple times! */ + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } /** @@ -189,7 +191,7 @@ e_message_box_construct (EMessageBox *messagebox, hbox, TRUE, TRUE, 10); gtk_widget_show (hbox); - if ((pixmap == NULL) || (GNOME_PIXMAP (pixmap)->pixmap == NULL)) { + if (pixmap == NULL) { if (pixmap) gtk_widget_destroy (pixmap); s = gnome_unconditional_pixmap_file ("gnome-default.png"); diff --git a/widgets/misc/e-messagebox.h b/widgets/misc/e-messagebox.h index 7c7a2e613f..c7f280bbf2 100644 --- a/widgets/misc/e-messagebox.h +++ b/widgets/misc/e-messagebox.h @@ -27,8 +27,6 @@ #include <gtk/gtkwidget.h> #include <libgnomeui/gnome-dialog.h> -BEGIN_GNOME_DECLS - #define E_TYPE_MESSAGE_BOX (e_message_box_get_type ()) #define E_MESSAGE_BOX(obj) (GTK_CHECK_CAST ((obj), E_TYPE_MESSAGE_BOX, EMessageBox)) #define E_MESSAGE_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MESSAGE_BOX, EMessageBoxClass)) @@ -62,7 +60,7 @@ struct _EMessageBoxClass }; -guint e_message_box_get_type (void) G_GNUC_CONST; +GtkType e_message_box_get_type (void) G_GNUC_CONST; GtkWidget* e_message_box_new (const gchar *message, const gchar *messagebox_type, ...); @@ -80,6 +78,4 @@ GtkWidget *e_message_box_get_label (EMessageBox *messagebox); GtkWidget *e_message_box_get_checkbox (EMessageBox *messagebox); -END_GNOME_DECLS - #endif /* __E_MESSAGE_BOX_H__ */ diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index da3bcb0803..a1cc110243 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -36,12 +36,12 @@ #include <gal/widgets/e-unicode.h> #include <gal/widgets/e-gui-utils.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <bonobo/bonobo-ui-util.h> #include <stdlib.h> +#include <string.h> #include "e-search-bar.h" @@ -823,7 +823,7 @@ class_init (ESearchBarClass *klass) esb_signals [QUERY_CHANGED] = gtk_signal_new ("query_changed", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ESearchBarClass, query_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -831,7 +831,7 @@ class_init (ESearchBarClass *klass) esb_signals [MENU_ACTIVATED] = gtk_signal_new ("menu_activated", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ESearchBarClass, menu_activated), gtk_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); @@ -839,12 +839,10 @@ class_init (ESearchBarClass *klass) esb_signals [SEARCH_ACTIVATED] = gtk_signal_new ("search_activated", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ESearchBarClass, search_activated), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, esb_signals, LAST_SIGNAL); } static void @@ -926,7 +924,7 @@ e_search_bar_set_menu (ESearchBar *search_bar, ESearchBarItem *menu_items) g_return_if_fail (search_bar != NULL); g_return_if_fail (E_IS_SEARCH_BAR (search_bar)); - ((ESearchBarClass *)((GtkObject *)search_bar)->klass)->set_menu (search_bar, menu_items); + ((ESearchBarClass *) GTK_OBJECT_GET_CLASS (search_bar))->set_menu (search_bar, menu_items); } void @@ -945,7 +943,7 @@ e_search_bar_set_option (ESearchBar *search_bar, ESearchBarItem *option_items) g_return_if_fail (E_IS_SEARCH_BAR (search_bar)); g_return_if_fail (option_items != NULL); - ((ESearchBarClass *)((GtkObject *)search_bar)->klass)->set_option (search_bar, option_items); + ((ESearchBarClass *) GTK_OBJECT_GET_CLASS (search_bar))->set_option (search_bar, option_items); } /** diff --git a/widgets/misc/e-title-bar.c b/widgets/misc/e-title-bar.c index 301aad108e..bcc645573d 100644 --- a/widgets/misc/e-title-bar.c +++ b/widgets/misc/e-title-bar.c @@ -261,21 +261,19 @@ class_init (ETitleBarClass *klass) signals[LABEL_BUTTON_PRESS_EVENT] = gtk_signal_new ("label_button_press_event", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ETitleBarClass, label_button_press_event), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, - GTK_TYPE_GDK_EVENT); + GTK_TYPE_POINTER); signals[BUTTON_CLICKED] = gtk_signal_new ("button_clicked", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ETitleBarClass, button_clicked), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } static void diff --git a/widgets/misc/e-url-entry.c b/widgets/misc/e-url-entry.c index e81ad4b8ea..4c0c477ebf 100644 --- a/widgets/misc/e-url-entry.c +++ b/widgets/misc/e-url-entry.c @@ -160,6 +160,6 @@ button_clicked_cb (GtkWidget *widget, gpointer data) priv = url_entry->priv; url = gtk_editable_get_chars (GTK_EDITABLE (priv->entry), 0, -1); - gnome_url_show (url); + gnome_url_show (url, NULL); g_free (url); } diff --git a/widgets/misc/test-calendar.c b/widgets/misc/test-calendar.c index 3fcf7d3706..8e0e9fe93b 100644 --- a/widgets/misc/test-calendar.c +++ b/widgets/misc/test-calendar.c @@ -32,8 +32,10 @@ #include <gtk/gtkdnd.h> #include <gtk/gtkmain.h> #include <gtk/gtkvbox.h> + #include <libgnomeui/gnome-app.h> -#include <libgnomeui/gnome-init.h> +#include <libgnomeui/gnome-ui-init.h> + #include "e-calendar.h" /* Drag and Drop stuff. */ diff --git a/widgets/misc/test-dateedit.c b/widgets/misc/test-dateedit.c index 94771d8ebb..79038bc79c 100644 --- a/widgets/misc/test-dateedit.c +++ b/widgets/misc/test-dateedit.c @@ -34,8 +34,8 @@ #include <gtk/gtkmain.h> #include <gtk/gtktable.h> #include <gtk/gtkwindow.h> +#include <libgnomeui/gnome-ui-init.h> #include <libgnomeui/gnome-app.h> -#include <libgnomeui/gnome-init.h> #include "e-dateedit.h" static void delete_event_cb (GtkWidget *widget, @@ -61,7 +61,9 @@ main (int argc, char **argv) EDateEdit *dedit; GtkWidget *table, *button; - gnome_init ("test-dateedit", "0.0", argc, argv); + gnome_program_init ("test-dateedit", "0.0", LIBGNOMEUI_MODULE, argc, argv, NULL); + + puts ("here"); app = gnome_app_new ("Test", "Test"); gtk_window_set_default_size (GTK_WINDOW (app), 300, 200); diff --git a/widgets/misc/test-dropdown-button.c b/widgets/misc/test-dropdown-button.c index 36609faddd..349176d05c 100644 --- a/widgets/misc/test-dropdown-button.c +++ b/widgets/misc/test-dropdown-button.c @@ -31,10 +31,13 @@ #include <gtk/gtkmain.h> #include <gtk/gtkmenu.h> #include <gtk/gtkwindow.h> +#include <gtk/gtkstock.h> + #include <libgnomeui/gnome-app.h> #include <libgnomeui/gnome-app-helper.h> -#include <libgnomeui/gnome-init.h> -#include <libgnomeui/gnome-stock.h> +#include <libgnomeui/gnome-ui-init.h> +#include <libgnomeui/gnome-stock-icons.h> + #include "e-dropdown-button.h" diff --git a/widgets/misc/test-title-bar.c b/widgets/misc/test-title-bar.c index a3a5b359e3..d8bf6a08f2 100644 --- a/widgets/misc/test-title-bar.c +++ b/widgets/misc/test-title-bar.c @@ -26,10 +26,11 @@ #include <gtk/gtkbox.h> #include <gtk/gtkmain.h> -#include <gtk/gtktext.h> #include <gtk/gtkvbox.h> +#include <gtk/gtklabel.h> + #include <libgnomeui/gnome-app.h> -#include <libgnomeui/gnome-init.h> +#include <libgnomeui/gnome-ui-init.h> #include "e-title-bar.h" static void @@ -45,7 +46,7 @@ main (int argc, char **argv) { GtkWidget *app; GtkWidget *title_bar; - GtkWidget *text; + GtkWidget *label; GtkWidget *vbox; gnome_init ("test-title-bar", "0.0", argc, argv); @@ -59,12 +60,12 @@ main (int argc, char **argv) title_bar = e_title_bar_new ("This is a very annoyingly long title bar"); gtk_widget_show (title_bar); - text = gtk_text_new (NULL, NULL); - gtk_widget_show (text); + label = gtk_label_new ("boo"); + gtk_widget_show (label); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), title_bar, FALSE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (vbox), text, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0); gtk_widget_show (vbox); gnome_app_set_contents (GNOME_APP (app), vbox); |