antiright-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Antiright-devel] antiright/gtkshell options.c


From: Jeffrey Bedard
Subject: [Antiright-devel] antiright/gtkshell options.c
Date: Fri, 30 Jul 2010 18:16:09 +0000

CVSROOT:        /sources/antiright
Module name:    antiright
Changes by:     Jeffrey Bedard <jefbed> 10/07/30 18:16:09

Modified files:
        gtkshell       : options.c 

Log message:
        Added self-documentation to option addition.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/options.c?cvsroot=antiright&r1=1.44&r2=1.45

Patches:
Index: options.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/options.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- options.c   21 Jul 2010 21:47:01 -0000      1.44
+++ options.c   30 Jul 2010 18:16:09 -0000      1.45
@@ -121,86 +121,88 @@
        if(gsh_options_usage_string==NULL)
                asprintf(&gsh_options_usage_string, "Usage:  ");
 
-#define ARTDEF(key, cb)\
+#define ARTDEF(key, cb, descr)\
        $(dictionary, add, key, (const gchar *)cb);\
-       asprintf(&gsh_options_usage_string, "%s [%s]",\
-                       gsh_options_usage_string, key);
+       asprintf(&gsh_options_usage_string, "%s\n%s\t%s",\
+                       gsh_options_usage_string, key, descr);
 
        dictionary=ARNEW(ar, ARTupleVector);
 
        /* Widgets */
-       ARTDEF("-aAm",  gsh_add_app_menu_cb);
-       ARTDEF("-aAc",  gsh_add_applet_clock_cb);
-       ARTDEF("-ab",   gsh_add_pane_cb);
-       ARTDEF("-acb",  gsh_add_commanded_button_cb);
-       ARTDEF("-acl",  gsh_add_commanded_label_cb);
-       ARTDEF("-aC",   gsh_add_command_cb);
-       ARTDEF("-ae",   gsh_add_editor_cb);
-       ARTDEF("-af",   gsh_add_form_cb);
-       ARTDEF("-aL",   gsh_add_list_cb);
-       ARTDEF("-al",   gsh_add_label_cb);
-       ARTDEF("-aP",   gsh_add_piped_text_cb);
-       ARTDEF("-ap",   gsh_add_piped_label_cb);
-       ARTDEF("-aQ",   gsh_add_quickstart_cb);
-       ARTDEF("-ar",   gsh_add_row_cb);
-       ARTDEF("-aS",   gsh_add_separator_cb);
-       ARTDEF("-as",   gsh_add_shell_cb);
-       ARTDEF("-at",   gsh_add_entry_cb);
-       ARTDEF("-aT",   gsh_add_text_cb);
-       ARTDEF("-aw",   gsh_add_window_cb);
-       ARTDEF("-aX",   gsh_add_embedded_cb);
+       ARTDEF("-aAm",  gsh_add_app_menu_cb, "add application menu");
+       ARTDEF("-aAc",  gsh_add_applet_clock_cb, "add clock applet");
+       ARTDEF("-ab",   gsh_add_pane_cb, "add resizable pane");
+       ARTDEF("-acb",  gsh_add_commanded_button_cb, "add commanded button");
+       ARTDEF("-acl",  gsh_add_commanded_label_cb, "add commanded label");
+       ARTDEF("-aC",   gsh_add_command_cb, "add default command callback");
+       ARTDEF("-ae",   gsh_add_editor_cb, "add editor");
+       ARTDEF("-af",   gsh_add_form_cb, "add radio button form");
+       ARTDEF("-aL",   gsh_add_list_cb, "add list");
+       ARTDEF("-al",   gsh_add_label_cb, "add label");
+       ARTDEF("-aP",   gsh_add_piped_text_cb, "add piped text from stdin");
+       ARTDEF("-ap",   gsh_add_piped_label_cb, "add piped label from stdin");
+       ARTDEF("-aQ",   gsh_add_quickstart_cb, "add quickstart");
+       ARTDEF("-ar",   gsh_add_row_cb, "add new row");
+       ARTDEF("-aS",   gsh_add_separator_cb, "add separator");
+       ARTDEF("-as",   gsh_add_shell_cb, "add terminal (VTE)");
+       ARTDEF("-at",   gsh_add_entry_cb, "add text entry");
+       ARTDEF("-aT",   gsh_add_text_cb, "add text editor");
+       ARTDEF("-aw",   gsh_add_window_cb, "add new window");
+       ARTDEF("-aX",   gsh_add_embedded_cb, "add embedded"); // FIXME
 
        /* Updating widgets */
-       ARTDEF("-aul",  gsh_add_updating_label_cb);
-       ARTDEF("-aup",  gsh_add_updating_progress_cb);
+       ARTDEF("-aul",  gsh_add_updating_label_cb, "add updating label");
+       ARTDEF("-aup",  gsh_add_updating_progress_cb, 
+               "add updating progress bar");
 
        /* Options */
