Revision: 1060
http://svn.sourceforge.net/geany/?rev=1060&view=rev
Author: eht16
Date: 2006-12-07 08:12:01 -0800 (Thu, 07 Dec 2006)
Log Message:
-----------
Revert the last change to utils_str_equal() and use it again because g_str_equal() is not NULL-safe.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/dialogs.c
trunk/src/vte.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-12-07 16:09:45 UTC (rev 1059)
+++ trunk/ChangeLog 2006-12-07 16:12:01 UTC (rev 1060)
@@ -10,8 +10,9 @@
* src/about.c, src/build.c, src/callbacks.c, src/document.c,
src/encodings.c, src/gb.c, src/keyfile.c, src/prefs.c, src/sci_cb.c,
src/search.c, src/symbols.c, src/ui_utils.c, src/utils.c,
- src/utils.h: Revert the last change to utils_str_equal() and use it
- again because g_str_equal() is not NULL-safe.
+ src/utils.h, src/dialogs.c, src/vte.c:
+ Revert the last change to utils_str_equal() and use it again because
+ g_str_equal() is not NULL-safe.
2006-12-06 Enrico Tröger <enrico.troeger(a)uvena.de>
Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c 2006-12-07 16:09:45 UTC (rev 1059)
+++ trunk/src/dialogs.c 2006-12-07 16:12:01 UTC (rev 1060)
@@ -1196,7 +1196,7 @@
// For a cancel button, use cancel reponse so user can press escape to cancel
gtk_dialog_add_button(GTK_DIALOG(dialog), no_btn,
- g_str_equal(no_btn, GTK_STOCK_CANCEL) ? GTK_RESPONSE_CANCEL : GTK_RESPONSE_NO);
+ utils_str_equal(no_btn, GTK_STOCK_CANCEL) ? GTK_RESPONSE_CANCEL : GTK_RESPONSE_NO);
gtk_dialog_add_button(GTK_DIALOG(dialog), yes_btn, GTK_RESPONSE_YES);
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_YES)
Modified: trunk/src/vte.c
===================================================================
--- trunk/src/vte.c 2006-12-07 16:09:45 UTC (rev 1059)
+++ trunk/src/vte.c 2006-12-07 16:12:01 UTC (rev 1060)
@@ -437,7 +437,7 @@
path = g_path_get_dirname(filename);
vte_get_working_directory(); // refresh vte_info.dir
- if (! g_str_equal(path, vte_info.dir))
+ if (! utils_str_equal(path, vte_info.dir))
{
cmd = g_strconcat("cd ", path, "\n", NULL);
vte_send_cmd(cmd);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1057
http://svn.sourceforge.net/geany/?rev=1057&view=rev
Author: eht16
Date: 2006-12-07 07:13:49 -0800 (Thu, 07 Dec 2006)
Log Message:
-----------
Create new tm file object when changing the filetype of a document to avoid a confused tagmanager.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-12-06 20:44:32 UTC (rev 1056)
+++ trunk/ChangeLog 2006-12-07 15:13:49 UTC (rev 1057)
@@ -1,7 +1,18 @@
+2006-12-07 Enrico Tröger <enrico.troeger(a)uvena.de>
+
+ * src/document.c: Create new tm file object when changing the filetype
+ of a document to avoid a confused tagmanager.
+
+
2006-12-06 Enrico Tröger <enrico.troeger(a)uvena.de>
* src/sci_cb.c: Don't insert extra indentation in Python files after a
- colon if the line is a comment.
+ colon if the line is a comment (closes #1609761).
+ * src/about.c, src/build.c, src/callbacks.c, src/document.c,
+ src/encodings.c, src/gb.c, src/keyfile.c, src/prefs.c, src/sci_cb.c,
+ src/search.c, src/symbols.c, src/ui_utils.c, src/utils.c,
+ src/utils.h: Removed utils_str_equal() and use g_str_equal() from
+ GLib because it does exactly the same.
2006-12-05 Enrico Tröger <enrico.troeger(a)uvena.de>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2006-12-06 20:44:32 UTC (rev 1056)
+++ trunk/src/document.c 2006-12-07 15:13:49 UTC (rev 1057)
@@ -1276,14 +1276,24 @@
}
-/* sets the filetype of the the document (sets syntax highlighting and tagging) */
+/* sets the filetype of the document (sets syntax highlighting and tagging) */
void document_set_filetype(gint idx, filetype *type)
{
- if (! type || idx < 0) return;
- if (type->id > GEANY_MAX_FILE_TYPES) return;
+ if (type == NULL ||
+ ! DOC_IDX_VALID(idx) ||
+ doc_list[idx].file_type == type)
+ return;
geany_debug("%s : %s (%s)", doc_list[idx].file_name, type->name, doc_list[idx].encoding);
doc_list[idx].file_type = type;
+
+ // delete tm file object to force creation of a new one
+ if (doc_list[idx].tm_file != NULL)
+ {
+ tm_workspace_remove_object(doc_list[idx].tm_file, TRUE);
+ doc_list[idx].tm_file = NULL;
+ }
+
document_update_tag_list(idx, TRUE);
type->style_func_ptr(doc_list[idx].sci);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1055
http://svn.sourceforge.net/geany/?rev=1055&view=rev
Author: eht16
Date: 2006-12-06 07:32:21 -0800 (Wed, 06 Dec 2006)
Log Message:
-----------
Don't insert extra indentation in Python files after a colon if the line is a comment.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/sci_cb.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-12-05 16:03:18 UTC (rev 1054)
+++ trunk/ChangeLog 2006-12-06 15:32:21 UTC (rev 1055)
@@ -1,3 +1,9 @@
+2006-12-06 Enrico Tröger <enrico.troeger(a)uvena.de>
+
+ * src/sci_cb.c: Don't insert extra indentation in Python files after a
+ colon if the line is a comment.
+
+
2006-12-05 Enrico Tröger <enrico.troeger(a)uvena.de>
* src/treeviews.c, tagmanager/latex.c:
Modified: trunk/src/sci_cb.c
===================================================================
--- trunk/src/sci_cb.c 2006-12-05 16:03:18 UTC (rev 1054)
+++ trunk/src/sci_cb.c 2006-12-06 15:32:21 UTC (rev 1055)
@@ -311,7 +311,8 @@
// add extra indentation for Python after colon
if (doc_list[idx].file_type->id == GEANY_FILETYPES_PYTHON &&
- sci_get_char_at(sci, pos - 2) == ':')
+ sci_get_char_at(sci, pos - 2) == ':' &&
+ sci_get_style_at(sci, pos - 2) == SCE_P_OPERATOR)
{
/// TODO add something like insert_tabs() which inserts a tab or tab_width times a space
sci_add_text(sci, "\t");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.