Revision: 5712
http://geany.svn.sourceforge.net/geany/?rev=5712&view=rev
Author: ntrel
Date: 2011-04-11 16:29:01 +0000 (Mon, 11 Apr 2011)
Log Message:
-----------
Remove unnecessary GEANY() macro usage.
Avoid using DOC_VALID() macro.
Modified Paths:
--------------
trunk/src/ui_utils.c
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2011-04-11 15:54:43 UTC (rev 5711)
+++ trunk/src/ui_utils.c 2011-04-11 16:29:01 UTC (rev 5712)
@@ -2428,17 +2428,16 @@
/* copy the documents_array into the new one */
foreach_document(i)
{
- g_ptr_array_add(sorted_documents, documents[i]);
+ if (documents[i]->is_valid)
+ g_ptr_array_add(sorted_documents, documents[i]);
}
/* and now sort it */
if (sort_func != NULL)
g_ptr_array_sort(sorted_documents, sort_func);
- for (i = 0; i < GEANY(sorted_documents)->len; i++)
+ for (i = 0; i < sorted_documents->len; i++)
{
doc = g_ptr_array_index(sorted_documents, i);
- if (! DOC_VALID(doc))
- continue;
base_name = g_path_get_basename(DOC_FILENAME(doc));
menu_item = gtk_image_menu_item_new_with_label(base_name);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5710
http://geany.svn.sourceforge.net/geany/?rev=5710&view=rev
Author: ntrel
Date: 2011-04-11 14:40:27 +0000 (Mon, 11 Apr 2011)
Log Message:
-----------
Remove notes about which headers to include as geanyplugin.h should be used instead.
Modified Paths:
--------------
trunk/doc/pluginsignals.c
Modified: trunk/doc/pluginsignals.c
===================================================================
--- trunk/doc/pluginsignals.c 2011-04-11 14:26:51 UTC (rev 5709)
+++ trunk/doc/pluginsignals.c 2011-04-11 14:40:27 UTC (rev 5710)
@@ -64,8 +64,6 @@
/** Sent when a new document is created.
*
- * You need to include "document.h" for the declaration of GeanyDocument.
- *
* @param obj a GeanyObject instance, should be ignored.
* @param doc the new document.
* @param user_data user data.
@@ -74,8 +72,6 @@
/** Sent when a new document is opened.
*
- * You need to include "document.h" for the declaration of GeanyDocument.
- *
* @param obj a GeanyObject instance, should be ignored.
* @param doc the opened document.
* @param user_data user data.
@@ -84,8 +80,6 @@
/** Sent when an existing document is reloaded.
*
- * You need to include "document.h" for the declaration of GeanyDocument.
- *
* @param obj a GeanyObject instance, should be ignored.
* @param doc the re-opened document.
* @param user_data user data.
@@ -96,8 +90,6 @@
/** Sent before a document is saved.
*
- * You need to include "document.h" for the declaration of GeanyDocument.
- *
* @param obj a GeanyObject instance, should be ignored.
* @param doc the document to be saved.
* @param user_data user data.
@@ -106,8 +98,6 @@
/** Sent when a new document is saved.
*
- * You need to include "document.h" for the declaration of GeanyDocument.
- *
* @param obj a GeanyObject instance, should be ignored.
* @param doc the saved document.
* @param user_data user data.
@@ -130,8 +120,6 @@
/** Sent when switching notebook pages.
*
- * You need to include "document.h" for the declaration of GeanyDocument.
- *
* @param obj a GeanyObject instance, should be ignored.
* @param doc the current document.
* @param user_data user data.
@@ -140,8 +128,6 @@
/** Sent before closing a document.
*
- * You need to include "document.h" for the declaration of GeanyDocument.
- *
* @param obj a GeanyObject instance, should be ignored.
* @param doc the document about to be closed.
* @param user_data user data.
@@ -215,8 +201,6 @@
* @note You can add menu items from @c plugin_init() using @c geany->main_widgets->editor_menu,
* remembering to destroy them in @c plugin_cleanup().
*
- * You need to include "document.h" for the declaration of GeanyDocument.
- *
* @param obj a GeanyObject instance, should be ignored.
* @param word the current word (in UTF-8 encoding) below the cursor position
where the popup menu will be opened.
@@ -250,9 +234,6 @@
* care about the return value; make sure to return TRUE only if it is necessary
* and in the correct situations.
*
- * You need to include "editor.h" for the declaration of GeanyEditor and "Scintilla.h" for
- * SCNotification.
- *
* @param obj a GeanyObject instance, should be ignored.
* @param editor The current GeanyEditor.
* @param nt A pointer to the SCNotification struct which holds additional information for
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5707
http://geany.svn.sourceforge.net/geany/?rev=5707&view=rev
Author: ntrel
Date: 2011-04-11 12:40:34 +0000 (Mon, 11 Apr 2011)
Log Message:
-----------
Store VTE path with the session (based on patch by Nicolas
Sierro, thanks).
There's still a bug with loading a project at startup; closing the
project doesn't restore old VTE path.
Modified Paths:
--------------
trunk/ChangeLog
trunk/THANKS
trunk/src/about.c
trunk/src/keyfile.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-11 12:07:19 UTC (rev 5706)
+++ trunk/ChangeLog 2011-04-11 12:40:34 UTC (rev 5707)
@@ -3,6 +3,11 @@
* plugins/filebrowser.c:
Update path when saving a new document for the first time if the
follow path option is enabled.
+ * src/about.c, src/keyfile.c, THANKS:
+ Store VTE path with the session (based on patch by Nicolas
+ Sierro, thanks).
+ There's still a bug with loading a project at startup; closing the
+ project doesn't restore old VTE path.
2011-04-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/THANKS
===================================================================
--- trunk/THANKS 2011-04-11 12:07:19 UTC (rev 5706)
+++ trunk/THANKS 2011-04-11 12:40:34 UTC (rev 5707)
@@ -88,6 +88,7 @@
Taylor Venable <taylor(at)metasyntax(dot)net> - Erlang filetype
Manuel Bua <manuel(dot)bua(at)gmail(dot)com> - Ensure consistent line endings pref.
Matthew Brush <codebrainz(at)users(dot)sourceforge(dot)net> - Various patches.
+Nicolas Sierro <nicolas(a)sierro.net> - store VTE path with session patch
Translators:
------------
Modified: trunk/src/about.c
===================================================================
--- trunk/src/about.c 2011-04-11 12:07:19 UTC (rev 5706)
+++ trunk/src/about.c 2011-04-11 12:40:34 UTC (rev 5707)
@@ -98,7 +98,8 @@
"John Gabriele, Jon Senior, Jon Strait, Josef Whiter, "
"Jörn Reder, Kelvin Gardiner, Kevin Ellwood, Kristoffer A. Tjernås, Lex Trotman, "
"Manuel Bua, Mário Silva, Marko Peric, Matthew Brush, Matti Mårds, "
-"Moritz Barsnick, Ondrej Donek, Peter Strand, Philipp Gildein, Pierre Joye, Rob van der Linde, "
+"Moritz Barsnick, Nicolas Sierro, Ondrej Donek, Peter Strand, Philipp Gildein, "
+"Pierre Joye, Rob van der Linde, "
"Robert McGinley, Roland Baudin, Ross McKay, S Jagannathan, Saleem Abdulrasool, "
"Sebastian Kraft, Shiv, Slava Semushin, Stefan Oltmanns, Tamim, Taylor Venable, "
"Thomas Huth, Thomas Martitz, Tomás Vírseda, "
Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c 2011-04-11 12:07:19 UTC (rev 5706)
+++ trunk/src/keyfile.c 2011-04-11 12:40:34 UTC (rev 5707)
@@ -335,6 +335,14 @@
i++;
}
}
+
+#ifdef HAVE_VTE
+ if (vte_info.have_vte)
+ {
+ vte_get_working_directory(); /* refresh vte_info.dir */
+ g_key_file_set_string(config, "VTE", "last_dir", vte_info.dir);
+ }
+#endif
}
@@ -482,8 +490,6 @@
tmp_string = utils_get_hex_from_color(vc->colour_back);
g_key_file_set_string(config, "VTE", "colour_back", tmp_string);
g_free(tmp_string);
- vte_get_working_directory(); /* refresh vte_info.dir */
- g_key_file_set_string(config, "VTE", "last_dir", vte_info.dir);
}
#endif
}
@@ -559,6 +565,13 @@
if (cl_options.load_session)
configuration_save_session_files(config);
+#ifdef HAVE_VTE
+ else if (vte_info.have_vte)
+ {
+ vte_get_working_directory(); /* refresh vte_info.dir */
+ g_key_file_set_string(config, "VTE", "last_dir", vte_info.dir);
+ }
+#endif
/* write the file */
data = g_key_file_to_data(config, NULL, NULL);
@@ -628,6 +641,16 @@
g_ptr_array_add(session_files, tmp_array);
i++;
}
+
+#ifdef HAVE_VTE
+ /* BUG: after loading project at startup, closing project doesn't restore old VTE path */
+ if (vte_info.have_vte)
+ {
+ gchar *tmp_string = utils_get_setting_string(config, "VTE", "last_dir", NULL);
+ vte_cwd(tmp_string,TRUE);
+ g_free(tmp_string);
+ }
+#endif
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.