From bdaae5b6704e29919ec7f284b9e3abe54f96f2f8 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 17 Jun 2010 13:07:17 +0200 Subject: Added CMake build system --- gui/CoreConnector.vala | 72 ------------------ gui/Ephraim.vala | 31 -------- gui/ephraim.glade | 200 ------------------------------------------------- 3 files changed, 303 deletions(-) delete mode 100644 gui/CoreConnector.vala delete mode 100644 gui/Ephraim.vala delete mode 100644 gui/ephraim.glade (limited to 'gui') diff --git a/gui/CoreConnector.vala b/gui/CoreConnector.vala deleted file mode 100644 index a3f0910..0000000 --- a/gui/CoreConnector.vala +++ /dev/null @@ -1,72 +0,0 @@ -using Erl; - - -public class CoreConnector { - unowned Thread thread; - bool running; - - private class TermStore { - public Erl.Term term; - } - - public CoreConnector() { - running = false; - } - - public bool start() { - if(running) - return true; - - running = true; - - try { - thread = Thread.create(receive, true); - return true; - } catch(ThreadError e) { - return false; - } - } - - public void stop() { - if(!running) - return; - - running = false; - thread.join(); - } - - private void* receive() { - Erl.Node node = Erl.Node("ephraim-gtk", "magiccookie", 0); - Erl.Connection con = node.connect("ephraim-core@avalon.local"); - - con.reg_send("ephraim", Erl.mk_self_pid(node)); - - while(running) { - TermStore response = new TermStore(); - Erl.ReceiveType ret = con.receive(out response.term, 1000); - - switch(ret) { - case Erl.ReceiveType.ERROR: - if(Erl.errno == Erl.Error.TIMEDOUT) - break; - - running = false; - break; - case Erl.ReceiveType.TICK: - // Do nothing - break; - case Erl.ReceiveType.MSG: - Idle.add(() => {handleTerm(response); return false;}); - break; - } - } - - return null; - } - - private void handleTerm(TermStore store) { - unowned Term term = store.term; - Erl.print_term(stdout, term); - stdout.printf("\n"); - } -} diff --git a/gui/Ephraim.vala b/gui/Ephraim.vala deleted file mode 100644 index d05e449..0000000 --- a/gui/Ephraim.vala +++ /dev/null @@ -1,31 +0,0 @@ -using Gtk; - - -public class Ephraim { - public static int main(string[] args) { - Gtk.init(ref args); - Erl.init(); - - Gtk.Builder builder = new Gtk.Builder(); - try { - builder.add_from_file("ephraim.glade"); - } catch(Error e) { - return 1; - } - - CoreConnector coreconn = new CoreConnector(); - - if(!coreconn.start()) - return 1; - - unowned Gtk.Window window = builder.get_object("MainWindow") as Gtk.Window; - window.hide.connect(Gtk.main_quit); - window.show(); - - Gtk.main(); - - coreconn.stop(); - - return 0; - } -} diff --git a/gui/ephraim.glade b/gui/ephraim.glade deleted file mode 100644 index b1b3455..0000000 --- a/gui/ephraim.glade +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - True - vertical - - - True - - - True - _Datei - True - - - True - - - gtk-new - True - True - True - - - - - gtk-open - True - True - True - - - - - gtk-save - True - True - True - - - - - gtk-save-as - True - True - True - - - - - True - - - - - gtk-quit - True - True - True - - - - - - - - - True - _Bearbeiten - True - - - True - - - gtk-cut - True - True - True - - - - - gtk-copy - True - True - True - - - - - gtk-paste - True - True - True - - - - - gtk-delete - True - True - True - - - - - - - - - True - _Ansicht - True - - - - - True - _Hilfe - True - - - True - - - gtk-about - True - True - True - - - - - - - - - False - 0 - - - - - True - True - - - True - True - RosterStore - - - False - True - - - - - True - True - True - - - - - - - - - - - - - - - - - - - - - True - True - - - - - 1 - - - - - - - -- cgit v1.2.3