aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-11-01 04:07:17 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-11-01 04:07:17 +0000
commit5136f54d0566e8a4695dcc100043c9bfec2443a5 (patch)
tree47ccd45698a041a86e4e63855e664de48435d3c3 /src
parent1ca8df113fdf103c457f5b31cce5909e6bc85d00 (diff)
added the option 'Open inbox on startup'.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1260 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/main.c8
-rw-r--r--src/prefs_common_dialog.c11
2 files changed, 17 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 7023ea6f..b6c54ec8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1108,6 +1108,14 @@ static void remote_command_exec(void)
mainwin = main_window_get();
+ if (prefs_common.open_inbox_on_startup) {
+ FolderItem *item;
+ item = cur_account && cur_account->inbox
+ ? folder_find_item_from_identifier(cur_account->inbox)
+ : folder_get_default_inbox();
+ folderview_select(mainwin->folderview, item);
+ }
+
if (cmd.receive_all)
inc_all_account_mail(mainwin, FALSE);
else if (prefs_common.chk_on_startup)
diff --git a/src/prefs_common_dialog.c b/src/prefs_common_dialog.c
index 0a0e4e20..80e8aa8b 100644
--- a/src/prefs_common_dialog.c
+++ b/src/prefs_common_dialog.c
@@ -185,6 +185,7 @@ static struct Interface {
GtkWidget *checkbtn_openunread;
GtkWidget *checkbtn_mark_as_read_on_newwin;
GtkWidget *checkbtn_openinbox;
+ GtkWidget *checkbtn_openinbox_startup;
GtkWidget *checkbtn_immedexec;
#ifndef G_OS_WIN32
GtkWidget *checkbtn_comply_gnome_hig;
@@ -452,6 +453,8 @@ static PrefsUIData ui_data[] = {
prefs_set_data_from_toggle, prefs_set_toggle},
{"open_inbox_on_inc", &interface.checkbtn_openinbox,
prefs_set_data_from_toggle, prefs_set_toggle},
+ {"open_inbox_on_startup", &interface.checkbtn_openinbox_startup,
+ prefs_set_data_from_toggle, prefs_set_toggle},
{"immediate_execution", &interface.checkbtn_immedexec,
prefs_set_data_from_toggle, prefs_set_toggle},
@@ -2048,6 +2051,7 @@ static void prefs_details_create(void)
GtkWidget *checkbtn_openunread;
GtkWidget *checkbtn_mark_as_read_on_newwin;
GtkWidget *checkbtn_openinbox;
+ GtkWidget *checkbtn_openinbox_startup;
GtkWidget *checkbtn_immedexec;
GtkWidget *hbox1;
GtkWidget *hbox_spc;
@@ -2085,7 +2089,7 @@ static void prefs_details_create(void)
PACK_CHECK_BUTTON
(vbox2, checkbtn_openunread,
- _("Open first unread message when entering a folder"));
+ _("Open first unread message when a folder is opened"));
SET_TOGGLE_SENSITIVITY_REV
(checkbtn_always_show_msg, checkbtn_openunread);
@@ -2096,7 +2100,9 @@ static void prefs_details_create(void)
PACK_CHECK_BUTTON
(vbox2, checkbtn_openinbox,
- _("Go to inbox after receiving new mail"));
+ _("Open inbox after receiving new mail"));
+ PACK_CHECK_BUTTON
+ (vbox2, checkbtn_openinbox_startup, _("Open inbox on startup"));
vbox3 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox3);
@@ -2161,6 +2167,7 @@ static void prefs_details_create(void)
interface.checkbtn_mark_as_read_on_newwin
= checkbtn_mark_as_read_on_newwin;
interface.checkbtn_openinbox = checkbtn_openinbox;
+ interface.checkbtn_openinbox_startup = checkbtn_openinbox_startup;
interface.checkbtn_immedexec = checkbtn_immedexec;
#ifndef G_OS_WIN32