aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-02-06 06:55:36 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-02-06 06:55:36 +0000
commitebd3e4e8ccb76c070225c2bd81f2f4b34e5fa6b0 (patch)
tree5bd3c7133eaec1f37c23630d0aa6672b7e759526
parent8aad93fdabaa410cdda2e3415ec62aa60756ce33 (diff)
added 'Not junk' and 'Search' button to the main toolbar.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1529 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog9
-rw-r--r--ChangeLog.ja9
-rw-r--r--src/icons/Makefile.am2
-rw-r--r--src/icons/stock_notspam.pngbin0 -> 1140 bytes
-rw-r--r--src/mainwindow.c43
-rw-r--r--src/mainwindow.h2
-rw-r--r--src/prefs_toolbar.c9
-rw-r--r--src/prefs_toolbar.h2
-rw-r--r--src/stock_pixmap.c4
-rw-r--r--src/stock_pixmap.h3
10 files changed, 72 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 287bfa86..fdb45a17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-02-06
+
+ * src/prefs_toolbar.[ch]
+ src/icons/stock_notspam.png
+ src/icons/Makefile.am
+ src/stock_pixmap.[ch]
+ src/mainwindow.[ch]: added 'Not junk' and 'Search' button to the
+ main toolbar.
+
2007-02-05
* src/compose.c: fixed '/View/Customize toolbar...' menu.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 8939d909..7c2abc42 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,12 @@
+2007-02-06
+
+ * src/prefs_toolbar.[ch]
+ src/icons/stock_notspam.png
+ src/icons/Makefile.am
+ src/stock_pixmap.[ch]
+ src/mainwindow.[ch]: 「非迷惑メール」と「検索」ボタンをメイン
+ ツールバーに追加。
+
2007-02-05
* src/compose.c: 「/表示/ツールバーをカスタマイズ...」メニューを修正。
diff --git a/src/icons/Makefile.am b/src/icons/Makefile.am
index 4dc4a2f1..31114b75 100644
--- a/src/icons/Makefile.am
+++ b/src/icons/Makefile.am
@@ -18,6 +18,7 @@ BUILT_SOURCES = \
stock_mail_send_queue.h \
stock_outbox.h \
stock_spam.h \
+ stock_notspam.h \
stock_sylpheed.h \
stock_sylpheed_16.h \
stock_sylpheed_32.h \
@@ -45,6 +46,7 @@ EXTRA_DIST = \
stock_mail_send_queue.png \
stock_outbox.png \
stock_spam.png \
+ stock_notspam.png \
stock_sylpheed.png \
stock_sylpheed_16.png \
stock_sylpheed_32.png \
diff --git a/src/icons/stock_notspam.png b/src/icons/stock_notspam.png
new file mode 100644
index 00000000..0801b6d9
--- /dev/null
+++ b/src/icons/stock_notspam.png
Binary files differ
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 44872ac5..c40c8a01 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -151,6 +151,8 @@ static void toolbar_delete_cb (GtkWidget *widget,
gpointer data);
static void toolbar_junk_cb (GtkWidget *widget,
gpointer data);
+static void toolbar_notjunk_cb (GtkWidget *widget,
+ gpointer data);
static void toolbar_exec_cb (GtkWidget *widget,
gpointer data);
@@ -160,6 +162,8 @@ static void toolbar_prev_unread_cb (GtkWidget *widget,
gpointer data);
static void toolbar_address_cb (GtkWidget *widget,
gpointer data);
+static void toolbar_search_cb (GtkWidget *widget,
+ gpointer data);
static void toolbar_print_cb (GtkWidget *widget,
gpointer data);
static void toolbar_prefs_common_cb (GtkWidget *widget,
@@ -1888,7 +1892,7 @@ void main_window_set_toolbar_sensitive(MainWindow *mainwin)
struct {
GtkWidget *widget;
SensitiveCond cond;
- } entry[17];
+ } entry[18];
#define SET_WIDGET_COND(w, c) \
{ \
@@ -1916,6 +1920,8 @@ void main_window_set_toolbar_sensitive(MainWindow *mainwin)
M_TARGET_EXIST|M_ALLOW_DELETE);
SET_WIDGET_COND(mainwin->junk_btn,
M_TARGET_EXIST|M_ALLOW_DELETE|M_ENABLE_JUNK);
+ SET_WIDGET_COND(mainwin->notjunk_btn,
+ M_TARGET_EXIST|M_ALLOW_DELETE|M_ENABLE_JUNK);
SET_WIDGET_COND(mainwin->exec_btn, M_MSG_EXIST|M_EXEC);
SET_WIDGET_COND(mainwin->next_btn, M_MSG_EXIST);
SET_WIDGET_COND(mainwin->prev_btn, M_MSG_EXIST);
@@ -2415,8 +2421,10 @@ static PrefsToolbarItem items[] =
{T_FORWARD, TRUE, toolbar_forward_cb},
{T_DELETE, FALSE, toolbar_delete_cb},
{T_JUNK, TRUE, toolbar_junk_cb},
+ {T_NOTJUNK, FALSE, toolbar_notjunk_cb},
{T_NEXT, FALSE, toolbar_next_unread_cb},
{T_PREV, FALSE, toolbar_prev_unread_cb},
+ {T_SEARCH, FALSE, toolbar_search_cb},
{T_PRINT, FALSE, toolbar_print_cb},
{T_ADDRESS_BOOK, FALSE, toolbar_address_cb},
{T_EXECUTE, FALSE, toolbar_exec_cb},
@@ -2473,14 +2481,16 @@ static GtkWidget *main_window_toolbar_create_from_list(MainWindow *mainwin,
items[6].data = &mainwin->fwd_btn;
items[7].data = &mainwin->delete_btn;
items[8].data = &mainwin->junk_btn;
- items[9].data = &mainwin->next_btn;
- items[10].data = &mainwin->prev_btn;
- items[11].data = &mainwin->print_btn;
- items[12].data = &mainwin->address_btn;
- items[13].data = &mainwin->exec_btn;
- items[14].data = &mainwin->prefs_common_btn;
- items[15].data = &mainwin->prefs_account_btn;
- for (i = 0; i <= 15; i++)
+ items[9].data = &mainwin->notjunk_btn;
+ items[10].data = &mainwin->next_btn;
+ items[11].data = &mainwin->prev_btn;
+ items[12].data = &mainwin->search_btn;
+ items[13].data = &mainwin->print_btn;
+ items[14].data = &mainwin->address_btn;
+ items[15].data = &mainwin->exec_btn;
+ items[16].data = &mainwin->prefs_common_btn;
+ items[17].data = &mainwin->prefs_account_btn;
+ for (i = 0; i <= 17; i++)
*(GtkWidget **)items[i].data = NULL;
mainwin->reply_combo = NULL;
mainwin->fwd_combo = NULL;
@@ -2668,6 +2678,14 @@ static void toolbar_junk_cb (GtkWidget *widget,
summary_junk(mainwin->summaryview);
}
+static void toolbar_notjunk_cb (GtkWidget *widget,
+ gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+
+ summary_not_junk(mainwin->summaryview);
+}
+
static void toolbar_exec_cb (GtkWidget *widget,
gpointer data)
{
@@ -2698,6 +2716,13 @@ static void toolbar_address_cb(GtkWidget *widget, gpointer data)
addressbook_open_cb(mainwin, 0, NULL);
}
+static void toolbar_search_cb(GtkWidget *widget, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+
+ search_cb(mainwin, 1, NULL);
+}
+
static void toolbar_print_cb(GtkWidget *widget, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 38fbefcb..b37efebc 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -87,10 +87,12 @@ struct _MainWindow
ComboButton *fwd_combo;
GtkWidget *delete_btn;
GtkWidget *junk_btn;
+ GtkWidget *notjunk_btn;
GtkWidget *exec_btn;
GtkWidget *next_btn;
GtkWidget *prev_btn;
GtkWidget *address_btn;
+ GtkWidget *search_btn;
GtkWidget *print_btn;
GtkWidget *prefs_common_btn;
GtkWidget *prefs_account_btn;
diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c
index 8f9cb3ae..36ce59e9 100644
--- a/src/prefs_toolbar.c
+++ b/src/prefs_toolbar.c
@@ -63,12 +63,18 @@ static PrefsDisplayItem all_items[] =
{T_JUNK, "junk", N_("Junk"),
N_("Set as junk mail"),
STOCK_PIXMAP_SPAM, NULL, FALSE, FALSE},
+ {T_NOTJUNK, "not-junk", N_("Not junk"),
+ N_("Set as not junk mail"),
+ STOCK_PIXMAP_NOTSPAM, NULL, FALSE, FALSE},
{T_NEXT, "next", N_("Next"),
N_("Next unread message"),
-1, GTK_STOCK_GO_DOWN, FALSE, FALSE},
{T_PREV, "prev", N_("Prev"),
N_("Previous unread message"),
-1, GTK_STOCK_GO_UP, FALSE, FALSE},
+ {T_SEARCH, "search", N_("Search"),
+ N_("Search messages"),
+ -1, GTK_STOCK_FIND, FALSE, FALSE},
{T_PRINT, "print", N_("Print"),
N_("Print message"),
-1, GTK_STOCK_PRINT, FALSE, FALSE},
@@ -129,8 +135,10 @@ static gint main_available_items[] =
T_FORWARD,
T_DELETE,
T_JUNK,
+ T_NOTJUNK,
T_NEXT,
T_PREV,
+ T_SEARCH,
T_PRINT,
T_ADDRESS_BOOK,
T_EXECUTE,
@@ -173,6 +181,7 @@ static gint default_main_items[] =
T_SEPARATOR,
T_NEXT,
T_SEPARATOR,
+ T_SEARCH,
T_PRINT,
T_ADDRESS_BOOK,
-1
diff --git a/src/prefs_toolbar.h b/src/prefs_toolbar.h
index a63f218e..cd122824 100644
--- a/src/prefs_toolbar.h
+++ b/src/prefs_toolbar.h
@@ -47,11 +47,13 @@ typedef enum
T_FORWARD,
T_DELETE,
T_JUNK,
+ T_NOTJUNK,
T_EXECUTE,
T_NEXT,
T_PREV,
T_ADDRESS_BOOK,
T_PRINT,
+ T_SEARCH,
T_COMMON_PREFS,
T_ACCOUNT_PREFS,
diff --git a/src/stock_pixmap.c b/src/stock_pixmap.c
index e8de2926..4335fd2d 100644
--- a/src/stock_pixmap.c
+++ b/src/stock_pixmap.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -69,6 +69,7 @@
#include "icons/stock_delete.h"
#include "icons/stock_delete_16.h"
#include "icons/stock_spam.h"
+#include "icons/stock_notspam.h"
#include "icons/stock_hand-signed.h"
#include "icons/stock_sylpheed.h"
#include "icons/stock_sylpheed_16.h"
@@ -137,6 +138,7 @@ static StockPixmapData pixmaps[] =
{NULL, NULL, NULL, NULL, stock_addressbook, sizeof(stock_addressbook), "stock_addressbook", 24},
{NULL, NULL, NULL, NULL, stock_delete, sizeof(stock_delete), GTK_STOCK_DELETE, 24},
{NULL, NULL, NULL, NULL, stock_spam, sizeof(stock_spam), "stock_spam", 24},
+ {NULL, NULL, NULL, NULL, stock_notspam, sizeof(stock_notspam), "stock_notspam", 24},
{NULL, NULL, NULL, NULL, stock_hand_signed, sizeof(stock_hand_signed), "stock_hand-signed", 24},
{NULL, NULL, NULL, NULL, stock_sylpheed, sizeof(stock_sylpheed), NULL, 0},
{NULL, NULL, NULL, NULL, stock_sylpheed_16, sizeof(stock_sylpheed_16), NULL, 0},
diff --git a/src/stock_pixmap.h b/src/stock_pixmap.h
index 236dbe27..d090d0d1 100644
--- a/src/stock_pixmap.h
+++ b/src/stock_pixmap.h
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -69,6 +69,7 @@ typedef enum
STOCK_PIXMAP_ADDRESS_BOOK,
STOCK_PIXMAP_DELETE,
STOCK_PIXMAP_SPAM,
+ STOCK_PIXMAP_NOTSPAM,
STOCK_PIXMAP_SIGN,
STOCK_PIXMAP_SYLPHEED,
STOCK_PIXMAP_SYLPHEED_SMALL,