Commit de7bee2a authored by Victor Ananjevsky's avatar Victor Ananjevsky

cleanup text buffer before loading file in text-info dialog

parent 8e3c7735
......@@ -118,10 +118,13 @@ open_file_cb (GtkWidget *w, gpointer d)
if (gtk_dialog_run (GTK_DIALOG (dlg)) == GTK_RESPONSE_ACCEPT)
{
/* set new filename and load it */
/* set new filename */
if (options.common_data.uri)
g_free (options.common_data.uri);
options.common_data.uri = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dlg));
/* load file */
gtk_text_buffer_set_text (GTK_TEXT_BUFFER (text_buffer), "", -1);
fill_buffer_from_file ();
/* keep current dir */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment