[dasher] g/c g_pEditor



commit fba60bcf10f08f581726c1642f03fea8535bb6d1
Author: Patrick Welche <prlw1 cam ac uk>
Date:   Mon Aug 15 11:40:03 2011 +0100

    g/c g_pEditor

 Src/Gtk2/dasher_editor_external.cpp |   17 ++---------------
 Src/main.cc                         |    4 ----
 2 files changed, 2 insertions(+), 19 deletions(-)
---
diff --git a/Src/Gtk2/dasher_editor_external.cpp b/Src/Gtk2/dasher_editor_external.cpp
index 8d1a103..57cf119 100644
--- a/Src/Gtk2/dasher_editor_external.cpp
+++ b/Src/Gtk2/dasher_editor_external.cpp
@@ -65,8 +65,6 @@ struct _DasherEditorExternalPrivate {
 
 #define DASHER_EDITOR_EXTERNAL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), DASHER_TYPE_EDITOR_EXTERNAL, DasherEditorExternalPrivate))
 
-static DasherEditorExternal *g_pEditor;
-
 G_DEFINE_TYPE(DasherEditorExternal, dasher_editor_external, DASHER_TYPE_EDITOR);
 
 
@@ -146,19 +144,8 @@ dasher_editor_external_finalize(GObject *pObject) {
 /* Public methods */
 DasherEditorExternal *
 dasher_editor_external_new() {
-  // TODO: Handle singleton class a little more sensibly
-
-  DasherEditorExternal *pDasherEditor;
-  pDasherEditor =
-        DASHER_EDITOR_EXTERNAL(g_object_new(DASHER_TYPE_EDITOR_EXTERNAL, NULL));
-  g_pEditor = pDasherEditor;
-
-  // TODO: Just add a simple placeholder widget here (eventually need
-  // to figure out how to have a null (ie non-visible) widget.
-
-  g_message("Creating new external editor");
-
-  return pDasherEditor;
+  return
+    DASHER_EDITOR_EXTERNAL(g_object_new(DASHER_TYPE_EDITOR_EXTERNAL, NULL));
 }
 
 static void
diff --git a/Src/main.cc b/Src/main.cc
index e1daa05..596f858 100644
--- a/Src/main.cc
+++ b/Src/main.cc
@@ -72,8 +72,6 @@ Window g_xOldIMWindow;
 
 // const gchar *filename = NULL;   // Filename of file currently being edited
 
-//static DasherEditor *g_pEditor = 0;
-
 
 // Apparently not obsolete, but should be sorted out
 
@@ -100,8 +98,6 @@ Window g_xOldIMWindow;
 
 /// Old stuff from edit.cc
 
-// DasherEditor *g_pEditor = 0;
-
 // GtkWidget *the_text_view;
 // GtkTextBuffer *the_text_buffer;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]