remove unused, empty glib event source/callback code (was from an experiment during nutempo2 development)

This commit is contained in:
Paul Davis 2021-09-04 07:39:27 -06:00
parent acd7703c36
commit e057088195
7 changed files with 0 additions and 80 deletions

View File

@ -73,17 +73,11 @@ BaseUI::RequestType Gtkmm2ext::AddTimeout = BaseUI::new_request_type();
template class AbstractUI<Gtkmm2ext::UIRequest>;
void
UI::event_loop_precall ()
{
}
UI::UI (string application_name, string thread_name, int *argc, char ***argv)
: AbstractUI<UIRequest> (thread_name)
, _receiver (*this)
, global_bindings (0)
, errors (0)
, event_callback (boost::bind (&UI::event_loop_precall, this))
{
theMain = new Main (argc, argv);
@ -117,12 +111,6 @@ UI::UI (string application_name, string thread_name, int *argc, char ***argv)
EventLoop::register_request_buffer_factory ("gui", request_buffer_factory);
/*
* every time the main loop runs (i.e. before any actual event handling
*/
event_callback.attach (MainContext::get_default());
/* attach our request source to the default main context */
attach_request_source ();

View File

@ -50,7 +50,6 @@
#define ABSTRACT_UI_EXPORTS
#endif
#include "pbd/abstract_ui.h"
#include "pbd/glib_event_source.h"
#include "pbd/ringbufferNPT.h"
#include "pbd/pool.h"
#include "pbd/error.h"
@ -171,8 +170,6 @@ protected:
Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag,
const char *msg);
virtual void event_loop_precall ();
private:
static UI *theGtkUI;
@ -205,8 +202,6 @@ private:
bool color_picked;
void do_request (UIRequest*);
GlibEventLoopCallback event_callback;
};
} /* namespace */

View File

@ -60,7 +60,6 @@ BaseUI::BaseUI (const string& loop_name)
, m_context(MainContext::get_default())
, run_loop_thread (0)
, request_channel (true)
, glib_event_callback (boost::bind (&BaseUI::event_loop_precall, this))
{
base_ui_instance = this;
request_channel.set_receive_handler (sigc::mem_fun (*this, &BaseUI::request_handler));
@ -121,12 +120,6 @@ BaseUI::run ()
_main_loop = MainLoop::create (m_context);
attach_request_source ();
/*
* every time the main loop runs (i.e. before any actual event handling)
*/
glib_event_callback.attach (m_context);
Glib::Threads::Mutex::Lock lm (_run_lock);
run_loop_thread = Glib::Threads::Thread::create (mem_fun (*this, &BaseUI::main_thread));
_running.wait (_run_lock);

View File

@ -1,19 +0,0 @@
#include "pbd/glib_event_source.h"
bool
GlibEventLoopSource::prepare (int& timeout)
{
return false;
}
bool
GlibEventLoopSource::check ()
{
return false;
}
bool
GlibEventLoopSource::dispatch (sigc::slot_base*)
{
return false;
}

View File

@ -33,7 +33,6 @@
#include "pbd/libpbd_visibility.h"
#include "pbd/crossthread.h"
#include "pbd/event_loop.h"
#include "pbd/glib_event_source.h"
#include "pbd/pthread_utils.h"
/** A BaseUI is an abstraction designed to be used with any "user
@ -129,8 +128,6 @@ class LIBPBD_API BaseUI : public sigc::trackable, public PBD::EventLoop
int setup_request_pipe ();
void main_thread ();
GlibEventLoopCallback glib_event_callback;
};
#endif /* __pbd_base_ui_h__ */

View File

@ -1,33 +0,0 @@
#ifndef __libpbd_glib_event_source_h__
#define __libpbd_glib_event_source_h__
#include <boost/function.hpp>
#include <glibmm/main.h>
class LIBPBD_API GlibEventLoopSource : public Glib::Source
{
public:
GlibEventLoopSource () {};
bool prepare (int& timeout);
bool check();
bool dispatch (sigc::slot_base*);
};
class LIBPBD_API GlibEventLoopCallback : public GlibEventLoopSource
{
public:
GlibEventLoopCallback (boost::function<void()> callback) : _callback (callback) {}
bool check() {
_callback();
return false;
}
private:
boost::function<void()> _callback;
};
#endif /* __libpbd_glib_event_source_h__ */

View File

@ -51,7 +51,6 @@ libpbd_sources = [
'file_archive.cc',
'file_utils.cc',
'fpu.cc',
'glib_event_source.cc',
'id.cc',
'locale_guard.cc',
'localtime_r.cc',