Revision: 5776
http://geany.svn.sourceforge.net/geany/?rev=5776&view=rev
Author: colombanw
Date: 2011-05-09 17:35:09 +0000 (Mon, 09 May 2011)
Log Message:
-----------
Add missing documentation to some plugin API functions
Modified Paths:
--------------
branches/0.20.1/src/sciwrappers.c
Modified: branches/0.20.1/src/sciwrappers.c
===================================================================
--- branches/0.20.1/src/sciwrappers.c 2011-05-09 13:22:02 UTC (rev 5775)
+++ branches/0.20.1/src/sciwrappers.c 2011-05-09 17:35:09 UTC (rev 5776)
@@ -450,6 +450,9 @@
}
+/** Gets the position at the end of a line
+ * @param sci Scintilla widget
+ * @param line Line */
gint sci_get_line_end_position(ScintillaObject *sci, gint line)
{
return SSM(sci, SCI_GETLINEENDPOSITION, line, 0);
@@ -823,6 +826,10 @@
}
+/** Sets the font for a particular style
+ * @param style The style
+ * @param font The font name
+ * @param size The font size */
void sci_set_font(ScintillaObject *sci, gint style, const gchar *font, gint size)
{
SSM(sci, SCI_STYLESETFONT, style, (sptr_t) font);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5774
http://geany.svn.sourceforge.net/geany/?rev=5774&view=rev
Author: colombanw
Date: 2011-05-09 13:21:45 +0000 (Mon, 09 May 2011)
Log Message:
-----------
Remove widget reparenting in Split Window plugin
Instead of reparenting the documents notebook full of
ScintillaObjects, just ref it, remove it from the old parent, add
it to the new parent, and then unref it. This fixes the display
issue on Windows and seems to have no issues on Linux.
Patch by Matthew Brush, thanks.
Closes #2725342.
Re-apply this patch now the X PRIMARY selection bug is fixed in
Scintilla's side (see r5692).
Modified Paths:
--------------
trunk/ChangeLog
trunk/plugins/splitwindow.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-05-08 17:11:23 UTC (rev 5773)
+++ trunk/ChangeLog 2011-05-09 13:21:45 UTC (rev 5774)
@@ -1,3 +1,10 @@
+2011-05-09 Colomban Wendling <colomban(at)geany(dot)org>
+
+ * plugins/splitwindow.c:
+ Remove widget reparenting in Split Window plugin. This fixes plugin
+ issues on Windows (patch by Matthew Brush, thanks - closes #2725342).
+
+
2011-05-06 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/callbacks.c:
Modified: trunk/plugins/splitwindow.c
===================================================================
--- trunk/plugins/splitwindow.c 2011-05-08 17:11:23 UTC (rev 5773)
+++ trunk/plugins/splitwindow.c 2011-05-09 13:21:45 UTC (rev 5774)
@@ -307,15 +307,15 @@
set_state(horizontal ? STATE_SPLIT_HORIZONTAL : STATE_SPLIT_VERTICAL);
- /* temporarily put document notebook in main vbox (scintilla widgets must stay
- * in a visible parent window, otherwise there are X selection and scrollbar issues) */
- gtk_widget_reparent(notebook,
- ui_lookup_widget(geany->main_widgets->window, "vbox1"));
+ gtk_widget_ref(notebook);
+ gtk_container_remove(GTK_CONTAINER(parent), notebook);
pane = horizontal ? gtk_hpaned_new() : gtk_vpaned_new();
gtk_container_add(GTK_CONTAINER(parent), pane);
- gtk_widget_reparent(notebook, pane);
+ gtk_container_add(GTK_CONTAINER(pane), notebook);
+ gtk_widget_unref(notebook);
+
box = gtk_vbox_new(FALSE, 0);
toolbar = create_toolbar();
gtk_box_pack_start(GTK_BOX(box), toolbar, FALSE, FALSE, 0);
@@ -358,10 +358,8 @@
g_return_if_fail(edit_window.editor);
- /* temporarily put document notebook in main vbox (scintilla widgets must stay
- * in a visible parent window, otherwise there are X selection and scrollbar issues) */
- gtk_widget_reparent(notebook,
- ui_lookup_widget(geany->main_widgets->window, "vbox1"));
+ gtk_widget_ref(notebook);
+ gtk_container_remove(GTK_CONTAINER(pane), notebook);
if (edit_window.sci != NULL && edit_window.handler_id > 0)
{
@@ -372,7 +370,9 @@
gtk_widget_destroy(pane);
edit_window.editor = NULL;
edit_window.sci = NULL;
- gtk_widget_reparent(notebook, parent);
+
+ gtk_container_add(GTK_CONTAINER(parent), notebook);
+ gtk_widget_unref(notebook);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5773
http://geany.svn.sourceforge.net/geany/?rev=5773&view=rev
Author: eht16
Date: 2011-05-08 17:11:23 +0000 (Sun, 08 May 2011)
Log Message:
-----------
Add Markdown extension.
Modified Paths:
--------------
branches/0.20.1/ChangeLog
branches/0.20.1/data/filetype_extensions.conf
Modified: branches/0.20.1/ChangeLog
===================================================================
--- branches/0.20.1/ChangeLog 2011-05-08 17:09:49 UTC (rev 5772)
+++ branches/0.20.1/ChangeLog 2011-05-08 17:11:23 UTC (rev 5773)
@@ -21,6 +21,8 @@
'Backup Copy' is not enabled at all.
* plugins/export.c:
Fix off-by-one bug which hidden the last empty line of a document.
+ * data/filetype_extensions.conf:
+ Add Markdown extension.
2011-01-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: branches/0.20.1/data/filetype_extensions.conf
===================================================================
--- branches/0.20.1/data/filetype_extensions.conf 2011-05-08 17:09:49 UTC (rev 5772)
+++ branches/0.20.1/data/filetype_extensions.conf 2011-05-08 17:11:23 UTC (rev 5773)
@@ -33,6 +33,7 @@
Lisp=*.lisp;
Lua=*.lua;
Make=*.mak;*.mk;GNUmakefile;makefile;Makefile;makefile.*;Makefile.*;
+Markdown=*.mdml;
Matlab=*.m;
NSIS=*.nsi;*.nsh;
Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5772
http://geany.svn.sourceforge.net/geany/?rev=5772&view=rev
Author: eht16
Date: 2011-05-08 17:09:49 +0000 (Sun, 08 May 2011)
Log Message:
-----------
Fix off-by-one bug which hidden the last empty line of a document.
Modified Paths:
--------------
branches/0.20.1/ChangeLog
branches/0.20.1/plugins/export.c
Modified: branches/0.20.1/ChangeLog
===================================================================
--- branches/0.20.1/ChangeLog 2011-05-08 17:05:21 UTC (rev 5771)
+++ branches/0.20.1/ChangeLog 2011-05-08 17:09:49 UTC (rev 5772)
@@ -19,6 +19,8 @@
* plugins/saveactions.c:
Fix wrong warning on empty backup directory setting if
'Backup Copy' is not enabled at all.
+ * plugins/export.c:
+ Fix off-by-one bug which hidden the last empty line of a document.
2011-01-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: branches/0.20.1/plugins/export.c
===================================================================
--- branches/0.20.1/plugins/export.c 2011-05-08 17:05:21 UTC (rev 5771)
+++ branches/0.20.1/plugins/export.c 2011-05-08 17:09:49 UTC (rev 5772)
@@ -354,7 +354,7 @@
/* read the document and write the LaTeX code */
body = g_string_new("");
doc_len = sci_get_length(doc->editor->sci);
- for (i = 0; i < doc_len; i++)
+ for (i = 0; i <= doc_len; i++)
{
style = sci_get_style_at(doc->editor->sci, i);
c = sci_get_char_at(doc->editor->sci, i);
@@ -369,9 +369,11 @@
g_string_append(body, "}\n");
block_open = FALSE;
}
- g_string_append_printf(body, "\\style%s{", get_tex_style(style));
-
- block_open = TRUE;
+ if (i < doc_len)
+ {
+ g_string_append_printf(body, "\\style%s{", get_tex_style(style));
+ block_open = TRUE;
+ }
}
/* escape the current character if necessary else just add it */
switch (c)
@@ -574,7 +576,7 @@
/* read the document and write the HTML body */
body = g_string_new("");
doc_len = sci_get_length(doc->editor->sci);
- for (i = 0; i < doc_len; i++)
+ for (i = 0; i <= doc_len; i++)
{
style = sci_get_style_at(doc->editor->sci, i);
c = sci_get_char_at(doc->editor->sci, i);
@@ -589,9 +591,11 @@
{
g_string_append(body, "</span>");
}
- g_string_append_printf(body, "<span class=\"style_%d\">", style);
-
- span_open = TRUE;
+ if (i < doc_len)
+ {
+ g_string_append_printf(body, "<span class=\"style_%d\">", style);
+ span_open = TRUE;
+ }
}
/* escape the current character if necessary else just add it */
switch (c)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5771
http://geany.svn.sourceforge.net/geany/?rev=5771&view=rev
Author: eht16
Date: 2011-05-08 17:05:21 +0000 (Sun, 08 May 2011)
Log Message:
-----------
Fix wrong warning on empty backup directory setting if 'Backup Copy' is not enabled at all.
Modified Paths:
--------------
branches/0.20.1/ChangeLog
branches/0.20.1/plugins/saveactions.c
Modified: branches/0.20.1/ChangeLog
===================================================================
--- branches/0.20.1/ChangeLog 2011-05-08 17:03:33 UTC (rev 5770)
+++ branches/0.20.1/ChangeLog 2011-05-08 17:05:21 UTC (rev 5771)
@@ -16,6 +16,9 @@
Improve error checking when trying to write project files
(patch by Colomban Wendling, thanks).
Add a warning if writing the project file fails on close.
+ * plugins/saveactions.c:
+ Fix wrong warning on empty backup directory setting if
+ 'Backup Copy' is not enabled at all.
2011-01-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: branches/0.20.1/plugins/saveactions.c
===================================================================
--- branches/0.20.1/plugins/saveactions.c 2011-05-08 17:03:33 UTC (rev 5770)
+++ branches/0.20.1/plugins/saveactions.c 2011-05-08 17:05:21 UTC (rev 5771)
@@ -453,15 +453,18 @@
g_key_file_set_integer(config, "backupcopy", "dir_levels", backupcopy_dir_levels);
g_key_file_set_string(config, "backupcopy", "time_fmt", text_time);
setptr(backupcopy_time_fmt, g_strdup(text_time));
- if (*text_dir != '\0' && backupcopy_set_backup_dir(text_dir))
+ if (enable_backupcopy)
{
- g_key_file_set_string(config, "backupcopy", "backup_dir", text_dir);
+ if (NZV(text_dir) && backupcopy_set_backup_dir(text_dir))
+ {
+ g_key_file_set_string(config, "backupcopy", "backup_dir", text_dir);
+ }
+ else
+ {
+ dialogs_show_msgbox(GTK_MESSAGE_ERROR,
+ _("Backup directory does not exist or is not writable."));
+ }
}
- else
- {
- dialogs_show_msgbox(GTK_MESSAGE_ERROR,
- _("Backup directory does not exist or is not writable."));
- }
if (! g_file_test(config_dir, G_FILE_TEST_IS_DIR) && utils_mkdir(config_dir, TRUE) != 0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5770
http://geany.svn.sourceforge.net/geany/?rev=5770&view=rev
Author: eht16
Date: 2011-05-08 17:03:33 +0000 (Sun, 08 May 2011)
Log Message:
-----------
Add a warning if writing the project file fails on close.
Modified Paths:
--------------
branches/0.20.1/ChangeLog
branches/0.20.1/src/project.c
Modified: branches/0.20.1/ChangeLog
===================================================================
--- branches/0.20.1/ChangeLog 2011-05-08 17:02:03 UTC (rev 5769)
+++ branches/0.20.1/ChangeLog 2011-05-08 17:03:33 UTC (rev 5770)
@@ -15,6 +15,7 @@
* src/project.c:
Improve error checking when trying to write project files
(patch by Colomban Wendling, thanks).
+ Add a warning if writing the project file fails on close.
2011-01-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: branches/0.20.1/src/project.c
===================================================================
--- branches/0.20.1/src/project.c 2011-05-08 17:02:03 UTC (rev 5769)
+++ branches/0.20.1/src/project.c 2011-05-08 17:03:33 UTC (rev 5770)
@@ -347,7 +347,8 @@
ui_set_statusbar(TRUE, _("Project \"%s\" closed."), app->project->name);
/* use write_config() to save project session files */
- write_config(FALSE);
+ if (!write_config(FALSE))
+ g_warning("Project file \"%s\" could not be written", app->project->file_name);
/* remove project filetypes build entries */
if (app->project->build_filetypes_list != NULL)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5768
http://geany.svn.sourceforge.net/geany/?rev=5768&view=rev
Author: eht16
Date: 2011-05-08 16:51:08 +0000 (Sun, 08 May 2011)
Log Message:
-----------
Fix memory leaks (reported by an anonymous IRC user).
Modified Paths:
--------------
branches/0.20.1/ChangeLog
branches/0.20.1/tagmanager/php.c
Modified: branches/0.20.1/ChangeLog
===================================================================
--- branches/0.20.1/ChangeLog 2011-05-08 16:48:35 UTC (rev 5767)
+++ branches/0.20.1/ChangeLog 2011-05-08 16:51:08 UTC (rev 5768)
@@ -10,6 +10,8 @@
* src/editor.c:
Ensure the editor widget has the focus when the editor menu is
called.
+ * tagmanager/php.c:
+ Fix memory leaks (reported by an anonymous IRC user).
2011-01-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: branches/0.20.1/tagmanager/php.c
===================================================================
--- branches/0.20.1/tagmanager/php.c 2011-05-08 16:48:35 UTC (rev 5767)
+++ branches/0.20.1/tagmanager/php.c 2011-05-08 16:51:08 UTC (rev 5768)
@@ -127,6 +127,9 @@
e.kindName = kindName;
e.extensionFields.arglist = arglist;
makeTagEntry (&e);
+
+ eFree(name);
+ eFree(arglist);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.