codebrainz commented on this pull request.
> + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
+
+ filter = gtk_file_filter_new();
+ gtk_file_filter_set_name(filter, _("All Files"));
+ gtk_file_filter_add_pattern(filter, "*");
+ gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
+
+ if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
+ gchar *fn = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+ gchar *html = markdown_viewer_get_html(viewer);
+ GError *error = NULL;
+ if (! g_file_set_contents(fn, html, -1, &error)) {
+ dialogs_show_msgbox(GTK_MESSAGE_ERROR,
+ _("Failed to export Markdown HTML to file '%s': %s"),
+ fn, error->message);
+ g_error_free(error);
Good idea.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/502