projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4c4f035
)
Re-enable reporting of filename in syntax errors
author
John Darrington
<john@darrington.wattle.id.au>
Thu, 1 Jan 2009 08:12:06 +0000
(17:12 +0900)
committer
John Darrington
<john@darrington.wattle.id.au>
Thu, 1 Jan 2009 08:12:06 +0000
(17:12 +0900)
src/ui/gui/psppire-syntax-window.c
patch
|
blob
|
history
src/ui/gui/psppire-window.c
patch
|
blob
|
history
src/ui/gui/syntax-editor-source.c
patch
|
blob
|
history
src/ui/gui/syntax-editor-source.h
patch
|
blob
|
history
diff --git
a/src/ui/gui/psppire-syntax-window.c
b/src/ui/gui/psppire-syntax-window.c
index c8fede093ae7b60144d991f09e3b74a3691775b5..073537bd5f7b824c9175866f097337ec01906738 100644
(file)
--- a/
src/ui/gui/psppire-syntax-window.c
+++ b/
src/ui/gui/psppire-syntax-window.c
@@
-106,10
+106,12
@@
psppire_syntax_window_base_finalize (PsppireSyntaxWindowClass *class,
static void
static void
-editor_execute_syntax (const PsppireSyntaxWindow *s
e
, GtkTextIter start,
- GtkTextIter stop)
+editor_execute_syntax (const PsppireSyntaxWindow *s
w
, GtkTextIter start,
+
GtkTextIter stop)
{
{
- execute_syntax (create_syntax_editor_source (se->buffer, start, stop));
+ PsppireWindow *win = PSPPIRE_WINDOW (sw);
+ const gchar *name = psppire_window_get_filename (win);
+ execute_syntax (create_syntax_editor_source (sw->buffer, start, stop, name));
}
}
diff --git
a/src/ui/gui/psppire-window.c
b/src/ui/gui/psppire-window.c
index b40ccf141c7bfbf8a07666cb0c55f0187518bbfa..c1333769802671d1fcd612cb3194ece3a38bffff 100644
(file)
--- a/
src/ui/gui/psppire-window.c
+++ b/
src/ui/gui/psppire-window.c
@@
-378,7
+378,7
@@
const gchar *
psppire_window_get_filename (PsppireWindow *w)
{
const gchar *name = NULL;
psppire_window_get_filename (PsppireWindow *w)
{
const gchar *name = NULL;
- g_object_get (w, "filename", name, NULL);
+ g_object_get (w, "filename",
&
name, NULL);
return name;
}
return name;
}
diff --git
a/src/ui/gui/syntax-editor-source.c
b/src/ui/gui/syntax-editor-source.c
index 9e1f2e8770c926b5b2b61f5eefae05524c7985b3..214370513b7369087344f60c636f450704f3b7a7 100644
(file)
--- a/
src/ui/gui/syntax-editor-source.c
+++ b/
src/ui/gui/syntax-editor-source.c
@@
-36,6
+36,7
@@
struct syntax_editor_source
GtkTextBuffer *buffer;
GtkTextIter i;
GtkTextIter end;
GtkTextBuffer *buffer;
GtkTextIter i;
GtkTextIter end;
+ const gchar *name;
};
};
@@
-49,10
+50,8
@@
always_false (const struct getl_interface *i UNUSED)
static const char *
name (const struct getl_interface *i)
{
static const char *
name (const struct getl_interface *i)
{
- // const struct syntax_editor_source *ses =
- // (const struct syntax_editor_source *) i;
-
- return "I have no idea"; // window_name ((const struct editor_window *) ses->se);
+ const struct syntax_editor_source *ses = (const struct syntax_editor_source *) i;
+ return ses->name;
}
}
@@
-105,7
+104,8
@@
do_close (struct getl_interface *i )
struct getl_interface *
create_syntax_editor_source (GtkTextBuffer *buffer,
GtkTextIter start,
struct getl_interface *
create_syntax_editor_source (GtkTextBuffer *buffer,
GtkTextIter start,
- GtkTextIter stop
+ GtkTextIter stop,
+ const gchar *nm
)
{
struct syntax_editor_source *ses = xzalloc (sizeof *ses);
)
{
struct syntax_editor_source *ses = xzalloc (sizeof *ses);
@@
-113,6
+113,7
@@
create_syntax_editor_source (GtkTextBuffer *buffer,
ses->buffer = buffer;
ses->i = start;
ses->end = stop;
ses->buffer = buffer;
ses->i = start;
ses->end = stop;
+ ses->name = nm;
ses->parent.interactive = always_false;
ses->parent.interactive = always_false;
diff --git
a/src/ui/gui/syntax-editor-source.h
b/src/ui/gui/syntax-editor-source.h
index f66c46f9b68f71215aa0b725ce823dc4afbc9872..f8d08eaaadbcde3a28f6ff61cfae0e9f051abf2c 100644
(file)
--- a/
src/ui/gui/syntax-editor-source.h
+++ b/
src/ui/gui/syntax-editor-source.h
@@
-25,7
+25,8
@@
struct syntax_editor;
struct getl_interface *
create_syntax_editor_source (GtkTextBuffer *buffer,
GtkTextIter start,
struct getl_interface *
create_syntax_editor_source (GtkTextBuffer *buffer,
GtkTextIter start,
- GtkTextIter stop
+ GtkTextIter stop,
+ const gchar *name
);
);