Revision: 764
Author: eht16
Date: 2006-08-26 10:12:55 -0700 (Sat, 26 Aug 2006)
ViewCVS: http://svn.sourceforge.net/geany/?rev=764&view=rev
Log Message:
-----------
Fixed missing styling settings on new files (needs to be tested).
Now the filetype sub menu in the document file menu will be updated when the filetype is set by the filename on new files.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-08-26 16:44:08 UTC (rev 763)
+++ trunk/ChangeLog 2006-08-26 17:12:55 UTC (rev 764)
@@ -2,6 +2,10 @@
* src/geany.h, src/main.c, src/utils.c:
Fixed weird behaviour of Save all tool button and menu item.
+ * src/document.c:
+ Fixed missing styling settings on new files (needs to be tested).
+ Now the filetype sub menu in the document file menu will be updated
+ when the filetype is set by the filename on new files.
2006-08-23 Enrico Tröger <enrico.troeger(a)uvena.de>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2006-08-26 16:44:08 UTC (rev 763)
+++ trunk/src/document.c 2006-08-26 17:12:55 UTC (rev 764)
@@ -373,6 +373,7 @@
doc_list[idx].encoding = g_strdup(encodings[app->pref_editor_default_encoding].charset);
//document_set_filetype(idx, (ft == NULL) ? filetypes[GEANY_FILETYPES_ALL] : ft);
document_set_filetype(idx, ft);
+ if (ft == NULL) filetypes[GEANY_FILETYPES_ALL]->style_func_ptr(doc_list[idx].sci);
utils_set_window_title(idx);
utils_build_show_hide(idx);
utils_update_tag_list(idx, FALSE);
@@ -774,7 +775,10 @@
sci_set_savepoint(doc_list[idx].sci);
doc_list[idx].mtime = time(NULL);
if (doc_list[idx].file_type == NULL || doc_list[idx].file_type->id == GEANY_FILETYPES_ALL)
+ {
doc_list[idx].file_type = filetypes_get_from_filename(doc_list[idx].file_name);
+ filetypes_select_radio_item(doc_list[idx].file_type);
+ }
document_set_filetype(idx, doc_list[idx].file_type);
tm_workspace_update(TM_WORK_OBJECT(app->tm_workspace), TRUE, TRUE, FALSE);
gtk_label_set_text(GTK_LABEL(doc_list[idx].tab_label), basename);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 761
Author: eht16
Date: 2006-08-23 11:08:48 -0700 (Wed, 23 Aug 2006)
ViewCVS: http://svn.sourceforge.net/geany/?rev=761&view=rev
Log Message:
-----------
Added counter when using "Replace All" and display the count of replacements in the status window.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-08-23 16:51:36 UTC (rev 760)
+++ trunk/ChangeLog 2006-08-23 18:08:48 UTC (rev 761)
@@ -5,6 +5,8 @@
Improved ignore menu bar accelerator settings.
Keep current working directory when restarting the VTE
(happens when hitting Ctrl+C).
+ * src/document.c: Added counter when using "Replace All" and display
+ the count of replacements in the status window.
2006-08-23 Frank Lanitz <frank(a)frank.uvena.de>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2006-08-23 16:51:36 UTC (rev 760)
+++ trunk/src/document.c 2006-08-23 18:08:48 UTC (rev 761)
@@ -928,6 +928,7 @@
gint flags, gint start, gint end)
{
gint search_pos;
+ gint count = 0;
gint find_len = 0, replace_len = 0;
gboolean match_found = FALSE;
struct TextToFind ttf;
@@ -958,9 +959,12 @@
ttf.chrg.cpMin = search_pos + replace_len; //next search starts after replacement
end += replace_len - find_len; //update end of range now text has changed
ttf.chrg.cpMax = end;
+ count++;
}
}
sci_end_undo_action(doc_list[idx].sci);
+ msgwin_status_add(_("Replaced %d occurrences of \"%s\" with \"%s\"."),
+ count, find_text, replace_text);
if (match_found)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.