diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-05-18 09:35:00 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-05-18 09:35:00 +0000 |
commit | 8c36c15235dbabcc1f7ebc18b96e98ac07c1cd8c (patch) | |
tree | 75019f73a6633e1ae5ce42c16323003020f77d15 | |
parent | bf268a1934dd6f4760652788b2e1f0aaa3d4c5c0 (diff) |
set minimum column width for folder view and summary view. Remember every column width of folder view.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@266 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | src/folderview.c | 38 | ||||
-rw-r--r-- | src/summaryview.c | 1 |
4 files changed, 48 insertions, 2 deletions
@@ -1,5 +1,11 @@ 2005-05-18 + * src/summaryview.c: set minimum column width. + src/folderview.c: set minimum column width. Remember every column + width. + +2005-05-18 + * src/summaryview.c: display next messages after deleting when immediate_exec is enabled. diff --git a/ChangeLog.ja b/ChangeLog.ja index 73de6ede..5de8fe67 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,10 @@ 2005-05-18 + * src/summaryview.c: 最小カラム幅を指定。 + * src/folderview.c: 最小カラム幅を指定。すべてのカラム幅を記憶。 + +2005-05-18 + * src/summaryview.c: immediate_exec が有効な場合、削除の後次の メッセージを表示するようにした。 diff --git a/src/folderview.c b/src/folderview.c index 3b0df34d..2f6ffc2f 100644 --- a/src/folderview.c +++ b/src/folderview.c @@ -356,7 +356,6 @@ FolderView *folderview_create(void) gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); gtk_tree_view_set_expander_column(GTK_TREE_VIEW(treeview), column); - g_signal_connect(G_OBJECT(column->button), "size-allocate", G_CALLBACK(folderview_col_resized), folderview); @@ -368,8 +367,11 @@ FolderView *folderview_create(void) gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width (column, prefs_common.folder_col_new); + gtk_tree_view_column_set_min_width(column, 8); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); + g_signal_connect(G_OBJECT(column->button), "size-allocate", + G_CALLBACK(folderview_col_resized), folderview); renderer = gtk_cell_renderer_text_new(); g_object_set(renderer, "xalign", 1.0, "ypad", 0, NULL); @@ -379,8 +381,11 @@ FolderView *folderview_create(void) gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width (column, prefs_common.folder_col_unread); + gtk_tree_view_column_set_min_width(column, 8); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); + g_signal_connect(G_OBJECT(column->button), "size-allocate", + G_CALLBACK(folderview_col_resized), folderview); renderer = gtk_cell_renderer_text_new(); g_object_set(renderer, "xalign", 1.0, "ypad", 0, NULL); @@ -390,8 +395,11 @@ FolderView *folderview_create(void) gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width (column, prefs_common.folder_col_total); + gtk_tree_view_column_set_min_width(column, 8); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); + g_signal_connect(G_OBJECT(column->button), "size-allocate", + G_CALLBACK(folderview_col_resized), folderview); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), COL_FOLDER_NAME, @@ -1724,7 +1732,33 @@ static void folderview_popup_close(GtkMenuShell *menu_shell, static void folderview_col_resized(GtkWidget *widget, GtkAllocation *allocation, FolderView *folderview) { - prefs_common.folder_col_folder = allocation->width; + GtkTreeViewColumn *column; + gint type; + gint width = allocation->width; + + for (type = 0; type <= COL_TOTAL; type++) { + column = gtk_tree_view_get_column + (GTK_TREE_VIEW(folderview->treeview), type); + if (column && column->button == widget) { + switch (type) { + case COL_FOLDER_NAME: + prefs_common.folder_col_folder = width; + break; + case COL_NEW: + prefs_common.folder_col_new = width; + break; + case COL_UNREAD: + prefs_common.folder_col_unread = width; + break; + case COL_TOTAL: + prefs_common.folder_col_total = width; + break; + default: + break; + } + break; + } + } } static void folderview_download_func(Folder *folder, FolderItem *item, diff --git a/src/summaryview.c b/src/summaryview.c index 80762a1d..9a56ef1f 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -3885,6 +3885,7 @@ static GtkWidget *summary_tree_view_create(SummaryView *summaryview) gtk_tree_view_column_set_sizing \ (column, GTK_TREE_VIEW_COLUMN_FIXED); \ gtk_tree_view_column_set_fixed_width(column, width); \ + gtk_tree_view_column_set_min_width(column, 8); \ gtk_tree_view_column_set_sort_column_id(column, col); \ gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); \ g_signal_connect(G_OBJECT(column->button), "clicked", \ |