X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fwindow-manager.c;h=b78a341a0336d723ac4145e4ece3db2fcd39cc28;hb=d2a96ae99e49b5264ca68ace469e20fa5e2e605b;hp=507fe0db391e3398586354372ea911ae60ef49d4;hpb=d8749acaf878dccf9e4527c27d06d06eb5e03091;p=pspp diff --git a/src/ui/gui/window-manager.c b/src/ui/gui/window-manager.c index 507fe0db39..b78a341a03 100644 --- a/src/ui/gui/window-manager.c +++ b/src/ui/gui/window-manager.c @@ -20,6 +20,8 @@ #include +#include "relocatable.h" + #include #include "syntax-editor.h" #include "data-editor.h" @@ -100,7 +102,7 @@ window_create (enum window_type type, const gchar *name) gtk_window_set_icon_from_file (GTK_WINDOW (e->window), - PKGDATADIR "/psppicon.png", 0); + relocate (PKGDATADIR "/psppicon.png"), 0); g_signal_connect (e->window, "destroy", G_CALLBACK (deregister_window), e); @@ -157,14 +159,15 @@ set_window_name (struct editor_window *e, FILENAME is in "filename encoding" */ void window_set_name_from_filename (struct editor_window *e, - const gchar *filename) + const gchar *fn) { gchar *title; + gchar *filename = g_filename_to_utf8 (fn, -1, NULL, NULL, NULL); gchar *basename = g_path_get_basename (filename); set_window_name (e, filename); - switch (e->type ) + switch (e->type) { case WINDOW_SYNTAX: title = g_strdup_printf (_("%s --- PSPP Syntax Editor"), basename); @@ -180,6 +183,7 @@ window_set_name_from_filename (struct editor_window *e, gtk_window_set_title (GTK_WINDOW (e->window), title); g_free (title); + g_free (filename); } const gchar *