Revision: 1245
http://svn.sourceforge.net/geany/?rev=1245&view=rev
Author: ntrel
Date: 2007-02-03 09:01:44 -0800 (Sat, 03 Feb 2007)
Log Message:
-----------
Allow Make for files with no extension - prevent Build when the
output filename would be the same as the source file.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/build.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-02-03 13:24:27 UTC (rev 1244)
+++ trunk/ChangeLog 2007-02-03 17:01:44 UTC (rev 1245)
@@ -7,6 +7,9 @@
Make anonymous typenames use anon_typename_n instead of
typename_anon_n (it seems we can't use <> brackets because of
missing scope problem).
+ * src/build.c:
+ Allow Make for files with no extension - prevent Build when the
+ output filename would be the same as the source file.
2007-02-01 Nick Treleaven <nick.treleaven(a)btinternet.com>
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2007-02-03 13:24:27 UTC (rev 1244)
+++ trunk/src/build.c 2007-02-03 17:01:44 UTC (rev 1245)
@@ -334,6 +334,15 @@
locale_filename = utils_get_locale_from_utf8(doc_list[idx].file_name);
executable = utils_remove_ext_from_filename(locale_filename);
+ // check for filename extension and abort if filename doesn't have one
+ if (utils_str_equal(locale_filename, executable))
+ {
+ msgwin_status_add(_("Command stopped because the current file has no extension."));
+ utils_beep();
+ utils_free_pointers(locale_filename, executable);
+ return (GPid) 1;
+ }
+
object_file = g_strdup_printf("%s.o", executable);
// check wether object file (file.o) exists
@@ -411,14 +420,6 @@
executable = utils_remove_ext_from_filename(locale_filename);
- // check for filename extension and abort if filename doesn't have one
- if (utils_str_equal(locale_filename, executable))
- {
- msgwin_status_add(_("Command stopped because the current file has no extension."));
- utils_beep();
- return (GPid) 1;
- }
-
// replace %f and %e in the command string
tmp = g_path_get_basename(locale_filename);
cmd_string = utils_str_replace(cmd_string, "%f", tmp);
@@ -543,7 +544,8 @@
{
msgwin_status_add(_("Command stopped because the current file has no extension."));
utils_beep();
- return (GPid) 1;
+ result_id = (GPid) 1;
+ goto free_strings;
}
// check whether executable exists
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1243
http://svn.sourceforge.net/geany/?rev=1243&view=rev
Author: ntrel
Date: 2007-02-03 05:14:34 -0800 (Sat, 03 Feb 2007)
Log Message:
-----------
Prevent scroll bar from moving when using document_find_text() and
no match is found.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-02-01 17:07:52 UTC (rev 1242)
+++ trunk/ChangeLog 2007-02-03 13:14:34 UTC (rev 1243)
@@ -1,3 +1,10 @@
+2007-02-03 Nick Treleaven <nick.treleaven(a)btinternet.com>
+
+ * src/document.c:
+ Prevent scroll bar from moving when using document_find_text() and
+ no match is found.
+
+
2007-02-01 Nick Treleaven <nick.treleaven(a)btinternet.com>
* src/ui_utils.c:
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2007-02-01 17:07:52 UTC (rev 1242)
+++ trunk/src/document.c 2007-02-03 13:14:34 UTC (rev 1243)
@@ -1123,15 +1123,11 @@
{
gint ret;
- sci_goto_pos(doc_list[idx].sci, (search_backwards) ? sci_len : 0, TRUE);
+ sci_set_current_position(doc_list[idx].sci, (search_backwards) ? sci_len : 0, FALSE);
ret = document_find_text(idx, text, flags, search_backwards, scroll);
if (ret == -1)
{ // return to original cursor position if not found
- gint new_visible_line;
-
- sci_goto_pos(doc_list[idx].sci, selection_start, FALSE);
- new_visible_line = sci_get_first_visible_line(doc_list[idx].sci);
- sci_scroll_lines(doc_list[idx].sci, first_visible_line - new_visible_line);
+ sci_set_current_position(doc_list[idx].sci, selection_start, FALSE);
}
return ret;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1241
http://svn.sourceforge.net/geany/?rev=1241&view=rev
Author: eht16
Date: 2007-02-01 07:43:13 -0800 (Thu, 01 Feb 2007)
Log Message:
-----------
Applied patch from Tom?\195?\161s V?\195?\173rseda to sort the list of open files in the sidebar alphabetically (thanks).
Modified Paths:
--------------
trunk/ChangeLog
trunk/THANKS
trunk/src/treeviews.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-02-01 15:00:59 UTC (rev 1240)
+++ trunk/ChangeLog 2007-02-01 15:43:13 UTC (rev 1241)
@@ -4,6 +4,9 @@
filename extension(closes #1642029).
* src/document.c: Made --line and --column also working for already
open files (thanks to Mark Knoop for his help).
+ * THANKS, src/treeviews.c:
+ Applied patch from Tomás Vírseda to sort the list of open files in
+ the sidebar alphabetically (thanks).
2007-01-31 Enrico Tröger <enrico.troeger(a)uvena.de>
Modified: trunk/THANKS
===================================================================
--- trunk/THANKS 2007-02-01 15:00:59 UTC (rev 1240)
+++ trunk/THANKS 2007-02-01 15:43:13 UTC (rev 1241)
@@ -22,6 +22,7 @@
Rob van der Linde <robvdl(at)paradise(dot)net(dot)nz> - fixed wrong vte height on some systems
Josef Whiter <josef(at)toxicpanda(dot)com> - parse 'Entering directory' build messages.
Jeff Pohlmeyer <yetanothergeek(at)gmail(dot)com> - "Allow DnD", "Use tabs" and other great patches
+Tomás Vírseda <kaskaras(at)gmail(dot)com> - sort open files patch
Translators:
----------------------------------
Modified: trunk/src/treeviews.c
===================================================================
--- trunk/src/treeviews.c 2007-02-01 15:00:59 UTC (rev 1240)
+++ trunk/src/treeviews.c 2007-02-01 15:43:13 UTC (rev 1241)
@@ -98,6 +98,7 @@
GtkTreeViewColumn *column;
GtkTreeSelection *select;
PangoFontDescription *pfd;
+ GtkTreeSortable *sortable;
tv.tree_openfiles = lookup_widget(app->window, "treeview6");
@@ -119,6 +120,10 @@
gtk_tree_view_set_enable_search(GTK_TREE_VIEW(tv.tree_openfiles), FALSE);
+ // sort opened filenames in the store_openfiles treeview
+ sortable = GTK_TREE_SORTABLE(GTK_TREE_MODEL(tv.store_openfiles));
+ gtk_tree_sortable_set_sort_column_id(sortable, 0, GTK_SORT_ASCENDING);
+
pfd = pango_font_description_from_string(app->tagbar_font);
gtk_widget_modify_font(tv.tree_openfiles, pfd);
pango_font_description_free(pfd);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1240
http://svn.sourceforge.net/geany/?rev=1240&view=rev
Author: eht16
Date: 2007-02-01 07:00:59 -0800 (Thu, 01 Feb 2007)
Log Message:
-----------
Made --line and --column also working for already open files (thanks to Mark Knoop for his help).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-02-01 14:42:25 UTC (rev 1239)
+++ trunk/ChangeLog 2007-02-01 15:00:59 UTC (rev 1240)
@@ -2,6 +2,8 @@
* src/build.c: Prevent compiling or executing of files without a
filename extension(closes #1642029).
+ * src/document.c: Made --line and --column also working for already
+ open files (thanks to Mark Knoop for his help).
2007-01-31 Enrico Tröger <enrico.troeger(a)uvena.de>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2007-02-01 14:42:25 UTC (rev 1239)
+++ trunk/src/document.c 2007-02-01 15:00:59 UTC (rev 1240)
@@ -653,6 +653,33 @@
}
+/* Sets the cursor position on opening a file. First it sets the line when cl_options.goto_line
+ * is set, otherwise it sets the line when pos is greater than zero and finally it sets the column
+ * if cl_options.goto_column is set. */
+static void set_cursor_position(gint idx, gint pos)
+{
+ 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);
+ doc_list[idx].scroll_percent = 0.5F;
+ cl_options.goto_line = -1;
+ }
+ else if (pos > 0)
+ {
+ sci_set_current_position(doc_list[idx].sci, pos, FALSE);
+ doc_list[idx].scroll_percent = 0.5F;
+ }
+
+ 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, FALSE);
+ doc_list[idx].scroll_percent = 0.5F;
+ cl_options.goto_column = -1;
+ }
+}
+
+
/* To open a new file, set idx to -1; filename should be locale encoded.
* To reload a file, set the idx for the document to be reloaded; filename should be NULL.
* Returns: idx of the opened file or -1 if an error occurred.
@@ -700,6 +727,7 @@
g_free(utf8_filename);
g_free(locale_filename);
utils_check_disk_status(idx, TRUE); // force a file changed check
+ set_cursor_position(idx, pos);
return idx;
}
}
@@ -740,24 +768,8 @@
// update line number margin width
sci_set_line_numbers(doc_list[idx].sci, app->show_linenumber_margin, 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);
- doc_list[idx].scroll_percent = 0.5F;
- cl_options.goto_line = -1;
- }
- else if (pos >= 0)
- {
- sci_set_current_position(doc_list[idx].sci, pos, FALSE);
- doc_list[idx].scroll_percent = 0.5F;
- }
- 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, FALSE);
- doc_list[idx].scroll_percent = 0.5F;
- cl_options.goto_column = -1;
- }
+ // set the cursor position according to pos, cl_options.goto_line and cl_options.goto_column
+ set_cursor_position(idx, pos);
if (! reload)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.