#include "compose.h"
#include "utils.h"
#include "gtkutils.h"
+#include "stock_pixmap.h"
#include "filesel.h"
#include "manage_window.h"
#include "alertpanel.h"
#include "scoring.h"
#include "prefs_folder_item.h"
#include "filtering.h"
-
-#include "pixmaps/dir-open.xpm"
-#include "pixmaps/mark.xpm"
-#include "pixmaps/deleted.xpm"
-#include "pixmaps/new.xpm"
-#include "pixmaps/unread.xpm"
-#include "pixmaps/replied.xpm"
-#include "pixmaps/forwarded.xpm"
-#include "pixmaps/clip.xpm"
-#include "pixmaps/ignorethread.xpm"
-#include "pixmaps/locked.xpm"
+#include "string_match.h"
#define STATUSBAR_PUSH(mainwin, str) \
{ \
static GtkStyle *small_marked_style;
static GtkStyle *small_deleted_style;
-static GdkPixmap *folderxpm;
-static GdkBitmap *folderxpmmask;
-
static GdkPixmap *markxpm;
static GdkBitmap *markxpmmask;
static GdkPixmap *deletedxpm;
GtkCTreeNode *node,
gpointer data);
+void summary_simplify_subject(SummaryView *summaryview, gchar * rexp,
+ GSList * mlist);
+
void summary_processing(SummaryView *summaryview, GSList * mlist);
static void summary_filter_func (GtkCTree *ctree,
GtkCTreeNode *node,
GtkStyle *style;
GtkWidget *pixmap;
- PIXMAP_CREATE(summaryview->ctree, markxpm, markxpmmask, mark_xpm);
- PIXMAP_CREATE(summaryview->ctree, deletedxpm, deletedxpmmask,
- deleted_xpm);
- PIXMAP_CREATE(summaryview->ctree, newxpm, newxpmmask, new_xpm);
- PIXMAP_CREATE(summaryview->ctree, unreadxpm, unreadxpmmask, unread_xpm);
- PIXMAP_CREATE(summaryview->ctree, repliedxpm, repliedxpmmask,
- replied_xpm);
- PIXMAP_CREATE(summaryview->ctree, forwardedxpm, forwardedxpmmask,
- forwarded_xpm);
- PIXMAP_CREATE(summaryview->ctree, ignorethreadxpm, ignorethreadxpmmask,
- ignorethread_xpm);
- PIXMAP_CREATE(summaryview->ctree, lockedxpm, lockedxpmmask, locked_xpm);
- PIXMAP_CREATE(summaryview->ctree, clipxpm, clipxpmmask, clip_xpm);
- PIXMAP_CREATE(summaryview->hbox, folderxpm, folderxpmmask,
- dir_open_xpm);
+ stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_MARK,
+ &markxpm, &markxpmmask);
+ stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_DELETED,
+ &deletedxpm, &deletedxpmmask);
+ stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_NEW,
+ &newxpm, &newxpmmask);
+ stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_UNREAD,
+ &unreadxpm, &unreadxpmmask);
+ stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_REPLIED,
+ &repliedxpm, &repliedxpmmask);
+ stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_FORWARDED,
+ &forwardedxpm, &forwardedxpmmask);
+ stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_CLIP,
+ &clipxpm, &clipxpmmask);
+ stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_LOCKED,
+ &lockedxpm, &lockedxpmmask);
if (!small_style) {
small_style = gtk_style_copy
gtk_widget_set_style(summaryview->statlabel_select, style);
gtk_widget_set_style(summaryview->statlabel_msgs, style);
- pixmap = gtk_pixmap_new(folderxpm, folderxpmmask);
+ pixmap = stock_pixmap_widget(summaryview->hbox, STOCK_PIXMAP_DIR_OPEN);
gtk_box_pack_start(GTK_BOX(summaryview->hbox), pixmap, FALSE, FALSE, 4);
gtk_box_reorder_child(GTK_BOX(summaryview->hbox), pixmap, 0);
gtk_widget_show(pixmap);
mlist = not_killed;
}
+ if (item->prefs->enable_simplify_subject
+ && item->prefs->simplify_subject_regexp != NULL
+ && strlen(item->prefs->simplify_subject_regexp) != 0) {
+ summary_simplify_subject(summaryview,
+ item->prefs->simplify_subject_regexp,
+ mlist);
+ }
+
STATUSBAR_POP(summaryview->mainwin);
/* set ctree and hash table from the msginfo list
}
}
+void summary_simplify_subject(SummaryView *summaryview, gchar * rexp,
+ GSList * mlist)
+{
+ GSList * cur;
+ for(cur = mlist ; cur != NULL ; cur = cur->next) {
+ MsgInfo * msginfo = (MsgInfo *) cur->data;
+ string_remove_all_matches(msginfo->subject, rexp, 0, 0);
+ }
+}
+
void summary_processing(SummaryView *summaryview, GSList * mlist)
{
GSList * processing_list;