aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--plugins/attachment-reminder/ChangeLog10
-rw-r--r--plugins/attachment-reminder/attachment-reminder.c16
-rw-r--r--plugins/attachment-reminder/org-gnome-attachment-reminder.error.xml1
3 files changed, 22 insertions, 5 deletions
diff --git a/plugins/attachment-reminder/ChangeLog b/plugins/attachment-reminder/ChangeLog
index 86cf6e0ba6..1bddccefe0 100644
--- a/plugins/attachment-reminder/ChangeLog
+++ b/plugins/attachment-reminder/ChangeLog
@@ -1,3 +1,13 @@
+2008-06-04 Johnny Jacob <jjohnny@novell.com>
+
+ ** Fixes Bug #208943.
+
+ * org-gnome-attachment-reminder.error.xml: Added
+ "Add attachment" button.
+
+ * attachment-reminder.c (ask_for_missing_attachment): activate
+ composer's "attach" action on "Add attachment".
+
2008-05-23 Johnny Jacob <jjohnny@novell.com>
** Fixes Bug 496476.
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;
}
diff --git a/plugins/attachment-reminder/org-gnome-attachment-reminder.error.xml b/plugins/attachment-reminder/org-gnome-attachment-reminder.error.xml
index 654078167b..c5e83387d4 100644
--- a/plugins/attachment-reminder/org-gnome-attachment-reminder.error.xml
+++ b/plugins/attachment-reminder/org-gnome-attachment-reminder.error.xml
@@ -5,6 +5,7 @@
<_title>Attachment Reminder</_title>
<_primary>Message has no attachments</_primary>
<_secondary>Evolution has found some keywords that suggest that this message should contain an attachment, but cannot find one.</_secondary>
+ <button response="GTK_RESPONSE_OK" _label="_Add attachment..."/>
<button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL" _label="_Edit Message"/>
<button response="GTK_RESPONSE_YES" _label="_Send"></button>
</error>