Revision: 3867
http://geany.svn.sourceforge.net/geany/?rev=3867&view=rev
Author: eht16
Date: 2009-06-16 21:25:04 +0000 (Tue, 16 Jun 2009)
Log Message:
-----------
Don't explicitly change the current directory of the Save As dialog so that it uses the last used directory.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/dialogs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-14 10:41:10 UTC (rev 3866)
+++ trunk/ChangeLog 2009-06-16 21:25:04 UTC (rev 3867)
@@ -1,3 +1,10 @@
+2009-06-16 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/dialogs.c:
+ Don't explicitly change the current directory of the Save As dialog
+ so that it uses the last used directory.
+
+
2009-06-14 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/encodings.c, src/encodings.h, src/plugindata.h:
Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c 2009-06-14 10:41:10 UTC (rev 3866)
+++ trunk/src/dialogs.c 2009-06-16 21:25:04 UTC (rev 3867)
@@ -444,6 +444,10 @@
if (gtk_check_version(2, 14, 0) == NULL)
gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(ui_widgets.save_filesel), FALSE);
+ /* set the folder by default to the project base dir or the global pref for opening files */
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(ui_widgets.save_filesel),
+ utils_get_default_dir_utf8());
+
g_signal_connect(check_open_new_tab, "toggled",
G_CALLBACK(on_save_as_new_tab_toggled), rename_btn);
@@ -461,11 +465,10 @@
#if ! GEANY_USE_WIN32_DIALOG
-static gboolean gtk_show_save_as(const gchar *initdir)
+static gboolean gtk_show_save_as(void)
{
GeanyDocument *doc = document_get_current();
gint resp;
- gboolean folder_set = FALSE;
if (G_UNLIKELY(ui_widgets.save_filesel == NULL))
create_save_file_dialog();
@@ -480,7 +483,6 @@
gchar *locale_basename = g_path_get_basename(locale_filename);
gchar *locale_dirname = g_path_get_dirname(locale_filename);
- folder_set = TRUE;
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(ui_widgets.save_filesel),
locale_dirname);
gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(ui_widgets.save_filesel),
@@ -514,10 +516,6 @@
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));
@@ -538,26 +536,12 @@
gboolean dialogs_show_save_as()
{
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 */
- if (initdir == NULL && initial)
- {
- initdir = g_strdup(utils_get_default_dir_utf8());
- initial = FALSE;
- }
-
- setptr(initdir, utils_get_locale_from_utf8(initdir));
-
#if GEANY_USE_WIN32_DIALOG
- result = win32_show_file_dialog(FALSE, initdir);
+ result = win32_show_file_dialog(FALSE, utils_get_default_dir_utf8());
#else
- result = gtk_show_save_as(initdir);
+ result = gtk_show_save_as();
#endif
- g_free(initdir);
return result;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3866
http://geany.svn.sourceforge.net/geany/?rev=3866&view=rev
Author: eht16
Date: 2009-06-14 10:41:10 +0000 (Sun, 14 Jun 2009)
Log Message:
-----------
When completing from the macro list, put the cursor after the inserted text.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/editor.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-14 10:31:44 UTC (rev 3865)
+++ trunk/ChangeLog 2009-06-14 10:41:10 UTC (rev 3866)
@@ -4,6 +4,8 @@
Add Japanese encoding "CP932" (patch by Ryūsei Yamaguchi, thanks).
* src/editor.c:
Remove dead code.
+ When completing from the macro list, put the cursor after
+ the inserted text.
2009-06-12 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2009-06-14 10:31:44 UTC (rev 3865)
+++ trunk/src/editor.c 2009-06-14 10:41:10 UTC (rev 3866)
@@ -821,8 +821,7 @@
{
if (nt->listType == 1)
{
- gint pos = SSM(sci, SCI_GETCURRENTPOS, 0, 0);
- SSM(sci, SCI_INSERTTEXT, pos, (sptr_t) nt->text);
+ SSM(sci, SCI_ADDTEXT, strlen(nt->text), (sptr_t) nt->text);
}
break;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3863
http://geany.svn.sourceforge.net/geany/?rev=3863&view=rev
Author: eht16
Date: 2009-06-12 18:52:02 +0000 (Fri, 12 Jun 2009)
Log Message:
-----------
Fix './waf distclean'.
Modified Paths:
--------------
trunk/wscript
Modified: trunk/wscript
===================================================================
--- trunk/wscript 2009-06-12 15:32:35 UTC (rev 3862)
+++ trunk/wscript 2009-06-12 18:52:02 UTC (rev 3863)
@@ -35,7 +35,7 @@
Known issues: Dependency handling is buggy, e.g. if src/document.h is
changed, depending source files are not rebuilt (maybe Waf bug).
-Requires WAF 1.5.3 and Python 2.4 (or later).
+Requires WAF 1.5.7 and Python 2.4 (or later).
"""
@@ -493,7 +493,7 @@
def shutdown():
- is_win32 = target_is_win32(Build.bld.env)
+ is_win32 = False if not Build.bld else target_is_win32(Build.bld.env)
# the following code was taken from midori's WAF script, thanks
if not is_win32 and not Options.options.destdir and (Options.commands['install'] or Options.commands['uninstall']):
dir = Build.bld.get_install_path('${DATADIR}/icons/hicolor')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.