Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mbar
Dir : e_modules/mbar Modified Files: configure.in e_mod_main.c e_mod_main.h Log Message: Begin BSD-izing of new mount module =================================================================== RCS file: /cvsroot/enlightenment/e_modules/mbar/configure.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- configure.in 15 Mar 2006 00:26:18 -0000 1.1 +++ configure.in 20 Mar 2006 22:45:51 -0000 1.2 @@ -21,6 +21,15 @@ AC_SUBST(MODULE_ARCH) AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture") +case "$host_os" in + *bsd*) + AC_DEFINE(HAVE_BSD, [], "Have a BSD distribution") + ;; + linux*) + AC_DEFINE(HAVE_LINUX, [], "Have a Linux distribution") + ;; +esac + dnl AC_CHECK_HEADERS(dirent.h,, AC_MSG_ERROR([Cannot find dirent.h]) dnl Check for things we need to mount/unmount/eject =================================================================== RCS file: /cvsroot/enlightenment/e_modules/mbar/e_mod_main.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- e_mod_main.c 20 Mar 2006 21:08:48 -0000 1.3 +++ e_mod_main.c 20 Mar 2006 22:45:51 -0000 1.4 @@ -10,6 +10,14 @@ #include "e_mod_config.h" #include "config.h" +#ifdef HAVE_LINUX +#include <mntent.h> +#endif + +#ifdef HAVE_BSD +#include <sys/mount.h> +#endif + /* TODO List: * * * Listen to change of main e_app! @@ -326,9 +334,12 @@ } } } - + +#ifdef HAVE_LINUX /* Add File Monitor for /etc/mtab */ mb->mon = ecore_file_monitor_add("/etc/mtab", _mbar_mtab_update, mb); +#endif + return mb; } @@ -346,10 +357,12 @@ if (mb->conf->appdir) evas_stringshare_del(mb->conf->appdir); e_app_change_callback_del(_mbar_app_change, mb); e_object_del(E_OBJECT(mb->config_menu)); - + +#ifdef HAVE_LINUX if (mb->mon) ecore_file_monitor_del(mb->mon); - +#endif + evas_list_free(mb->conf->bars); free(mb->conf); free(mb); =================================================================== RCS file: /cvsroot/enlightenment/e_modules/mbar/e_mod_main.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- e_mod_main.h 15 Mar 2006 00:26:18 -0000 1.1 +++ e_mod_main.h 20 Mar 2006 22:45:51 -0000 1.2 @@ -41,7 +41,8 @@ E_Menu *config_menu; Config *conf; - E_Config_Dialog *config_dialog; + E_Config_Dialog *config_dialog; + Ecore_File_Monitor *mon; }; struct _MBar_Bar ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs