Revision: 1377
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1377&view=rev
Author: sheckley
Date: 2010-05-22 07:20:14 +0000 (Sat, 22 May 2010)
Log Message:
-----------
use documents_foreach() if foreach_document() is not available
Modified Paths:
--------------
trunk/geany-plugins/geanyextrasel/ChangeLog
trunk/geany-plugins/geanyextrasel/src/extrasel.c
Modified: trunk/geany-plugins/geanyextrasel/ChangeLog
===================================================================
--- trunk/geany-plugins/geanyextrasel/ChangeLog 2010-05-22 07:12:02 UTC (rev 1376)
+++ trunk/geany-plugins/geanyextrasel/ChangeLog 2010-05-22 07:20:14 UTC (rev 1377)
@@ -2,6 +2,7 @@
* src/extrasel.c:
Fixed crash in plugin_cleanup() - patch by Colomban Wendling, thanks.
+ Use documents_foreach() if foreach_document() is not available.
2010-05-21 Dimitar Zhekov <hamster(a)mbox.contact.bg>
Modified: trunk/geany-plugins/geanyextrasel/src/extrasel.c
===================================================================
--- trunk/geany-plugins/geanyextrasel/src/extrasel.c 2010-05-22 07:12:02 UTC (rev 1376)
+++ trunk/geany-plugins/geanyextrasel/src/extrasel.c 2010-05-22 07:20:14 UTC (rev 1377)
@@ -293,6 +293,11 @@
"key-press-event", FALSE, G_CALLBACK(on_key_press_event), NULL);
}
+/* for 0.18 compatibility */
+#ifndef foreach_document
+#define foreach_document documents_foreach
+#endif
+
void plugin_cleanup(void)
{
guint i;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1375
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1375&view=rev
Author: colombanw
Date: 2010-05-21 21:23:38 +0000 (Fri, 21 May 2010)
Log Message:
-----------
GeanyGenDoc: Add a section in the manual to describe the UI in Geany
Add a new section in the manual that presents and describes the UI
that the plugin adds to Geany.
Modified Paths:
--------------
trunk/geanygendoc/docs/help/manual.rst
Modified: trunk/geanygendoc/docs/help/manual.rst
===================================================================
--- trunk/geanygendoc/docs/help/manual.rst 2010-05-21 21:23:08 UTC (rev 1374)
+++ trunk/geanygendoc/docs/help/manual.rst 2010-05-21 21:23:38 UTC (rev 1375)
@@ -360,6 +360,88 @@
Whether to also document symbol's children (according to their own rules).
+User interface in Geany
+=======================
+
+Menus
+-----
+
+GeanyGenDoc adds an item named `Insert Documentation Comment` in the editor's
+pop-up under the `Insert Comments` sub-menu; and a menu named
+`Documentation Generator` into the `Tools` menu.
+
+Editor's pop-up menu
+~~~~~~~~~~~~~~~~~~~~
+
+The item `Editor's pop-up → Insert Comments → Insert Documentation Comment`
+generates documentation for the current symbol. It has a keyboard shortcut
+that can be configured through Geany's keybinding configuration system, under
+`GeanyGenDoc → Insert Documentation Comment`.
+
+Tools menu
+~~~~~~~~~~
+
+The `Documentation Generator` menu under `Tools` contains the following items:
+
+`Document Current Symbol`
+ This generates documentation for the current symbol. It is equivalent to the
+ item `Insert Documentation Comment` that can be found in the editor's pop-up
+ menu.
+
+`Document All Symbols`
+ This generates documentation for all symbols in the document. This is
+ equivalent to manually requesting documentation generation for each symbol in
+ the document.
+
+`Reload Configuration Files`
+ This force reloading of all the `file type`_ configuration files. It is
+ useful when a file type configuration file was modified, in order to the new
+ configuration to be used without reloading the plugin.
+
+`Edit Current Language Configuration`
+ This opens the configuration file that applies to the current document for
+ editing. The opened configuration file has write permissions: if it was a
+ system configuration file it is copied under your personal `configuration
+ directory`_ transparently.
+
+`Open Manual`
+ Opens this manual in a browser.
+
+
+Preferences dialog
+------------------
+
+The preferences dialog, than can either be opened through `Edit →
+Plugin Preferences` or with the `Preferences` button in the plugin manager,
+allows to modify the following preferences:
+
+`General`
+ `Save file before generating documentation`
+ Choose whether the current document should be saved to disc before
+ generating the documentation. This is a technical detail, but it is
+ currently needed to have an up-to-date tag list. If you disable this option
+ and ask for documentation generation on a modified document, the behavior
+ may be surprising since the comment will be generated for the last saved
+ state of the document and not the current one.
+
+ `Indent inserted documentation`
+ Chooses whether the inserted documentation should be indented to fit the
+ indentation at the insertion position.
+
+`Documentation type`
+ This list allows you to choose the documentation type to use with each file
+ type. The special language `All` on top of the list is used to choose the
+ default documentation type, used for all languages that haven't one set.
+
+`Global environment`
+ Global environment overrides and additions. This is an environment that will
+ be merged with the `file type`_-specific ones, possibly overriding some parts.
+ It can be used to define some values for all the file types, such as whether
+ to write the common `Since` tag, define the `Doxygen`_ prefix an so on.
+ Its most use case is not to need to change a file type's environment to change
+ the value of one of its elements.
+
+
Miscellaneous
=============
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1374
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1374&view=rev
Author: colombanw
Date: 2010-05-21 21:23:08 +0000 (Fri, 21 May 2010)
Log Message:
-----------
GeanyGenDoc: Strings review
Modified Paths:
--------------
trunk/geanygendoc/src/ggd-file-type-loader.c
trunk/geanygendoc/src/ggd-file-type-manager.c
trunk/geanygendoc/src/ggd-options.c
trunk/geanygendoc/src/ggd-plugin.c
trunk/geanygendoc/src/ggd-utils.c
trunk/geanygendoc/src/ggd-widget-doctype-selector.c
trunk/geanygendoc/src/ggd.c
Modified: trunk/geanygendoc/src/ggd-file-type-loader.c
===================================================================
--- trunk/geanygendoc/src/ggd-file-type-loader.c 2010-05-21 17:50:21 UTC (rev 1373)
+++ trunk/geanygendoc/src/ggd-file-type-loader.c 2010-05-21 21:23:08 UTC (rev 1374)
@@ -423,7 +423,7 @@
} else {
if (! ggd_match_from_string (identifier)) {
g_scanner_warn (scanner,
- _("Unknown type \"%s\". Is this a typo?"),
+ _("Unknown type \"%s\", is it a typo?"),
identifier);
}
if (match_str->len > 0) {
@@ -446,7 +446,7 @@
match = g_string_free (match_str, FALSE);
} else {
if (success) {
- g_scanner_error (scanner, _("match is empty"));
+ g_scanner_error (scanner, _("match identifier is empty"));
}
g_string_free (match_str, TRUE);
success = FALSE;
@@ -568,7 +568,8 @@
g_scanner_get_next_token (scanner); /* eat it */
if (multiple) {
g_scanner_unexp_token (scanner, G_TOKEN_IDENTIFIER,
- _("doctype"), NULL, NULL, NULL,TRUE);
+ _("documentation type"), NULL, NULL, NULL,
+ TRUE);
success = FALSE;
} else {
multiple = TRUE;
@@ -579,7 +580,8 @@
g_scanner_get_next_token (scanner); /* eat it */
if (! multiple) {
g_scanner_unexp_token (scanner, G_TOKEN_IDENTIFIER,
- _("doctype"), NULL, NULL, NULL,TRUE);
+ _("documentation type"), NULL, NULL, NULL,
+ TRUE);
success = FALSE;
}
break;
@@ -600,7 +602,8 @@
default:
g_scanner_get_next_token (scanner); /* eat it */
g_scanner_unexp_token (scanner, G_TOKEN_IDENTIFIER,
- _("doctype"), NULL, NULL, NULL, TRUE);
+ _("documentation type"), NULL, NULL, NULL,
+ TRUE);
success = FALSE;
}
} while (success && multiple && ttype != G_TOKEN_RIGHT_CURLY);
@@ -853,10 +856,10 @@
gboolean error)
{
if (! error) {
- g_warning (_("Parsing warning: %s:%u:%u: %s"),
+ g_warning (_("Parser warning: %s:%u:%u: %s"),
scanner->input_name, scanner->line, scanner->position, message);
} else {
- g_critical (_("Parsing error: %s:%u:%u: %s"),
+ g_critical (_("Parser error: %s:%u:%u: %s"),
scanner->input_name, scanner->line, scanner->position, message);
g_set_error (scanner->user_data,
GGD_FILE_TYPE_LOAD_ERROR, GGD_FILE_TYPE_LOAD_ERROR_PARSE,
Modified: trunk/geanygendoc/src/ggd-file-type-manager.c
===================================================================
--- trunk/geanygendoc/src/ggd-file-type-manager.c 2010-05-21 17:50:21 UTC (rev 1373)
+++ trunk/geanygendoc/src/ggd-file-type-manager.c 2010-05-21 21:23:08 UTC (rev 1374)
@@ -172,7 +172,7 @@
filename = ggd_file_type_manager_get_conf_path_intern (geany_ft, GGD_PERM_R,
&err);
if (! filename) {
- msgwin_status_add (_("Filetype configuration file for language \"%s\" not "
+ msgwin_status_add (_("File type configuration file for language \"%s\" not "
"found: %s"),
geany_ft->name, err->message);
g_error_free (err);
Modified: trunk/geanygendoc/src/ggd-options.c
===================================================================
--- trunk/geanygendoc/src/ggd-options.c 2010-05-21 17:50:21 UTC (rev 1373)
+++ trunk/geanygendoc/src/ggd-options.c 2010-05-21 21:23:08 UTC (rev 1374)
@@ -323,7 +323,7 @@
entry = ggd_opt_group_lookup_entry (group, optvar);
if (! entry) {
- g_warning (_("Unknown setting"));
+ g_warning (_("Unknown option"));
} else {
if (check_type) {
gboolean success = TRUE;
Modified: trunk/geanygendoc/src/ggd-plugin.c
===================================================================
--- trunk/geanygendoc/src/ggd-plugin.c 2010-05-21 17:50:21 UTC (rev 1373)
+++ trunk/geanygendoc/src/ggd-plugin.c 2010-05-21 21:23:08 UTC (rev 1374)
@@ -48,10 +48,10 @@
/* TODO check minimum requierment */
PLUGIN_VERSION_CHECK (171)
-PLUGIN_SET_INFO (GGD_PLUGIN_NAME,
- _("Generates documentation comments basis from source code"),
+PLUGIN_SET_INFO (_("Documentation Generator"),
+ _("Generates documentation basis from source code"),
VERSION,
- "Colomban \"Ban\" Wendling <ban(a)herbesfolles.org>")
+ "Colomban Wendling <ban(a)herbesfolles.org>")
enum
{
@@ -357,7 +357,7 @@
gtk_menu_shell_append (GTK_MENU_SHELL (parent_menu), pdata->separator_item);
gtk_widget_show (pdata->separator_item);
}
- pdata->edit_menu_item = gtk_menu_item_new_with_label (_("Insert documentation comment"));
+ pdata->edit_menu_item = gtk_menu_item_new_with_label (_("Insert Documentation Comment"));
pdata->edit_menu_item_hid = g_signal_connect (pdata->edit_menu_item, "activate",
G_CALLBACK (editor_menu_acivated_handler),
pdata);
@@ -368,7 +368,7 @@
/* and attach a keybinding */
keybindings_set_item (plugin_key_group, KB_INSERT, insert_comment_keybinding_handler,
GDK_d, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
- "instert_doc", _("Insert documentation comment"),
+ "instert_doc", _("Insert Documentation Comment"),
pdata->edit_menu_item);
}
@@ -422,16 +422,15 @@
menu = gtk_menu_new ();
/* build "document current symbol" item */
item = menu_add_item (GTK_MENU_SHELL (menu),
- _("_Document current symbol"),
- _("Generate documentation for the currently selected "
- "symbol"),
+ _("_Document Current Symbol"),
+ _("Generate documentation for the current symbol"),
NULL,
G_CALLBACK (document_current_symbol_handler), NULL);
ui_add_document_sensitive (item);
/* build "document all" item */
item = menu_add_item (GTK_MENU_SHELL (menu),
- _("Document _all symbols"),
- _("Generate documentation for all the symbols in the "
+ _("Document _All Symbols"),
+ _("Generate documentation for all symbols in the "
"current document"),
NULL,
G_CALLBACK (document_all_symbols_handler), NULL);
@@ -441,13 +440,13 @@
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
/* build "reload" item */
item = menu_add_item (GTK_MENU_SHELL (menu),
- _("_Reload configuration files"),
+ _("_Reload Configuration Files"),
_("Force reloading of the configuration files"),
GTK_STOCK_REFRESH,
G_CALLBACK (reload_configuration_hanlder), NULL);
/* language filetypes opener */
item = menu_add_item (GTK_MENU_SHELL (menu),
- _("_Edit current language configuration"),
+ _("_Edit Current Language Configuration"),
_("Open the current language configuration file for "
"editing"),
GTK_STOCK_EDIT,
@@ -458,12 +457,12 @@
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
/* help/manual opening */
item = menu_add_item (GTK_MENU_SHELL (menu),
- _("Open _manual"),
+ _("Open _Manual"),
_("Open the manual in a browser"),
GTK_STOCK_HELP,
G_CALLBACK (open_manual_handler), NULL);
/* build tools menu item */
- item = gtk_menu_item_new_with_mnemonic (_("_Documentation generator"));
+ item = gtk_menu_item_new_with_mnemonic (_("_Documentation Generator"));
gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu);
gtk_widget_show_all (item);
@@ -565,22 +564,23 @@
box2 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (frame), box2);
/* auto-save */
- widget = gtk_check_button_new_with_mnemonic (_("_Save file before generating comment"));
+ widget = gtk_check_button_new_with_mnemonic (_("_Save file before generating "
+ "documentation"));
ui_widget_set_tooltip_text (widget,
- _("Whether to automatically save the file to work on before inserting a "
- "comment. This is currently needed to have an up-to-date tag list. "
- "If you disable this option and ask for comment generation on a "
- "modified file, the behavior may be surprising since the comment will be "
- "generated for the last saved state and not the current state of the "
- "file."));
+ _("Whether the current document should be saved to disc before generating "
+ "the documentation. This is a technical detail, but it is currently "
+ "needed to have an up-to-date tag list. If you disable this option and "
+ "ask for documentation generation on a modified document, the behavior "
+ "may be surprising since the comment will be generated for the last "
+ "saved state of this document and not the current one."));
ggd_opt_group_set_proxy_gtktogglebutton (plugin->config, &GGD_OPT_save_to_refresh,
widget);
gtk_box_pack_start (GTK_BOX (box2), widget, FALSE, FALSE, 0);
/* indent */
- widget = gtk_check_button_new_with_mnemonic (_("_Indent comments"));
- ui_widget_set_tooltip_text (widget, _("Whether to indent the comments to fit "
- "the indentation at the insertion "
- "position."));
+ widget = gtk_check_button_new_with_mnemonic (_("_Indent inserted documentation"));
+ ui_widget_set_tooltip_text (widget,
+ _("Whether the inserted documentation should be indented to fit the "
+ "indentation at the insertion position."));
ggd_opt_group_set_proxy_gtktogglebutton (plugin->config, &GGD_OPT_indent,
widget);
gtk_box_pack_start (GTK_BOX (box2), widget, FALSE, FALSE, 0);
@@ -595,14 +595,17 @@
ggd_doctype_selector_set_doctype (GGD_DOCTYPE_SELECTOR (GGD_W_doctype_selector),
i, GGD_OPT_doctype[i]);
}
+ ui_widget_set_tooltip_text (GGD_W_doctype_selector,
+ _("Choose the documentation type to use with each file type. The special "
+ "language \"All\" on top of the list is used to choose the default "
+ "documentation type, used for all languages that haven't one set."));
gtk_box_pack_start (GTK_BOX (box2), GGD_W_doctype_selector, TRUE, TRUE, 0);
/* Environ editor */
widget = ggd_frame_new (_("Global environment"));
- ui_widget_set_tooltip_text (widget, _("Global environment overrides and "
- "additions. This environment will be "
- "merged with the filetype-specific "
- "ones."));
+ ui_widget_set_tooltip_text (widget,
+ _("Global environment overrides and additions. This environment will be "
+ "merged with the file-type-specific ones."));
{
GtkWidget *scrolled;
GtkWidget *view;
Modified: trunk/geanygendoc/src/ggd-utils.c
===================================================================
--- trunk/geanygendoc/src/ggd-utils.c 2010-05-21 17:50:21 UTC (rev 1373)
+++ trunk/geanygendoc/src/ggd-utils.c 2010-05-21 21:23:08 UTC (rev 1374)
@@ -161,7 +161,7 @@
if (g_file_test (user_path, G_FILE_TEST_EXISTS)) {
if (! g_file_test (user_path, G_FILE_TEST_IS_REGULAR)) {
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
- _("file \"%s\" exists but is not a regular file"),
+ _("File \"%s\" exists but is not a regular file"),
user_path);
} else {
path = user_path;
@@ -172,7 +172,7 @@
if (! g_file_test (system_path, G_FILE_TEST_IS_REGULAR)) {
g_clear_error (error);
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
- _("file \"%s\" exists but is not a regular file"),
+ _("File \"%s\" exists but is not a regular file"),
system_path);
} else {
path = system_path;
Modified: trunk/geanygendoc/src/ggd-widget-doctype-selector.c
===================================================================
--- trunk/geanygendoc/src/ggd-widget-doctype-selector.c 2010-05-21 17:50:21 UTC (rev 1373)
+++ trunk/geanygendoc/src/ggd-widget-doctype-selector.c 2010-05-21 21:23:08 UTC (rev 1374)
@@ -141,8 +141,8 @@
gtk_list_store_set (self->priv->store, &iter,
COLUMN_ID, 0,
COLUMN_LANGUAGE, _("All"),
- COLUMN_TOOLTIP, _("Default doctype for languages that "
- "doesn't have one set"),
+ COLUMN_TOOLTIP, _("Default documentation type for "
+ "languages that does not have one set"),
COLUMN_DOCTYPE, NULL,
-1);
/* i = 1: skip None */
Modified: trunk/geanygendoc/src/ggd.c
===================================================================
--- trunk/geanygendoc/src/ggd.c 2010-05-21 17:50:21 UTC (rev 1373)
+++ trunk/geanygendoc/src/ggd.c 2010-05-21 21:23:08 UTC (rev 1374)
@@ -420,7 +420,8 @@
doctype = ggd_file_type_get_doc (ft, doc_type);
if (! doctype) {
- msgwin_status_add (_("No documentation type \"%s\" for language \"%s\""),
+ msgwin_status_add (_("Documentation type \"%s\" does not exist for "
+ "language \"%s\"."),
doc_type, doc->file_type->name);
} else {
if (file_type_) *file_type_ = ft;
@@ -475,7 +476,7 @@
}
} else if (! setting) {
msgwin_status_add (_("No setting applies to symbol \"%s\" of type \"%s\" "
- "at line %lu"),
+ "at line %lu."),
tag->name, ggd_tag_get_type_name (tag),
tag->atts.entry.line);
}
@@ -516,7 +517,7 @@
tag_array = doc->tm_file->tags_array;
tag = ggd_tag_find_from_line (tag_array, line + 1 /* it is a SCI line */);
if (! tag || (tag->type & tm_tag_file_t)) {
- msgwin_status_add (_("No valid tag for line %d"), line);
+ msgwin_status_add (_("No valid tag at line %d."), line);
} else {
if (get_config (doc, doc_type, &filetype, &doctype)) {
GgdDocSetting *setting;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.