aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/attachment-reminder/attachment-reminder.c
diff options
context:
space:
mode:
authorJohnny Jacob <jjohnny@src.gnome.org>2008-06-09 17:23:00 +0800
committerJohnny Jacob <jjohnny@src.gnome.org>2008-06-09 17:23:00 +0800
commiteddb3f403bca1e490e0cd36d4451a93ab940edff (patch)
tree080a5a4f798ca8e647aebe6b01110f5f59b5a755 /plugins/attachment-reminder/attachment-reminder.c
parentf364d972e905e5409d517c0d9c5eccfe93a394f2 (diff)
downloadgsoc2013-evolution-eddb3f403bca1e490e0cd36d4451a93ab940edff.tar.gz
gsoc2013-evolution-eddb3f403bca1e490e0cd36d4451a93ab940edff.tar.zst
gsoc2013-evolution-eddb3f403bca1e490e0cd36d4451a93ab940edff.zip
Attachment Reminder : Fixes Bug #208943. Add attachment button added.
svn path=/trunk/; revision=35613
Diffstat (limited to 'plugins/attachment-reminder/attachment-reminder.c')
-rw-r--r--plugins/attachment-reminder/attachment-reminder.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/plugins/attachment-reminder/attachment-reminder.c b/plugins/attachment-reminder/attachment-reminder.c
index cfaa2a171c..537e167f96 100644
--- a/plugins/attachment-reminder/attachment-reminder.c
+++ b/plugins/attachment-reminder/attachment-reminder.c
@@ -44,6 +44,7 @@
#include "widgets/misc/e-attachment-bar.h"
#include "composer/e-msg-composer.h"
+#include "composer/e-composer-actions.h"
#define GCONF_KEY_ATTACH_REMINDER_CLUES "/apps/evolution/mail/attachment_reminder_clues"
#define SIGNATURE "-- "
@@ -116,22 +117,27 @@ org_gnome_evolution_attachment_reminder (EPlugin *ep, EMEventTargetComposer *t)
static gboolean
ask_for_missing_attachment (EPlugin *ep, GtkWindow *window)
{
- GtkWidget *mbox, *check = NULL;
+ GtkWidget *check = NULL;
+ GtkDialog *dialog = NULL;
gint response;
- mbox = e_error_new(window, "org.gnome.evolution.plugins.attachment_reminder:attachment-reminder", NULL);
+ dialog = (GtkDialog*)e_error_new(window, "org.gnome.evolution.plugins.attachment_reminder:attachment-reminder", NULL);
+ /*Check buttons*/
check = gtk_check_button_new_with_mnemonic (_("_Do not show this message again."));
gtk_container_set_border_width((GtkContainer *)check, 12);
- gtk_box_pack_start ((GtkBox *)((GtkDialog *) mbox)->vbox, check, TRUE, TRUE, 0);
+ gtk_box_pack_start ((GtkBox *)dialog->vbox, check, TRUE, TRUE, 0);
gtk_widget_show (check);
- response = gtk_dialog_run ((GtkDialog *) mbox);
+ response = gtk_dialog_run ((GtkDialog *) dialog);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check)))
e_plugin_enable (ep, FALSE);
- gtk_widget_destroy(mbox);
+ gtk_widget_destroy((GtkWidget *)dialog);
+
+ if (response == GTK_RESPONSE_OK)
+ gtk_action_activate (E_COMPOSER_ACTION_ATTACH (window));
return response == GTK_RESPONSE_YES;
}