balsa r7879 - in branches/mailbox-gsequence: . src
- From: PeterB svn gnome org
- To: svn-commits-list gnome org
- Subject: balsa r7879 - in branches/mailbox-gsequence: . src
- Date: Mon, 3 Mar 2008 01:41:24 +0000 (GMT)
Author: PeterB
Date: Mon Mar 3 01:41:24 2008
New Revision: 7879
URL: http://svn.gnome.org/viewvc/balsa?rev=7879&view=rev
Log:
select all messages
Modified:
branches/mailbox-gsequence/ChangeLog
branches/mailbox-gsequence/src/balsa-index.c
branches/mailbox-gsequence/src/balsa-index.h
branches/mailbox-gsequence/src/main-window.c
Modified: branches/mailbox-gsequence/src/balsa-index.c
==============================================================================
--- branches/mailbox-gsequence/src/balsa-index.c (original)
+++ branches/mailbox-gsequence/src/balsa-index.c Mon Mar 3 01:41:24 2008
@@ -387,8 +387,9 @@
/* handle select row signals to display message in the window
* preview pane */
- g_signal_connect(selection, "changed",
- G_CALLBACK(bndx_selection_changed), index);
+ index->selection_changed_id =
+ g_signal_connect(selection, "changed",
+ G_CALLBACK(bndx_selection_changed), index);
/* we want to handle button presses to pop up context menus if
* necessary */
@@ -2451,3 +2452,15 @@
gtk_tree_path_free(path);
}
}
+
+void
+balsa_index_select_all(BalsaIndex * bindex)
+{
+ GtkTreeView *tree_view = GTK_TREE_VIEW(bindex);
+ GtkTreeSelection *selection = gtk_tree_view_get_selection(tree_view);
+
+ gtk_tree_view_expand_all(tree_view);
+ g_signal_handler_block(selection, bindex->selection_changed_id);
+ gtk_tree_selection_select_all(selection);
+ g_signal_handler_unblock(selection, bindex->selection_changed_id);
+}
Modified: branches/mailbox-gsequence/src/balsa-index.h
==============================================================================
--- branches/mailbox-gsequence/src/balsa-index.h (original)
+++ branches/mailbox-gsequence/src/balsa-index.h Mon Mar 3 01:41:24 2008
@@ -68,6 +68,7 @@
/* signal handler ids */
gulong row_expanded_id;
gulong row_collapsed_id;
+ gulong selection_changed_id;
LibBalsaMailboxSearchIter *search_iter;
};
@@ -171,6 +172,9 @@
/* Make sure messages are visible. */
void balsa_index_ensure_visible(BalsaIndex * index);
+ /* Select all without previewing any. */
+ void balsa_index_select_all(BalsaIndex * bindex);
+
#define BALSA_INDEX_VIEW_ON_OPEN "balsa-index-view-on-open"
#ifdef __cplusplus
Modified: branches/mailbox-gsequence/src/main-window.c
==============================================================================
--- branches/mailbox-gsequence/src/main-window.c (original)
+++ branches/mailbox-gsequence/src/main-window.c Mon Mar 3 01:41:24 2008
@@ -5103,10 +5103,11 @@
if (gtk_tree_selection_get_mode(selection) ==
GTK_SELECTION_MULTIPLE) {
if (BALSA_IS_INDEX(focus_widget))
- balsa_index_update_tree((BalsaIndex *) focus_widget, TRUE);
- else
+ balsa_index_select_all((BalsaIndex *) focus_widget);
+ else {
gtk_tree_view_expand_all((GtkTreeView *) focus_widget);
- gtk_tree_selection_select_all(selection);
+ gtk_tree_selection_select_all(selection);
+ }
}
#ifdef HAVE_GTKHTML
} else if (libbalsa_html_can_select(focus_widget)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]