diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2008-11-19 05:38:30 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2008-11-19 05:38:30 +0000 |
commit | d0e22ee5b0217071febec9975dcb2231ce665dd8 (patch) | |
tree | f19d752acf77a23ad41d5d8e6968456e804fb9a9 | |
parent | fe9f255aa83af29fc78c04357a48bbc4900e47ba (diff) |
foldersel.c: made virtual folders unselectable when not in FOLDER_SEL_ALL mode.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2072 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | src/foldersel.c | 25 |
3 files changed, 26 insertions, 9 deletions
@@ -1,5 +1,10 @@ 2008-11-19 + * src/foldersel.c: made virtual folders unselectable when not in + FOLDER_SEL_ALL mode. + +2008-11-19 + * libsylph/prefs.c: prefs_file_close(): keep backups for four generations. diff --git a/ChangeLog.ja b/ChangeLog.ja index 1c793b59..891935d3 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,10 @@ 2008-11-19 + * src/foldersel.c: FOLDER_SEL_ALL モードでない時は仮想フォルダを + 選択不可にした。 + +2008-11-19 + * libsylph/prefs.c: prefs_file_close(): 4世代にわたってバックアップ を保持するようにした。 diff --git a/src/foldersel.c b/src/foldersel.c index a2d648b6..982223cf 100644 --- a/src/foldersel.c +++ b/src/foldersel.c @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2006 Hiroyuki Yamamoto + * Copyright (C) 1999-2008 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 @@ -209,8 +209,10 @@ FolderItem *foldersel_folder_sel(Folder *cur_folder, FolderSelectionType type, if (cancelled || !selected_item) return NULL; - if (type == FOLDER_SEL_ALL || type == FOLDER_SEL_MOVE_FOLDER || - (selected_item->path && !selected_item->no_select)) { + if (type == FOLDER_SEL_ALL || + (selected_item->stype != F_VIRTUAL && + (sel_type == FOLDER_SEL_MOVE_FOLDER || + (selected_item->path && !selected_item->no_select)))) { folder_item = selected_item; return folder_item; } @@ -348,6 +350,7 @@ static void foldersel_append_item(GtkTreeStore *store, FolderItem *item, gchar *name; GdkPixbuf *pixbuf, *pixbuf_open; gboolean use_color; + gboolean no_select; PangoWeight weight = PANGO_WEIGHT_NORMAL; GdkColor *foreground = NULL; static GdkColor color_noselect = {0, COLOR_DIM, COLOR_DIM, COLOR_DIM}; @@ -402,9 +405,11 @@ static void foldersel_append_item(GtkTreeStore *store, FolderItem *item, } else name = g_strdup(name); - pixbuf = item->no_select ? foldernoselect_pixbuf : folder_pixbuf; - pixbuf_open = - item->no_select ? foldernoselect_pixbuf : folderopen_pixbuf; + no_select = item->no_select || + (sel_type != FOLDER_SEL_ALL && item->stype == F_VIRTUAL); + + pixbuf = no_select ? foldernoselect_pixbuf : folder_pixbuf; + pixbuf_open = no_select ? foldernoselect_pixbuf : folderopen_pixbuf; if (item->stype == F_OUTBOX || item->stype == F_DRAFT || item->stype == F_TRASH) { @@ -419,7 +424,7 @@ static void foldersel_append_item(GtkTreeStore *store, FolderItem *item, weight = PANGO_WEIGHT_BOLD; } - if (item->no_select) + if (no_select) foreground = &color_noselect; else if (use_color) foreground = &color_new; @@ -500,8 +505,10 @@ static gboolean foldersel_selected(GtkTreeSelection *selection, selected_item = item; if (selected_item && - (sel_type == FOLDER_SEL_ALL || sel_type == FOLDER_SEL_MOVE_FOLDER || - (selected_item->path && !selected_item->no_select))) { + (sel_type == FOLDER_SEL_ALL || + (selected_item->stype != F_VIRTUAL && + (sel_type == FOLDER_SEL_MOVE_FOLDER || + (selected_item->path && !selected_item->no_select))))) { gchar *id; id = folder_item_get_identifier(selected_item); gtk_entry_set_text(GTK_ENTRY(entry), id); |