Revision: 1154
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1154&view=rev
Author: frlan
Date: 2010-02-16 17:21:10 +0000 (Tue, 16 Feb 2010)
Log Message:
-----------
GeanyLaTeX: Add an extra test against a NULL pointer to avoid a segfault e.g. at shutdown of Geany. Reported by alekkks.
Modified Paths:
--------------
trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c 2010-02-09 18:46:55 UTC (rev 1153)
+++ trunk/geanylatex/src/geanylatex.c 2010-02-16 17:21:10 UTC (rev 1154)
@@ -300,6 +300,11 @@
static void activate_toolbar_items()
{
+ if (uim == NULL)
+ {
+ return;
+ }
+
toggle_toolbar_item("/ui/glatex_format_toolbar/Bold", TRUE);
toggle_toolbar_item("/ui/glatex_format_toolbar/Underline", TRUE);
toggle_toolbar_item("/ui/glatex_format_toolbar/Centered", TRUE);
@@ -311,6 +316,11 @@
static void deactivate_toolbar_items()
{
+ if (uim == NULL)
+ {
+ return;
+ }
+
toggle_toolbar_item("/ui/glatex_format_toolbar/Bold", FALSE);
toggle_toolbar_item("/ui/glatex_format_toolbar/Underline", FALSE);
toggle_toolbar_item("/ui/glatex_format_toolbar/Centered", FALSE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1152
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1152&view=rev
Author: frlan
Date: 2010-02-09 18:46:14 +0000 (Tue, 09 Feb 2010)
Log Message:
-----------
GeanyLaTeX: Put Check for whether auto completion should be done into one single if-construct.
Modified Paths:
--------------
trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c 2010-02-09 18:45:37 UTC (rev 1151)
+++ trunk/geanylatex/src/geanylatex.c 2010-02-09 18:46:14 UTC (rev 1152)
@@ -402,21 +402,13 @@
*
* Function has been taken from Geany's core under terms of GPLv2+
* where it was original developed. */
- if (glatex_autocompletion_active == TRUE)
+ if (glatex_autocompletion_active == TRUE &&
+ !(glatex_autocompletion_only_for_latex == TRUE &&
+ editor->document->file_type->id != GEANY_FILETYPES_LATEX))
{
sci = editor->sci;
pos = sci_get_current_position(sci);
- /* Check whether this is a LaTeX file at all. If not, we most
- likely don't want to do anything. However, there is only one
- exception: In case of user really wants to do so and is forcing
- us with hidden preference */
- if (glatex_autocompletion_only_for_latex == TRUE &&
- editor->document->file_type->id != GEANY_FILETYPES_LATEX)
- {
- return FALSE;
- }
-
if (nt->nmhdr.code == SCN_CHARADDED)
{
switch (nt->ch)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1151
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1151&view=rev
Author: frlan
Date: 2010-02-09 18:45:37 +0000 (Tue, 09 Feb 2010)
Log Message:
-----------
GeanyLaTeX: Move code for checking whether auto completion should be done into code block to avoid issues on unusual configuration situations
Modified Paths:
--------------
trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c 2010-01-31 20:59:51 UTC (rev 1150)
+++ trunk/geanylatex/src/geanylatex.c 2010-02-09 18:45:37 UTC (rev 1151)
@@ -396,20 +396,7 @@
gint pos;
g_return_val_if_fail(editor != NULL, FALSE);
-
- /* Check whether this is a LaTeX file at all. If not, we most
- likely don't want to do anything. However, there is only one
- exception: In case of user really wants to do so and is forcing
- us with hidden preference */
- if (glatex_autocompletion_only_for_latex == TRUE &&
- editor->document->file_type->id != GEANY_FILETYPES_LATEX)
- {
- return FALSE;
- }
-
- sci = editor->sci;
- pos = sci_get_current_position(sci);
-
+
/* Autocompletion for LaTeX specific stuff:
* Introducing \end{} or \endgroup{} after a \begin{}
*
@@ -417,6 +404,19 @@
* where it was original developed. */
if (glatex_autocompletion_active == TRUE)
{
+ sci = editor->sci;
+ pos = sci_get_current_position(sci);
+
+ /* Check whether this is a LaTeX file at all. If not, we most
+ likely don't want to do anything. However, there is only one
+ exception: In case of user really wants to do so and is forcing
+ us with hidden preference */
+ if (glatex_autocompletion_only_for_latex == TRUE &&
+ editor->document->file_type->id != GEANY_FILETYPES_LATEX)
+ {
+ return FALSE;
+ }
+
if (nt->nmhdr.code == SCN_CHARADDED)
{
switch (nt->ch)
@@ -527,7 +527,8 @@
{
gchar buf[7];
gint len;
-
+ sci = editor->sci;
+
len = g_unichar_to_utf8(nt->ch, buf);
if (len > 0)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.