-       ARTDEF("-oa", gsh_option_app_mode_cb);
-       ARTDEF("-oC", gsh_option_check_commands_cb);
-       ARTDEF("-oc", gsh_option_color_cb);
-       ARTDEF("-oD", gsh_option_no_dummy_cb);
-       ARTDEF("-oE", gsh_option_echoes_cb);
-       ARTDEF("-oe", gsh_option_exits_cb);
-       ARTDEF("-oF", gsh_option_no_base_frame_cb);
-       ARTDEF("-of", gsh_option_framed_labels_cb);
-       ARTDEF("-og", gsh_option_geometry_cb);
-       ARTDEF("-oH", gsh_option_horiz_clock_cb);
-       ARTDEF("-oh", gsh_option_horiz_labels_cb);
-       ARTDEF("-oi", gsh_option_icon_size_cb);
-       ARTDEF("-ol", gsh_option_no_expand_cb);
-       ARTDEF("-oL", gsh_option_expand_cb);
-       ARTDEF("-on", gsh_option_no_decorations_cb);
-       ARTDEF("-op", gsh_option_pane_next_cb);
-       ARTDEF("-or", gsh_option_rows_cb);
-       ARTDEF("-os", gsh_option_scroll_cb);
-       ARTDEF("-oT", gsh_option_title_cb);
-       ARTDEF("-ou", gsh_option_update_cb);
+       ARTDEF("-oa", gsh_option_app_mode_cb, "set app mode");
+       ARTDEF("-oC", gsh_option_check_commands_cb, "set check commands");
+       ARTDEF("-oc", gsh_option_color_cb, "set color");
+       ARTDEF("-oD", gsh_option_no_dummy_cb, "set no dummy");
+       ARTDEF("-oE", gsh_option_echoes_cb, "set echoes");
+       ARTDEF("-oe", gsh_option_exits_cb, "set exits");
+       ARTDEF("-oF", gsh_option_no_base_frame_cb, "set no base frame");
+       ARTDEF("-of", gsh_option_framed_labels_cb, "set framed labels");
+       ARTDEF("-og", gsh_option_geometry_cb, "set geometry");
+       ARTDEF("-oH", gsh_option_horiz_clock_cb, "set horizontal clock");
+       ARTDEF("-oh", gsh_option_horiz_labels_cb, "set horizontal labels");
+       ARTDEF("-oi", gsh_option_icon_size_cb, "set icon size");
+       ARTDEF("-ol", gsh_option_no_expand_cb, "set no expand");
+       ARTDEF("-oL", gsh_option_expand_cb, "set expand");
+       ARTDEF("-on", gsh_option_no_decorations_cb, "set no decorations");
+       ARTDEF("-op", gsh_option_pane_next_cb, "set adding to next pane");
+       ARTDEF("-or", gsh_option_rows_cb, "set number of rows");
+       ARTDEF("-os", gsh_option_scroll_cb, "set scroll");
+       ARTDEF("-oT", gsh_option_title_cb, "set window title");
+       ARTDEF("-ou", gsh_option_update_cb, "set update frequency");
 
        /* Terminal options */
-       ARTDEF("-otf", gsh_option_terminal_font_cb);
-       ARTDEF("-oth", gsh_option_terminal_height_cb);
-       ARTDEF("-otN", gsh_option_terminal_not_tab_cb);
-       ARTDEF("-otT", gsh_option_terminal_not_transparent_cb);
-       ARTDEF("-ott", gsh_option_terminal_transparent_cb);
-       ARTDEF("-otw", gsh_option_terminal_width_cb);
+       ARTDEF("-otf", gsh_option_terminal_font_cb, "set terminal font");
+       ARTDEF("-oth", gsh_option_terminal_height_cb, "set terminal height");
+       ARTDEF("-otN", gsh_option_terminal_not_tab_cb, "set terminal not tab");
+       ARTDEF("-otT", gsh_option_terminal_not_transparent_cb, 
+               "set not transparent");
+       ARTDEF("-ott", gsh_option_terminal_transparent_cb, "set transparent");
+       ARTDEF("-otw", gsh_option_terminal_width_cb, "set terminal width");
 
        /* Dialog options */
-       ARTDEF("-da", gsh_dialog_about_cb);
-       ARTDEF("-dc", gsh_dialog_color_cb);
-       ARTDEF("-dD", gsh_dialog_folder_cb);
-       ARTDEF("-dd", gsh_dialog_folder_open_cb);
-       ARTDEF("-de", gsh_dialog_error_cb);
-       ARTDEF("-dF", gsh_dialog_font_cb);
-       ARTDEF("-df", gsh_dialog_file_cb);
-       ARTDEF("-di", gsh_dialog_information_cb);
-       ARTDEF("-ds", gsh_dialog_save_cb);
-       ARTDEF("-dw", gsh_dialog_warning_cb);
+       ARTDEF("-da", gsh_dialog_about_cb, "show about dialog");
+       ARTDEF("-dc", gsh_dialog_color_cb, "show color chooser");
+       ARTDEF("-dD", gsh_dialog_folder_cb, "show folder chooser");
+       ARTDEF("-dd", gsh_dialog_folder_open_cb, "show folder opener");
+       ARTDEF("-de", gsh_dialog_error_cb, "show error dialog");
+       ARTDEF("-dF", gsh_dialog_font_cb, "show font dialog");
+       ARTDEF("-df", gsh_dialog_file_cb, "show file dialog");
+       ARTDEF("-di", gsh_dialog_information_cb, "show information dialog");
+       ARTDEF("-ds", gsh_dialog_save_cb, "show save dialog");
+       ARTDEF("-dw", gsh_dialog_warning_cb, "show warning dialog");
 
        /* Test */
-       ARTDEF("-t", test_cb);
+       ARTDEF("-t", test_cb, "run test code");
 
        /* GUIDL file */
-       ARTDEF("-f", guidl_file_cb);
+       ARTDEF("-f", guidl_file_cb, "open GUIDL file");
 
        return dictionary;
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]