fixed wrong setting of filetype when using "All files" as filetype

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@410 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2006-06-05 15:10:40 +00:00
parent fd0cfdf7fd
commit 9446020898
2 changed files with 2 additions and 3 deletions

View File

@ -370,7 +370,7 @@ void document_new_file(filetype *ft)
g_free(template);
doc_list[idx].encoding = g_strdup("UTF-8");
document_set_filetype(idx, (ft) ? ft : filetypes[GEANY_FILETYPES_ALL]);
document_set_filetype(idx, ft);
utils_set_window_title(idx);
utils_build_show_hide(idx);
utils_update_tag_list(idx, FALSE);

View File

@ -541,8 +541,7 @@ gint main(gint argc, gchar **argv)
app->opening_session_files = FALSE;
// open a new file if no other file was opened
if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)) == 0)
document_new_file(filetypes[GEANY_FILETYPES_ALL]);
if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)) == 0) document_new_file(NULL);
utils_close_buttons_toggle();
utils_save_buttons_toggle(FALSE);