diff options
-rw-r--r-- | mail/e-mail-reader.c | 6 | ||||
-rw-r--r-- | mail/message-list.c | 274 | ||||
-rw-r--r-- | mail/message-list.h | 10 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-content.c | 59 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-private.c | 10 | ||||
-rw-r--r-- | widgets/table/Makefile.am | 2 | ||||
-rw-r--r-- | widgets/table/e-tree-scrolled.c | 230 | ||||
-rw-r--r-- | widgets/table/e-tree-scrolled.h | 75 |
8 files changed, 196 insertions, 470 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 7ea11698a4..f9e5abd837 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -2637,15 +2637,15 @@ e_mail_reader_init (EMailReader *reader) G_CALLBACK (mail_reader_emit_folder_loaded), reader); g_signal_connect_swapped ( - MESSAGE_LIST (message_list)->tree, "double-click", + message_list, "double-click", G_CALLBACK (mail_reader_double_click_cb), reader); g_signal_connect_swapped ( - MESSAGE_LIST (message_list)->tree, "key-press", + message_list, "key-press", G_CALLBACK (mail_reader_key_press_cb), reader); g_signal_connect_swapped ( - MESSAGE_LIST (message_list)->tree, "selection-change", + message_list, "selection-change", G_CALLBACK (e_mail_reader_changed), reader); } diff --git a/mail/message-list.c b/mail/message-list.c index f45afbed34..f7ba4ff542 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -197,7 +197,7 @@ struct _EMailAddress { typedef struct _EMailAddress EMailAddress; #endif /* SMART_ADDRESS_COMPARE */ -G_DEFINE_TYPE (MessageList, message_list, E_TREE_SCROLLED_TYPE) +G_DEFINE_TYPE (MessageList, message_list, E_TREE_TYPE) static void on_cursor_activated_cmd (ETree *tree, gint row, ETreePath path, gpointer user_data); static void on_selection_changed_cmd(ETree *tree, MessageList *ml); @@ -220,7 +220,6 @@ static void clear_info(gchar *key, ETreePath *node, MessageList *ml); enum { MESSAGE_SELECTED, MESSAGE_LIST_BUILT, - MESSAGE_LIST_SCROLLED, LAST_SIGNAL }; @@ -513,7 +512,9 @@ ml_search_forward(MessageList *ml, gint start, gint end, guint32 flags, guint32 ETreePath path; gint row; CamelMessageInfo *info; - ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree); + ETreeTableAdapter *etta; + + etta = e_tree_get_table_adapter (E_TREE (ml)); for (row = start; row <= end; row ++) { path = e_tree_table_adapter_node_at_row(etta, row); @@ -532,7 +533,9 @@ ml_search_backward(MessageList *ml, gint start, gint end, guint32 flags, guint32 ETreePath path; gint row; CamelMessageInfo *info; - ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree); + ETreeTableAdapter *etta; + + etta = e_tree_get_table_adapter (E_TREE (ml)); for (row = start; row >= end; row --) { path = e_tree_table_adapter_node_at_row(etta, row); @@ -550,7 +553,9 @@ ml_search_path(MessageList *ml, MessageListSelectDirection direction, guint32 fl { ETreePath node; gint row, count; - ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree); + ETreeTableAdapter *etta; + + etta = e_tree_get_table_adapter (E_TREE (ml)); if (ml->cursor_uid == NULL || (node = g_hash_table_lookup(ml->uid_nodemap, ml->cursor_uid)) == NULL) @@ -579,14 +584,20 @@ ml_search_path(MessageList *ml, MessageListSelectDirection direction, guint32 fl static void select_path(MessageList *ml, ETreePath path) { - ETreeSelectionModel *etsm = (ETreeSelectionModel *)e_tree_get_selection_model(ml->tree); + ETree *tree; + ETreeTableAdapter *etta; + ETreeSelectionModel *etsm; + + tree = E_TREE (ml); + etta = e_tree_get_table_adapter (tree); + etsm = (ETreeSelectionModel *) e_tree_get_selection_model (tree); g_free(ml->cursor_uid); ml->cursor_uid = NULL; - e_tree_table_adapter_show_node(e_tree_get_table_adapter(ml->tree), path); - e_tree_set_cursor(ml->tree, path); - e_tree_selection_model_select_single_path(etsm, path); + e_tree_table_adapter_show_node (etta, path); + e_tree_set_cursor (tree, path); + e_tree_selection_model_select_single_path (etsm, path); } /** @@ -660,10 +671,14 @@ message_list_select_uid (MessageList *message_list, const gchar *uid) node = g_hash_table_lookup (message_list->uid_nodemap, uid); if (node) { - ETreePath old_cur = e_tree_get_cursor (message_list->tree); + ETree *tree; + ETreePath old_cur; + + tree = E_TREE (message_list); + old_cur = e_tree_get_cursor (tree); /* This will emit a changed signal that we'll pick up */ - e_tree_set_cursor (message_list->tree, node); + e_tree_set_cursor (tree, node); if (old_cur == node) g_signal_emit (message_list, message_list_signals[MESSAGE_SELECTED], 0, message_list->cursor_uid); @@ -678,9 +693,11 @@ void message_list_select_next_thread (MessageList *ml) { ETreePath node; - ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree); + ETreeTableAdapter *etta; gint i, count, row; + etta = e_tree_get_table_adapter (E_TREE (ml)); + if (!ml->cursor_uid || (node = g_hash_table_lookup(ml->uid_nodemap, ml->cursor_uid)) == NULL) return; @@ -712,7 +729,7 @@ message_list_select_all (MessageList *message_list) { ESelectionModel *etsm; - etsm = e_tree_get_selection_model (message_list->tree); + etsm = e_tree_get_selection_model (E_TREE (message_list)); e_selection_model_select_all (etsm); } @@ -734,15 +751,17 @@ select_node (ETreeModel *model, ETreePath path, gpointer user_data) static void select_thread (MessageList *message_list, void (*selector)(ETreePath, gpointer)) { + ETree *tree; ETreeSelectionModel *etsm; thread_select_info_t tsi; tsi.ml = message_list; tsi.paths = g_ptr_array_new (); - etsm = (ETreeSelectionModel *) e_tree_get_selection_model (message_list->tree); + tree = E_TREE (message_list); + etsm = (ETreeSelectionModel *) e_tree_get_selection_model (tree); - e_tree_selected_path_foreach (message_list->tree, selector, &tsi); + e_tree_selected_path_foreach (tree, selector, &tsi); e_tree_selection_model_select_paths (etsm, tsi.paths); @@ -812,7 +831,7 @@ message_list_invert_selection (MessageList *message_list) { ESelectionModel *etsm; - etsm = e_tree_get_selection_model (message_list->tree); + etsm = e_tree_get_selection_model (E_TREE (message_list)); e_selection_model_invert_selection (etsm); } @@ -1153,7 +1172,7 @@ for_node_and_subtree_if_collapsed (MessageList *ml, ETreePath node, CamelMessage return; child = e_tree_model_node_get_first_child (etm, node); - if (child && !e_tree_node_is_expanded (ml->tree, node)) + if (child && !e_tree_node_is_expanded (E_TREE (ml), node)) e_tree_model_node_traverse (etm, node, func, data); } @@ -1916,11 +1935,11 @@ save_tree_state(MessageList *ml) { gchar *filename; - if (ml->folder == NULL || ml->tree == NULL) + if (ml->folder == NULL) return; filename = mail_config_folder_to_cachename(ml->folder, "et-expanded-"); - e_tree_save_expanded_state(ml->tree, filename); + e_tree_save_expanded_state (E_TREE (ml), filename); g_free(filename); ml->priv->any_row_changed = FALSE; @@ -1929,16 +1948,16 @@ save_tree_state(MessageList *ml) static void load_tree_state (MessageList *ml, xmlDoc *expand_state) { - if (ml->folder == NULL || ml->tree == NULL) + if (ml->folder == NULL) return; if (expand_state) { - e_tree_load_expanded_state_xml (ml->tree, expand_state); + e_tree_load_expanded_state_xml (E_TREE (ml), expand_state); } else { gchar *filename; filename = mail_config_folder_to_cachename (ml->folder, "et-expanded-"); - e_tree_load_expanded_state (ml->tree, filename); + e_tree_load_expanded_state (E_TREE (ml), filename); g_free (filename); } @@ -1962,11 +1981,11 @@ message_list_setup_etree (MessageList *message_list, gboolean outgoing) gchar *name; gint data = 1; struct stat st; - ETableItem *item = e_tree_get_item (message_list->tree); + ETableItem *item; - g_object_set (message_list->tree, - "uniform_row_height", TRUE, - NULL); + item = e_tree_get_item (E_TREE (message_list)); + + g_object_set (message_list, "uniform_row_height", TRUE, NULL); name = camel_service_get_name (CAMEL_SERVICE (message_list->folder->parent_store), TRUE); d(printf ("folder name is '%s'\n", name)); @@ -1976,7 +1995,7 @@ message_list_setup_etree (MessageList *message_list, gboolean outgoing) if (path && g_stat (path, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) { /* build based on saved file */ - e_tree_load_expanded_state (message_list->tree, path); + e_tree_load_expanded_state (E_TREE (message_list), path); } g_free (path); @@ -2230,12 +2249,6 @@ ml_tree_drag_motion(ETree *tree, GdkDragContext *context, gint x, gint y, guint } static void -ml_scrolled (GtkAdjustment *adj, MessageList *ml) -{ - g_signal_emit (ml, message_list_signals[MESSAGE_LIST_SCROLLED], 0); -} - -static void on_model_row_changed (ETableModel *model, gint row, MessageList *ml) { ml->priv->any_row_changed = TRUE; @@ -2278,14 +2291,12 @@ static void message_list_init (MessageList *message_list) { MessageListPrivate *p; - GtkAdjustment *adjustment; GdkAtom matom; message_list->priv = MESSAGE_LIST_GET_PRIVATE (message_list); - adjustment = (GtkAdjustment *) gtk_adjustment_new (0.0, 0.0, G_MAXDOUBLE, 0.0, 0.0, 0.0); - gtk_scrolled_window_set_vadjustment ((GtkScrolledWindow *) message_list, adjustment); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (message_list), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); +/* adjustment = (GtkAdjustment *) gtk_adjustment_new (0.0, 0.0, G_MAXDOUBLE, 0.0, 0.0, 0.0); + gtk_scrolled_window_set_vadjustment ((GtkScrolledWindow *) message_list, adjustment);*/ message_list->normalised_hash = g_hash_table_new_full ( g_str_hash, g_str_equal, @@ -2324,8 +2335,6 @@ message_list_init (MessageList *message_list) g_signal_connect(p->invisible, "selection_get", G_CALLBACK(ml_selection_get), message_list); g_signal_connect(p->invisible, "selection_clear_event", G_CALLBACK(ml_selection_clear_event), message_list); g_signal_connect(p->invisible, "selection_received", G_CALLBACK(ml_selection_received), message_list); - - g_signal_connect (((GtkScrolledWindow *) message_list)->vscrollbar, "value-changed", G_CALLBACK (ml_scrolled), message_list); } static void @@ -2342,10 +2351,6 @@ message_list_destroy(GtkObject *object) } if (message_list->folder) { - /* need to do this before removing folder, folderinfo's might not exist after */ - save_tree_state(message_list); - save_hide_state(message_list); - mail_regen_cancel(message_list); if (message_list->uid_nodemap) { @@ -2478,9 +2483,12 @@ message_list_finalize (GObject *object) G_OBJECT_CLASS (message_list_parent_class)->finalize (object); } -/* - * GObjectClass::init - */ +static void +message_list_built (MessageList *message_list) +{ + gtk_widget_grab_focus (GTK_WIDGET (message_list)); +} + static void message_list_class_init (MessageListClass *class) { @@ -2502,6 +2510,8 @@ message_list_class_init (MessageListClass *class) gtk_object_class = GTK_OBJECT_CLASS (class); gtk_object_class->destroy = message_list_destroy; + class->message_list_built = message_list_built; + g_object_class_install_property ( object_class, PROP_SHELL_BACKEND, @@ -2533,16 +2543,6 @@ message_list_class_init (MessageListClass *class) g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - message_list_signals[MESSAGE_LIST_SCROLLED] = - g_signal_new ("message_list_scrolled", - MESSAGE_LIST_TYPE, - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (MessageListClass, message_list_scrolled), - NULL, - NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); - message_list_init_images (); } @@ -2569,7 +2569,7 @@ static void message_list_construct (MessageList *message_list) { AtkObject *a11y; - gboolean construct_failed; + gboolean constructed; gchar *etspecfile; GConfClient *gconf = mail_config_get_gconf_client (); @@ -2610,51 +2610,62 @@ message_list_construct (MessageList *message_list) message_list->extras = message_list_create_extras (); etspecfile = g_build_filename (EVOLUTION_ETSPECDIR, "message-list.etspec", NULL); - construct_failed = (e_tree_scrolled_construct_from_spec_file (E_TREE_SCROLLED (message_list), - message_list->model, - message_list->extras, - etspecfile, - NULL) - == FALSE); + constructed = e_tree_construct_from_spec_file ( + E_TREE (message_list), message_list->model, + message_list->extras, etspecfile, NULL); g_free (etspecfile); - message_list->tree = e_tree_scrolled_get_tree(E_TREE_SCROLLED (message_list)); - if (!construct_failed) - e_tree_root_node_set_visible (message_list->tree, FALSE); + if (constructed) + e_tree_root_node_set_visible (E_TREE (message_list), FALSE); if (atk_get_root() != NULL) { - a11y = gtk_widget_get_accessible((GtkWidget *)message_list->tree); + a11y = gtk_widget_get_accessible (GTK_WIDGET (message_list)); atk_object_set_name(a11y, _("Messages")); } - g_signal_connect (e_tree_get_table_adapter (message_list->tree), "model_row_changed", G_CALLBACK (on_model_row_changed), message_list); + g_signal_connect ( + e_tree_get_table_adapter (E_TREE (message_list)), + "model_row_changed", + G_CALLBACK (on_model_row_changed), message_list); - g_signal_connect((message_list->tree), "cursor_activated", - G_CALLBACK (on_cursor_activated_cmd), - message_list); + g_signal_connect ( + message_list, "cursor_activated", + G_CALLBACK (on_cursor_activated_cmd), message_list); - g_signal_connect((message_list->tree), "click", - G_CALLBACK (on_click), message_list); + g_signal_connect ( + message_list, "click", + G_CALLBACK (on_click), message_list); - g_signal_connect((message_list->tree), "selection_change", - G_CALLBACK (on_selection_changed_cmd), message_list); + g_signal_connect ( + message_list, "selection_change", + G_CALLBACK (on_selection_changed_cmd), message_list); - e_tree_drag_source_set(message_list->tree, GDK_BUTTON1_MASK, - ml_drag_types, G_N_ELEMENTS (ml_drag_types), - GDK_ACTION_MOVE|GDK_ACTION_COPY); + e_tree_drag_source_set ( + E_TREE (message_list), GDK_BUTTON1_MASK, + ml_drag_types, G_N_ELEMENTS (ml_drag_types), + GDK_ACTION_MOVE|GDK_ACTION_COPY); - g_signal_connect(message_list->tree, "tree_drag_data_get", - G_CALLBACK(ml_tree_drag_data_get), message_list); + g_signal_connect ( + message_list, "tree_drag_data_get", + G_CALLBACK(ml_tree_drag_data_get), message_list); - e_tree_drag_dest_set(message_list->tree, GTK_DEST_DEFAULT_ALL, - ml_drop_types, G_N_ELEMENTS (ml_drop_types), - GDK_ACTION_MOVE|GDK_ACTION_COPY); + e_tree_drag_dest_set ( + E_TREE (message_list), GTK_DEST_DEFAULT_ALL, + ml_drop_types, G_N_ELEMENTS (ml_drop_types), + GDK_ACTION_MOVE|GDK_ACTION_COPY); - g_signal_connect(message_list->tree, "tree_drag_data_received", - G_CALLBACK(ml_tree_drag_data_received), message_list); - g_signal_connect(message_list->tree, "drag-motion", G_CALLBACK(ml_tree_drag_motion), message_list); + g_signal_connect ( + message_list, "tree_drag_data_received", + G_CALLBACK (ml_tree_drag_data_received), message_list); - g_signal_connect (e_tree_get_table_adapter (message_list->tree), "sorting_changed", G_CALLBACK (ml_tree_sorting_changed), message_list); + g_signal_connect ( + message_list, "drag-motion", + G_CALLBACK (ml_tree_drag_motion), message_list); + + g_signal_connect ( + e_tree_get_table_adapter (E_TREE (message_list)), + "sorting_changed", + G_CALLBACK (ml_tree_sorting_changed), message_list); } /** @@ -2667,18 +2678,17 @@ message_list_construct (MessageList *message_list) GtkWidget * message_list_new (EShellBackend *shell_backend) { - MessageList *message_list; + GtkWidget *message_list; g_return_val_if_fail (E_IS_SHELL_BACKEND (shell_backend), NULL); - message_list = MESSAGE_LIST (g_object_new(message_list_get_type (), - "hadjustment", NULL, - "vadjustment", NULL, - "shell-backend", shell_backend, - NULL)); - message_list_construct (message_list); + message_list = g_object_new ( + message_list_get_type (), + "shell-backend", shell_backend, NULL); + + message_list_construct (MESSAGE_LIST (message_list)); - return GTK_WIDGET (message_list); + return message_list; } EShellBackend * @@ -2793,7 +2803,7 @@ find_next_selectable (MessageList *ml) gint last; gint vrow_orig; gint vrow; - ETree *et = ml->tree; + ETree *et = E_TREE (ml); CamelMessageInfo *info; node = g_hash_table_lookup (ml->uid_nodemap, ml->cursor_uid); @@ -2804,7 +2814,7 @@ find_next_selectable (MessageList *ml) if (info && is_node_selectable (ml, info)) return NULL; - last = e_tree_row_count (ml->tree); + last = e_tree_row_count (et); /* model_to_view_row etc simply dont work for sorted views. Sigh. */ vrow_orig = e_tree_row_of_node (et, node); @@ -2908,7 +2918,7 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c ml->cursor_uid = NULL; g_signal_emit (ml, message_list_signals[MESSAGE_SELECTED], 0, NULL); } else { - e_tree_set_cursor (ml->tree, node); + e_tree_set_cursor (E_TREE (ml), node); } g_free (saveuid); } else if (ml->cursor_uid && !g_hash_table_lookup (ml->uid_nodemap, ml->cursor_uid)) { @@ -3228,7 +3238,7 @@ build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes) ml->cursor_uid = NULL; g_signal_emit (ml, message_list_signals[MESSAGE_SELECTED], 0, NULL); } else { - e_tree_set_cursor (ml->tree, node); + e_tree_set_cursor (E_TREE (ml), node); } g_free (saveuid); } @@ -3248,7 +3258,7 @@ message_list_change_first_visible_parent (MessageList *ml, ETreePath node) ETreePath first_visible = NULL; while (node && (node = e_tree_model_node_get_parent (ml->model, node))) { - if (!e_tree_node_is_expanded (ml->tree, node)) + if (!e_tree_node_is_expanded (E_TREE (ml), node)) first_visible = node; } @@ -3542,8 +3552,11 @@ static gboolean on_cursor_activated_idle (gpointer data) { MessageList *message_list = data; - ESelectionModel *esm = e_tree_get_selection_model (message_list->tree); - gint selected = e_selection_model_selected_count (esm); + ESelectionModel *esm; + gint selected; + + esm = e_tree_get_selection_model (E_TREE (message_list)); + selected = e_selection_model_selected_count (esm); if (selected == 1 && message_list->cursor_uid) { d(printf ("emitting cursor changed signal, for uid %s\n", message_list->cursor_uid)); @@ -3688,7 +3701,7 @@ message_list_get_uids(MessageList *ml) g_ptr_array_new() }; - e_tree_path_foreach(ml->tree, ml_getselected_cb, &data); + e_tree_path_foreach (E_TREE (ml), ml_getselected_cb, &data); if (ml->folder && data.uids->len) camel_folder_sort_uids (ml->folder, data.uids); @@ -3704,7 +3717,7 @@ message_list_get_selected(MessageList *ml) g_ptr_array_new() }; - e_tree_selected_path_foreach(ml->tree, ml_getselected_cb, &data); + e_tree_selected_path_foreach (E_TREE (ml), ml_getselected_cb, &data); if (ml->folder && data.uids->len) camel_folder_sort_uids (ml->folder, data.uids); @@ -3720,7 +3733,7 @@ message_list_set_selected(MessageList *ml, GPtrArray *uids) ETreePath node; GPtrArray *paths = g_ptr_array_new(); - etsm = (ETreeSelectionModel *)e_tree_get_selection_model(ml->tree); + etsm = (ETreeSelectionModel *) e_tree_get_selection_model (E_TREE (ml)); for (i=0; i<uids->len; i++) { node = g_hash_table_lookup(ml->uid_nodemap, uids->pdata[i]); if (node) @@ -4156,11 +4169,10 @@ ml_sort_uids_by_tree (MessageList *ml, GPtrArray *uids) guint i, len; g_return_if_fail (ml != NULL); - g_return_if_fail (ml->tree != NULL); g_return_if_fail (ml->folder != NULL); g_return_if_fail (uids != NULL); - adapter = e_tree_get_table_adapter (ml->tree); + adapter = e_tree_get_table_adapter (E_TREE (ml)); g_return_if_fail (adapter != NULL); sort_info = e_tree_table_adapter_get_sort_info (adapter); @@ -4260,15 +4272,17 @@ regen_list_exec (struct _regen_list_msg *m) GPtrArray *uids, *uidnew, *showuids, *searchuids = NULL; CamelMessageInfo *info; ETreePath cursor; + ETree *tree; gint i; gchar *expr = NULL; if (m->folder != m->ml->folder) return; - cursor = e_tree_get_cursor (m->ml->tree); + tree = E_TREE (m->ml); + cursor = e_tree_get_cursor (tree); if (cursor) - m->last_row = e_tree_table_adapter_row_of_node (e_tree_get_table_adapter (m->ml->tree), cursor); + m->last_row = e_tree_table_adapter_row_of_node (e_tree_get_table_adapter (tree), cursor); e_profile_event_emit("list.getuids", m->folder->full_name, 0); @@ -4397,7 +4411,7 @@ regen_list_exec (struct _regen_list_msg *m) decrease our last row number, to put cursor on a proper place. */ ETreePath node = g_hash_table_lookup (m->ml->uid_nodemap, (const gchar *) uids->pdata[i]); - if (node && m->last_row > e_tree_table_adapter_row_of_node (e_tree_get_table_adapter (m->ml->tree), node)) + if (node && m->last_row > e_tree_table_adapter_row_of_node (e_tree_get_table_adapter (tree), node)) subtr ++; } } @@ -4482,6 +4496,8 @@ regen_list_exec (struct _regen_list_msg *m) static void regen_list_done (struct _regen_list_msg *m) { + ETree *tree; + if (m->ml->priv->destroyed) return; @@ -4494,7 +4510,9 @@ regen_list_done (struct _regen_list_msg *m) if (m->ml->folder != m->folder) return; - g_signal_handlers_block_by_func (e_tree_get_table_adapter (m->ml->tree), ml_tree_sorting_changed, m->ml); + tree = E_TREE (m->ml); + + g_signal_handlers_block_by_func (e_tree_get_table_adapter (tree), ml_tree_sorting_changed, m->ml); e_profile_event_emit("list.buildtree", m->folder->full_name, 0); @@ -4511,7 +4529,7 @@ regen_list_done (struct _regen_list_msg *m) } if (forcing_expand_state) - e_tree_force_expanded_state (m->ml->tree, m->ml->expand_all ? 1 : -1); + e_tree_force_expanded_state (tree, m->ml->expand_all ? 1 : -1); build_tree (m->ml, m->tree, m->changes); if (m->ml->thread_tree) @@ -4520,10 +4538,10 @@ regen_list_done (struct _regen_list_msg *m) m->tree = NULL; if (forcing_expand_state) { - if (m->ml->folder != NULL && m->ml->tree != NULL) + if (m->ml->folder != NULL && tree != NULL) save_tree_state (m->ml); /* do not forget to set this back to use the default value... */ - e_tree_force_expanded_state (m->ml->tree, 0); + e_tree_force_expanded_state (tree, 0); } else load_tree_state (m->ml, m->expand_state); @@ -4548,7 +4566,7 @@ regen_list_done (struct _regen_list_msg *m) message_list_select_uid(m->ml, uid); g_free(uid); } else if (m->ml->regen == NULL && m->ml->cursor_uid == NULL && m->last_row != -1) { - ETreeTableAdapter *etta = e_tree_get_table_adapter (m->ml->tree); + ETreeTableAdapter *etta = e_tree_get_table_adapter (tree); if (m->last_row >= e_table_model_row_count (E_TABLE_MODEL (etta))) m->last_row = e_table_model_row_count (E_TABLE_MODEL (etta)) - 1; @@ -4566,16 +4584,16 @@ regen_list_done (struct _regen_list_msg *m) if (message_list_length (m->ml) <= 0) { /* space is used to indicate no search too */ if (m->ml->search && *m->ml->search && strcmp (m->ml->search, " ") != 0) - e_tree_set_info_message (m->ml->tree, _("No message satisfies your search criteria. Either clear search with Search->Clear menu item or change it.")); + e_tree_set_info_message (tree, _("No message satisfies your search criteria. Either clear search with Search->Clear menu item or change it.")); else if (m->ml->hidden) - e_tree_set_info_message (m->ml->tree, _("There are only hidden messages in this folder. Use View->Show Hidden Messages to show them.")); + e_tree_set_info_message (tree, _("There are only hidden messages in this folder. Use View->Show Hidden Messages to show them.")); else - e_tree_set_info_message (m->ml->tree, _("There are no messages in this folder.")); + e_tree_set_info_message (tree, _("There are no messages in this folder.")); } else - e_tree_set_info_message (m->ml->tree, NULL); + e_tree_set_info_message (tree, NULL); } - g_signal_handlers_unblock_by_func (e_tree_get_table_adapter (m->ml->tree), ml_tree_sorting_changed, m->ml); + g_signal_handlers_unblock_by_func (e_tree_get_table_adapter (tree), ml_tree_sorting_changed, m->ml); g_signal_emit (m->ml, message_list_signals[MESSAGE_LIST_BUILT], 0); m->ml->priv->any_row_changed = FALSE; @@ -4733,7 +4751,7 @@ mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, Ca /* there is some info why the message list is empty, let it be something useful */ gchar *txt = g_strconcat (_("Generating message list"), "..." , NULL); - e_tree_set_info_message (m->ml->tree, txt); + e_tree_set_info_message (E_TREE (m->ml), txt); g_free (txt); } @@ -4743,7 +4761,7 @@ mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, Ca message_list_save_state (ml); } else if (m->dotree && !ml->just_set_folder) { /* remember actual expand state and restore it after regen */ - m->expand_state = e_tree_save_expanded_state_xml (ml->tree); + m->expand_state = e_tree_save_expanded_state_xml (E_TREE (ml)); } /* if we're busy already kick off timeout processing, so normal updates are immediate */ @@ -4754,15 +4772,3 @@ mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, Ca ml->regen_timeout_id = g_timeout_add(500, (GSourceFunc)ml_regen_timeout, m); } } - -gdouble -message_list_get_scrollbar_position (MessageList *ml) -{ - return gtk_range_get_value ((GtkRange *) ((GtkScrolledWindow *) ml)->vscrollbar); -} - -void -message_list_set_scrollbar_position (MessageList *ml, double pos) -{ - gtk_range_set_value ((GtkRange *) ((GtkScrolledWindow *) ml)->vscrollbar, pos); -} diff --git a/mail/message-list.h b/mail/message-list.h index 96ef42b91c..72960babe1 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -26,7 +26,7 @@ #include <gtk/gtk.h> #include <camel/camel-folder-thread.h> -#include <table/e-tree-scrolled.h> +#include <table/e-tree.h> #include <camel/camel-folder.h> #include <shell/e-shell-backend.h> @@ -89,13 +89,12 @@ typedef struct _MessageListClass MessageListClass; typedef struct _MessageListPrivate MessageListPrivate; struct _MessageList { - ETreeScrolled parent; + ETree parent; MessageListPrivate *priv; /* The table */ ETreeModel *model; - ETree *tree; ETreePath tree_root; ETableExtras *extras; @@ -168,7 +167,7 @@ struct _MessageList { }; struct _MessageListClass { - ETreeScrolledClass parent_class; + ETreeClass parent_class; /* signals - select a message */ void (*message_selected) (MessageList *ml, const gchar *uid); @@ -236,9 +235,6 @@ void message_list_ensure_message (MessageList *ml, const gchar *uid); void message_list_save_state (MessageList *ml); -gdouble message_list_get_scrollbar_position (MessageList *ml); -void message_list_set_scrollbar_position (MessageList *ml, double pos); - #define MESSAGE_LIST_LOCK(m, l) g_mutex_lock(((MessageList *)m)->l) #define MESSAGE_LIST_UNLOCK(m, l) g_mutex_unlock(((MessageList *)m)->l) diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c index 9be6677de3..01b4811f2b 100644 --- a/modules/mail/e-mail-shell-content.c +++ b/modules/mail/e-mail-shell-content.c @@ -51,6 +51,7 @@ struct _EMailShellContentPrivate { GtkWidget *paned; + GtkWidget *scrolled_window; GtkWidget *message_list; GtkWidget *search_bar; @@ -90,7 +91,7 @@ mail_shell_content_etree_unfreeze (MessageList *message_list, ETableItem *item; GObject *object; - item = e_tree_get_item (message_list->tree); + item = e_tree_get_item (E_TREE (message_list)); object = G_OBJECT (((GnomeCanvasItem *) item)->canvas); g_object_set_data (object, "freeze-cursor", 0); @@ -98,19 +99,21 @@ mail_shell_content_etree_unfreeze (MessageList *message_list, static void mail_shell_content_message_list_scrolled_cb (EMailShellContent *mail_shell_content, - MessageList *message_list) + GtkScrollbar *vscrollbar) { EShellContent *shell_content; EShellView *shell_view; + EMailReader *reader; GKeyFile *key_file; const gchar *folder_uri; const gchar *key; gchar *group_name; - gdouble position; + gdouble value; /* Save the scrollbar position for the current folder. */ - folder_uri = message_list->folder_uri; + reader = E_MAIL_READER (mail_shell_content); + folder_uri = e_mail_reader_get_folder_uri (reader); if (folder_uri == NULL) return; @@ -121,9 +124,9 @@ mail_shell_content_message_list_scrolled_cb (EMailShellContent *mail_shell_conte key = STATE_KEY_SCROLLBAR_POSITION; group_name = g_strdup_printf ("Folder %s", folder_uri); - position = message_list_get_scrollbar_position (message_list); + value = gtk_range_get_value (GTK_RANGE (vscrollbar)); - g_key_file_set_double (key_file, group_name, key, position); + g_key_file_set_double (key_file, group_name, key, value); e_shell_view_set_state_dirty (shell_view); g_free (group_name); @@ -135,7 +138,9 @@ mail_shell_content_scroll_timeout_cb (EMailShellContent *mail_shell_content) EMailShellContentPrivate *priv = mail_shell_content->priv; EShellContent *shell_content; EShellView *shell_view; + GtkScrolledWindow *scrolled_window; GtkWidget *message_list; + GtkWidget *vscrollbar; EMailReader *reader; GKeyFile *key_file; const gchar *folder_uri; @@ -153,6 +158,9 @@ mail_shell_content_scroll_timeout_cb (EMailShellContent *mail_shell_content) folder_uri = e_mail_reader_get_folder_uri (reader); message_list = e_mail_reader_get_message_list (reader); + scrolled_window = GTK_SCROLLED_WINDOW (priv->scrolled_window); + vscrollbar = gtk_scrolled_window_get_vscrollbar (scrolled_window); + if (folder_uri == NULL) goto skip; @@ -162,19 +170,18 @@ mail_shell_content_scroll_timeout_cb (EMailShellContent *mail_shell_content) group_name = g_strdup_printf ("Folder %s", folder_uri); if (g_key_file_has_key (key_file, group_name, key, NULL)) { - gdouble position; + gdouble value; - position = g_key_file_get_double ( + value = g_key_file_get_double ( key_file, group_name, key, NULL); - message_list_set_scrollbar_position ( - MESSAGE_LIST (message_list), position); + gtk_range_set_value (GTK_RANGE (vscrollbar), value); } g_free (group_name); skip: priv->message_list_scrolled_id = g_signal_connect_swapped ( - message_list, "message-list-scrolled", + vscrollbar, "value-changed", G_CALLBACK (mail_shell_content_message_list_scrolled_cb), mail_shell_content); @@ -203,6 +210,9 @@ mail_shell_content_message_list_built_cb (EMailShellContent *mail_shell_content, shell_view = e_shell_content_get_shell_view (shell_content); key_file = e_shell_view_get_state_key_file (shell_view); + scrolled_window = GTK_SCROLLED_WINDOW (priv->scrolled_window); + vscrollbar = gtk_scrolled_window_get_vscrollbar (scrolled_window); + if (message_list->cursor_uid != NULL) uid = NULL; @@ -257,14 +267,12 @@ mail_shell_content_message_list_built_cb (EMailShellContent *mail_shell_content, * It gets restored in the timeout handler we just added. */ if (priv->message_list_scrolled_id > 0) { g_signal_handler_disconnect ( - message_list, priv->message_list_scrolled_id); + vscrollbar, priv->message_list_scrolled_id); priv->message_list_scrolled_id = 0; } /* FIXME This is another ugly hack to hide a side-effect of the * previous workaround. */ - scrolled_window = GTK_SCROLLED_WINDOW (message_list); - vscrollbar = gtk_scrolled_window_get_vscrollbar (scrolled_window); g_signal_connect_swapped ( vscrollbar, "button-press-event", G_CALLBACK (mail_shell_content_etree_unfreeze), @@ -284,7 +292,7 @@ mail_shell_content_display_view_cb (EMailShellContent *mail_shell_content, if (GAL_IS_VIEW_ETABLE (gal_view)) gal_view_etable_attach_tree ( GAL_VIEW_ETABLE (gal_view), - MESSAGE_LIST (message_list)->tree); + E_TREE (message_list)); } static void @@ -413,6 +421,11 @@ mail_shell_content_dispose (GObject *object) priv->paned = NULL; } + if (priv->scrolled_window != NULL) { + g_object_unref (priv->scrolled_window); + priv->scrolled_window = NULL; + } + if (priv->message_list != NULL) { g_object_unref (priv->message_list); priv->message_list = NULL; @@ -481,13 +494,27 @@ mail_shell_content_constructed (GObject *object) object, "orientation", widget, "orientation"); + container = priv->paned; + + widget = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy ( + GTK_SCROLLED_WINDOW (widget), + GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); + gtk_scrolled_window_set_shadow_type ( + GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); + priv->scrolled_window = g_object_ref (widget); + gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE); + gtk_widget_show (widget); + container = widget; widget = message_list_new (shell_backend); - gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE); + gtk_container_add (GTK_CONTAINER (container), widget); priv->message_list = g_object_ref (widget); gtk_widget_show (widget); + container = priv->paned; + widget = gtk_vbox_new (FALSE, 1); gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, FALSE); gtk_widget_show (widget); diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c index ec02aacea8..0a38886a6d 100644 --- a/modules/mail/e-mail-shell-view-private.c +++ b/modules/mail/e-mail-shell-view-private.c @@ -330,14 +330,18 @@ mail_shell_view_prepare_for_quit_cb (EMailShellView *mail_shell_view, { CamelFolder *folder; EMailReader *reader; + GtkWidget *message_list; /* If we got here, it means the application is shutting down * and this is the last EMailShellView instance. Synchronize * the currently selected folder before we terminate. */ reader = E_MAIL_READER (mail_shell_view->priv->mail_shell_content); + message_list = e_mail_reader_get_message_list (reader); folder = e_mail_reader_get_folder (reader); + message_list_save_state (MESSAGE_LIST (message_list)); + if (folder == NULL) return; @@ -485,17 +489,17 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view) mail_shell_view); g_signal_connect_swapped ( - MESSAGE_LIST (message_list)->tree, "key-press", + message_list, "key-press", G_CALLBACK (mail_shell_view_message_list_key_press_cb), mail_shell_view); g_signal_connect_swapped ( - MESSAGE_LIST (message_list)->tree, "popup-menu", + message_list, "popup-menu", G_CALLBACK (mail_shell_view_message_list_popup_menu_cb), mail_shell_view); g_signal_connect_swapped ( - MESSAGE_LIST (message_list)->tree, "right-click", + message_list, "right-click", G_CALLBACK (mail_shell_view_message_list_right_click_cb), mail_shell_view); diff --git a/widgets/table/Makefile.am b/widgets/table/Makefile.am index 8df9b4b122..ae21e57c1e 100644 --- a/widgets/table/Makefile.am +++ b/widgets/table/Makefile.am @@ -67,7 +67,6 @@ libetable_la_SOURCES = \ e-tree-memory-callbacks.c \ e-tree-memory.c \ e-tree-model.c \ - e-tree-scrolled.c \ e-tree-selection-model.c \ e-tree-sorted.c \ e-tree-table-adapter.c \ @@ -148,7 +147,6 @@ libetableinclude_HEADERS = \ e-tree-memory-callbacks.h \ e-tree-memory.h \ e-tree-model.h \ - e-tree-scrolled.h \ e-tree-selection-model.h \ e-tree-sorted.h \ e-tree-table-adapter.h \ diff --git a/widgets/table/e-tree-scrolled.c b/widgets/table/e-tree-scrolled.c deleted file mode 100644 index eac80443d0..0000000000 --- a/widgets/table/e-tree-scrolled.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see <http://www.gnu.org/licenses/> - * - * - * Authors: - * Chris Lahey <clahey@ximian.com> - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#include <config.h> - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include <libgnomecanvas/gnome-canvas.h> -#include <gtk/gtk.h> -#include <libxml/parser.h> -#include <libxml/xmlmemory.h> - -#include <glib/gi18n.h> -#include "e-util/e-util.h" - -#include "e-tree-scrolled.h" - -#define COLUMN_HEADER_HEIGHT 16 - -G_DEFINE_TYPE (ETreeScrolled, e_tree_scrolled, GTK_TYPE_SCROLLED_WINDOW) - -enum { - PROP_0, - PROP_TREE -}; - -static void -e_tree_scrolled_init (ETreeScrolled *ets) -{ - GtkScrolledWindow *scrolled_window; - - scrolled_window = GTK_SCROLLED_WINDOW (ets); - - GTK_WIDGET_SET_FLAGS (ets, GTK_CAN_FOCUS); - - ets->tree = g_object_new (E_TREE_TYPE, NULL); - - gtk_scrolled_window_set_policy (scrolled_window, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtk_scrolled_window_set_shadow_type (scrolled_window, GTK_SHADOW_IN); -} - -static void -e_tree_scrolled_real_construct (ETreeScrolled *ets) -{ - gtk_container_add(GTK_CONTAINER(ets), GTK_WIDGET(ets->tree)); - - gtk_widget_show(GTK_WIDGET(ets->tree)); -} - -gboolean -e_tree_scrolled_construct (ETreeScrolled *ets, - ETreeModel *etm, - ETableExtras *ete, - const gchar *spec, - const gchar *state) -{ - g_return_val_if_fail(ets != NULL, FALSE); - g_return_val_if_fail(E_IS_TREE_SCROLLED(ets), FALSE); - g_return_val_if_fail(etm != NULL, FALSE); - g_return_val_if_fail(E_IS_TREE_MODEL(etm), FALSE); - g_return_val_if_fail(ete == NULL || E_IS_TABLE_EXTRAS(ete), FALSE); - g_return_val_if_fail(spec != NULL, FALSE); - - if (!e_tree_construct (ets->tree, etm, ete, spec, state)) - return FALSE; - - e_tree_scrolled_real_construct(ets); - - return TRUE; -} - -GtkWidget *e_tree_scrolled_new (ETreeModel *etm, - ETableExtras *ete, - const gchar *spec, - const gchar *state) -{ - ETreeScrolled *ets; - - g_return_val_if_fail(etm != NULL, NULL); - g_return_val_if_fail(E_IS_TREE_MODEL(etm), NULL); - g_return_val_if_fail(ete == NULL || E_IS_TABLE_EXTRAS(ete), NULL); - g_return_val_if_fail(spec != NULL, NULL); - - ets = E_TREE_SCROLLED (gtk_widget_new (e_tree_scrolled_get_type (), - "hadjustment", NULL, - "vadjustment", NULL, - NULL)); - - if (!e_tree_scrolled_construct (ets, etm, ete, spec, state)) { - g_object_unref (ets); - return NULL; - } - - return GTK_WIDGET (ets); -} - -gboolean -e_tree_scrolled_construct_from_spec_file (ETreeScrolled *ets, - ETreeModel *etm, - ETableExtras *ete, - const gchar *spec_fn, - const gchar *state_fn) -{ - g_return_val_if_fail(ets != NULL, FALSE); - g_return_val_if_fail(E_IS_TREE_SCROLLED(ets), FALSE); - g_return_val_if_fail(etm != NULL, FALSE); - g_return_val_if_fail(E_IS_TREE_MODEL(etm), FALSE); - g_return_val_if_fail(ete == NULL || E_IS_TABLE_EXTRAS(ete), FALSE); - g_return_val_if_fail(spec_fn != NULL, FALSE); - - if (!e_tree_construct_from_spec_file (ets->tree, etm, ete, spec_fn, state_fn)) - return FALSE; - - e_tree_scrolled_real_construct(ets); - - return TRUE; -} - -GtkWidget *e_tree_scrolled_new_from_spec_file (ETreeModel *etm, - ETableExtras *ete, - const gchar *spec_fn, - const gchar *state_fn) -{ - ETreeScrolled *ets; - - g_return_val_if_fail(etm != NULL, NULL); - g_return_val_if_fail(E_IS_TREE_MODEL(etm), NULL); - g_return_val_if_fail(ete == NULL || E_IS_TABLE_EXTRAS(ete), NULL); - g_return_val_if_fail(spec_fn != NULL, NULL); - - ets = E_TREE_SCROLLED (gtk_widget_new (e_tree_scrolled_get_type (), - "hadjustment", NULL, - "vadjustment", NULL, - NULL)); - if (!e_tree_scrolled_construct_from_spec_file (ets, etm, ete, spec_fn, state_fn)) { - g_object_unref (ets); - return NULL; - } - - return GTK_WIDGET (ets); -} - -ETree * -e_tree_scrolled_get_tree (ETreeScrolled *ets) -{ - return ets->tree; -} - -static void -ets_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) -{ - ETreeScrolled *ets = E_TREE_SCROLLED (object); - - switch (prop_id) { - case PROP_TREE: - g_value_set_object (value, ets->tree); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -/* Grab_focus handler for the scrolled ETree */ -static void -ets_grab_focus (GtkWidget *widget) -{ - ETreeScrolled *ets; - - ets = E_TREE_SCROLLED (widget); - - gtk_widget_grab_focus (GTK_WIDGET (ets->tree)); -} - -/* Focus handler for the scrolled ETree */ -static gint -ets_focus (GtkWidget *container, GtkDirectionType direction) -{ - ETreeScrolled *ets; - - ets = E_TREE_SCROLLED (container); - - return gtk_widget_child_focus (GTK_WIDGET (ets->tree), direction); -} - -static void -e_tree_scrolled_class_init (ETreeScrolledClass *class) -{ - GObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - object_class->get_property = ets_get_property; - - widget_class->grab_focus = ets_grab_focus; - - widget_class->focus = ets_focus; - - g_object_class_install_property (object_class, PROP_TREE, - g_param_spec_object ("tree", - _( "Tree" ), - _( "Tree" ), - E_TREE_TYPE, - G_PARAM_READABLE)); -} - diff --git a/widgets/table/e-tree-scrolled.h b/widgets/table/e-tree-scrolled.h deleted file mode 100644 index 197dd9a083..0000000000 --- a/widgets/table/e-tree-scrolled.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see <http://www.gnu.org/licenses/> - * - * - * Authors: - * Chris Lahey <clahey@ximian.com> - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifndef _E_TREE_SCROLLED_H_ -#define _E_TREE_SCROLLED_H_ - -#include <gtk/gtk.h> -#include <table/e-tree-model.h> -#include <table/e-tree.h> - -G_BEGIN_DECLS - -#define E_TREE_SCROLLED_TYPE (e_tree_scrolled_get_type ()) -#define E_TREE_SCROLLED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TREE_SCROLLED_TYPE, ETreeScrolled)) -#define E_TREE_SCROLLED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TREE_SCROLLED_TYPE, ETreeScrolledClass)) -#define E_IS_TREE_SCROLLED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TREE_SCROLLED_TYPE)) -#define E_IS_TREE_SCROLLED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TREE_SCROLLED_TYPE)) - -typedef struct { - GtkScrolledWindow parent; - - ETree *tree; -} ETreeScrolled; - -typedef struct { - GtkScrolledWindowClass parent_class; -} ETreeScrolledClass; - -GType e_tree_scrolled_get_type (void); - -gboolean e_tree_scrolled_construct (ETreeScrolled *ets, - ETreeModel *etm, - ETableExtras *ete, - const gchar *spec, - const gchar *state); -GtkWidget *e_tree_scrolled_new (ETreeModel *etm, - ETableExtras *ete, - const gchar *spec, - const gchar *state); - -gboolean e_tree_scrolled_construct_from_spec_file (ETreeScrolled *ets, - ETreeModel *etm, - ETableExtras *ete, - const gchar *spec_fn, - const gchar *state_fn); -GtkWidget *e_tree_scrolled_new_from_spec_file (ETreeModel *etm, - ETableExtras *ete, - const gchar *spec_fn, - const gchar *state_fn); - -ETree *e_tree_scrolled_get_tree (ETreeScrolled *ets); - -G_END_DECLS - -#endif /* _E_TREE_SCROLLED_H_ */ |