Revision: 3636
http://geany.svn.sourceforge.net/geany/?rev=3636&view=rev
Author: eht16
Date: 2009-03-19 17:50:23 +0000 (Thu, 19 Mar 2009)
Log Message:
-----------
Set the initial directory for the Save As dialog only once on initialisation.
Add a shortcut of the project's base directory to the File Open/Save As dialogs when a project is open for faster access.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/dialogs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-03-19 17:50:08 UTC (rev 3635)
+++ trunk/ChangeLog 2009-03-19 17:50:23 UTC (rev 3636)
@@ -7,6 +7,11 @@
set but empty.
* src/notebook.c:
Fix wrong display of the filename in the tab bar menu for new files.
+ * src/dialog.c:
+ Set the initial directory for the Save As dialog only once on
+ initialisation.
+ Add a shortcut of the project's base directory to the
+ File Open/Save As dialogs when a project is open for faster access.
2009-03-16 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c 2009-03-19 17:50:08 UTC (rev 3635)
+++ trunk/src/dialogs.c 2009-03-19 17:50:23 UTC (rev 3636)
@@ -56,6 +56,7 @@
#include "encodings.h"
#include "build.h"
#include "main.h"
+#include "project.h"
enum
@@ -102,6 +103,9 @@
}
g_slist_free(filelist);
}
+ if (app->project && NZV(app->project->base_path))
+ gtk_file_chooser_remove_shortcut_folder(GTK_FILE_CHOOSER(ui_widgets.open_filesel),
+ app->project->base_path, NULL);
}
#endif
@@ -273,6 +277,10 @@
GTK_FILE_CHOOSER(ui_widgets.open_filesel), initdir);
}
+ if (app->project && NZV(app->project->base_path))
+ gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(ui_widgets.open_filesel),
+ app->project->base_path, NULL);
+
gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(ui_widgets.open_filesel));
gtk_window_present(GTK_WINDOW(ui_widgets.open_filesel));
#endif
@@ -550,12 +558,21 @@
g_free(fname);
}
+ if (app->project && NZV(app->project->base_path))
+ gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(ui_widgets.save_filesel),
+ app->project->base_path, NULL);
+
/* if the folder wasn't set so far, we set it to the given directory */
if (! folder_set && initdir != NULL && g_path_is_absolute(initdir))
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(ui_widgets.save_filesel), initdir);
/* Run the dialog synchronously, pausing this function call */
resp = gtk_dialog_run(GTK_DIALOG(ui_widgets.save_filesel));
+
+ if (app->project && NZV(app->project->base_path))
+ gtk_file_chooser_remove_shortcut_folder(GTK_FILE_CHOOSER(ui_widgets.save_filesel),
+ app->project->base_path, NULL);
+
return (resp == GTK_RESPONSE_ACCEPT);
}
#endif
@@ -570,13 +587,16 @@
{
gboolean result;
gchar *initdir = NULL;
+ static gboolean initial = TRUE;
initdir = utils_get_current_file_dir_utf8();
/* use project or default startup directory (if set) if no files are open */
- /** TODO should it only be used when initally open the dialog and not on every show? */
- if (! initdir)
+ if (initdir == NULL && initial)
+ {
initdir = g_strdup(utils_get_default_dir_utf8());
+ initial = FALSE;
+ }
setptr(initdir, utils_get_locale_from_utf8(initdir));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3635
http://geany.svn.sourceforge.net/geany/?rev=3635&view=rev
Author: eht16
Date: 2009-03-19 17:50:08 +0000 (Thu, 19 Mar 2009)
Log Message:
-----------
Fix wrong display of the filename in the tab bar menu for new files.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/notebook.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-03-19 17:49:52 UTC (rev 3634)
+++ trunk/ChangeLog 2009-03-19 17:50:08 UTC (rev 3635)
@@ -5,6 +5,8 @@
'Set Includes and Arguments' dialog.
Disable Compile/Run buttons/menu items when Compile/Run commands are
set but empty.
+ * src/notebook.c:
+ Fix wrong display of the filename in the tab bar menu for new files.
2009-03-16 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/notebook.c
===================================================================
--- trunk/src/notebook.c 2009-03-19 17:49:52 UTC (rev 3634)
+++ trunk/src/notebook.c 2009-03-19 17:50:08 UTC (rev 3635)
@@ -213,7 +213,7 @@
if (! DOC_VALID(doc))
continue;
- base_name = g_path_get_basename(doc->file_name);
+ base_name = g_path_get_basename(DOC_FILENAME(doc));
menu_item = gtk_menu_item_new_with_label(base_name);
gtk_widget_show(menu_item);
gtk_container_add(GTK_CONTAINER(menu), menu_item);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3631
http://geany.svn.sourceforge.net/geany/?rev=3631&view=rev
Author: ntrel
Date: 2009-03-16 14:03:20 +0000 (Mon, 16 Mar 2009)
Log Message:
-----------
Minor fixes.
Modified Paths:
--------------
trunk/doc/geany.txt
trunk/src/document.c
trunk/src/socket.c
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2009-03-16 13:45:12 UTC (rev 3630)
+++ trunk/doc/geany.txt 2009-03-16 14:03:20 UTC (rev 3631)
@@ -2566,7 +2566,7 @@
`Send text through definable commands`_ for
details).
-Send Selection to Verminal Sends the current selection or the current
+Send Selection to Terminal Sends the current selection or the current
line (if there is no selection) to the
embedded Terminal (VTE).
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2009-03-16 13:45:12 UTC (rev 3630)
+++ trunk/src/document.c 2009-03-16 14:03:20 UTC (rev 3631)
@@ -2334,9 +2334,10 @@
gboolean ret = FALSE;
guint n;
const GString *s;
- ScintillaObject *sci = doc->editor->sci;
+ ScintillaObject *sci;
g_return_val_if_fail(doc != NULL, FALSE);
+ sci = doc->editor->sci;
switch (FILETYPE_ID(doc->file_type))
{ /* continue working with the following languages, skip on all others */
Modified: trunk/src/socket.c
===================================================================
--- trunk/src/socket.c 2009-03-16 13:45:12 UTC (rev 3630)
+++ trunk/src/socket.c 2009-03-16 14:03:20 UTC (rev 3631)
@@ -385,7 +385,7 @@
return -1;
}
- g_chmod(real_path, 0600);
+ g_chmod(real_path, 0600);
g_free(real_path);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3630
http://geany.svn.sourceforge.net/geany/?rev=3630&view=rev
Author: eht16
Date: 2009-03-16 13:45:12 +0000 (Mon, 16 Mar 2009)
Log Message:
-----------
Fix wrong directory selection behaviour in all Open Folder dialogs (closes #2688020, patch by Marcel Stimberg, thanks).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/ui_utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-03-16 13:43:12 UTC (rev 3629)
+++ trunk/ChangeLog 2009-03-16 13:45:12 UTC (rev 3630)
@@ -5,6 +5,9 @@
display the right amount of matches.
Fix the display of the matches once per line (I broke the original
patch).
+ * src/ui_uitls.c:
+ Fix wrong directory selection behaviour in all Open Folder dialogs
+ (closes #2688020, patch by Marcel Stimberg, thanks).
2009-03-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2009-03-16 13:43:12 UTC (rev 3629)
+++ trunk/src/ui_utils.c 2009-03-16 13:45:12 UTC (rev 3630)
@@ -1505,7 +1505,7 @@
{
gchar *dir_locale;
- dir_locale = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(dialog));
+ dir_locale = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
ret_path = utils_get_utf8_from_locale(dir_locale);
g_free(dir_locale);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3629
http://geany.svn.sourceforge.net/geany/?rev=3629&view=rev
Author: eht16
Date: 2009-03-16 13:43:12 +0000 (Mon, 16 Mar 2009)
Log Message:
-----------
When using Find All in the Find dialog (in Session and Document), display the right amount of matches.
Fix the display of the matches once per line (I broke the original patch).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/search.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-03-15 07:50:05 UTC (rev 3628)
+++ trunk/ChangeLog 2009-03-16 13:43:12 UTC (rev 3629)
@@ -1,3 +1,12 @@
+2009-03-16 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/search.c:
+ When using Find All in the Find dialog (in Session and Document),
+ display the right amount of matches.
+ Fix the display of the matches once per line (I broke the original
+ patch).
+
+
2009-03-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/socket.c:
Modified: trunk/src/search.c
===================================================================
--- trunk/src/search.c 2009-03-15 07:50:05 UTC (rev 3628)
+++ trunk/src/search.c 2009-03-16 13:43:12 UTC (rev 3629)
@@ -1592,6 +1592,7 @@
gchar *buffer, *short_file_name;
struct TextToFind ttf;
gint count = 0;
+ gint prev_line = -1;
g_return_val_if_fail(doc != NULL, 0);
@@ -1603,7 +1604,6 @@
while (1)
{
gint pos, line, start, find_len;
- gint prev_line = -1;
pos = sci_find_text(doc->editor->sci, flags, &ttf);
if (pos == -1)
@@ -1634,7 +1634,7 @@
void search_find_usage(const gchar *search_text, gint flags, gboolean in_session)
{
GeanyDocument *doc;
- gboolean found = FALSE;
+ gint count = 0;
doc = document_get_current();
g_return_if_fail(doc != NULL);
@@ -1650,7 +1650,7 @@
if (! in_session)
{ /* use current document */
- found = (find_document_usage(doc, search_text, flags) > 0);
+ count = find_document_usage(doc, search_text, flags);
}
else
{
@@ -1658,20 +1658,19 @@
for (i = 0; i < documents_array->len; i++)
{
if (documents[i]->is_valid)
- if (find_document_usage(documents[i], search_text, flags) > 0)
- found = TRUE;
+ {
+ count += find_document_usage(documents[i], search_text, flags);
+ }
}
}
- if (! found) /* no matches were found */
+ if (count == 0) /* no matches were found */
{
ui_set_statusbar(FALSE, _("No matches found for \"%s\"."), search_text);
msgwin_msg_add(COLOR_BLUE, -1, NULL, _("No matches found for \"%s\"."), search_text);
}
else
{
- gint count = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(msgwindow.store_msg), NULL);
-
ui_set_statusbar(FALSE, ngettext(
"Found %d match for \"%s\".", "Found %d matches for \"%s\".", count),
count, search_text);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3627
http://geany.svn.sourceforge.net/geany/?rev=3627&view=rev
Author: eht16
Date: 2009-03-13 17:23:56 +0000 (Fri, 13 Mar 2009)
Log Message:
-----------
When using Find All in the Find dialog, display matches only once per line in the messages window (patch by Bert Vermeulen, thanks).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/search.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-03-13 10:02:29 UTC (rev 3626)
+++ trunk/ChangeLog 2009-03-13 17:23:56 UTC (rev 3627)
@@ -4,6 +4,9 @@
src/main.c, src/plugindata.h, src/plugins.c, src/prefs.c,
src/prefs.h:
Add an option to set an additional plugin lookup path.
+ * src/search.c:
+ When using Find All in the Find dialog, display matches only once
+ per line in the messages window (patch by Bert Vermeulen, thanks).
2009-03-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/search.c
===================================================================
--- trunk/src/search.c 2009-03-13 10:02:29 UTC (rev 3626)
+++ trunk/src/search.c 2009-03-13 17:23:56 UTC (rev 3627)
@@ -1603,6 +1603,7 @@
while (1)
{
gint pos, line, start, find_len;
+ gint prev_line = -1;
pos = sci_find_text(doc->editor->sci, flags, &ttf);
if (pos == -1)
@@ -1613,10 +1614,14 @@
count++;
line = sci_get_line_from_position(doc->editor->sci, pos);
- buffer = sci_get_line(doc->editor->sci, line);
- msgwin_msg_add(COLOR_BLACK, line + 1, doc,
- "%s:%d : %s", short_file_name, line + 1, g_strstrip(buffer));
- g_free(buffer);
+ if (line != prev_line)
+ {
+ buffer = sci_get_line(doc->editor->sci, line);
+ msgwin_msg_add(COLOR_BLACK, line + 1, doc,
+ "%s:%d : %s", short_file_name, line + 1, g_strstrip(buffer));
+ g_free(buffer);
+ prev_line = line;
+ }
start = ttf.chrgText.cpMax + 1;
ttf.chrg.cpMin = start;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.