X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fui%2Fgui%2Fpsppire-syntax-window.c;h=c68ad44553daaaa59f75def7d329ed01872ac880;hb=f775feb2cd46a56d926cfe176e4761650bb7e692;hp=b5cf0d3345d27cc45474bcc24e3cbe53c6562c0c;hpb=fe8dc2171009e90d2335f159d05f7e6660e24780;p=pspp diff --git a/src/ui/gui/psppire-syntax-window.c b/src/ui/gui/psppire-syntax-window.c index b5cf0d3345..c68ad44553 100644 --- a/src/ui/gui/psppire-syntax-window.c +++ b/src/ui/gui/psppire-syntax-window.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,7 +24,6 @@ #include #include - #include "language/lexer/lexer.h" #include "libpspp/encoding-guesser.h" #include "libpspp/i18n.h" @@ -32,13 +31,13 @@ #include "ui/gui/executor.h" #include "ui/gui/help-menu.h" #include "ui/gui/helper.h" +#include "ui/gui/builder-wrapper.h" #include "ui/gui/psppire-data-window.h" #include "ui/gui/psppire-encoding-selector.h" -#include "ui/gui/psppire-syntax-window.h" +#include "ui/gui/psppire-lex-reader.h" #include "ui/gui/psppire-syntax-window.h" #include "ui/gui/psppire-window-register.h" #include "ui/gui/psppire.h" -#include "ui/gui/psppire.h" #include "gl/localcharset.h" #include "gl/xalloc.h" @@ -251,10 +250,7 @@ editor_execute_syntax (const PsppireSyntaxWindow *sw, GtkTextIter start, GtkTextIter stop) { PsppireWindow *win = PSPPIRE_WINDOW (sw); - struct lex_reader *reader; - gchar *text = gtk_text_buffer_get_text (GTK_TEXT_BUFFER (sw->buffer), &start, &stop, FALSE); - reader = lex_reader_for_string (text); - g_free (text); + struct lex_reader *reader = lex_reader_for_gtk_text_buffer (GTK_TEXT_BUFFER (sw->buffer), start, stop); lex_reader_set_file_name (reader, psppire_window_get_filename (win)); @@ -600,6 +596,8 @@ syntax_pick_filename (PsppireWindow *window) GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); + g_object_set (dialog, "local-only", FALSE, NULL); + filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("Syntax Files (*.sps) ")); gtk_file_filter_add_pattern (filter, "*.sps"); @@ -935,7 +933,7 @@ error_dialog (GtkWindow *w, const gchar *filename, GError *err) g_free (fn); - g_object_set (dialog, "icon-name", "psppicon", NULL); + g_object_set (dialog, "icon-name", "pspp", NULL); gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", err->message);