Revision: 1250 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1250&view=re... Author: frlan Date: 2010-04-16 18:34:12 +0000 (Fri, 16 Apr 2010)
Log Message: ----------- GeanySendMail: Allow hitting return to close email address dialog and proceed.
Modified Paths: -------------- trunk/geanysendmail/ChangeLog trunk/geanysendmail/src/geanysendmail.c
Modified: trunk/geanysendmail/ChangeLog =================================================================== --- trunk/geanysendmail/ChangeLog 2010-04-16 17:56:04 UTC (rev 1249) +++ trunk/geanysendmail/ChangeLog 2010-04-16 18:34:12 UTC (rev 1250) @@ -1,13 +1,18 @@ +2010-04-16 Frank Lanitz <frank(at)frank(dot)uvena(dot)de> + + * Allow hitting return to close email address dialog and proceed. + + 2010-01-05
* Release of 0.4.3 mainteinance release. - - + + 2009-10-08 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Use waf for building plugin in faovr of autotools.
- + 2009-07-18 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Update to Geany plugin API v147 and make usage of single header includes.
Modified: trunk/geanysendmail/src/geanysendmail.c =================================================================== --- trunk/geanysendmail/src/geanysendmail.c 2010-04-16 17:56:04 UTC (rev 1249) +++ trunk/geanysendmail/src/geanysendmail.c 2010-04-16 18:34:12 UTC (rev 1250) @@ -1,7 +1,7 @@ /* * geanysendmail.c * - * Copyright 2007-2009 Frank Lanitz <frank(at)frank(dot)uvena(dot)de> + * Copyright 2007-2010 Frank Lanitz <frank(at)frank(dot)uvena(dot)de> * Copyright 2007 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> * Copyright 2007, 2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> * Copyright 2008, 2009 Timothy Boronczyk <tboronczyk(at)gmail(dot)com> @@ -58,6 +58,13 @@ GtkWidget *mailbutton = NULL; static GtkWidget *main_menu_item = NULL;
+ +static void on_enter_key_pressed_in_entry(G_GNUC_UNUSED GtkWidget *widget, gpointer dialog ) +{ + gtk_dialog_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); +} + + /* Callback for sending file as attachment */ static void send_as_attachment(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer gdata) @@ -120,15 +127,11 @@ gtk_container_add(GTK_CONTAINER(vbox), entry); gtk_widget_show(vbox);
- tmp = gtk_dialog_run(GTK_DIALOG(dialog)); + g_signal_connect(G_OBJECT(entry), "activate", + G_CALLBACK(on_enter_key_pressed_in_entry), dialog);
- if (tmp != GTK_RESPONSE_ACCEPT) + if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) { - gtk_widget_destroy(dialog); - return; - } - else - { g_key_file_load_from_file(config, config_file, G_KEY_FILE_NONE, NULL);
g_free(address); @@ -136,6 +139,11 @@
g_key_file_set_string(config, "tools", "address", address); } + else + { + gtk_widget_destroy(dialog); + return; + }
if (! g_file_test(config_dir, G_FILE_TEST_IS_DIR) && utils_mkdir(config_dir, TRUE) != 0) @@ -182,7 +190,10 @@ g_free(command);
if (dialog != NULL) + { gtk_widget_destroy(dialog); + } + } else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org