Revision: 1228
http://svn.sourceforge.net/geany/?rev=1228&view=rev
Author: eht16
Date: 2007-01-24 14:48:52 -0800 (Wed, 24 Jan 2007)
Log Message:
-----------
Oops. Revert the change to ignore --line setting when opening session files.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-01-24 22:38:53 UTC (rev 1227)
+++ trunk/ChangeLog 2007-01-24 22:48:52 UTC (rev 1228)
@@ -11,6 +11,16 @@
open tabs.
Removed Zoom items from popup menu.
* tagmanager/latex.c: Allow \section*{} and other commands with *.
+ * doc/geany.1.in, doc/geany.docbook, src/document.c, src/main.c,
+ src/main.h, src/socket.c:
+ Added command line option --column to allow setting the initial
+ column for the first opened file on command line.
+ Don't apply the --line and --column options to the first opened
+ session file.
+ Make --line and --column options work for opening files in an already
+ running instance.
+ * src/document.c: Oops. Revert the change to ignore --line setting when
+ opening session files.
2007-01-24 Nick Treleaven <nick.treleaven(a)btinternet.com>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2007-01-24 22:38:53 UTC (rev 1227)
+++ trunk/src/document.c 2007-01-24 22:48:52 UTC (rev 1228)
@@ -737,7 +737,7 @@
// update line number margin width
sci_set_line_numbers(doc_list[idx].sci, app->show_linenumber_margin, 0);
- if (! app->opening_session_files && cl_options.goto_line >= 0)
+ if (cl_options.goto_line >= 0)
{ // goto line which was specified on command line and then undefine the line
sci_goto_line(doc_list[idx].sci, cl_options.goto_line - 1, TRUE);
sci_scroll_to_line(doc_list[idx].sci, cl_options.goto_line - 1, 0.5);
@@ -749,7 +749,7 @@
if (reload)
sci_scroll_to_line(doc_list[idx].sci, -1, 0.5);
}
- if (! app->opening_session_files && cl_options.goto_column >= 0)
+ if (cl_options.goto_column >= 0)
{ // goto column which was specified on command line and then undefine the column
gint cur_pos = sci_get_current_position(doc_list[idx].sci);
sci_set_current_position(doc_list[idx].sci, cur_pos + cl_options.goto_column);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1227
http://svn.sourceforge.net/geany/?rev=1227&view=rev
Author: eht16
Date: 2007-01-24 14:38:53 -0800 (Wed, 24 Jan 2007)
Log Message:
-----------
Added command line option --column to allow setting the initial column for the first opened file on command line.
Don't apply the --line and --column options to the first opened session file.
Make --line and --column options work for opening files in an already running instance.
Modified Paths:
--------------
trunk/doc/geany.1.in
trunk/doc/geany.docbook
trunk/src/document.c
trunk/src/main.c
trunk/src/main.h
trunk/src/socket.c
Modified: trunk/doc/geany.1.in
===================================================================
--- trunk/doc/geany.1.in 2007-01-24 19:52:12 UTC (rev 1226)
+++ trunk/doc/geany.1.in 2007-01-24 22:38:53 UTC (rev 1227)
@@ -16,11 +16,13 @@
Set initial line number for the first opened file
.SH "OPTIONS"
+.IP "\fB\fP \fB\-\-column\fP " 10
+Set initial column number for the first opened file (useful in conjunction with --line).
.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.
+Run 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.
Modified: trunk/doc/geany.docbook
===================================================================
--- trunk/doc/geany.docbook 2007-01-24 19:52:12 UTC (rev 1226)
+++ trunk/doc/geany.docbook 2007-01-24 22:38:53 UTC (rev 1227)
@@ -236,6 +236,12 @@
</thead>
<tbody>
<row>
+ <entry></entry>
+ <entry>--column</entry>
+ <entry>Set initial column number for the first opened file.
+ </entry>
+ </row>
+ <row>
<entry>-c dir_name</entry>
<entry>--config=directory_name</entry>
<entry>Use an alternate configuration directory. Default
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2007-01-24 19:52:12 UTC (rev 1226)
+++ trunk/src/document.c 2007-01-24 22:38:53 UTC (rev 1227)
@@ -737,10 +737,10 @@
// update line number margin width
sci_set_line_numbers(doc_list[idx].sci, app->show_linenumber_margin, 0);
- if (cl_options.goto_line >= 0)
+ if (! app->opening_session_files && cl_options.goto_line >= 0)
{ // goto line which was specified on command line and then undefine the line
sci_goto_line(doc_list[idx].sci, cl_options.goto_line - 1, TRUE);
- sci_scroll_to_line(doc_list[idx].sci, -1, 0.5);
+ sci_scroll_to_line(doc_list[idx].sci, cl_options.goto_line - 1, 0.5);
cl_options.goto_line = -1;
}
else if (pos >= 0)
@@ -749,6 +749,12 @@
if (reload)
sci_scroll_to_line(doc_list[idx].sci, -1, 0.5);
}
+ if (! app->opening_session_files && cl_options.goto_column >= 0)
+ { // goto column which was specified on command line and then undefine the column
+ gint cur_pos = sci_get_current_position(doc_list[idx].sci);
+ sci_set_current_position(doc_list[idx].sci, cur_pos + cl_options.goto_column);
+ cl_options.goto_column = -1;
+ }
if (! reload)
{
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2007-01-24 19:52:12 UTC (rev 1226)
+++ trunk/src/main.c 2007-01-24 22:38:53 UTC (rev 1227)
@@ -86,6 +86,7 @@
static GOptionEntry entries[] =
{
+ { "column", 0, 0, G_OPTION_ARG_INT, &cl_options.goto_column, N_("set initial column number for the first opened file (useful in conjunction with --line)"), NULL },
{ "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 },
{ "generate-data-files", 'g', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &generate_datafiles, "", NULL },
@@ -401,6 +402,7 @@
// first initialise cl_options fields with default values
cl_options.load_session = TRUE;
cl_options.goto_line = -1;
+ cl_options.goto_column = -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 2007-01-24 19:52:12 UTC (rev 1226)
+++ trunk/src/main.h 2007-01-24 22:38:53 UTC (rev 1227)
@@ -29,6 +29,7 @@
{
gboolean load_session;
gint goto_line;
+ gint goto_column;
} CommandLineOptions;
extern CommandLineOptions cl_options;
Modified: trunk/src/socket.c
===================================================================
--- trunk/src/socket.c 2007-01-24 19:52:12 UTC (rev 1226)
+++ trunk/src/socket.c 2007-01-24 22:38:53 UTC (rev 1227)
@@ -21,7 +21,22 @@
* $Id$
*/
+/*
+ * Little dev doc:
+ * Each command which is sent between two instances (see send_open_command and
+ * socket_lock_input_cb) should have the following scheme:
+ * command name\n
+ * data\n
+ * data\n
+ * ...
+ * .\n
+ * The first thing should be the command name followed by the data belonging to the command and
+ * to mark the end of data send a single '.'. Each message should be ended with \n.
+ *
+ * At the moment the commands open, line and column are available.
+ */
+
#include "geany.h"
#ifdef HAVE_SOCKET
@@ -37,6 +52,7 @@
# include <winsock2.h>
# include <ws2tcpip.h>
#endif
+#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
@@ -85,6 +101,24 @@
g_return_if_fail(argc > 1);
geany_debug("using running instance of Geany");
+ if (cl_options.goto_line >= 0)
+ {
+ gchar *line = g_strdup_printf("%d\n", cl_options.goto_line);
+ socket_fd_write_all(sock, "line\n", 5);
+ socket_fd_write_all(sock, line, strlen(line));
+ socket_fd_write_all(sock, ".\n", 2);
+ g_free(line);
+ }
+
+ if (cl_options.goto_column >= 0)
+ {
+ gchar *col = g_strdup_printf("%d\n", cl_options.goto_column);
+ socket_fd_write_all(sock, "column\n", 7);
+ socket_fd_write_all(sock, col, strlen(col));
+ socket_fd_write_all(sock, ".\n", 2);
+ g_free(col);
+ }
+
socket_fd_write_all(sock, "open\n", 5);
for(i = 1; i < argc && argv[i] != NULL; i++)
@@ -364,24 +398,43 @@
sock = accept(fd, (struct sockaddr *)&caddr, &caddr_len);
// first get the command
- if (socket_fd_gets(sock, buf, sizeof(buf)) != -1 && strncmp(buf, "open", 4) == 0)
+ while (socket_fd_gets(sock, buf, sizeof(buf)) != -1)
{
- geany_debug("remote command: open");
- while (socket_fd_gets(sock, buf, sizeof(buf)) != -1 && *buf != '.')
+ if (strncmp(buf, "open", 4) == 0)
{
- g_strstrip(buf); // remove \n char
+ while (socket_fd_gets(sock, buf, sizeof(buf)) != -1 && *buf != '.')
+ {
+ g_strstrip(buf); // remove \n char
- if (g_file_test(buf, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_SYMLINK))
- document_open_file(-1, buf, 0, FALSE, NULL, NULL);
- else
- geany_debug("got data from socket, but it does not look like a filename");
- }
- gtk_window_deiconify(GTK_WINDOW(app->window));
+ if (g_file_test(buf, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_SYMLINK))
+ document_open_file(-1, buf, 0, FALSE, NULL, NULL);
+ else
+ geany_debug("got data from socket, but it does not look like a filename");
+ }
+ gtk_window_deiconify(GTK_WINDOW(app->window));
#ifdef G_OS_WIN32
- gtk_window_present(GTK_WINDOW(app->window));
+ gtk_window_present(GTK_WINDOW(app->window));
#endif
+ }
+ else if (strncmp(buf, "line", 4) == 0)
+ {
+ while (socket_fd_gets(sock, buf, sizeof(buf)) != -1 && *buf != '.')
+ {
+ g_strstrip(buf); // remove \n char
+ // on any error we get 0 which should be save enough as fallback
+ cl_options.goto_line = atoi(buf);
+ }
+ }
+ else if (strncmp(buf, "column", 6) == 0)
+ {
+ while (socket_fd_gets(sock, buf, sizeof(buf)) != -1 && *buf != '.')
+ {
+ g_strstrip(buf); // remove \n char
+ // on any error we get 0 which should be save enough as fallback
+ cl_options.goto_column = atoi(buf);
+ }
+ }
}
-
socket_fd_close(sock);
return TRUE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1223
http://svn.sourceforge.net/geany/?rev=1223&view=rev
Author: ntrel
Date: 2007-01-24 04:35:05 -0800 (Wed, 24 Jan 2007)
Log Message:
-----------
Setup Find Next/Previous to use the same search text after using
Find Selected/Prev Selected.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/callbacks.c
trunk/src/search.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-01-23 17:51:30 UTC (rev 1222)
+++ trunk/ChangeLog 2007-01-24 12:35:05 UTC (rev 1223)
@@ -1,3 +1,10 @@
+2007-01-24 Nick Treleaven <nick.treleaven(a)btinternet.com>
+
+ * src/callbacks.c, src/search.c:
+ Setup Find Next/Previous to use the same search text after using
+ Find Selected/Prev Selected.
+
+
2007-01-23 Nick Treleaven <nick.treleaven(a)btinternet.com>
* src/interface.c, src/keybindings.c, src/keybindings.h,
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2007-01-23 17:51:30 UTC (rev 1222)
+++ trunk/src/callbacks.c 2007-01-24 12:35:05 UTC (rev 1223)
@@ -567,11 +567,11 @@
}
+// store text, clear search flags so we can use Search->Find Next/Previous
static void setup_find_next(GtkEditable *editable)
{
g_free(search_data.text);
- search_data.text = g_strdup(gtk_editable_get_chars(editable, 0, -1));
- // clear search flags so can later use Search->Find Next/Previous
+ search_data.text = gtk_editable_get_chars(editable, 0, -1);
search_data.flags = 0;
search_data.backwards = FALSE;
}
Modified: trunk/src/search.c
===================================================================
--- trunk/src/search.c 2007-01-23 17:51:30 UTC (rev 1222)
+++ trunk/src/search.c 2007-01-24 12:35:05 UTC (rev 1223)
@@ -240,6 +240,16 @@
}
+// store text, clear search flags so we can use Search->Find Next/Previous
+static void setup_find_next(const gchar *text)
+{
+ g_free(search_data.text);
+ search_data.text = g_strdup(text);
+ search_data.flags = 0;
+ search_data.backwards = FALSE;
+}
+
+
/* Search for next match of the current "selection"
* For X11 based systems, this will try to use the system-wide
* x-selection first. If it doesn't find anything suitable in
@@ -267,6 +277,7 @@
if (!s) { s=get_default_text(idx); }
if (s)
{
+ setup_find_next(s); // allow find next/prev
document_find_text(idx, s, 0, search_backwards, TRUE);
g_free(s);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1221
http://svn.sourceforge.net/geany/?rev=1221&view=rev
Author: ntrel
Date: 2007-01-23 09:34:10 -0800 (Tue, 23 Jan 2007)
Log Message:
-----------
Add text DnD note about holding control to copy text.
Modified Paths:
--------------
trunk/doc/geany.docbook
Modified: trunk/doc/geany.docbook
===================================================================
--- trunk/doc/geany.docbook 2007-01-23 11:54:27 UTC (rev 1220)
+++ trunk/doc/geany.docbook 2007-01-23 17:34:10 UTC (rev 1221)
@@ -368,8 +368,9 @@
<para>
If you drag selected text in the editor widget of
<application>Geany</application> the text is moved to the position where the
- mouse pointer is when releasing the mouse button. This behaviour has been
- changed in <application>Geany</application> 0.11. Before the selected text
+ mouse pointer is when releasing the mouse button. Holding Control when releasing
+ the mouse button will copy the text instead. This behaviour was
+ changed in <application>Geany</application> 0.11 - before the selected text
was copied to the new position.
</para>
</section>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1220
http://svn.sourceforge.net/geany/?rev=1220&view=rev
Author: ntrel
Date: 2007-01-23 03:54:27 -0800 (Tue, 23 Jan 2007)
Log Message:
-----------
Correct version no.
Modified Paths:
--------------
trunk/doc/geany.docbook
Modified: trunk/doc/geany.docbook
===================================================================
--- trunk/doc/geany.docbook 2007-01-21 22:44:09 UTC (rev 1219)
+++ trunk/doc/geany.docbook 2007-01-23 11:54:27 UTC (rev 1220)
@@ -369,7 +369,7 @@
If you drag selected text in the editor widget of
<application>Geany</application> the text is moved to the position where the
mouse pointer is when releasing the mouse button. This behaviour has been
- changed in <application>Geany</application> 0.12. Before the selected text
+ changed in <application>Geany</application> 0.11. Before the selected text
was copied to the new position.
</para>
</section>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1219
http://svn.sourceforge.net/geany/?rev=1219&view=rev
Author: kretek
Date: 2007-01-21 14:44:09 -0800 (Sun, 21 Jan 2007)
Log Message:
-----------
Update of German translation
Modified Paths:
--------------
trunk/po/ChangeLog
trunk/po/de.po
Modified: trunk/po/ChangeLog
===================================================================
--- trunk/po/ChangeLog 2007-01-21 19:10:40 UTC (rev 1218)
+++ trunk/po/ChangeLog 2007-01-21 22:44:09 UTC (rev 1219)
@@ -1,3 +1,8 @@
+2007-01-21 Frank Lanitz <frank(a)frank.uvena.de>
+
+ * de.po: Update of German translation
+
+
2007-01-21 Enrico Tröger <enrico.troeger(a)uvena.de>
* de.po: Update of German translation
Modified: trunk/po/de.po
===================================================================
--- trunk/po/de.po 2007-01-21 19:10:40 UTC (rev 1218)
+++ trunk/po/de.po 2007-01-21 22:44:09 UTC (rev 1219)
@@ -1,16 +1,16 @@
# German translations for geany package.
# Copyright (C) 2006 THE geany'S COPYRIGHT HOLDER
# This file is distributed under the same license as the geany package.
-# Enrico Troeger <enrico.troeger(a)uvena.de>, 2006.
-# Frank Lanitz <frank(a)frank.uvena.de>,2006
+# Enrico Troeger <enrico.troeger(a)uvena.de> 2006,2007
+# Frank Lanitz <frank(a)frank.uvena.de> 2006,2007
#
msgid ""
msgstr ""
"Project-Id-Version: geany 0.10svn\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-01-21 01:12+0100\n"
-"PO-Revision-Date: 2007-01-21 01:13+0100\n"
-"Last-Translator: Enrico Tröger <enrico.troeger(a)uvena.de>\n"
+"POT-Creation-Date: 2007-01-21 20:20+0100\n"
+"PO-Revision-Date: 2007-01-21 20:21+0100\n"
+"Last-Translator: Frank Lanitz <frank(a)frank.uvena.de>\n"
"Language-Team: German <frank(a)frank.uvena.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
@@ -998,7 +998,7 @@
msgid "Config file"
msgstr "Konfigurationsdatei"
-#: src/filetypes.c:720 src/project.c:104
+#: src/filetypes.c:720 src/project.c:109
msgid "All files"
msgstr "Alle Dateien"
@@ -2544,7 +2544,7 @@
msgid "Status messages"
msgstr "Meldungen"
-#: src/msgwindow.c:412
+#: src/msgwindow.c:418
msgid "_Hide Message Window"
msgstr "Meldungsfenster ausblenden"
@@ -2573,39 +2573,54 @@
"Die Tastenkombination '%s' wird bereits für \"%s\" verwendet. Bitte wählen "
"Sie eine andere Tastenkombination."
-#: src/project.c:89
+#. "projects" is part of the default project base path so be carefully when translating
+#. please avoid special characters and spaces, look at the source for details or ask Frank
+#: src/project.c:70
+msgid "projects"
+msgstr "projekte"
+
+#: src/project.c:94
msgid "Open project"
msgstr "Projekt öffnen"
-#: src/project.c:108
+#: src/project.c:113
msgid "Project files"
msgstr "Projektdateien"
-#: src/project.c:156
+#: src/project.c:136
+#, c-format
+msgid "Project \"%s\" closed."
+msgstr "Projekt \"%s\" geschlossen."
+
+#: src/project.c:160
msgid "Project properties"
msgstr "Projekteigenschaften"
-#: src/project.c:168
+#: src/project.c:169
+msgid "C_reate"
+msgstr "_Erstellen"
+
+#: src/project.c:188
msgid "Name:"
msgstr "Name:"
-#: src/project.c:179
+#: src/project.c:200
msgid "Description:"
msgstr "Beschreibung:"
-#: src/project.c:194
+#: src/project.c:217
msgid "Filename:"
msgstr "Dateiname:"
-#: src/project.c:213
+#: src/project.c:236
msgid "Base path:"
msgstr "Basispfad:"
-#: src/project.c:232
+#: src/project.c:255
msgid "File patterns:"
msgstr "Dateinamenmuster:"
-#: src/project.c:313
+#: src/project.c:337
#, c-format
msgid ""
"There is already an open project \"%s\". Do you want to close it before "
@@ -2614,49 +2629,58 @@
"Es ist schon ein Projekt \"%s\" geöffnet. Soll es vor dem Weiterarbeiten "
"geschlossen werden? "
-#: src/project.c:341
+#: src/project.c:366
msgid "The specified project name is too short."
msgstr "Der eingegebene Projektname ist zu kurz. "
-#: src/project.c:347
+#: src/project.c:372
#, c-format
msgid "The specified project name is too long (max. %d characters)."
msgstr "Der eingegebene Projektname ist zu lang (max %d Zeichen)."
-#: src/project.c:355
+#: src/project.c:380
msgid "You have specified an invalid project filename."
msgstr "Sie haben einen ungültigen Dateinamen angegeben. "
-#: src/project.c:363
+#: src/project.c:388
msgid "You have specified an invalid project base path."
msgstr "Sie haben einen ungültigen Projektbasispfad angegeben. "
-#: src/project.c:373
+#: src/project.c:398
msgid "The specified project base path does not exist. Should it be created?"
msgstr ""
"Der Projektbasispfad existiert nicht. Soll er durch Geany angelegt werden? "
-#: src/project.c:390
+#: src/project.c:415
msgid "Project file could not be written."
msgstr "Projektdatei konnte nicht geschrieben werden. "
+#: src/project.c:455
+#, c-format
+msgid "Project \"%s\" created."
+msgstr "Projekt \"%s\" erstellt."
+
+#: src/project.c:457
+#, c-format
+msgid "Project \"%s\" saved."
+msgstr "Projekt \"%s\" gespeichert."
+
#. initialise the dialog
-#: src/project.c:462
+#: src/project.c:500
msgid "Choose project filename"
msgstr "Wählen Sie den Dateinamen für die Projektdatei"
#. initialise the dialog
-#: src/project.c:485
+#: src/project.c:523
msgid "Choose project base path"
msgstr "Wählen Sie den Projektbasispfad"
-#. "projects" is part of the default project base path so be carefully when translating
-#. please avoid special characters and spaces, look at the source for details or ask Frank
-#: src/project.c:501
-msgid "projects"
-msgstr "projekte"
+#: src/project.c:592
+#, c-format
+msgid "Project \"%s\" opened."
+msgstr "Projekt \"%s\" geöffnet."
-#: src/project.c:559
+#: src/project.c:596
msgid "Project file could not be loaded."
msgstr "Die Projektdatei konnte nicht geladen werden. "
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.