Revision: 865
http://svn.sourceforge.net/geany/?rev=865&view=rev
Author: eht16
Date: 2006-10-03 10:54:02 -0700 (Tue, 03 Oct 2006)
Log Message:
-----------
Fixed bug which caused not saving session files when quitting Geany(introduced with r862).
Modified Paths:
--------------
trunk/src/callbacks.c
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2006-10-03 13:45:30 UTC (rev 864)
+++ trunk/src/callbacks.c 2006-10-03 17:54:02 UTC (rev 865)
@@ -191,21 +191,21 @@
{
if (app->pref_main_confirm_exit)
{
- // there is the chance that the user cancel the exit process while closing open
- // files, so save the configuration(i.e. the list of open files) first
- configuration_save();
if (dialogs_show_question_full(GTK_STOCK_QUIT, GTK_STOCK_CANCEL, NULL,
_("Do you really want to quit?")) && on_close_all1_activate(NULL, NULL))
{
+ configuration_save();
destroyapp(NULL, gdata);
}
else app->quitting = FALSE;
}
else
{
+ // there is the chance that the user cancel the exit process while closing open
+ // files, so save the configuration(i.e. the list of open files) first
+ configuration_save();
if (on_close_all1_activate(NULL, NULL))
{
- configuration_save();
destroyapp(NULL, gdata);
}
else app->quitting = FALSE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 864
http://svn.sourceforge.net/geany/?rev=864&view=rev
Author: eht16
Date: 2006-10-03 06:45:30 -0700 (Tue, 03 Oct 2006)
Log Message:
-----------
Added keyword "until".
Modified Paths:
--------------
trunk/ChangeLog
trunk/data/filetypes.sh
trunk/src/highlighting.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-10-03 13:16:42 UTC (rev 863)
+++ trunk/ChangeLog 2006-10-03 13:45:30 UTC (rev 864)
@@ -7,6 +7,7 @@
Reordered command line options alphabetically.
Added new command line option --line to set the initial line for the
first opened file.
+ * data/filetypes.sh, src/highlighting.c: Added keyword "until".
2006-10-02 Nick Treleaven <nick.treleaven(a)btinternet.com>
Modified: trunk/data/filetypes.sh
===================================================================
--- trunk/data/filetypes.sh 2006-10-03 13:16:42 UTC (rev 863)
+++ trunk/data/filetypes.sh 2006-10-03 13:45:30 UTC (rev 864)
@@ -14,7 +14,7 @@
scalar=0x105090;0xffffff;false;false
[keywords]
-primary=break case continue do done elif else esac eval exit export fi for function goto if in integer return set shift then while
+primary=break case continue do done elif else esac eval exit export fi for function goto if in integer return set shift then until while
[settings]
Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c 2006-10-03 13:16:42 UTC (rev 863)
+++ trunk/src/highlighting.c 2006-10-03 13:45:30 UTC (rev 864)
@@ -1638,7 +1638,7 @@
get_keyfile_hex(config, config_home, "styling", "scalar", "0x105090", "0xffffff", "false", &style_sets[GEANY_FILETYPES_SH].styling[10]);
style_sets[GEANY_FILETYPES_SH].keywords = g_new(gchar*, 2);
- get_keyfile_keywords(config, config_home, "keywords", "primary", GEANY_FILETYPES_SH, 0, "break case continue do done elif else esac eval exit export fi for goto if in integer return set shift then while");
+ get_keyfile_keywords(config, config_home, "keywords", "primary", GEANY_FILETYPES_SH, 0, "break case continue do done elif else esac eval exit export fi for goto if in integer return set shift then until while");
style_sets[GEANY_FILETYPES_SH].keywords[1] = NULL;
get_keyfile_wordchars(config, config_home, GEANY_WORDCHARS,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
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(a)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(a)uvena.de>. Permission is
+This manual page was written by Enrico Tröger <enrico.troeger(a)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.
Revision: 862
http://svn.sourceforge.net/geany/?rev=862&view=rev
Author: eht16
Date: 2006-10-03 04:21:36 -0700 (Tue, 03 Oct 2006)
Log Message:
-----------
Save configuration(i.e. list of open files) as late as possible and save the filetype build commands first shortly before quitting.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/callbacks.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-10-02 15:22:29 UTC (rev 861)
+++ trunk/ChangeLog 2006-10-03 11:21:36 UTC (rev 862)
@@ -1,3 +1,10 @@
+2006-10-03 Enrico Tröger <enrico.troeger(a)uvena.de>
+
+ * 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.
+
+
2006-10-02 Nick Treleaven <nick.treleaven(a)btinternet.com>
* src/templates.c:
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2006-10-02 15:22:29 UTC (rev 861)
+++ trunk/src/callbacks.c 2006-10-03 11:21:36 UTC (rev 862)
@@ -87,6 +87,7 @@
#endif
keybindings_free();
+ filetypes_save_commands();
filetypes_free_types();
styleset_free_styles();
templates_free_templates();
@@ -162,10 +163,6 @@
{
app->quitting = TRUE;
- // TODO: only save config if definitely quitting
- configuration_save();
- filetypes_save_commands();
-
if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)) > 0)
{
gint i;
@@ -181,21 +178,36 @@
}
if (has_dirty_editors)
{
- if (on_close_all1_activate(NULL, NULL)) destroyapp(NULL, gdata);
+ // there is the chance that the user cancel the exit process while closing open
+ // files, so save the configuration(i.e. the list of open files) first
+ configuration_save();
+ if (on_close_all1_activate(NULL, NULL))
+ {
+ destroyapp(NULL, gdata);
+ }
else app->quitting = FALSE;
}
else
{
if (app->pref_main_confirm_exit)
{
+ // there is the chance that the user cancel the exit process while closing open
+ // files, so save the configuration(i.e. the list of open files) first
+ configuration_save();
if (dialogs_show_question_full(GTK_STOCK_QUIT, GTK_STOCK_CANCEL, NULL,
_("Do you really want to quit?")) && on_close_all1_activate(NULL, NULL))
+ {
destroyapp(NULL, gdata);
+ }
else app->quitting = FALSE;
}
else
{
- if (on_close_all1_activate(NULL, NULL)) destroyapp(NULL, gdata);
+ if (on_close_all1_activate(NULL, NULL))
+ {
+ configuration_save();
+ destroyapp(NULL, gdata);
+ }
else app->quitting = FALSE;
}
}
@@ -206,11 +218,15 @@
{
if (dialogs_show_question_full(GTK_STOCK_QUIT, GTK_STOCK_CANCEL, NULL,
_("Do you really want to quit?")))
- destroyapp(NULL, gdata);
+ {
+ configuration_save();
+ destroyapp(NULL, gdata);
+ }
else app->quitting = FALSE;
}
else
{
+ configuration_save();
destroyapp(NULL, gdata);
}
}
@@ -2258,7 +2274,7 @@
filetype *ft = user_data;
g_return_if_fail(ft != NULL);
-
+
if (response == GTK_RESPONSE_ACCEPT)
{
const gchar *newstr;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.