summaryrefslogtreecommitdiffstats
path: root/friendfinder/handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'friendfinder/handler.c')
-rw-r--r--friendfinder/handler.c48
1 files changed, 30 insertions, 18 deletions
diff --git a/friendfinder/handler.c b/friendfinder/handler.c
index 9b74339..6967351 100644
--- a/friendfinder/handler.c
+++ b/friendfinder/handler.c
@@ -1,15 +1,15 @@
#include "Ecore.h"
-#include "/usr/local/include/Evas.h"
-#include "/usr/local/include/Ecore_Evas.h"
-#include "/usr/local/include/Elementary.h"
+#include "Evas.h"
+#include "Ecore_Evas.h"
+#include "Elementary.h"
+
#include "receiver.h"
#include "sender.h"
#include "msg_sender.h"
int is_init = 0;
double interval = 0.1;
-double current_time, last_call;
-
+int pos_start = 0;
void pause_msg_sender()
@@ -42,16 +42,14 @@ void continue_sender()
sender_run_irc();
}
-void exit_all()
+void continue_gui(void *data)
{
- elm_exit();
- ecore_shutdown();
- elm_shutdown();
+ elm_run();
}
-void continue_gui(void *data)
+void start_pos()
{
- elm_run();
+ pos_start = 1;
}
void init_ecore_handler(char *from, char *to)
@@ -65,27 +63,41 @@ void init_ecore_handler(char *from, char *to)
sender_main(from);
receiver_main(from);
}
-
+ ecore_idle_exiter_add(continue_gui, NULL);
+
ecore_idle_exiter_add(continue_msg_sender, NULL);
ecore_idle_exiter_add(pause_msg_sender, NULL);
- ecore_idle_exiter_add(continue_sender, NULL);
+ ecore_idle_exiter_add(continue_gui, NULL);
- ecore_idle_exiter_add(pause_sender, NULL);
+ if (pos_start == 1)
+ {
+ printf("HANDLER: sender started\n");
+
+ ecore_idle_exiter_add(continue_sender, NULL);
+
+ ecore_idle_exiter_add(pause_sender, NULL);
+ }
+
+ ecore_idle_exiter_add(continue_gui, NULL);
- ecore_idle_exiter_add(continue_receiver, NULL);
+ if (pos_start == 1)
+ {
+ printf("HANDLER: receiver_started");
+
+ ecore_idle_exiter_add(continue_receiver, NULL);
- ecore_idle_exiter_add(pause_receiver, NULL);
+ ecore_idle_exiter_add(pause_receiver, NULL);
+ }
ecore_idle_exiter_add(continue_gui, NULL);
- //ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_all, NULL);
-
ecore_main_loop_begin();
}
void shutdown_ecore_handler()
{
+ ecore_main_loop_quit();
ecore_shutdown();
}