2007-08-19 [paul] 2.10.0cvs132
[claws.git] / src / foldersel.c
index c86ec214de460505ca63fca7d0a22fe50f647492..011202d438cd29c200fe1f94ba21de1e1d16c4cb 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto and the Claws Mail team
  *
  * 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
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 
  */
 
 #include "defs.h"
@@ -198,7 +198,7 @@ FolderItem *foldersel_folder_sel(Folder *cur_folder, FolderSelectionType type,
        gtk_tree_store_clear(tree_store);
 
        if (!cancelled &&
-           selected_item && selected_item->path && !selected_item->no_select) {
+           selected_item && selected_item->path) {
                folder_item = selected_item;
                return folder_item;
        } else
@@ -224,14 +224,13 @@ static void foldersel_create(void)
        GtkTreeSelection *selection;
        static GdkGeometry geometry;
 
-       window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+       window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "foldersel");
        gtk_window_set_title(GTK_WINDOW(window), _("Select folder"));
        gtk_container_set_border_width(GTK_CONTAINER(window), 4);
        gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
        gtk_window_set_modal(GTK_WINDOW(window), TRUE);
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
-       gtk_window_set_wmclass
-               (GTK_WINDOW(window), "folder_selection", "Claws Mail");
+
        gtk_widget_realize(window);
        g_signal_connect(G_OBJECT(window), "delete_event",
                         G_CALLBACK(delete_event), NULL);
@@ -391,22 +390,6 @@ static void foldersel_append_item(GtkTreeStore *store, FolderItem *item,
                }
        }
 
-        /* CLAWS: already adds the UI string to the folder name */
-#ifndef CLAWS         
-       if (!item->parent) {
-               switch (FOLDER_TYPE(item->folder)) {
-               case F_MH:
-                       Xstrcat_a(name, name, " (MH)", ); break;
-               case F_IMAP:
-                       Xstrcat_a(name, name, " (IMAP4)", ); break;
-               case F_NEWS:
-                       Xstrcat_a(name, name, " (News)", ); break;
-               default:
-                       break;
-               }
-       }
-#endif        
-
        if (folder_has_parent_of_type(item, F_QUEUE) && item->total_msgs > 0) {
                name = g_strdup_printf("%s (%d)", name, item->total_msgs);
        } else if (item->unread_msgs > 0) {
@@ -511,7 +494,7 @@ static gboolean foldersel_selected(GtkTreeSelection *selection,
                           FOLDERSEL_FOLDERITEM, &item, -1);
 
        selected_item = item;
-       if (selected_item && selected_item->path && !selected_item->no_select) {
+       if (selected_item && selected_item->path) {
                gchar *id;
                id = folder_item_get_identifier(selected_item);
                gtk_entry_set_text(GTK_ENTRY(entry), id);