Revision: 2579
http://geany.svn.sourceforge.net/geany/?rev=2579&view=rev
Author: ntrel
Date: 2008-05-14 05:11:01 -0700 (Wed, 14 May 2008)
Log Message:
-----------
Add note about possible double colourisation after reloading
(it shouldn't be that noticeable though).
Modified Paths:
--------------
trunk/src/document.c
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2008-05-14 11:58:05 UTC (rev 2578)
+++ trunk/src/document.c 2008-05-14 12:11:01 UTC (rev 2579)
@@ -1114,8 +1114,10 @@
else
{ /* reloading */
document_undo_clear(idx);
- /* Recolour the document here because the text could have changed but the
- * filetype hasn't */
+ /* Recolour the document after reloading because the text could have changed
+ * without typenames changing.
+ * Note: This could cause double colourising of the current document if typenames have
+ * also changed, but it shouldn't be that noticeable. */
sci_colourise(doc_list[idx].sci, 0, -1);
use_ft = ft;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2578
http://geany.svn.sourceforge.net/geany/?rev=2578&view=rev
Author: ntrel
Date: 2008-05-14 04:58:05 -0700 (Wed, 14 May 2008)
Log Message:
-----------
Recolourise the document in document_reload_file() because the
text may have changed (should fix #1948857).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-05-14 11:31:07 UTC (rev 2577)
+++ trunk/ChangeLog 2008-05-14 11:58:05 UTC (rev 2578)
@@ -3,6 +3,9 @@
* src/templates.c:
Sort custom template file menu items by filetype, with None
filetypes first.
+ * src/document.c:
+ Recolourise the document in document_reload_file() because the
+ text may have changed (should fix #1948857).
2008-05-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2008-05-14 11:31:07 UTC (rev 2577)
+++ trunk/src/document.c 2008-05-14 11:58:05 UTC (rev 2578)
@@ -1114,6 +1114,9 @@
else
{ /* reloading */
document_undo_clear(idx);
+ /* Recolour the document here because the text could have changed but the
+ * filetype hasn't */
+ sci_colourise(doc_list[idx].sci, 0, -1);
use_ft = ft;
}
/* update taglist, typedef keywords and build menu if necessary */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2574
http://geany.svn.sourceforge.net/geany/?rev=2574&view=rev
Author: eht16
Date: 2008-05-12 06:46:19 -0700 (Mon, 12 May 2008)
Log Message:
-----------
Clear a document's symbol list first after it was detached from its container to prevent crashes when saving files with collapsed symbol list items.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/symbols.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-05-12 12:40:37 UTC (rev 2573)
+++ trunk/ChangeLog 2008-05-12 13:46:19 UTC (rev 2574)
@@ -9,6 +9,10 @@
* src/socket.c:
Iconify the main window on Windows before de-iconifying it when
opening files remotely to ensure the main window pops up.
+ * src/symbols.c:
+ Clear a document's symbol list first after it was detached from its
+ container to prevent crashes when saving files with collapsed
+ symbol list items.
2008-05-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/symbols.c
===================================================================
--- trunk/src/symbols.c 2008-05-12 12:40:37 UTC (rev 2573)
+++ trunk/src/symbols.c 2008-05-12 13:46:19 UTC (rev 2574)
@@ -807,19 +807,19 @@
/* the following code surely can be improved, at the moment it collects some iters
* for removal and after that the actual removal is done. I didn't find a way to find and remove
* an empty row in one loop (next iter fails then) */
-static void hide_empty_rows(GtkTreeModel *model, GtkTreeStore *store)
+static void hide_empty_rows(GtkTreeStore *store)
{
GtkTreeIter iter, *iters[MAX_SYMBOL_TYPES] = { NULL };
guint i = 0;
- if (! gtk_tree_model_get_iter_first(model, &iter))
+ if (! gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter))
return; /* stop when first iter is invalid, i.e. no elements */
do /* first collect the iters we need to delete empty rows */
{
- if (! gtk_tree_model_iter_has_child(model, &iter))
+ if (! gtk_tree_model_iter_has_child(GTK_TREE_MODEL(store), &iter))
iters[i++] = gtk_tree_iter_copy(&iter);
- } while (gtk_tree_model_iter_next(model, &iter));
+ } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter));
/* now actually delete the collected iters */
for (i = 0; i < MAX_SYMBOL_TYPES; i++)
@@ -837,7 +837,6 @@
GList *tmp;
const GList *tags;
GtkTreeIter iter;
- GtkTreeModel *model;
static gint prev_sort_mode = SYMBOLS_SORT_BY_NAME;
filetype_id ft_id = FILETYPE_ID(doc_list[idx].file_type);
@@ -852,13 +851,12 @@
if (doc_list[idx].tm_file == NULL || tags == NULL)
return FALSE;
- gtk_tree_store_clear(doc_list[idx].tag_store);
- /* unref the store to speed up the filling(from TreeView Tutorial) */
- model = gtk_tree_view_get_model(GTK_TREE_VIEW(doc_list[idx].tag_tree));
/* Make sure the model stays with us after the tree view unrefs it */
- g_object_ref(model);
+ g_object_ref(GTK_TREE_MODEL(doc_list[idx].tag_store));
/* Detach model from view */
gtk_tree_view_set_model(GTK_TREE_VIEW(doc_list[idx].tag_tree), NULL);
+ /* Clear all contents */
+ gtk_tree_store_clear(doc_list[idx].tag_store);
init_tag_list(idx);
for (tmp = (GList*)tags; tmp; tmp = g_list_next(tmp))
@@ -953,11 +951,13 @@
g_object_unref(icon);
}
}
- hide_empty_rows(model, doc_list[idx].tag_store);
+ hide_empty_rows(doc_list[idx].tag_store);
/* Re-attach model to view */
- gtk_tree_view_set_model(GTK_TREE_VIEW(doc_list[idx].tag_tree), model);
- g_object_unref(model);
+ gtk_tree_view_set_model(GTK_TREE_VIEW(doc_list[idx].tag_tree),
+ GTK_TREE_MODEL(doc_list[idx].tag_store));
+ g_object_unref(GTK_TREE_MODEL(doc_list[idx].tag_store));
gtk_tree_view_expand_all(GTK_TREE_VIEW(doc_list[idx].tag_tree));
+
return TRUE;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2573
http://geany.svn.sourceforge.net/geany/?rev=2573&view=rev
Author: eht16
Date: 2008-05-12 05:40:37 -0700 (Mon, 12 May 2008)
Log Message:
-----------
Iconify the main window on Windows before de-iconifying it when opening files remotely to ensure the main window pops up.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/socket.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-05-12 12:28:34 UTC (rev 2572)
+++ trunk/ChangeLog 2008-05-12 12:40:37 UTC (rev 2573)
@@ -6,6 +6,9 @@
Use Python styles for embedded Python code.
* src/highlighting.c:
Remove hotspot code as it was never really used.
+ * src/socket.c:
+ Iconify the main window on Windows before de-iconifying it when
+ opening files remotely to ensure the main window pops up.
2008-05-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/socket.c
===================================================================
--- trunk/src/socket.c 2008-05-12 12:28:34 UTC (rev 2572)
+++ trunk/src/socket.c 2008-05-12 12:40:37 UTC (rev 2573)
@@ -510,10 +510,14 @@
}
document_colourise_new();
- gtk_window_deiconify(GTK_WINDOW(app->window));
#ifdef G_OS_WIN32
+ /* we need to bring the main window up with gtk_window_present() but this is not
+ * enough, instead we need to iconify it so that gtk_window_deiconify() will
+ * bring it in the foreground */
gtk_window_present(GTK_WINDOW(app->window));
+ gtk_window_iconify(GTK_WINDOW(app->window));
#endif
+ gtk_window_deiconify(GTK_WINDOW(app->window));
}
else if (strncmp(buf, "line", 4) == 0)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.