summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/App.cpp13
-rw-r--r--src/libs/gui/App.hpp2
-rw-r--r--src/libs/gui/ConnectWindow.cpp13
3 files changed, 17 insertions, 11 deletions
diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp
index 64a89f8a..54547114 100644
--- a/src/libs/gui/App.cpp
+++ b/src/libs/gui/App.cpp
@@ -333,6 +333,17 @@ App::event_save_session_as()
#endif
+void
+App::register_callbacks()
+{
+ Glib::signal_timeout().connect(
+ sigc::mem_fun(App::instance(), &App::gtk_main_iteration), 25, G_PRIORITY_DEFAULT);
+
+ Glib::signal_timeout().connect(
+ sigc::mem_fun(App::instance(), &App::animate), 50, G_PRIORITY_DEFAULT);
+}
+
+
bool
App::gtk_main_iteration()
{
@@ -347,8 +358,6 @@ App::gtk_main_iteration()
_enable_signal = true;
}
- animate();
-
return true;
}
diff --git a/src/libs/gui/App.hpp b/src/libs/gui/App.hpp
index 8d16a1c4..a693b729 100644
--- a/src/libs/gui/App.hpp
+++ b/src/libs/gui/App.hpp
@@ -91,7 +91,9 @@ public:
void detach();
+ void register_callbacks();
bool gtk_main_iteration();
+
void show_about();
void quit();
diff --git a/src/libs/gui/ConnectWindow.cpp b/src/libs/gui/ConnectWindow.cpp
index eb095af5..3037ee88 100644
--- a/src/libs/gui/ConnectWindow.cpp
+++ b/src/libs/gui/ConnectWindow.cpp
@@ -171,9 +171,7 @@ ConnectWindow::connect(bool existing)
client = SharedPtr<HTTPClientReceiver>(new HTTPClientReceiver(world, uri, tsci));
App::instance().attach(tsci, client);
-
- Glib::signal_timeout().connect(
- sigc::mem_fun(App::instance(), &App::gtk_main_iteration), 40, G_PRIORITY_DEFAULT);
+ App::instance().register_callbacks();
Glib::signal_timeout().connect(
sigc::mem_fun(this, &ConnectWindow::gtk_callback), 40);
@@ -192,10 +190,9 @@ ConnectWindow::connect(bool existing)
// FIXME: static args
SharedPtr<ThreadedSigClientInterface> tsci(new ThreadedSigClientInterface(1024));
SharedPtr<OSCClientReceiver> client(new OSCClientReceiver(16181, tsci));
+
App::instance().attach(tsci, client);
-
- Glib::signal_timeout().connect(
- sigc::mem_fun(App::instance(), &App::gtk_main_iteration), 40, G_PRIORITY_DEFAULT);
+ App::instance().register_callbacks();
Glib::signal_timeout().connect(
sigc::mem_fun(this, &ConnectWindow::gtk_callback), 40);
@@ -220,9 +217,7 @@ ConnectWindow::connect(bool existing)
world->local_engine->activate(1); // FIXME: parallelism
App::instance().attach(client);
-
- Glib::signal_timeout().connect(
- sigc::mem_fun(App::instance(), &App::gtk_main_iteration), 40, G_PRIORITY_DEFAULT);
+ App::instance().register_callbacks();
Glib::signal_timeout().connect(
sigc::mem_fun(this, &ConnectWindow::gtk_callback), 10);