SF.net SVN: geany:[4311] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Wed Oct 14 12:21:18 UTC 2009
Revision: 4311
http://geany.svn.sourceforge.net/geany/?rev=4311&view=rev
Author: ntrel
Date: 2009-10-14 12:21:18 +0000 (Wed, 14 Oct 2009)
Log Message:
-----------
Add document_get_notebook_page() to API.
Minor edits of dox.
Modified Paths:
--------------
trunk/ChangeLog
trunk/plugins/geanyfunctions.h
trunk/src/document.c
trunk/src/plugindata.h
trunk/src/plugins.c
trunk/src/ui_utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-10-14 12:04:05 UTC (rev 4310)
+++ trunk/ChangeLog 2009-10-14 12:21:18 UTC (rev 4311)
@@ -4,6 +4,10 @@
Don't include trailing newlines when using reflow command.
* src/notebook.c:
Add stock close buttons to notebook tab popup menu.
+ * src/plugindata.h, src/document.c, src/plugins.c, src/ui_utils.c,
+ plugins/geanyfunctions.h:
+ Add document_get_notebook_page() to API.
+ Minor edits of dox.
2009-10-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/plugins/geanyfunctions.h
===================================================================
--- trunk/plugins/geanyfunctions.h 2009-10-14 12:04:05 UTC (rev 4310)
+++ trunk/plugins/geanyfunctions.h 2009-10-14 12:21:18 UTC (rev 4311)
@@ -64,6 +64,8 @@
geany_functions->p_document->get_status_color
#define document_get_basename_for_display \
geany_functions->p_document->get_basename_for_display
+#define document_get_notebook_page \
+ geany_functions->p_document->get_notebook_page
#define editor_get_indent_prefs \
geany_functions->p_editor->get_indent_prefs
#define editor_create_widget \
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2009-10-14 12:04:05 UTC (rev 4310)
+++ trunk/src/document.c 2009-10-14 12:21:18 UTC (rev 4311)
@@ -222,7 +222,10 @@
}
-/* returns the index of the notebook page for the document. */
+/** Get the notebook page index for a document.
+ * @param doc The document.
+ * @return The index.
+ * @since 0.19 */
gint document_get_notebook_page(GeanyDocument *doc)
{
g_return_val_if_fail(doc != NULL, -1);
@@ -2760,13 +2763,13 @@
/**
- * Gets the status colour of the document, or @c NULL if default widget colouring should be used.
- * Returned colours are red if the document has changes, green is the document is read-only
+ * Gets the status color of the document, or @c NULL if default widget coloring should be used.
+ * Returned colors are red if the document has changes, green if the document is read-only
* or simply @c NULL if the document is unmodified but writable.
*
* @param doc The document to use.
*
- * @return The colour for the document or @c NULL if the default colour should be used. The colour
+ * @return The color for the document or @c NULL if the default color should be used. The color
* object is owned by Geany and should not be modified or freed.
*
* @since 0.16
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2009-10-14 12:04:05 UTC (rev 4310)
+++ trunk/src/plugindata.h 2009-10-14 12:21:18 UTC (rev 4311)
@@ -50,7 +50,7 @@
enum {
/** The Application Programming Interface (API) version, incremented
* whenever any plugin data types are modified or appended to. */
- GEANY_API_VERSION = 160,
+ GEANY_API_VERSION = 161,
/** The Application Binary Interface (ABI) version, incremented whenever
* existing fields in the plugin data types have to be changed or reordered. */
@@ -270,6 +270,7 @@
void (*rename_file) (struct GeanyDocument *doc, const gchar *new_filename);
const GdkColor* (*get_status_color) (struct GeanyDocument *doc);
gchar* (*get_basename_for_display) (struct GeanyDocument *doc, gint length);
+ gint (*get_notebook_page) (struct GeanyDocument *doc);
}
DocumentFuncs;
Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c 2009-10-14 12:04:05 UTC (rev 4310)
+++ trunk/src/plugins.c 2009-10-14 12:21:18 UTC (rev 4311)
@@ -106,7 +106,8 @@
&document_save_file_as,
&document_rename_file,
&document_get_status_color,
- &document_get_basename_for_display
+ &document_get_basename_for_display,
+ &document_get_notebook_page
};
static EditorFuncs editor_funcs = {
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2009-10-14 12:04:05 UTC (rev 4310)
+++ trunk/src/ui_utils.c 2009-10-14 12:21:18 UTC (rev 4311)
@@ -2113,7 +2113,8 @@
* @param active Which document to highlight, or @c NULL.
* @param callback is used for each menu item's @c "activate" signal and will be passed
* the corresponding document pointer as @c user_data.
- * @warning You should check @c doc->is_valid in the callback. */
+ * @warning You should check @c doc->is_valid in the callback.
+ * @since 0.19 */
void ui_menu_add_document_items(GtkMenu *menu, GeanyDocument *active, GCallback callback)
{
GtkWidget *menu_item, *menu_item_label;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list