Commit Graph

7390 Commits

Author SHA1 Message Date
cd76c782bd Miscellaneous cleanups. 2013-07-07 11:39:47 -04:00
f6de38811c Use gal_view_collection_get_user_directory() where needed.
GalViewInstance and EMailPanedView need access.  Currently they're just
using the public GalViewCollection members directly, but those are about
to be sealed up.
2013-07-05 16:40:50 -04:00
c6d3ced98a GalViewEtable: Remove ETableSpecification member.
Instead, lazily load the state file once an ETable or ETree is attached,
since we need its ETableSpecification to create an ETableState instance.

This means GalViewFactoryEtable can lose its ETableSpecification too.
2013-07-05 16:40:49 -04:00
31b5261fdb EShellView: Add a "view-instance" property.
EShellView now holds a reference to the active GalViewInstance.  Where
applicable, the EShellView subclass is responsible for keeping this up
to date when the sidebar selection changes.

Holding a reference allows EShellView to implement common actions like
"Save Current View" directly instead pushing it on to subclasses.

New functions:

  e_shell_view_get_view_instance
  e_shell_view_set_view_instance
2013-07-05 16:40:48 -04:00
f267827d67 ETableSpecification: Implement GInitable.
e_table_specification_new() now takes a table specification filename and
a GError and parses the file as part of instance creation.  If a file or
parse error occurs, e_table_specification_new() returns NULL.

This replaces e_table_specification_load_from_file().

New functions:

  e_table_specification_get_filename()

Removed functions:

  e_table_specification_load_from_file()
2013-07-02 10:34:12 -04:00
7329de1078 e-mail-reader-utils.c: Avoid e_tree_get_state().
Use e_tree_get_state_object() and e_tree_set_state_object() instead to
transfer state info from one ETree instance to another.
2013-07-02 10:34:12 -04:00
a5f7b4eef6 Remove e_tree_new_from_spec_file().
Also remove e_tree_construct_from_spec_file().

Use e_tree_new() or e_tree_construct() instead.
2013-07-02 10:34:11 -04:00
509fe26141 e_tree_new_from_spec_file: Remove unused "state_fn" parameter. 2013-07-02 10:34:11 -04:00
ad5ed0d603 ETableSortInfo: Rework API to avoid exposing ETableSortColumn.
Replace ETableSortColumn with separate ETableColumnSpecification and
GtkSortType parameters in the "get_nth" and "set_nth" functions.

Makes some other parts of the code simpler since it no longer has to
translate a column number to a column specification.
2013-07-02 10:34:10 -04:00
96b07a2ff0 ETableCol: Embed an ETableColumnSpecification.
Eliminates a few redundant fields.
2013-07-02 10:34:09 -04:00
05c04b5512 ETableState: Add a "specification" construct-only property.
ETableState now keeps a weak reference on the ETableSpecification to
which it's associated.  The plan is to replace the column index numbers
with a direct reference to an ETableColumnSpecification from the spec.

New functions:

  e_table_state_ref_specification()
2013-07-02 10:34:08 -04:00
3b5782afd6 Bug #689640 - Print Preview of composer text is empty 2013-07-02 13:30:51 +02:00
05f1d810f9 Set network-available on a CamelSession when going online
The network-available property was unset when going offline, but
never set again, which caused download of messages for offline use
broken, because it downloads for offline only if the network-available
is set.
2013-06-27 08:49:47 +02:00
43e5594f18 EMailPrintConfigHeaders: Derive from ETreeViewFrame.
EMailPrintConfigHeaders is pretty simple now that we delegate most
of the meat and potatoes tree view handling to our new parent class.
2013-06-25 14:44:11 -04:00
1f181f1e7b EMFolderTreeModel: Listen for "folder-info-stale" signals.
The signal indicates the folder tree for a particular store needs to be
reconstructed.  We do this by calling em_folder_tree_model_add_store().
2013-06-22 10:05:21 -04:00
04ffa1afb9 EMFolderTreeModel cleanups. 2013-06-22 09:36:50 -04:00
77346775da Bug 702710 - MessageList: Delay state capture for regen.
Delay capturing MessageList state for a regen operation until the idle
callback, so the caller has a chance to configure the MessageList first.

Also, move the CamelFolderThread into the private structure and provide
thread-safe internal accessor functions for it.
2013-06-21 14:34:06 -04:00
e8753f37f8 MessageList cleanups. 2013-06-21 14:34:02 -04:00
3c2e03fa5c extended_g_node_insert_before: Small correction. 2013-06-21 09:41:03 -04:00
26a0168f9e Bug 702796 - Work around GNode's O(N) tail insertions 2013-06-21 09:07:07 -04:00
6abeaa3223 Remove e_tree_row_count().
Reducing API bloat.  Do this instead:

  adapter = e_tree_get_table_adapter (tree);
  row_count = e_table_model_row_count (E_TABLE_MODEL (adapter));
2013-06-20 15:31:52 -04:00
662c1a21bf Remove e_tree_force_expanded_state().
Reducing API bloat.  Do this instead:

  adapter = e_tree_get_table_adapter (tree);
  e_tree_table_adapter_force_expanded_state (adapter, state);
2013-06-20 15:31:52 -04:00
68b0b10221 Remove e_tree_load_expanded_state_xml().
Reducing API bloat.  Do this instead:

  adapter = e_tree_get_table_adapter (tree);
  e_tree_table_adapter_load_expanded_state_xml (adapter, xml);
2013-06-20 15:31:52 -04:00
ebcb25def1 Remove e_tree_save_expanded_state_xml().
Reducing API bloat.  Do this instead:

  adapter = e_tree_get_table_adapter (tree);
  xml = e_tree_table_adapter_save_expanded_state_xml (adapter);
