Branch: refs/heads/master
Author: Matthew Brush <matt(a)geany.org>
Committer: Matthew Brush <matt(a)geany.org>
Date: Sat, 16 Jun 2012 23:28:15
Commit: 51f5ffa0f709109c506936883ac8be7ff6f716f7
https://github.com/geany/geany-plugins/commit/51f5ffa0f709109c506936883ac8b…
Log Message:
-----------
geniuspaste: Provide a better message dialog after pasting
Contains a link in the secondary message label to open the paste
in a web browser when clicked.
Modified Paths:
--------------
geniuspaste/src/geniuspaste.c
Modified: geniuspaste/src/geniuspaste.c
9 files changed, 8 insertions(+), 1 deletions(-)
===================================================================
@@ -352,7 +352,14 @@ static void paste(GeanyDocument * doc, const gchar * website)
}
else
{
- dialogs_show_msgbox(GTK_MESSAGE_INFO, "%s", p_url);
+ GtkWidget *dlg = gtk_message_dialog_new(GTK_WINDOW(geany->main_widgets->window),
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK,
+ _("Paste Successful"));
+ gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(dlg),
+ _("Your paste can be found here:\n<a href=\"%s\" "
+ "title=\"Click to open the paste in your browser\">%s</a>"), p_url, p_url);
+ gtk_dialog_run(GTK_DIALOG(dlg));
+ gtk_widget_destroy(dlg);
}
}
else
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
Branch: refs/heads/master
Author: Matthew Brush <matt(a)geany.org>
Committer: Matthew Brush <matt(a)geany.org>
Date: Sat, 16 Jun 2012 21:19:33
Commit: ed831e5a8892b80267cf7784d59d277f3791808c
https://github.com/geany/geany-plugins/commit/ed831e5a8892b80267cf7784d59d2…
Log Message:
-----------
geniuspaste: Check result of dialogs_show_save_as() to prevent segfault
Fixes crash when an unsaved file is open and the Paste It! item is clicked,
when it shows the Save As dialog and you cancel it, the paste() function
gets run anyway, working on a NULL file_name (ie. last_indexof/strrchr).
Modified Paths:
--------------
geniuspaste/src/geniuspaste.c
Modified: geniuspaste/src/geniuspaste.c
7 files changed, 6 insertions(+), 1 deletions(-)
===================================================================
@@ -396,7 +396,12 @@ static void item_activate(GtkMenuItem * menuitem, gpointer gdata)
}
else if(doc->file_name == NULL)
{
- dialogs_show_save_as();
+ if (dialogs_show_save_as() == FALSE)
+ {
+ dialogs_show_msgbox(GTK_MESSAGE_ERROR,
+ _("A filename is needed and saving the current document was cancelled.\n"));
+ return;
+ }
}
else if(doc->changed)
{
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).