Replace untitled file header filename after Save As and add to recent
files on Windows too. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2381 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
30528921d3
commit
1e387f4dc5
@ -22,6 +22,9 @@
|
||||
* src/win32.c, src/dialogs.c, src/document.c, src/document.h:
|
||||
Only use filetype detection after Save As, not on every save when the
|
||||
filetype is None (fixes #1891778).
|
||||
* src/dialogs.c, src/document.c:
|
||||
Replace untitled file header filename after Save As and add to recent
|
||||
files on Windows too.
|
||||
|
||||
|
||||
2008-03-20 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||
|
@ -410,14 +410,10 @@ static void handle_save_as(const gchar *utf8_filename, gboolean open_new_tab,
|
||||
doc_list[idx].file_name = g_strdup(utf8_filename);
|
||||
}
|
||||
|
||||
utils_replace_filename(idx);
|
||||
document_save_file_as(idx);
|
||||
|
||||
if (! open_new_tab)
|
||||
build_menu_update(idx);
|
||||
|
||||
/* finally add current file to recent files menu */
|
||||
ui_add_recent_file(doc_list[idx].file_name);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1262,6 +1262,8 @@ static void get_line_column_from_pos(gint idx, guint byte_pos, gint *line, gint
|
||||
*/
|
||||
gboolean document_save_file_as(gint idx)
|
||||
{
|
||||
gboolean ret;
|
||||
|
||||
if (! DOC_IDX_VALID(idx)) return FALSE;
|
||||
|
||||
/* detect filetype */
|
||||
@ -1277,7 +1279,12 @@ gboolean document_save_file_as(gint idx)
|
||||
app->ignore_callback = FALSE;
|
||||
}
|
||||
}
|
||||
return document_save_file(idx, TRUE);
|
||||
utils_replace_filename(idx);
|
||||
|
||||
ret = document_save_file(idx, TRUE);
|
||||
if (ret)
|
||||
ui_add_recent_file(doc_list[idx].file_name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user