Revision: 863 http://svn.sourceforge.net/geany/?rev=863&view=rev Author: eht16 Date: 2006-10-03 06:16:42 -0700 (Tue, 03 Oct 2006)
Log Message: ----------- Reordered command line options alphabetically. Added new command line option --line to set the initial line for the first opened file.
Modified Paths: -------------- trunk/ChangeLog trunk/doc/geany.1.in trunk/doc/geany.docbook trunk/src/document.c trunk/src/main.c trunk/src/main.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-10-03 11:21:36 UTC (rev 862) +++ trunk/ChangeLog 2006-10-03 13:16:42 UTC (rev 863) @@ -3,6 +3,10 @@ * src/callbacks.c: Save configuration(i.e. list of open files) as late as possible and save the filetype build commands first shortly before quitting. + * doc/geany.docbook, doc/geany.1.in, src/main.c, src/document.c: + Reordered command line options alphabetically. + Added new command line option --line to set the initial line for the + first opened file.
2006-10-02 Nick Treleaven nick.treleaven@btinternet.com
Modified: trunk/doc/geany.1.in =================================================================== --- trunk/doc/geany.1.in 2006-10-03 11:21:36 UTC (rev 862) +++ trunk/doc/geany.1.in 2006-10-03 13:16:42 UTC (rev 863) @@ -1,4 +1,4 @@ -.TH "GEANY" "1" "September 29, 2006" "@PACKAGE@ @VERSION@" "" +.TH "GEANY" "1" "October 03, 2006" "@PACKAGE@ @VERSION@" "" .SH "NAME" Geany (em a small and lightweight IDE .SH "SYNOPSIS" @@ -13,40 +13,45 @@ .PP Homepage: http://geany.uvena.de
+Set initial line number for the first opened file + .SH "OPTIONS" +.IP "\fB-c\fP \fB--config\fP " 10 +Use an alternate configuration directory. Default configuration directory is +~/.geany/ and there resides geany.conf and some template files. +.IP "\fB-d\fP \fB--debug\fP " 10 +Runs Geany in debug mode, which means being verbose and printing lots of information. +.IP "\fB-i\fP \fB--new-instance\fP " 10 +Don't open files in a running instance, force opening a new instance. +Only available if Geany was compiled with support for Sockets. +.IP "\fB-l\fP \fB--line\fP " 10 +Set initial line number for the first opened file. +.IP "\fB-m\fP \fB--no-msgwin\fP " 10 +Don't show the message window. Use this option if you don't need compiler messages +or VTE support. .IP "\fB-n\fP \fB--no-ctags\fP " 10 Don't load auto completion and call tip data. Use this option, if you don't want to use them. For more information please see documentation. -.IP "\fB-m\fP \fB--no-msgwin\fP " 10 -Don't show the message window. Use this option if you don't need compiler messages -or VTE support. -.IP "\fB-i\fP \fB--new-instance\fP " 10 -Don't open files in a running instance, force opening a new instance. .IP "\fB-s\fP \fB--no-session\fP " 10 Don't load the previous session's files .IP "\fB-t\fP \fB--no-terminal\fP " 10 Don't load terminal support. Use this option, if you don't want to load the virtual terminal emulator widget at startup. If you don't have libvte.so.4 installed, then terminal-support is -automatically disabled. -.IP "\fB-l\fP \fB--vte-lib\fP " 10 +automatically disabled. Only available if Geany was compiled with support for VTE. +.IP "\fB\fP \fB--vte-lib\fP " 10 Specify explicitly the path including filename or only the filename to the VTE library, e.g. /usr/lib/libvte.so or libvte.so. This option is only needed, when the autodetection doesn't -work. -.IP "\fB-c\fP \fB--config\fP " 10 -Use an alternate configuration directory. Default configuration directory is -~/.geany/ and there resides geany.conf and some template files. -.IP "\fB-d\fP \fB--debug\fP " 10 -Runs geany in debug mode, which means being verbose and printing lots of information. +work. Only available if Geany was compiled with support for VTE. +.IP "\fB-v\fP \fB--version\fP " 10 +Show version information and exit. .IP "\fB-?\fP \fB--help\fP " 10 Show help information and exit. -.IP "\fB-v\fP \fB--version\fP " 10 -Show version information and exit. .PP -geany supports all generic GTK options, a list is available on the help screen. +Geany supports all generic GTK options, a list is available on the help screen.
.SH "AUTHOR" .PP -This manual page was written by Enrico Troeger enrico.troeger@uvena.de. Permission is +This manual page was written by Enrico Tröger enrico.troeger@uvena.de. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.
Modified: trunk/doc/geany.docbook =================================================================== --- trunk/doc/geany.docbook 2006-10-03 11:21:36 UTC (rev 862) +++ trunk/doc/geany.docbook 2006-10-03 13:16:42 UTC (rev 863) @@ -236,19 +236,35 @@ </thead> <tbody> <row> - <entry>-s</entry> - <entry>--no-session</entry> - <entry>Don't load the previous session's files. + <entry>-c dir_name</entry> + <entry>--config=directory_name</entry> + <entry>Use an alternate configuration directory. Default + configuration directory is <filename>~/.&app_small;/</filename> + and there resides <filename>&app_small;.conf</filename> and + other configuration files. </entry> </row> <row> - <entry>-n</entry> - <entry>--no-ctags</entry> - <entry>Do not load auto completion and call tip data. - Use this option if you do not want to use them. + <entry>-d</entry> + <entry>--debug</entry> + <entry>Run &app; in debug mode, which means being verbose + and printing lots of information. </entry> </row> <row> + <entry>-i</entry> + <entry>--new-instance</entry> + <entry>Do not open files in a running instance, force opening a new instance. + Only available if &app; was compiled with support for Sockets. + </entry> + </row> + <row> + <entry>-l</entry> + <entry>--line</entry> + <entry>Set initial line number for the first opened file. + </entry> + </row> + <row> <entry>-m</entry> <entry>--no-msgwin</entry> <entry>Do not show the message window. Use this option if you do not @@ -256,56 +272,49 @@ </entry> </row> <row> - <entry>-i</entry> - <entry>--new-instance</entry> - <entry>Do not open files in a running instance, force opening a new instance. + <entry>-n</entry> + <entry>--no-ctags</entry> + <entry>Do not load auto completion and call tip data. + Use this option if you do not want to use them. </entry> </row> <row> + <entry>-s</entry> + <entry>--no-session</entry> + <entry>Don't load the previous session's files. + </entry> + </row> + <row> <entry>-t</entry> <entry>--no-terminal</entry> <entry>Do not load terminal support. Use this option if you do not want to load the virtual terminal emulator widget at startup. If you do not have <filename>libvte.so.4</filename> installed, - then terminal-support is automatically disabled. + then terminal-support is automatically disabled. Only available + if &app; was compiled with support for VTE. </entry> </row> <row> - <entry>-l</entry> + <entry></entry> <entry>--vte-lib</entry> <entry>Specify explicitly the path including filename or only the filename to the VTE library, e.g. <filename>/usr/lib/libvte.so</filename> or <filename>libvte.so</filename>. This option is only needed when the - autodetection does not work. + autodetection does not work. Only available if &app; was compiled + with support for VTE. </entry> </row> <row> - <entry>-c directory_name</entry> - <entry>--config=directory_name</entry> - <entry>Use an alternate configuration directory. Default - configuration directory is <filename>~/.&app_small;/</filename> - and there resides <filename>&app_small;.conf</filename> and - other configuration files. - </entry> + <entry>-v</entry> + <entry>--version</entry> + <entry>Show version information and exit.</entry> </row> <row> - <entry>-d</entry> - <entry>--debug</entry> - <entry>Run &app; in debug mode, which means being verbose - and printing lots of information. - </entry> - </row> - <row> <entry>-?</entry> <entry>--help</entry> <entry>Show help information and exit.</entry> </row> <row> - <entry>-v</entry> - <entry>--version</entry> - <entry>Show version information and exit.</entry> - </row> - <row> <entry></entry> <entry>[files ...]</entry> <entry>Open all given files at startup. This option causes &app; to
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2006-10-03 11:21:36 UTC (rev 862) +++ trunk/src/document.c 2006-10-03 13:16:42 UTC (rev 863) @@ -650,7 +650,13 @@ doc_list[idx].encoding = enc; doc_list[idx].has_bom = bom;
- sci_goto_pos(doc_list[idx].sci, pos, TRUE); + if (cl_options.goto_line >= 0) + { // goto line which was specified on command line and then undefine the line + sci_goto_line_scroll(doc_list[idx].sci, cl_options.goto_line - 1, 0.25); + cl_options.goto_line = -1; + } + else if (pos >= 0) + sci_goto_pos(doc_list[idx].sci, pos, TRUE);
if (! reload) {
Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2006-10-03 11:21:36 UTC (rev 862) +++ trunk/src/main.c 2006-10-03 13:16:42 UTC (rev 863) @@ -81,20 +81,21 @@
static GOptionEntry entries[] = { + { "config", 'c', 0, G_OPTION_ARG_FILENAME, &alternate_config, N_("use an alternate configuration directory"), NULL }, { "debug", 'd', 0, G_OPTION_ARG_NONE, &debug_mode, N_("runs in debug mode (means being verbose)"), NULL }, - { "no-session", 's', G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &cl_options.load_session, N_("don't load the previous session's files"), NULL }, - { "no-ctags", 'n', 0, G_OPTION_ARG_NONE, &ignore_global_tags, N_("don't load auto completion data (see documentation)"), NULL }, + { "generate-data-files", 'g', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &generate_datafiles, "", NULL }, #ifdef HAVE_SOCKET { "new-instance", 'i', 0, G_OPTION_ARG_NONE, &ignore_socket, N_("don't open files in a running instance, force opening a new instance"), NULL }, #endif - { "config", 'c', 0, G_OPTION_ARG_FILENAME, &alternate_config, N_("use an alternate configuration directory"), NULL }, + { "line", 'l', 0, G_OPTION_ARG_INT, &cl_options.goto_line, N_("set initial line number for the first opened file"), NULL }, { "no-msgwin", 'm', 0, G_OPTION_ARG_NONE, &no_msgwin, N_("don't show message window at startup"), NULL }, + { "no-ctags", 'n', 0, G_OPTION_ARG_NONE, &ignore_global_tags, N_("don't load auto completion data (see documentation)"), NULL }, + { "no-session", 's', G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &cl_options.load_session, N_("don't load the previous session's files"), NULL }, #ifdef HAVE_VTE { "no-terminal", 't', 0, G_OPTION_ARG_NONE, &no_vte, N_("don't load terminal support"), NULL }, - { "vte-lib", 'l', 0, G_OPTION_ARG_FILENAME, &lib_vte, N_("filename of libvte.so"), NULL }, + { "vte-lib", 0, 0, G_OPTION_ARG_FILENAME, &lib_vte, N_("filename of libvte.so"), NULL }, #endif { "version", 'v', 0, G_OPTION_ARG_NONE, &show_version, N_("show version and exit"), NULL }, - { "generate-data-files", 'g', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &generate_datafiles, "", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } };
@@ -384,6 +385,7 @@
// first initialise cl_options fields with default values cl_options.load_session = TRUE; + cl_options.goto_line = -1;
context = g_option_context_new(_(" - A fast and lightweight IDE")); g_option_context_add_main_entries(context, entries, GETTEXT_PACKAGE);
Modified: trunk/src/main.h =================================================================== --- trunk/src/main.h 2006-10-03 11:21:36 UTC (rev 862) +++ trunk/src/main.h 2006-10-03 13:16:42 UTC (rev 863) @@ -28,6 +28,7 @@ typedef struct { gboolean load_session; + gint goto_line; } CommandLineOptions;
extern CommandLineOptions cl_options;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.