diff --git a/.gitignore b/.gitignore index 8ed22e9..4f03f5a 100755 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ src/menu/a.out src/color/_build src/turtle/_build src/temp +src/le html/* latex/* diff --git a/gfm/sec12.md b/gfm/sec12.md index 339fcc8..1a486e9 100644 --- a/gfm/sec12.md +++ b/gfm/sec12.md @@ -160,20 +160,20 @@ The error is managed only in the TfeTextView instance and no information is noti 4 GFile *file; 5 GtkWidget *win = gtk_widget_get_ancestor (GTK_WIDGET (tv), GTK_TYPE_WINDOW); 6 - 7 gtk_window_destroy (GTK_WINDOW (dialog)); - 8 if (response == GTK_RESPONSE_ACCEPT) { - 9 file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog)); -10 if (! G_IS_FILE (file)) -11 g_warning ("TfeTextView: gtk_file_chooser_get_file returns non GFile object.\n"); -12 else { -13 save_file(file, tb, GTK_WINDOW (win)); -14 if (G_IS_FILE (tv->file)) -15 g_object_unref (tv->file); -16 tv->file = file; -17 gtk_text_buffer_set_modified (tb, FALSE); -18 g_signal_emit (tv, tfe_text_view_signals[CHANGE_FILE], 0); -19 } -20 } + 7 if (response == GTK_RESPONSE_ACCEPT) { + 8 file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog)); + 9 if (! G_IS_FILE (file)) +10 g_warning ("TfeTextView: gtk_file_chooser_get_file returns non GFile object.\n"); +11 else { +12 save_file(file, tb, GTK_WINDOW (win)); +13 if (G_IS_FILE (tv->file)) +14 g_object_unref (tv->file); +15 tv->file = file; +16 gtk_text_buffer_set_modified (tb, FALSE); +17 g_signal_emit (tv, tfe_text_view_signals[CHANGE_FILE], 0); +18 } +19 } +20 gtk_window_destroy (GTK_WINDOW (dialog)); 21 } 22 23 void diff --git a/gfm/sec15.md b/gfm/sec15.md index d88efaf..f60004f 100644 --- a/gfm/sec15.md +++ b/gfm/sec15.md @@ -545,20 +545,20 @@ It is a good practice for you to add more features. 101 GFile *file; 102 GtkWidget *win = gtk_widget_get_ancestor (GTK_WIDGET (tv), GTK_TYPE_WINDOW); 103 -104 gtk_window_destroy (GTK_WINDOW (dialog)); -105 if (response == GTK_RESPONSE_ACCEPT) { -106 file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog)); -107 if (! G_IS_FILE (file)) -108 g_warning ("TfeTextView: gtk_file_chooser_get_file returns non GFile object.\n"); -109 else { -110 save_file(file, tb, GTK_WINDOW (win)); -111 if (G_IS_FILE (tv->file)) -112 g_object_unref (tv->file); -113 tv->file = file; -114 gtk_text_buffer_set_modified (tb, FALSE); -115 g_signal_emit (tv, tfe_text_view_signals[CHANGE_FILE], 0); -116 } -117 } +104 if (response == GTK_RESPONSE_ACCEPT) { +105 file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog)); +106 if (! G_IS_FILE (file)) +107 g_warning ("TfeTextView: gtk_file_chooser_get_file returns non GFile object.\n"); +108 else { +109 save_file(file, tb, GTK_WINDOW (win)); +110 if (G_IS_FILE (tv->file)) +111 g_object_unref (tv->file); +112 tv->file = file; +113 gtk_text_buffer_set_modified (tb, FALSE); +114 g_signal_emit (tv, tfe_text_view_signals[CHANGE_FILE], 0); +115 } +116 } +117 gtk_window_destroy (GTK_WINDOW (dialog)); 118 } 119 120 void diff --git a/gfm/sec20.md b/gfm/sec20.md index 8865b00..345d58c 100644 --- a/gfm/sec20.md +++ b/gfm/sec20.md @@ -705,7 +705,7 @@ But in the future version, it will probably need details. - 209-212: `tfe_window_new`. This function creates TfeWindow instance. -## GtkApplication +## TfeApplication The file `tfeapplication.c` is now very simple. diff --git a/src/sec20.src.md b/src/sec20.src.md index 238de9a..ad8be17 100644 --- a/src/sec20.src.md +++ b/src/sec20.src.md @@ -225,7 +225,7 @@ But in the future version, it will probably need details. - 209-212: `tfe_window_new`. This function creates TfeWindow instance. -## GtkApplication +## TfeApplication The file `tfeapplication.c` is now very simple. diff --git a/src/tfetextview/tfetextview.c b/src/tfetextview/tfetextview.c index 964945d..dba2542 100644 --- a/src/tfetextview/tfetextview.c +++ b/src/tfetextview/tfetextview.c @@ -101,7 +101,6 @@ saveas_dialog_response (GtkWidget *dialog, gint response, TfeTextView *tv) { GFile *file; GtkWidget *win = gtk_widget_get_ancestor (GTK_WIDGET (tv), GTK_TYPE_WINDOW); - gtk_window_destroy (GTK_WINDOW (dialog)); if (response == GTK_RESPONSE_ACCEPT) { file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog)); if (! G_IS_FILE (file)) @@ -115,6 +114,7 @@ saveas_dialog_response (GtkWidget *dialog, gint response, TfeTextView *tv) { g_signal_emit (tv, tfe_text_view_signals[CHANGE_FILE], 0); } } + gtk_window_destroy (GTK_WINDOW (dialog)); } void