aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMike Kestner <mkestner@ximian.com>2002-09-06 22:51:37 +0800
committerMike Kestner <mkestner@src.gnome.org>2002-09-06 22:51:37 +0800
commit6f4d80d825055b2859b176da33725394232d5c08 (patch)
tree5e447d7e100dfda0bfeda3dee3add9d9e381dfa2 /shell
parent578e5695fbedacf9ff56aab68dac396b21876927 (diff)
downloadgsoc2013-evolution-6f4d80d825055b2859b176da33725394232d5c08.tar
gsoc2013-evolution-6f4d80d825055b2859b176da33725394232d5c08.tar.gz
gsoc2013-evolution-6f4d80d825055b2859b176da33725394232d5c08.tar.bz2
gsoc2013-evolution-6f4d80d825055b2859b176da33725394232d5c08.tar.lz
gsoc2013-evolution-6f4d80d825055b2859b176da33725394232d5c08.tar.xz
gsoc2013-evolution-6f4d80d825055b2859b176da33725394232d5c08.tar.zst
gsoc2013-evolution-6f4d80d825055b2859b176da33725394232d5c08.zip
no longer distribute the etstate files. enable_search on the view. add
2002-09-05 Mike Kestner <mkestner@ximian.com> * Makefile.am : no longer distribute the etstate files. * e-shell-folder-selection-dialog.c : enable_search on the view. * e-storage-set-view.c : add search_enabled flag handling. (e_storage_set_view_set_show_checkboxes): manipulate the existing state instead of loading a state file from disk. (e_storage_set_view_enable_search): new. set a column in the sort_info on the etree to allow keystroke jumping in the etree. svn path=/trunk/; revision=18002
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog10
-rw-r--r--shell/Makefile.am4
-rw-r--r--shell/e-shell-folder-selection-dialog.c1
-rw-r--r--shell/e-storage-set-view.c42
-rw-r--r--shell/e-storage-set-view.h3
5 files changed, 54 insertions, 6 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 11dc338e8c..b0b9279fff 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,13 @@
+2002-09-05 Mike Kestner <mkestner@ximian.com>
+
+ * Makefile.am : no longer distribute the etstate files.
+ * e-shell-folder-selection-dialog.c : enable_search on the view.
+ * e-storage-set-view.c : add search_enabled flag handling.
+ (e_storage_set_view_set_show_checkboxes): manipulate the existing state
+ instead of loading a state file from disk.
+ (e_storage_set_view_enable_search): new. set a column in the sort_info
+ on the etree to allow keystroke jumping in the etree.
+
2002-09-05 Anna Marie Dirks <anna@ximian.com>
* GNOME_Evolution_Shell.oaf.in : Changed the description
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 0d1cf2a625..345269f390 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -256,9 +256,7 @@ oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
etspecdir = $(datadir)/evolution/etspec/
etspec_DATA = \
- e-storage-set-view.etspec \
- e-storage-set-view-checkboxes.etstate \
- e-storage-set-view-no-checkboxes.etstate
+ e-storage-set-view.etspec
@XML_I18N_MERGE_OAF_RULE@
diff --git a/shell/e-shell-folder-selection-dialog.c b/shell/e-shell-folder-selection-dialog.c
index 887d9de988..5a0296cbbb 100644
--- a/shell/e-shell-folder-selection-dialog.c
+++ b/shell/e-shell-folder-selection-dialog.c
@@ -402,6 +402,7 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s
priv->storage_set_view = e_storage_set_create_new_view (priv->storage_set, NULL);
e_storage_set_view_set_allow_dnd (E_STORAGE_SET_VIEW (priv->storage_set_view), FALSE);
+ e_storage_set_view_enable_search (E_STORAGE_SET_VIEW (priv->storage_set_view), TRUE);
/* Load the expanded state for this StorageSetView */
filename = g_strdup_printf ("%s/config/storage-set-view-expanded:folder-selection-dialog",
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 0b8b7642a9..618f27f4cf 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -98,6 +98,7 @@ struct _EStorageSetViewPrivate {
unsigned int show_folders : 1;
unsigned int show_checkboxes : 1;
unsigned int allow_dnd : 1;
+ unsigned int search_enabled : 1;
/* The `Evolution::ShellComponentDnd::SourceFolder' interface for the
folder we are dragging from, or CORBA_OBJECT_NIL if no dragging is
@@ -1876,6 +1877,7 @@ init (EStorageSetView *storage_set_view)
priv->show_folders = TRUE;
priv->show_checkboxes = FALSE;
priv->allow_dnd = TRUE;
+ priv->search_enabled = FALSE;
priv->drag_corba_source_interface = CORBA_OBJECT_NIL;
@@ -2251,6 +2253,7 @@ e_storage_set_view_set_show_checkboxes (EStorageSetView *storage_set_view,
void *func_data)
{
EStorageSetViewPrivate *priv;
+ ETableState *state;
g_return_if_fail (storage_set_view != NULL);
g_return_if_fail (E_IS_STORAGE_SET_VIEW (storage_set_view));
@@ -2264,10 +2267,14 @@ e_storage_set_view_set_show_checkboxes (EStorageSetView *storage_set_view,
priv->show_checkboxes = show;
+ state = e_tree_get_state_object (E_TREE (storage_set_view));
+ g_free (state->columns);
+ state->col_count = show ? 2 : 1;
+ state->columns = g_new(int, state->col_count);
+ state->columns [state->col_count - 1] = 0;
if (show)
- e_tree_load_state (E_TREE (storage_set_view), EVOLUTION_ETSPECDIR "/e-storage-set-view-checkboxes.etstate");
- else
- e_tree_load_state (E_TREE (storage_set_view), EVOLUTION_ETSPECDIR "/e-storage-set-view-no-checkboxes.etstate");
+ state->columns [0] = 1;
+ e_tree_set_state_object (E_TREE (storage_set_view), state);
priv->has_checkbox_func = has_checkbox_func;
priv->has_checkbox_func_data = func_data;
@@ -2283,6 +2290,35 @@ e_storage_set_view_get_show_checkboxes (EStorageSetView *storage_set_view)
}
void
+e_storage_set_view_enable_search (EStorageSetView *storage_set_view,
+ gboolean enable)
+{
+ ETableState *state;
+ ETableSortColumn col;
+
+ g_return_if_fail (storage_set_view != NULL);
+ g_return_if_fail (E_IS_STORAGE_SET_VIEW (storage_set_view));
+
+ enable = !! enable;
+
+ if (enable == storage_set_view->priv->search_enabled)
+ return;
+
+ storage_set_view->priv->search_enabled = enable;
+
+ state = e_tree_get_state_object (E_TREE (storage_set_view));
+
+ if (enable) {
+ col.column = 0;
+ col.ascending = TRUE;
+ e_table_sort_info_sorting_set_nth (state->sort_info, 0, col);
+ } else
+ e_table_sort_info_sorting_truncate (state->sort_info, 0);
+
+ e_tree_set_state_object (E_TREE (storage_set_view), state);
+}
+
+void
e_storage_set_view_set_checkboxes_list (EStorageSetView *storage_set_view,
GList *checkboxes)
{
diff --git a/shell/e-storage-set-view.h b/shell/e-storage-set-view.h
index 1d884bc00f..db5fccd975 100644
--- a/shell/e-storage-set-view.h
+++ b/shell/e-storage-set-view.h
@@ -101,6 +101,9 @@ void e_storage_set_view_set_show_checkboxes (EStorageSetView
void *func_data);
gboolean e_storage_set_view_get_show_checkboxes (EStorageSetView *storage_set_view);
+void e_storage_set_view_enable_search (EStorageSetView *storage_set_view,
+ gboolean enable);
+
void e_storage_set_view_set_checkboxes_list (EStorageSetView *storage_set_view,
GList *checkboxes);
GList *e_storage_set_view_get_checkboxes_list (EStorageSetView *storage_set_view);