aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.c68
-rw-r--r--src/mainwindow.h7
-rw-r--r--src/prefs_toolbar.c12
-rw-r--r--src/prefs_toolbar.h8
4 files changed, 89 insertions, 6 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c
index d57e8acf..7ebc2216 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -153,6 +153,16 @@ static void toolbar_exec_cb (GtkWidget *widget,
static void toolbar_next_unread_cb (GtkWidget *widget,
gpointer data);
+static void toolbar_prev_unread_cb (GtkWidget *widget,
+ gpointer data);
+static void toolbar_address_cb (GtkWidget *widget,
+ gpointer data);
+static void toolbar_print_cb (GtkWidget *widget,
+ gpointer data);
+static void toolbar_prefs_common_cb (GtkWidget *widget,
+ gpointer data);
+static void toolbar_prefs_account_cb (GtkWidget *widget,
+ gpointer data);
static gboolean toolbar_button_pressed (GtkWidget *widget,
GdkEventButton *event,
@@ -1857,7 +1867,7 @@ void main_window_set_toolbar_sensitive(MainWindow *mainwin)
struct {
GtkWidget *widget;
SensitiveCond cond;
- } entry[13];
+ } entry[17];
#define SET_WIDGET_COND(w, c) \
{ \
@@ -1887,6 +1897,10 @@ void main_window_set_toolbar_sensitive(MainWindow *mainwin)
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);
+ SET_WIDGET_COND(mainwin->print_btn, M_TARGET_EXIST);
+ SET_WIDGET_COND(mainwin->prefs_common_btn, M_UNLOCKED);
+ SET_WIDGET_COND(mainwin->prefs_account_btn, M_HAVE_ACCOUNT|M_UNLOCKED);
#undef SET_WIDGET_COND
@@ -2386,6 +2400,16 @@ static PrefsToolbarItem items[] =
-1, GTK_STOCK_EXECUTE, toolbar_exec_cb},
{T_NEXT, N_("Next unread message"),
-1, GTK_STOCK_GO_DOWN, toolbar_next_unread_cb},
+ {T_PREV, N_("Previous unread message"),
+ -1, GTK_STOCK_GO_UP, toolbar_prev_unread_cb},
+ {T_ADDRESS_BOOK, N_("Address book"),
+ STOCK_PIXMAP_ADDRESS_BOOK, NULL, toolbar_address_cb},
+ {T_PRINT, N_("Print message"),
+ -1, GTK_STOCK_PRINT, toolbar_print_cb},
+ {T_COMMON_PREFS, N_("Common preferences"),
+ -1, GTK_STOCK_PREFERENCES, toolbar_prefs_common_cb},
+ {T_ACCOUNT_PREFS, N_("Account preferences"),
+ -1, GTK_STOCK_PREFERENCES, toolbar_prefs_account_cb},
{-1, NULL, -1, NULL, NULL}
};
@@ -2440,7 +2464,12 @@ static GtkWidget *main_window_toolbar_create_from_list(MainWindow *mainwin,
items[8].data = &mainwin->junk_btn;
items[9].data = &mainwin->exec_btn;
items[10].data = &mainwin->next_btn;
- for (i = 0; i <= 10; i++)
+ items[11].data = &mainwin->prev_btn;
+ items[12].data = &mainwin->address_btn;
+ items[13].data = &mainwin->print_btn;
+ items[14].data = &mainwin->prefs_common_btn;
+ items[15].data = &mainwin->prefs_account_btn;
+ for (i = 0; i <= 15; i++)
*(GtkWidget **)items[i].data = NULL;
mainwin->reply_combo = NULL;
mainwin->fwd_combo = NULL;
@@ -2606,6 +2635,41 @@ static void toolbar_next_unread_cb (GtkWidget *widget,
next_unread_cb(mainwin, 0, NULL);
}
+static void toolbar_prev_unread_cb(GtkWidget *widget, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+
+ prev_unread_cb(mainwin, 0, NULL);
+}
+
+static void toolbar_address_cb(GtkWidget *widget, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+
+ addressbook_open_cb(mainwin, 0, NULL);
+}
+
+static void toolbar_print_cb(GtkWidget *widget, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+
+ print_cb(mainwin, 0, NULL);
+}
+
+static void toolbar_prefs_common_cb(GtkWidget *widget, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+
+ prefs_common_open_cb(mainwin, 0, NULL);
+}
+
+static void toolbar_prefs_account_cb(GtkWidget *widget, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+
+ prefs_account_open_cb(mainwin, 0, NULL);
+}
+
static void toolbar_customize(GtkWidget *widget, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 9c591fe8..38fbefcb 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.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
@@ -89,6 +89,11 @@ struct _MainWindow
GtkWidget *junk_btn;
GtkWidget *exec_btn;
GtkWidget *next_btn;
+ GtkWidget *prev_btn;
+ GtkWidget *address_btn;
+ GtkWidget *print_btn;
+ GtkWidget *prefs_common_btn;
+ GtkWidget *prefs_account_btn;
/* body */
GtkWidget *vbox_body;
diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c
index 4ddaff2d..91d9ca93 100644
--- a/src/prefs_toolbar.c
+++ b/src/prefs_toolbar.c
@@ -45,6 +45,12 @@ static PrefsDisplayItem all_items[] =
{T_JUNK, "junk", N_("Junk"), FALSE, FALSE},
{T_EXECUTE, "execute", N_("Execute"), FALSE, FALSE},
{T_NEXT, "next", N_("Next"), FALSE, FALSE},
+ {T_PREV, "prev", N_("Prev"), FALSE, FALSE},
+ {T_ADDRESS_BOOK,"address-book", N_("Address"), FALSE, FALSE},
+ {T_PRINT, "print", N_("Print"), FALSE, FALSE},
+ {T_COMMON_PREFS,"common-prefs", N_("Prefs"), FALSE, FALSE},
+ {T_ACCOUNT_PREFS,
+ "account-prefs",N_("Account"), FALSE, FALSE},
{T_SEND, "send", N_("Send"), FALSE, FALSE},
{T_SEND_LATER, "send-later", N_("Send later"), FALSE, FALSE},
@@ -54,7 +60,6 @@ static PrefsDisplayItem all_items[] =
{T_SIGNATURE, "signature", N_("Signature"), FALSE, FALSE},
{T_EDITOR, "editor", N_("Editor"), FALSE, FALSE},
{T_LINEWRAP, "linewrap", N_("Linewrap"), FALSE, FALSE},
- {T_ADDRESS_BOOK,"address-book", N_("Address"), FALSE, FALSE},
{-1, NULL, NULL, FALSE, FALSE}
};
@@ -73,6 +78,11 @@ static gint main_available_items[] =
T_JUNK,
T_EXECUTE,
T_NEXT,
+ T_PREV,
+ T_ADDRESS_BOOK,
+ T_PRINT,
+ T_COMMON_PREFS,
+ T_ACCOUNT_PREFS,
-1
};
diff --git a/src/prefs_toolbar.h b/src/prefs_toolbar.h
index 2fceb283..0f3fe6fb 100644
--- a/src/prefs_toolbar.h
+++ b/src/prefs_toolbar.h
@@ -50,6 +50,11 @@ typedef enum
T_JUNK,
T_EXECUTE,
T_NEXT,
+ T_PREV,
+ T_ADDRESS_BOOK,
+ T_PRINT,
+ T_COMMON_PREFS,
+ T_ACCOUNT_PREFS,
/* Compose */
T_SEND,
@@ -59,8 +64,7 @@ typedef enum
T_ATTACH_FILE,
T_SIGNATURE,
T_EDITOR,
- T_LINEWRAP,
- T_ADDRESS_BOOK
+ T_LINEWRAP
} ToolbarItems;
struct _PrefsToolbarItem