Revision: 5703
http://geany.svn.sourceforge.net/geany/?rev=5703&view=rev
Author: eht16
Date: 2011-04-10 13:53:05 +0000 (Sun, 10 Apr 2011)
Log Message:
-----------
Add and use signal "document-reload" to the plugin API.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/pluginsignals.c
trunk/src/document.c
trunk/src/geanyobject.c
trunk/src/geanyobject.h
trunk/src/plugindata.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-10 12:08:24 UTC (rev 5702)
+++ trunk/ChangeLog 2011-04-10 13:53:05 UTC (rev 5703)
@@ -2,6 +2,9 @@
* src/editor.c:
Ignore scrolling events in on_update_ui().
+ * src/geanyobject.c, src/plugindata.h, src/geanyobject.h,
+ src/document.c, doc/pluginsignals.c:
+ Add and use signal "document-reload" to the plugin API.
2011-04-08 Colomban Wendling <colomban(at)geany(dot)org>
Modified: trunk/doc/pluginsignals.c
===================================================================
--- trunk/doc/pluginsignals.c 2011-04-10 12:08:24 UTC (rev 5702)
+++ trunk/doc/pluginsignals.c 2011-04-10 13:53:05 UTC (rev 5703)
@@ -82,6 +82,18 @@
*/
signal void (*document_open)(GObject *obj, GeanyDocument *doc, gpointer user_data);
+/** Sent when an existing document is reloaded.
+ *
+ * You need to include "document.h" for the declaration of GeanyDocument.
+ *
+ * @param obj a GeanyObject instance, should be ignored.
+ * @param doc the re-opened document.
+ * @param user_data user data.
+ *
+ * @since 0.21
+ */
+signal void (*document_reload)(GObject *obj, GeanyDocument *doc, gpointer user_data);
+
/** Sent before a document is saved.
*
* You need to include "document.h" for the declaration of GeanyDocument.
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2011-04-10 12:08:24 UTC (rev 5702)
+++ trunk/src/document.c 2011-04-10 13:53:05 UTC (rev 5703)
@@ -1253,18 +1253,21 @@
if (! main_status.opening_session_files)
ui_add_recent_file(utf8_filename);
- if (! reload)
- g_signal_emit_by_name(geany_object, "document-open", doc);
-
if (reload)
+ {
+ g_signal_emit_by_name(geany_object, "document-reload", doc);
ui_set_statusbar(TRUE, _("File %s reloaded."), display_filename);
+ }
else
+ {
+ g_signal_emit_by_name(geany_object, "document-open", doc);
/* For translators: this is the status window message for opening a file. %d is the number
* of the newly opened file, %s indicates whether the file is opened read-only
* (it is replaced with the string ", read-only"). */
msgwin_status_add(_("File %s opened(%d%s)."),
display_filename, gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)),
(readonly) ? _(", read-only") : "");
+ }
}
g_free(display_filename);
Modified: trunk/src/geanyobject.c
===================================================================
--- trunk/src/geanyobject.c 2011-04-10 12:08:24 UTC (rev 5702)
+++ trunk/src/geanyobject.c 2011-04-10 13:53:05 UTC (rev 5703)
@@ -189,6 +189,15 @@
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1,
G_TYPE_POINTER);
+ geany_object_signals[GCB_DOCUMENT_RELOAD] = g_signal_new (
+ "document-reload",
+ G_OBJECT_CLASS_TYPE (g_object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GeanyObjectClass, document_reload),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
geany_object_signals[GCB_DOCUMENT_BEFORE_SAVE] = g_signal_new (
"document-before-save",
G_OBJECT_CLASS_TYPE (g_object_class),
Modified: trunk/src/geanyobject.h
===================================================================
--- trunk/src/geanyobject.h 2011-04-10 12:08:24 UTC (rev 5702)
+++ trunk/src/geanyobject.h 2011-04-10 13:53:05 UTC (rev 5703)
@@ -34,6 +34,7 @@
{
GCB_DOCUMENT_NEW,
GCB_DOCUMENT_OPEN,
+ GCB_DOCUMENT_RELOAD,
GCB_DOCUMENT_BEFORE_SAVE,
GCB_DOCUMENT_SAVE,
GCB_DOCUMENT_FILETYPE_SET,
@@ -82,6 +83,7 @@
void (*document_new)(GeanyDocument *doc);
void (*document_open)(GeanyDocument *doc);
+ void (*document_reload)(GeanyDocument *doc);
void (*document_before_save)(GeanyDocument *doc);
void (*document_save)(GeanyDocument *doc);
void (*document_filetype_set)(GeanyDocument *doc, GeanyFiletype *filetype_old);
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2011-04-10 12:08:24 UTC (rev 5702)
+++ trunk/src/plugindata.h 2011-04-10 13:53:05 UTC (rev 5703)
@@ -54,7 +54,7 @@
* @warning You should not test for values below 200 as previously
* @c GEANY_API_VERSION was defined as an enum value, not a macro.
*/
-#define GEANY_API_VERSION 205
+#define GEANY_API_VERSION 206
/** The Application Binary Interface (ABI) version, incremented whenever
* existing fields in the plugin data types have to be changed or reordered.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5700
http://geany.svn.sourceforge.net/geany/?rev=5700&view=rev
Author: colombanw
Date: 2011-04-08 01:35:58 +0000 (Fri, 08 Apr 2011)
Log Message:
-----------
Don't set font twice for line numbers and braces
No need to set the font for some specific styles that are set up anyway
when we set the font for all styles from 0 to STYLE_MAX.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/editor.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-08 00:14:06 UTC (rev 5699)
+++ trunk/ChangeLog 2011-04-08 01:35:58 UTC (rev 5700)
@@ -10,6 +10,8 @@
Highlight triple-quoted verbatims in Vala, Genie and Scala filtypes.
* data/filetypes.Genie.conf:
Copy C styling rather than redefining the styles.
+ * src/editor.c:
+ Don't set font twice for line numbers and braces.
2011-04-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2011-04-08 00:14:06 UTC (rev 5699)
+++ trunk/src/editor.c 2011-04-08 01:35:58 UTC (rev 5700)
@@ -4481,10 +4481,6 @@
for (style = 0; style <= STYLE_MAX; style++)
sci_set_font(editor->sci, style, font_name, size);
- /* line number and braces */
- sci_set_font(editor->sci, STYLE_LINENUMBER, font_name, size);
- sci_set_font(editor->sci, STYLE_BRACELIGHT, font_name, size);
- sci_set_font(editor->sci, STYLE_BRACEBAD, font_name, size);
g_free(font_name);
/* zoom to 100% to prevent confusion */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5699
http://geany.svn.sourceforge.net/geany/?rev=5699&view=rev
Author: colombanw
Date: 2011-04-08 00:14:06 +0000 (Fri, 08 Apr 2011)
Log Message:
-----------
Copy C styling rather than redefining the styles
Modified Paths:
--------------
trunk/ChangeLog
trunk/data/filetypes.Genie.conf
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-08 00:13:53 UTC (rev 5698)
+++ trunk/ChangeLog 2011-04-08 00:14:06 UTC (rev 5699)
@@ -8,6 +8,8 @@
* data/filetypes.c, data/filetypes.vala, data/filetypes.Genie.conf,
data/filetypes.Scala.conf:
Highlight triple-quoted verbatims in Vala, Genie and Scala filtypes.
+ * data/filetypes.Genie.conf:
+ Copy C styling rather than redefining the styles.
2011-04-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/data/filetypes.Genie.conf
===================================================================
--- trunk/data/filetypes.Genie.conf 2011-04-08 00:13:53 UTC (rev 5698)
+++ trunk/data/filetypes.Genie.conf 2011-04-08 00:14:06 UTC (rev 5699)
@@ -1,28 +1,5 @@
# For complete documentation of this file, please see Geany's main documentation
-[styling]
-# foreground;background;bold;italic
-default=default
-comment=comment
-commentline=comment
-commentdoc=commentdoc
-number=number
-word=keyword
-word2=keyword2
-string=string
-character=string
-uuid=extra
-preprocessor=preprocessor
-operator=operator
-identifier=default
-stringeol=stringeol
-# @"verbatim"
-verbatim=extra
-# (/regex/)
-regex=extra
-commentlinedoc=commentdoc,bold
-commentdockeyword=commentdoc,bold,italic
-commentdockeyworderror=commentdoc
-globalclass=type
+[styling=C]
[keywords]
# all items must be in one line
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5698
http://geany.svn.sourceforge.net/geany/?rev=5698&view=rev
Author: colombanw
Date: 2011-04-08 00:13:53 +0000 (Fri, 08 Apr 2011)
Log Message:
-----------
Highlight triple-quoted verbatims in Vala, Genie and Scala filtypes
Modified Paths:
--------------
trunk/ChangeLog
trunk/data/filetypes.Genie.conf
trunk/data/filetypes.Scala.conf
trunk/data/filetypes.c
trunk/data/filetypes.vala
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-08 00:13:37 UTC (rev 5697)
+++ trunk/ChangeLog 2011-04-08 00:13:53 UTC (rev 5698)
@@ -5,6 +5,9 @@
from Scintilla HG 3602:5536ed81a85b).
* src/highlighting.c:
Add highlight for triple-quoted verbatims.
+ * data/filetypes.c, data/filetypes.vala, data/filetypes.Genie.conf,
+ data/filetypes.Scala.conf:
+ Highlight triple-quoted verbatims in Vala, Genie and Scala filtypes.
2011-04-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/data/filetypes.Genie.conf
===================================================================
--- trunk/data/filetypes.Genie.conf 2011-04-08 00:13:37 UTC (rev 5697)
+++ trunk/data/filetypes.Genie.conf 2011-04-08 00:13:53 UTC (rev 5698)
@@ -31,6 +31,9 @@
# these are some doxygen keywords (incomplete)
docComment=attention author brief bug class code date def enum example exception file fn namespace note param remarks return see since struct throw todo typedef var version warning union
+[lexer_properties]
+lexer.cpp.triplequoted.strings=1
+
[settings]
# Vala uses the C lexer
lexer_filetype=C
Modified: trunk/data/filetypes.Scala.conf
===================================================================
--- trunk/data/filetypes.Scala.conf 2011-04-08 00:13:37 UTC (rev 5697)
+++ trunk/data/filetypes.Scala.conf 2011-04-08 00:13:53 UTC (rev 5698)
@@ -5,11 +5,13 @@
[keywords]
# all items must be in one line
primary=abstract case catch class def do else extends false final finally for forSome if implicit import lazy match new object override package private protected requires return sealed throw trait true try type val var with while yield @ =>
-
secondary=null super this AllRef Any AnyRef Array Attribute Elem Iterable List Option Some Stack String Unit Console Nil None Predef
# these are some doxygen keywords (incomplete)
docComment=attention author brief bug class code date def enum example exception file fn namespace note param remarks return see since struct throw todo typedef var version warning union
+[lexer_properties]
+lexer.cpp.triplequoted.strings=1
+
[settings]
lexer_filetype=C
Modified: trunk/data/filetypes.c
===================================================================
--- trunk/data/filetypes.c 2011-04-08 00:13:37 UTC (rev 5697)
+++ trunk/data/filetypes.c 2011-04-08 00:13:53 UTC (rev 5698)
@@ -15,7 +15,7 @@
operator=operator
identifier=default
stringeol=stringeol
-# @"verbatim"
+# @"verbatim" and """multi-line verbatim"""
verbatim=extra
# (/regex/)
regex=extra
Modified: trunk/data/filetypes.vala
===================================================================
--- trunk/data/filetypes.vala 2011-04-08 00:13:37 UTC (rev 5697)
+++ trunk/data/filetypes.vala 2011-04-08 00:13:53 UTC (rev 5698)
@@ -38,6 +38,7 @@
preprocessor.start.$(file.patterns.cpp)=if
preprocessor.middle.$(file.patterns.cpp)=else elif
preprocessor.end.$(file.patterns.cpp)=endif
+lexer.cpp.triplequoted.strings=1
[settings]
lexer_filetype=C
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.