diff options
author | Andreas Volz <andreas@er00923n.(none)> | 2011-01-14 20:32:16 +0100 |
---|---|---|
committer | Andreas Volz <andreas@er00923n.(none)> | 2011-01-14 20:32:16 +0100 |
commit | 9e25833870ed8281fab00d7f9eac5755c6798c57 (patch) | |
tree | 4110b0490a12563b729eda36b5ace785ae742cff | |
parent | b23f1b2eabd594b40c152ec6224181126fcc8b0c (diff) | |
download | dbus-c++-9e25833870ed8281fab00d7f9eac5755c6798c57.tar.gz |
fixed some bugs in the ecore mainloop integration
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | include/dbus-c++/ecore-integration.h | 1 | ||||
-rw-r--r-- | src/ecore-integration.cpp | 28 |
3 files changed, 13 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac index 1cdbb6f..fc9f063 100644 --- a/configure.ac +++ b/configure.ac @@ -14,13 +14,6 @@ AC_SUBST(PACKAGE_VERSION) # Set configuration options -AC_ARG_ENABLE(debug, - AS_HELP_STRING([--enable-debug], - [enable debugging support]), - [enable_debug=$enableval], - [enable_debug=no] -) - AC_ARG_ENABLE(ecore, AS_HELP_STRING([--enable-ecore], [enable ecore integration]), @@ -65,7 +58,7 @@ if test -n "$vtest"; then AC_MSG_RESULT(yes) AC_DEFINE(GCC_HASCLASSVISIBILITY, 1, [to enable hidden symbols]) - CXXFLAGS="-fvisibility=hidden" + CXXFLAGS="$CXXFLAGS -fvisibility=hidden" else AC_MSG_RESULT(no) fi diff --git a/include/dbus-c++/ecore-integration.h b/include/dbus-c++/ecore-integration.h index 2b14b27..395384a 100644 --- a/include/dbus-c++/ecore-integration.h +++ b/include/dbus-c++/ecore-integration.h @@ -79,7 +79,6 @@ private: private: Ecore_Fd_Handler *fd_handler_read; - Ecore_Fd_Handler *fd_handler_error; friend class BusDispatcher; }; diff --git a/src/ecore-integration.cpp b/src/ecore-integration.cpp index f1e24e7..650e14d 100644 --- a/src/ecore-integration.cpp +++ b/src/ecore-integration.cpp @@ -100,9 +100,12 @@ static bool watch_dispatch( void *data ) } Ecore::BusWatch::BusWatch( Watch::Internal* wi) -: Watch(wi) +: Watch(wi), fd_handler_read (NULL) { - _enable(); + if (Watch::enabled()) + { + _enable(); + } } Ecore::BusWatch::~BusWatch() @@ -133,7 +136,7 @@ Eina_Bool Ecore::BusWatch::watch_handler_read( void *data, Ecore_Fd_Handler *fdh return 1; } -Eina_Bool Ecore::BusWatch::watch_handler_error( void *data, Ecore_Fd_Handler *fdh ) +/*Eina_Bool Ecore::BusWatch::watch_handler_error( void *data, Ecore_Fd_Handler *fdh ) { //Ecore::BusWatch* w = reinterpret_cast<Ecore::BusWatch*>(data); @@ -144,14 +147,12 @@ Eina_Bool Ecore::BusWatch::watch_handler_error( void *data, Ecore_Fd_Handler *fd watch_dispatch(NULL); return 1; -} +}*/ void Ecore::BusWatch::_enable() { debug_log("Ecore::BusWatch::_enable()"); - //int flags = Watch::flags(); - fd_handler_read = ecore_main_fd_handler_add (Watch::descriptor(), ECORE_FD_READ, watch_handler_read, @@ -159,20 +160,15 @@ void Ecore::BusWatch::_enable() NULL, NULL); ecore_main_fd_handler_active_set(fd_handler_read, ECORE_FD_READ); - - fd_handler_error = ecore_main_fd_handler_add (Watch::descriptor(), - ECORE_FD_ERROR, - watch_handler_error, - this, - NULL, NULL); - - ecore_main_fd_handler_active_set(fd_handler_error, ECORE_FD_ERROR); } void Ecore::BusWatch::_disable() { - ecore_main_fd_handler_del (fd_handler_read); - ecore_main_fd_handler_del (fd_handler_error); + if (fd_handler_read) + { + ecore_main_fd_handler_del (fd_handler_read); + fd_handler_read = NULL; + } } void Ecore::BusDispatcher::attach( ) |