aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-05-13 08:59:56 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-05-13 08:59:56 +0000
commit8f38c085b08b7da429f6118619b5ff9b525043ab (patch)
tree90f15dad250fe31fba9b898daa51a71ad15021bc /src
parent7a133d95f9b475a56777de2004c37f0f9838c948 (diff)
made rules hint configurable. Removed debug code.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@253 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/gtkutils.c6
-rw-r--r--src/prefs_common.c4
-rw-r--r--src/prefs_common.h2
-rw-r--r--src/summaryview.c20
4 files changed, 14 insertions, 18 deletions
diff --git a/src/gtkutils.c b/src/gtkutils.c
index 8e5c16f1..23e42bec 100644
--- a/src/gtkutils.c
+++ b/src/gtkutils.c
@@ -535,7 +535,13 @@ gboolean gtkut_tree_row_reference_equal(GtkTreeRowReference *ref1,
return FALSE;
path1 = gtk_tree_row_reference_get_path(ref1);
+ if (!path1)
+ return FALSE;
path2 = gtk_tree_row_reference_get_path(ref2);
+ if (!path2) {
+ gtk_tree_path_free(path1);
+ return FALSE;
+ }
result = gtk_tree_path_compare(path1, path2);
diff --git a/src/prefs_common.c b/src/prefs_common.c
index 99232748..92d0f6d1 100644
--- a/src/prefs_common.c
+++ b/src/prefs_common.c
@@ -367,13 +367,13 @@ static PrefParam param[] = {
&display.chkbtn_expand_thread,
prefs_set_data_from_toggle, prefs_set_toggle},
+ {"enable_rules_hint", "TRUE", &prefs_common.enable_rules_hint, P_BOOL,
+ NULL, NULL, NULL},
{"enable_hscrollbar", "TRUE", &prefs_common.enable_hscrollbar, P_BOOL,
NULL, NULL, NULL},
{"bold_unread", "TRUE", &prefs_common.bold_unread, P_BOOL,
NULL, NULL, NULL},
- {"enable_thread", "TRUE", &prefs_common.enable_thread, P_BOOL,
- NULL, NULL, NULL},
{"toolbar_style", "3", &prefs_common.toolbar_style, P_ENUM,
NULL, NULL, NULL},
{"show_statusbar", "TRUE", &prefs_common.show_statusbar, P_BOOL,
diff --git a/src/prefs_common.h b/src/prefs_common.h
index 4af69a15..58aa71cd 100644
--- a/src/prefs_common.h
+++ b/src/prefs_common.h
@@ -100,9 +100,9 @@ struct _PrefsCommon
gboolean expand_thread;
gchar *date_format;
+ gboolean enable_rules_hint;
gboolean enable_hscrollbar;
gboolean bold_unread;
- gboolean enable_thread;
ToolbarStyle toolbar_style;
gboolean show_statusbar;
diff --git a/src/summaryview.c b/src/summaryview.c
index 9c77d208..bf5574f9 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -1752,10 +1752,10 @@ static void summary_set_row(SummaryView *summaryview, GtkTreeIter *iter,
mark_pix = deleted_pixbuf;
foreground = &summaryview->color_dim;
} else if (MSG_IS_MOVE(flags)) {
- //mark_pix = move_pixbuf;
+ /* mark_pix = move_pixbuf; */
foreground = &summaryview->color_marked;
} else if (MSG_IS_COPY(flags)) {
- //mark_pix = copy_pixbuf;
+ /* mark_pix = copy_pixbuf; */
foreground = &summaryview->color_marked;
} else if (MSG_IS_MARKED(flags))
mark_pix = mark_pixbuf;
@@ -1833,7 +1833,6 @@ static void summary_set_tree_model_from_list(SummaryView *summaryview,
GtkTreeIter iter;
MsgInfo *msginfo;
GSList *cur;
- struct timeval tv_bef, tv_aft, tv_res;
if (!mlist) return;
@@ -1842,8 +1841,6 @@ static void summary_set_tree_model_from_list(SummaryView *summaryview,
_("Setting summary from message data..."));
gdk_flush();
- gettimeofday(&tv_bef, NULL);
-
/* temporarily remove the model for speed up */
gtk_tree_view_set_model(GTK_TREE_VIEW(summaryview->treeview), NULL);
@@ -1887,7 +1884,7 @@ static void summary_set_tree_model_from_list(SummaryView *summaryview,
summaryview->deleted++;
summaryview->total_size += msginfo->size;
}
- //mlist = g_slist_reverse(mlist);
+ /* mlist = g_slist_reverse(mlist); */
}
gtk_tree_view_set_model(GTK_TREE_VIEW(summaryview->treeview),
@@ -1902,12 +1899,6 @@ static void summary_set_tree_model_from_list(SummaryView *summaryview,
summaryview->folder_item->sort_type);
}
- gettimeofday(&tv_aft, NULL);
- timersub(&tv_aft, &tv_bef, &tv_res);
- g_print("set_model: %s: elapsed time: %ld.%06ld sec\n",
- summaryview->folder_item->path,
- tv_res.tv_sec, tv_res.tv_usec);
-
debug_print(_("done.\n"));
STATUSBAR_POP(summaryview->mainwin);
}
@@ -3358,13 +3349,11 @@ static void summary_modify_threads(SummaryView *summaryview)
void summary_expand_threads(SummaryView *summaryview)
{
gtk_tree_view_expand_all(GTK_TREE_VIEW(summaryview->treeview));
- //gtk_ctree_node_moveto(ctree, summaryview->selected, -1, 0.5, 0);
}
void summary_collapse_threads(SummaryView *summaryview)
{
gtk_tree_view_collapse_all(GTK_TREE_VIEW(summaryview->treeview));
- //gtk_ctree_node_moveto(ctree, summaryview->selected, -1, 0.5, 0);
}
static gboolean summary_filter_func(GtkTreeModel *model, GtkTreePath *path,
@@ -3739,7 +3728,8 @@ static GtkWidget *summary_tree_view_create(SummaryView *summaryview)
treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), TRUE);
- gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview), TRUE);
+ gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview),
+ prefs_common.enable_rules_hint);
gtk_tree_view_set_search_column(GTK_TREE_VIEW(treeview), S_COL_SUBJECT);
gtk_tree_view_set_reorderable(GTK_TREE_VIEW(treeview), FALSE);
g_object_set(treeview, "fixed-height-mode", TRUE, NULL);