Add #include <config.h>.
[pspp-builds.git] / src / ui / gui / window-manager.c
index 51fc95a91de9df69f0f26b000a25c4a75f0880a2..507fe0db391e3398586354372ea911ae60ef49d4 100644 (file)
@@ -18,6 +18,8 @@
     02110-1301, USA. */
 
 
+#include <config.h>
+
 #include <glib.h>
 #include "syntax-editor.h"
 #include "data-editor.h"
@@ -105,11 +107,16 @@ window_create (enum window_type type, const gchar *name)
 
   register_window (e);
 
-  gtk_widget_show (e->window);
+  gtk_widget_show (GTK_WIDGET (e->window));
 
   return e;
 }
 
+void
+default_window_name (struct editor_window *w)
+{
+  set_window_name (w, NULL);
+}
 
 static void
 set_window_name (struct editor_window *e,
@@ -118,11 +125,12 @@ set_window_name (struct editor_window *e,
   gchar *title ;
   g_free (e->name);
 
+  e->name = NULL;
 
   if ( name )
     {
-      e->name = g_strdup (name);
-      return ;
+      e->name =  g_strdup (name);
+      return;
     }
 
   switch (e->type )
@@ -145,6 +153,8 @@ set_window_name (struct editor_window *e,
 }
 
 
+/* Set the name of this window based on FILENAME.
+   FILENAME is in "filename encoding" */
 void
 window_set_name_from_filename (struct editor_window *e,
                               const gchar *filename)