2013-06-20 15:31:52 -04:00
40da203f43 Remove e_tree_load_expanded_state().
Reducing API bloat.  Do this instead:

  adapter = e_tree_get_table_adapter (tree);
  e_tree_table_adapter_load_expanded_state (adapter, filename);
2013-06-20 15:31:52 -04:00
63a53b5aa4 Remove e_tree_save_expanded_state().
Reducing API bloat.  Do this instead:

  adapter = e_tree_get_table_adapter (tree);
  e_tree_table_adapter_save_expanded_state (adapter, filename);
2013-06-20 15:31:52 -04:00
792f0ba374 Remove e_tree_row_of_node().
Reducing API bloat.  Do this instead:

  adapter = e_tree_get_table_adapter (tree);
  row = e_tree_table_adapter_row_of_node (adapter, path);
2013-06-20 15:31:51 -04:00
43ffc445dd Remove e_tree_node_at_row().
Reducing API bloat.  Do this instead:

  adapter = e_tree_get_table_adapter (tree);
  path = e_tree_table_adapter_node_at_row (adapter, row);
2013-06-20 15:31:51 -04:00
0eaa11530b Remove e_tree_root_node_set_visible().
Reducing API bloat.  Do this instead:

  adapter = e_tree_get_table_adapter (tree);
  e_tree_table_adapter_root_node_set_visible (adapter, visible);
2013-06-20 15:31:51 -04:00
7742fe0860 Remove e_tree_node_is_expanded().
Reducing API bloat.  Do this instead:

  adapter = e_tree_get_table_adapter (tree);
  expanded = e_tree_table_adapter_node_is_expanded (adapter, path);
2013-06-20 15:31:51 -04:00
2f7f592d63 Remove e_tree_drag_dest_set().
Reducing API bloat.  Call gtk_drag_dest_set() directly instead.
2013-06-20 15:31:50 -04:00
de9391e246 Remove e_tree_selected_path_foreach().
Reducing API bloat.  Do this instead:

  selection = (ETreeSelectionModel *) e_tree_get_selection_model (tree);
  e_tree_selection_model_foreach (selection, callback, closure);
2013-06-20 15:31:50 -04:00
31c6240eeb Remove e_tree_selected_row_foreach().
Reducing API bloat.  Do this instead:

  selection = (ESelectionModel *) e_tree_get_selection_model (tree);
  e_selection_model_foreach (selection, callback, closure);
2013-06-20 15:31:50 -04:00
e0eb876c24 Make is_node_selectable() easier to debug. 2013-06-19 19:28:21 -04:00
6b6c02aa9c build_tree: Fix indentation. 2013-06-19 15:36:11 -04:00
86ff7f5d76 Remove unused message_list_invert_selection(). 2013-06-19 14:37:08 -04:00
457d2ea140 MessageList: Fix an unused variable warning. 2013-06-19 14:36:51 -04:00
a100a1588a Add e_tree_model_node_get_n_nodes().
Returns the total number of nodes in the tree model, including hidden
nodes in collapsed tree branches.
2013-06-19 14:15:25 -04:00
340c64e42d Bug 702454 - EMailBrowser fails to show message
This reworks the MessageList regen scheduling to be a little more
intuitive, at least to me.  We now set the RegenData immediately, but
start the actual regen operation from an idle callback.  That way the
caller has the remainder of this main loop iteration to make further
MessageList changes without triggering additional regens.

I think what was happening before was we were triggering multiple regen
operations as we were configuring the EMailBrowser, with each new regen
cancelling the previous, and the message UID to select wound up getting
paired with one of the cancelled regen operations.  This resulted in no
message UID ever getting selected in the EMailBrowser.
2013-06-17 10:18:02 -04:00
0c2b350db0 MessageList: Move more RegenData initialization into regen_data_new(). 2013-06-17 09:51:39 -04:00
6b4a736005 Remove e_tree_model_node_is_editable().
It always returned FALSE.
2013-06-15 20:19:38 -04:00
ad10f874c5 Remove e_tree_model_set_value_at().
Was never called.
2013-06-15 20:17:36 -04:00
bd6d0c3222 Remove e_tree_model_has_get_node_by_id().
It always returned TRUE.
2013-06-15 20:15:46 -04:00
6ee6427afd Remove e_tree_model_has_save_id().
It always returned TRUE.
2013-06-15 20:13:11 -04:00
5e8195693b Remove e_tree_model_icon_at().
It always returned NULL.
2013-06-15 20:10:06 -04:00
69de51a15a Convert ETreeModel to an interface.
This commit does a number of things which I could not subdivide into
smaller commits.

* Converts ETreeModel to an interface, implemented by MessageList.

* Drops ETreeMemory and ETreeMemoryCallbacks, which were ETreeModel
  subclasses.  Their functionality is subsumed by MessageList.

* MessageList drops its public ETreeModel pointer, since MessageList
  now implements ETreeModel as an interface.

* Adds message_list_set_expanded_default(), which takes over for
  e_tree_memory_set_expanded_default().
2013-06-15 20:10:06 -04:00
1dea0429cf Remove em_utils_uids_free().
No longer used.  We actually had this defined in two places.
2013-06-15 08:28:37 -04:00
3f39ab5f59 Remove em_utils_uids_copy().
No longer used.
2013-06-15 08:27:48 -04:00
9311500db8 Avoid em_utils_uids_free() in other places. 2013-06-15 08:26:18 -04:00
f642e03d49 message_list_get_selected: Give the returned array a free func.
The returned UID array now has a built-in "free" function for its
elements and should be released by callers with g_ptr_array_unref()
rather than em_utils_uids_free() or some equivalent.
2013-06-15 08:19:27 -04:00