Revision: 2719 http://geany.svn.sourceforge.net/geany/?rev=2719&view=rev Author: ntrel Date: 2008-06-20 07:19:57 -0700 (Fri, 20 Jun 2008)
Log Message: ----------- Remove document_delay_colourise(), document_colourise_all().
Modified Paths: -------------- trunk/ChangeLog trunk/src/callbacks.c trunk/src/document.c trunk/src/document.h trunk/src/keyfile.c trunk/src/main.c trunk/src/socket.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-20 14:17:15 UTC (rev 2718) +++ trunk/ChangeLog 2008-06-20 14:19:57 UTC (rev 2719) @@ -7,6 +7,11 @@ document_colourise_all() functions redundant (they'll be removed in the next commit). Note: I'll move on_editor_expose_event() to editor.c. + * src/dialogs.c: + Use stack buffers for g_vsnprintf() instead of heap allocation. + * src/callbacks.c, src/keyfile.c, src/document.c, src/document.h, + src/main.c, src/socket.c: + Remove document_delay_colourise(), document_colourise_all().
2008-06-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2008-06-20 14:17:15 UTC (rev 2718) +++ trunk/src/callbacks.c 2008-06-20 14:19:57 UTC (rev 2719) @@ -204,8 +204,6 @@ gint i, max = gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)); GeanyDocument *doc, *cur_doc = document_get_current();
- document_delay_colourise(); /* avoid recolourising all C files after each save */ - for (i = 0; i < max; i++) { doc = document_get_from_page(i); @@ -220,7 +218,6 @@ else document_save_file(doc, FALSE); } - document_colourise_new(); treeviews_update_tag_list(cur_doc, TRUE); ui_set_window_title(cur_doc); }
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2008-06-20 14:17:15 UTC (rev 2718) +++ trunk/src/document.c 2008-06-20 14:19:57 UTC (rev 2719) @@ -703,14 +703,6 @@ * Open a %document specified by @a locale_filename. * After all, the "document-open" signal is emitted for plugins. * - * When opening more than one file, either: - * -# Use document_open_files(). - * -# Call document_delay_colourise() before document_open_file() and - * document_colourise_new() after opening all files. - * - * This avoids unnecessary recolourising, saving significant processing when a lot of files - * are open of a %filetype that supports user typenames, e.g. C. - * * @param locale_filename The filename of the %document to load, in locale encoding. * @param readonly Whether to open the %document in read-only mode. * @param ft The %filetype for the %document or @c NULL to auto-detect the %filetype. @@ -1033,15 +1025,7 @@ * To reload a file, set the doc for the document to be reloaded; filename should be NULL. * pos is the cursor position, which can be overridden by --line and --column. * forced_enc can be NULL to detect the file encoding. - * Returns: doc of the opened file or NULL if an error occurred. - * - * When opening more than one file, either: - * 1. Use document_open_files(). - * 2. Call document_delay_colourise() before document_open_file() and - * document_colourise_new() after opening all files. - * - * This avoids unnecessary recolourising, saving significant processing when a lot of files - * are open of a filetype that supports user typenames, e.g. C. */ + * Returns: doc of the opened file or NULL if an error occurred. */ GeanyDocument *document_open_file_full(GeanyDocument *doc, const gchar *filename, gint pos, gboolean readonly, GeanyFiletype *ft, const gchar *forced_enc) { @@ -1215,8 +1199,6 @@ default: list = g_strsplit(data, "\n", 0); }
- document_delay_colourise(); - for (i = 0; ; i++) { if (list[i] == NULL) break; @@ -1225,15 +1207,13 @@ document_open_file(filename, FALSE, NULL, NULL); g_free(filename); } - document_colourise_new();
g_strfreev(list); }
/** - * Opens each file in the list @a filenames, ensuring the newly opened documents and - * existing documents (if necessary) are only colourised once. + * Opens each file in the list @a filenames. * Internally, document_open_file() is called for every list item. * * @param filenames A list of filenames to load, in locale encoding. @@ -1246,13 +1226,10 @@ { const GSList *item;
- document_delay_colourise(); - for (item = filenames; item != NULL; item = g_slist_next(item)) { document_open_file(item->data, readonly, ft, forced_enc); } - document_colourise_new(); }
@@ -2493,21 +2470,9 @@ #endif
-void document_delay_colourise() -{ - /* TODO: remove */ -} - - -void document_colourise_new() -{ - /* TODO: remove */ -} - - +/* create a new file and copy file content and properties */ GeanyDocument *document_clone(GeanyDocument *old_doc, const gchar *utf8_filename) { - /* create a new file and copy file content and properties */ gint len; gchar *text; GeanyDocument *doc;
Modified: trunk/src/document.h =================================================================== --- trunk/src/document.h 2008-06-20 14:17:15 UTC (rev 2718) +++ trunk/src/document.h 2008-06-20 14:19:57 UTC (rev 2719) @@ -235,8 +235,4 @@
GdkColor *document_get_status_color(GeanyDocument *doc);
-void document_delay_colourise(void); - -void document_colourise_new(void); - #endif
Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2008-06-20 14:17:15 UTC (rev 2718) +++ trunk/src/keyfile.c 2008-06-20 14:19:57 UTC (rev 2719) @@ -875,8 +875,6 @@ /* necessary to set it to TRUE for project session support */ main_status.opening_session_files = TRUE;
- document_delay_colourise(); - i = file_prefs.tab_order_ltr ? 0 : (session_files->len - 1); while (TRUE) { @@ -900,7 +898,6 @@ if (i < 0) break; } } - document_colourise_new();
g_ptr_array_free(session_files, TRUE); session_files = NULL;
Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2008-06-20 14:17:15 UTC (rev 2718) +++ trunk/src/main.c 2008-06-20 14:19:57 UTC (rev 2719) @@ -708,8 +708,6 @@
if (argc <= 1) return FALSE;
- document_delay_colourise(); - for (i = 1; i < argc; i++) { gchar *filename = get_argv_filename(argv[i]); @@ -717,7 +715,6 @@ handle_cl_filename(filename); g_free(filename); } - document_colourise_new(); return TRUE; }
Modified: trunk/src/socket.c =================================================================== --- trunk/src/socket.c 2008-06-20 14:17:15 UTC (rev 2718) +++ trunk/src/socket.c 2008-06-20 14:19:57 UTC (rev 2719) @@ -489,8 +489,6 @@ { if (strncmp(buf, "open", 4) == 0) { - document_delay_colourise(); - while (socket_fd_gets(sock, buf, sizeof(buf)) != -1 && *buf != '.') { g_strstrip(buf); /* remove \n char */ @@ -508,7 +506,6 @@ geany_debug("got data from socket, but it does not look like a filename"); } } - document_colourise_new();
#ifdef G_OS_WIN32 /* we need to bring the main window up with gtk_window_present() but this is not
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.