aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-02-12 00:54:59 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-02-12 00:54:59 +0800
commitaf223e6f19084fcd08a613d1e88c0d31d5161266 (patch)
tree388d91a090008eca9c3fb4f44726c91beb820b7e /mail
parenta541fc716262e7fc7f0f527fc8b268d22d202a43 (diff)
downloadgsoc2013-evolution-af223e6f19084fcd08a613d1e88c0d31d5161266.tar
gsoc2013-evolution-af223e6f19084fcd08a613d1e88c0d31d5161266.tar.gz
gsoc2013-evolution-af223e6f19084fcd08a613d1e88c0d31d5161266.tar.bz2
gsoc2013-evolution-af223e6f19084fcd08a613d1e88c0d31d5161266.tar.lz
gsoc2013-evolution-af223e6f19084fcd08a613d1e88c0d31d5161266.tar.xz
gsoc2013-evolution-af223e6f19084fcd08a613d1e88c0d31d5161266.tar.zst
gsoc2013-evolution-af223e6f19084fcd08a613d1e88c0d31d5161266.zip
Implemented. (on_right_click): Do better enabling/hiding of unwanted
2002-02-11 Jeffrey Stedfast <fejj@ximian.com> * folder-browser.c (followup_tag_complete): Implemented. (on_right_click): Do better enabling/hiding of unwanted flag-for-followup options. svn path=/trunk/; revision=15675
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/folder-browser.c38
-rw-r--r--mail/message-tag-followup.c10
3 files changed, 39 insertions, 15 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 79a9b3c2a0..ddfbd6feb1 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-11 Jeffrey Stedfast <fejj@ximian.com>
+
+ * folder-browser.c (followup_tag_complete): Implemented.
+ (on_right_click): Do better enabling/hiding of unwanted
+ flag-for-followup options.
+
2002-02-09 Jeffrey Stedfast <fejj@ximian.com>
* message-tag-followup.c (set_widget_values): Set the correct
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index d0d9887e7b..da955ff525 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -63,6 +63,7 @@
#include "mail-mt.h"
#include "mail-folder-cache.h"
#include "folder-browser-ui.h"
+#include "message-tag-followup.h"
#include "mail-local.h"
#include "mail-config.h"
@@ -1433,7 +1434,8 @@ enum {
CAN_MARK_IMPORTANT = 1<<8,
CAN_MARK_UNIMPORTANT = 1<<9,
CAN_FLAG_FOR_FOLLOWUP = 1<<10,
- CAN_FLAG_COMPLETED = 1<<11
+ CAN_FLAG_COMPLETED = 1<<11,
+ CAN_CLEAR_FLAG = 1<<12
};
#define MLIST_VFOLDER (3)
@@ -1473,7 +1475,7 @@ static EPopupMenu context_menu[] = {
{ N_("Flag for Follow-up"), NULL, GTK_SIGNAL_FUNC (flag_for_followup), NULL, CAN_FLAG_FOR_FOLLOWUP },
{ N_("Flag Completed"), NULL, GTK_SIGNAL_FUNC (flag_followup_completed), NULL, CAN_FLAG_COMPLETED },
- { N_("Clear Flag"), NULL, GTK_SIGNAL_FUNC (flag_followup_clear), NULL, CAN_FLAG_COMPLETED },
+ { N_("Clear Flag"), NULL, GTK_SIGNAL_FUNC (flag_followup_clear), NULL, CAN_CLEAR_FLAG },
/* separator here? */
@@ -1522,9 +1524,16 @@ context_menu_position_func (GtkMenu *menu, gint *x, gint *y,
}
static gboolean
-followup_tag_complete (const char *tag)
+followup_tag_complete (const char *tag_value)
{
- return FALSE;
+ struct _FollowUpTag *tag;
+ gboolean ret;
+
+ tag = message_tag_followup_decode (tag_value);
+ ret = tag->completed != (time_t) 0 ? TRUE : FALSE;
+ g_free (tag);
+
+ return ret;
}
/* handle context menu over message-list */
@@ -1579,6 +1588,7 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
gboolean have_unimportant = FALSE;
gboolean have_flag_for_followup = FALSE;
gboolean have_flag_completed = FALSE;
+ gboolean have_flag_incomplete = FALSE;
gboolean have_unflagged = FALSE;
const char *tag;
@@ -1606,6 +1616,8 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
have_flag_for_followup = TRUE;
if (followup_tag_complete (tag))
have_flag_completed = TRUE;
+ else
+ have_flag_incomplete = TRUE;
} else
have_unflagged = TRUE;
@@ -1630,39 +1642,43 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
if (!have_important)
enable_mask |= CAN_MARK_UNIMPORTANT;
+ if (!have_flag_for_followup)
+ enable_mask |= CAN_CLEAR_FLAG;
if (!have_unflagged)
enable_mask |= CAN_FLAG_FOR_FOLLOWUP;
- if (!(have_flag_for_followup && have_flag_completed))
+ if (!have_flag_incomplete)
enable_mask |= CAN_FLAG_COMPLETED;
/*
* Hide items that wont get used.
*/
- if (!(have_unseen && have_seen)){
+ if (!(have_unseen && have_seen)) {
if (have_seen)
hide_mask |= CAN_MARK_READ;
else
hide_mask |= CAN_MARK_UNREAD;
}
- if (!(have_undeleted && have_deleted)){
+ if (!(have_undeleted && have_deleted)) {
if (have_deleted)
hide_mask |= CAN_DELETE;
else
hide_mask |= CAN_UNDELETE;
}
- if (!(have_important && have_unimportant)){
+ if (!(have_important && have_unimportant)) {
if (have_important)
hide_mask |= CAN_MARK_IMPORTANT;
else
hide_mask |= CAN_MARK_UNIMPORTANT;
}
+ if (!have_flag_for_followup)
+ hide_mask |= CAN_CLEAR_FLAG;
if (!have_unflagged)
- enable_mask |= CAN_FLAG_FOR_FOLLOWUP;
- if (!(have_flag_for_followup && have_flag_completed))
- enable_mask |= CAN_FLAG_COMPLETED;
+ hide_mask |= CAN_FLAG_FOR_FOLLOWUP;
+ if (!have_flag_incomplete)
+ hide_mask |= CAN_FLAG_COMPLETED;
}
/* free uids */
diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c
index 5c46418391..86a7abd95b 100644
--- a/mail/message-tag-followup.c
+++ b/mail/message-tag-followup.c
@@ -88,15 +88,17 @@ static void
message_tag_followup_class_init (MessageTagFollowUpClass *klass)
{
GtkObjectClass *object_class;
+ MessageTagEditorClass *editor_class;
object_class = (GtkObjectClass *) klass;
+ editor_class = (MessageTagEditorClass *) klass;
parent_class = gtk_type_class (message_tag_editor_get_type ());
object_class->finalize = message_tag_followup_finalise;
- parent_class->get_name = tag_get_name;
- parent_class->get_value = tag_get_value;
- parent_class->set_value = tag_set_value;
+ editor_class->get_name = tag_get_name;
+ editor_class->get_value = tag_get_value;
+ editor_class->set_value = tag_set_value;
}
static void
@@ -130,7 +132,7 @@ message_tag_followup_finalise (GtkObject *obj)
static const char *
-tag_get_name (MessageTagEditor *editor)
+tag_get_name (MessageTagEditor *editor)
{
return "follow-up";
}