Add document_get_notebook_page() to API.

Minor edits of dox.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4311 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2009-10-14 12:21:18 +00:00
parent d2a93f351d
commit 539f8b3068
6 changed files with 19 additions and 7 deletions

View File

@ -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>

View File

@ -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 \

View File

@ -222,7 +222,10 @@ GeanyDocument *document_find_by_sci(ScintillaObject *sci)
}
/* 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 @@ static void document_redo_add(GeanyDocument *doc, guint type, gpointer data)
/**
* 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

View File

@ -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 @@ typedef struct DocumentFuncs
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;

View File

@ -106,7 +106,8 @@ static DocumentFuncs doc_funcs = {
&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 = {

View File

@ -2113,7 +2113,8 @@ GtkWidget *ui_label_set_markup(GtkLabel *label, const gchar *format, ...)
* @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;