Rewrite output-viewer.c --> psppire-output-window.c
[pspp-builds.git] / src / ui / gui / window-manager.c
index e70c75f796a8a3b94d2dc6fada0ba5dc6e510ed6..065a4db7fdf0f5034da62f6469daf5bca132a2f1 100644 (file)
@@ -20,9 +20,9 @@
 #include "relocatable.h"
 
 #include <glib.h>
-#include "syntax-editor.h"
+#include "psppire-syntax-window.h"
 #include "data-editor.h"
-#include "output-viewer.h"
+
 
 #include <gettext.h>
 #define _(msgid) gettext (msgid)
@@ -84,13 +84,13 @@ window_create (enum window_type type, const gchar *name)
   switch (type)
     {
     case WINDOW_SYNTAX:
-      e = (struct editor_window *) new_syntax_editor ();
+      //e = (struct editor_window *) new_syntax_editor ();
       break;
     case WINDOW_DATA:
       e = (struct editor_window *) new_data_editor ();
       break;
     case WINDOW_OUTPUT:
-      e = (struct editor_window *) new_output_viewer ();
+      //e = (struct editor_window *) new_output_viewer ();
       break;
     default:
       g_assert_not_reached ();
@@ -125,8 +125,6 @@ static void
 set_window_name (struct editor_window *e,
                 const gchar *name )
 {
-  gchar mdash[6] = { 0, 0, 0, 0, 0, 0};
-
   gchar *title ;
   g_free (e->name);
 
@@ -138,32 +136,26 @@ set_window_name (struct editor_window *e,
       return;
     }
 
-  g_unichar_to_utf8 (2014, mdash);
-
   switch (e->type )
     {
     case WINDOW_SYNTAX:
       e->name = g_strdup_printf (_("Syntax%d"), next_window_id () );
-      title = g_strdup_printf (_("%s %s PSPP Syntax Editor"), e->name, mdash);
+      title = g_strdup_printf (_("%s --- PSPP Syntax Editor"), e->name);
       break;
     case WINDOW_DATA:
       e->name = g_strdup_printf (_("Untitled%d"), next_window_id () );
-      title = g_strdup_printf (_("%s %s PSPP Data Editor"), e->name, mdash);
+      title = g_strdup_printf (_("%s --- PSPP Data Editor"), e->name);
       break;
     case WINDOW_OUTPUT:
       e->name = g_strdup_printf (_("Output%d"), next_window_id () );
-      title = g_strdup_printf (_("%s %s PSPP Output"), e->name, mdash);
+      title = g_strdup_printf (_("%s --- PSPP Output"), e->name);
       break;
     default:
       g_assert_not_reached ();
     }
 
-  gchar* x = g_locale_from_utf8  (title, -1, NULL, NULL, NULL);
-
+  gtk_window_set_title (GTK_WINDOW (e->window), title);
 
-  gtk_window_set_title (GTK_WINDOW (e->window), x);
-
-  g_free (x);
   g_free (title);
 }
 
@@ -193,12 +185,8 @@ window_set_name_from_filename (struct editor_window *e,
     }
   g_free (basename);
 
-  gchar* x = g_locale_from_utf8  (title, -1, NULL, NULL, NULL);
-
-
-  gtk_window_set_title (GTK_WINDOW (e->window), x);
+  gtk_window_set_title (GTK_WINDOW (e->window), title);
 
-  g_free (x);
   g_free (title);
   g_free (filename);
 }