* e-shell-view.c (e_shell_view_remove_control_for_uri): Ooops.
Save the pointer to the control for use after the view struct is
freed.
svn path=/trunk/; revision=12458
* e-shell-view.c: New struct `View'. Replace `uri_to_control' in
`EShellViewPrivate' with `uri_to_view'.
(view_new): New.
(hash_forall_destroy_view): New, replacing
`hash_forall_destroy_control'.
(destroy): Updated to match the uri_to_control -> uri_to_view
changes.
(socket_destroy_cb): Likewise.
(get_view_for_uri): Renamed from `get_control_for_uri'. Return a
View instead of a GtkWidget.
(show_existing_view): Updated to use `get_view_from_uri', get a
@view instead of a @control.
(e_shell_view_display_uri): Updated to use `uri_to_view' instead
of `uri_to_control'.
(e_shell_view_remove_control_for_uri): Likewise.
svn path=/trunk/; revision=12457
* e-shell-view.c (update_folder_title_bar): Changed to get a
@title and a @type.
(update_for_current_uri): Updated accordingly.
(update_window_icon): Get a @type instead of a @folder.
(update_for_current_uri): Updated accordingly.
svn path=/trunk/; revision=12452
* e-shell-view.c (socket_destroy_cb): If the view belongs to a
toplevel storage node, get the right type information with
`e_storage_get_toplevel_node_uri()' instead of trying to get the
[non-existing] folder for it.
svn path=/trunk/; revision=12451
* e-shell-view.c (e_shell_view_load_settings): Don't set the
paneds' positions if the respective left-hand elements [i.e. the
shortcut bar and the folder bar] are hidden.
(e_shell_view_show_folder_bar): Set the paned position to zero
when hiding.
(e_shell_view_show_shortcut_bar): Likewise.
svn path=/trunk/; revision=12321
* e-shell-view.c (setup_storage_set_subwindow): Don't show the
vbox here.
(setup_widgets): Don't show the storage_set_view_box here.
svn path=/trunk/; revision=12246
* e-shell-view.c: New constant `MIN_POPUP_TREE_WIDTH'.
(pop_up_folder_bar): Make sure the pop-up is always this size or
more.
(setup_widgets): Pass %FALSE for @shrink to `e_paned_pack1()'.
(reparent_storage_set_view_box_and_destroy_popup): Likewise.
svn path=/trunk/; revision=12211
* e-shell-view-menu.c (shortcut_bar_visibility_changed_cb): New,
replacing `shortcut_bar_mode_changed_cb'.
(folder_bar_visibility_changed_cb): New, replacing
`folder_bar_mode_changed_cb'.
(command_toggle_folder_bar): Use `e_shell_view_show_folder_bar()'
instead of `e_shell_view_set_folder_bar_mode()'.
(command_toggle_shortcut_bar): Use
`e_shell_view_show_shortcut_bar()' instead of
`e_shell_view_set_shortcut_bar_mode()'.
(e_shell_view_menu_setup): Updated for the
"shortcut_bar_visibility_changed" and
"folder_bar_visibility_changed" signals and the above changes.
* e-shell-view.c: New member `folder_bar_popup' in
`EShellViewPrivate'. Replaced `folder_bar_mode' and
`shortcut_bar_mode' with `folder_bar_shown' and
`shortcut_bar_shown', respectively.
(init): Updated to initialize these correctly.
(reparent): New helper function.
(reparent_storage_set_view_box_and_destroy_popup): New helper
function.
(popdown_transient_folder_bar): Updated to use the
`folder_bar_popup'.
(folder_bar_popup_map_callback): Renamed from
`storage_set_view_box_map_cb'.
(e_shell_view_set_shortcut_bar_mode): Removed.
(e_shell_view_set_folder_bar_mode): Removed.
(e_shell_view_show_shortcut_bar): New. All the calls to
`e_shell_view_set_shortcut_bar_mode()' replaced with calls to this
one.
(e_shell_view_show_folder_bar): New. All the calls to
`e_shell_view_set_folder_bar_mode()' replaced with calls to this
one.
(e_shell_view_folder_bar_shown): New. All the calls to
`e_shell_view_get_folder_bar_mode()' replaced with calls to this
one.
(e_shell_view_shortcut_bar_shown): New. All the calls to
`e_shell_view_get_shortcut_bar_mode()' replaced with calls to this
one.
(class_init): Replace signal `folder_bar_mode_changed' with
`folder_bar_visibility_changed' and `shortcut_bar_mode_changed'
with `shortcut_visibility_changed'.
(e_shell_view_save_settings): Use keys "ShortcutBarShown" and
"FolderBarShown" instead of "ShortcutBarMode" and "FolderBarMode",
respectively.
(e_shell_view_load_settings): Likewise.
* e-shell-view.h: Removed enum `EShellViewSubwindowMode'. Renamed
signal `shortcut_bar_mode_changed' to
`shortcut_bar_visibility_changed' and `folder_bar_mode_changed' to
`folder_bar_visibility_changed'.
svn path=/trunk/; revision=12203
2001-08-16 Jason Leach <jleach@ximian.com>
* e-shell-view.c (folder_selected_cb): Desensitize the
move/copy/delete/rename in the menus (including right click) for
stock folders.
* Evolution-Icon.idl: Actually remove this file from CVS (its
contents are now in Evolution-common.idl).
svn path=/trunk/; revision=12139
* e-shell-view.c (setup_widgets): Put the folder title bar into an
EGrayBar.
* e-gray-bar.c: New.
* e-gray-bar.h: New.
svn path=/trunk/; revision=11932
* evolution-test-component.c (user_create_new_item_callback):
Updated to display the parent folder's URI and its type as well.
* evolution-shell-component.c (impl_userCreateNewItem): Updated to
get the @parent_folder_physical_uri and the @parent_folder_type.
(class_init): Update the "user_create_new_item" signal to have
@parent_folder_physical_uri and @parent_folder_type args.
* e-shell-view.c (get_type_for_folder): Don't bork on a NULL
@physical_uri_return.
(e_shell_view_get_current_physical_uri): New.
(e_shell_view_get_current_folder_type): New.
* e-shell-user-creatable-items-handler.c
(e_shell_user_creatable_items_handler_setup_menus): Replace
@ui_component arg with a @shell_view arg. Set it on the
UIComponent using gtk_object_set_data().
(verb_fn): Pass the type and physical URI of the current folder;
retrieve that from the shell_view got with gtk_object_get_data().
* Evolution-ShellComponent.idl
(userCreateNewItem): New args @parent_folder_uri,
@parent_folder_type.
svn path=/trunk/; revision=11863
* e-shell-view.c (e_shell_view_construct): Add the menu items
using the EShellUserCreatableItemsHandler.
* e-shell-user-creatable-items-handler.c: New.
* e-shell-user-creatable-items-handler.h: New.
* e-shell.c: New member `user_creatable_items_handler' in
`EShellPrivate'.
(init): Initialize to NULL.
(destroy): Unref.
(e_shell_construct): Create here.
(e_shell_get_user_creatable_items_handler): New accessor.
(setup_components): Add the registered components to the
user_creatable_items_handler.
* evolution-test-component.c (factory_fn): Add a couple sample
user-creatable items.
(user_create_new_item_callback): New callback for the
"user_create_new_item" signal on the EvolutionShellComponent.
(factory_fn): Connect.
* e-shell.c (e_shell_get_component_registry): New.
* evolution-shell-component.c: New enum value
`USER_CREATE_NEW_ITEM'. New member `user_create_item_types' in
`_EvolutionShellComponentPrivate'.
(init): Init to NULL.
(impl_destroy): Free it.
(user_creatable_item_type_free): New helper function.
(user_creatable_item_type_new): New helper function.
(impl_userCreateNewItem): New, implementation for
::userCreateNewItem.
(class_init): Install the "user_create_new_item" signal and the
userCreateNewItem impl.
(impl__get_external_uri_schemas): Renamed from
`impl_ShellComponent__get_external_uri_schemas'.
(impl___get_supported_types): Renamed from
`impl_ShellComponent__get_supported_types'.
(impl__get_user_creatable_item_types): New, implementation for the
`user_creatable_item_types' attribute.
(class_init): Install it.
(evolution_shell_component_add_user_creatable_item): New.
* evolution-shell-component.h: Added signal
`user_create_new_item'.
* Evolution-ShellComponent.idl: Added typedefs
`UserCreatableItemType', `UserCreatableItemTypeList'. New
attribute `user_creatable_item_types'.
(userCreateNewItem): New.
svn path=/trunk/; revision=11849
2001-08-03 Jason Leach <jleach@ximian.com>
[Removing Evolution::LocalStorage interface, abstracting the
unread counts from a folder's name, also abstract unread counts
from a shortcut's name. Fixes#4489 and #5497]
* e-shortcuts.c (shortcut_item_new): Take an unread_count argument
now.
(shortcut_item_update): Ditto.
* e-shortcuts-view-model.c (get_name_with_unread): Get a string
containing a shortcut name and it's unread, because these are
abstracted now.
(load_group_into_model): Use the above function to make shortcuts
that have unread counts.
* e-storage-set-view.c (update_folder_with_unread_hash): Keep a
hash of folder names with unread counts, because the folder name
and it's unread count are to be separated, only the ETree is
supposed to present it as one string.
* e-shell-view.c: Renamed EShellView::view_title_bar to
folder_title_bar, to closer match the
* e-shell-view-menu.c (new_shortcut_dialog_folder_selected_cb):
Make a shortcut with the unread count.
* e-shell-folder-commands.c (e_shell_command_add_to_shortcut_bar):
Make a shortcut with the unread count.
* e-local-storage.c: Updated for API changes.
* e-folder.c (e_folder_get_unread_count): New function, does what
it says.
(e_folder_set_unread_count): Ditto.
* e-corba-storage.c (impl_StorageListener_new_folder): Renamed to
match the IDL function name.
(impl_StorageListener_update_folder): Ditto.
(impl_StorageListener_removed_folder): Ditto.
* Evolution-Storage.idl (struct Folder): Replace the boolean
highlighted with a long unread_count.
(updateFolder): Brought in from the now dead
Evolution::LocalStorage.
* Evolution-Shell.idl (getLocalStorage): Return a Storage instead
of a LocalStorage.
* Evolution-LocalStorage.idl: Removed, no longer needed, only used
function, updateFolder, has been moved into Evolution::Storage
interface.
* evolution-local-storage.[ch]: Ditto.
* evolution-storage.c (impl_Storage_updateFolder): Implementation
of the updateFolder taken from ::LocalStorage.
(class_init): New "update_folder" signal, taken from
evolution-local-storage.c too.
(evolution_storage_update_folder): Take an @unread_count int
instead of a @highlighted boolean.
(evolution_storage_new_folder): Same for here.
(evolution_storage_update_folder_by_uri): And here.
* evolution-storage-listener.h: "update_folder" signal no longer
sends a @highlighted boolean.
2001-08-03 Jason Leach <jleach@ximian.com>
* e-shell-view-menu.c (update_offline_menu_item): Use Jakub's new
"Work Online" icon and fix a typo.
svn path=/trunk/; revision=11633
* e-shell-view.c (switch_on_folder_tree_click): Set the
`set_folder_uri' to NULL when freeing it.
* e-task-bar.c (e_task_bar_remove_task): Just destroy the widget.
No need to `gtk_container_remove()' it.
svn path=/trunk/; revision=11597
2001-07-25 Jason Leach <jleach@ximian.com>
* Makefile.am (INCLUDES): $(BONOBO_CONF_CFLAGS) was here twice,
took out one of them.
* e-shell-view.c (socket_destroy_cb): Mem leak fix. Thanks to the
amazing Jacob B. Bug #5054.
svn path=/trunk/; revision=11402
2001-07-20 Jason Leach <jleach@ximian.com>
[Fix a crash if you start evolution with a bad URI.]
* e-shell.c (e_shell_create_view): If we can't display the URI,
display the default uri. This is because it's necessary for
e_shell_view_display_uri() to run all the way through so corba
interfaces get setup.
* e-shell-view.c (e_shell_view_display_uri): If we fail to create
a new view for a URI (happens if you pass in an invalid URI), be
sure to return FALSE.
svn path=/trunk/; revision=11290
2001-07-19 Jason Leach <jleach@ximian.com>
* e-local-storage.h: Make the local storage name "Local Folders"
instead of "local", looks better with "My Evolution", "VFolders",
and "Other Contacts".
* e-shell-view.h: Put the #define DEFAULT_URI here instead of in
e-shell-view.c.
* main.c: Remove the duplicated #define STARTUP_URI, actually make
use of the nice defines.
* e-shell-folder-commands.c (e_shell_command_delete_folder): Use
the DEFAULT_URI here instead of a hard coded string.
* e-shortcuts.c (e_shortcuts_add_default_group): Fix the URI's
here to use "Local Folder".
svn path=/trunk/; revision=11241
2001-07-19 Jason Leach <jleach@ximian.com>
* e-shell-folder-title-bar.c (e_shell_folder_title_bar_construct):
Line up the padding for the folder title bar labels when you have
the folder bar enabled or disabled (previously when disabled it
was padding ~8 pixels to the right while the other had 0).
* e-shell-view.c (setup_widgets): Take out a 2 pixel padding
around the vbox containing the title bar, folder bar, message list
and mail display. Also remove 2 more extra pixels of padding on
the bottom.
svn path=/trunk/; revision=11238
2001-07-11 Jason Leach <jleach@ximian.com>
* e-shell-view.c (e_shell_view_save_settings): Make sure to create
~/evolution/config/ if it doesn't exist. (ShellView settings get
saved before component settings, so when the mailer comes around
to saving ETree stuff, this dir will be there). Fixes bug #4279.
svn path=/trunk/; revision=10991
2001-07-09 Jason Leach <jleach@ximian.com>
* e-shell-view.c (updated_folder_cb): It's very possible that
get_storage_set_path_from_uri() returns NULL (5 of the 6 return
cases), so check that it's not NULL before trying to strcmp() it.
Fixes a startup crash.
svn path=/trunk/; revision=10935
* e-shortcuts.c (shortcut_item_update): Return a gboolean saying
whether or not the shortcut changed. Use strcmp rather than
pointer comparisons to determine this.
(update_shortcut_and_emit_signal): propagate the gboolean from
shortcut_item_update (and only emit the signal if it's TRUE).
(update_shortcuts_by_path): Only call make_dirty if something
changed.
(storage_set_new_folder_callback,
storage_set_updated_folder_callback): Don't call make_dirty:
update_shortcuts_by_path will have called it if necessary.
* e-shell-view.c (updated_folder_cb): Don't call
update_for_current_uri if the folder that was updated isn't the
one being displayed.
svn path=/trunk/; revision=10912
* e-shell-view.c (socket_destroy_cb): Fix Jason's broken fix for
#3205 that was causing #3643. It is not safe to strcmp() the
return value from `e_shell_view_get_current_uri()' as it might be
NULL already.
svn path=/trunk/; revision=10739
work (I had removed a line by mistake), and fix a crash that would
happen if user opened a new view, closed it and then created a new
folder.
svn path=/trunk/; revision=10657
type and a name too. The name will allow renaming shortcuts (thus
decoupling the name of the folder the shortcuts points to from the
name of the shortcut); the type member is used to cache the type of
the folder we point to so that we can still display the right icon
even if the folder is currently not in the storage (e.g. this happens
for IMAP folders when you haven't opened the corresponding IMAP node
yet).
I don't like the way this is designed at all (mainly, the
responsibility for saving the values should be moved elsewhere), but
I'll fix it later.
Also, I added an "Open in New Window" right-click menu item for
shortcuts.
svn path=/trunk/; revision=10649
unfinished. Also, it causes the shortcut bar to stop displaying
message unread count, but this is unfixable until we get rid of the
::LocalStorage interface, which should hopefully happen soon.
svn path=/trunk/; revision=10621
2001-06-25 jacob berkman <jacob@ximian.com>
* e-shell-view.c: (set_folder_timeout): display a selected uri in
a timeout rather than right away, so the UI feels a bit more
responsive, and the tree is more navigable via keyboard
(switch_on_folder_tree_click): use the timeout rather than setting
the URI right away
(destroy): remove the timeout if it still exists
(update_for_current_uri): if there is a timeout set, don't update
(e_shell_view_display_uri): remove the timeout if it exists
svn path=/trunk/; revision=10490
(Implemented deleting folders in the shell. Files changed that aren't
noted below were simply small indentation/space changes. To play
with deleting folders, right click on a selected folder in the folder
tree, then choose Delete.)
2001-06-23 Jason Leach <jleach@ximian.com>
* e-shell-folder-selection-dialog.c
(e_shell_folder_selection_dialog_construct): Make the folder tree
have a similar expanded state as the shell's folder tree.
* e-local-storage.c (remove_folder): New function that does the
meat of actual deletion stuff.
(remove_folder_directory): A helper function that remove_folder()
uses.
(component_async_remove_folder_callback): A new callback to do the
removing stuff from shell (if there weren't errors from the
component).
(impl_async_remove_folder): Implemented this.
* evolution-shell-component-client.c
(evolution_shell_component_client_async_remove_folder):
Implemented this.
* e-shell-view.c (e_shell_view_remove_control_for_uri): New
function.
svn path=/trunk/; revision=10446
e_shell_view_{get,set}_current_shortcuts_group_num() at the bottom of
the file, add pre-conditions to them, and reindent the header file
slightly.
svn path=/trunk/; revision=10444
background tasks. The Activity interface is added to the shell, and
the status of the various tasks is now displayed in a task bar widget
at the bottom of the EShellView.
I also implemented a simple test component to test all this stuff.
svn path=/trunk/; revision=10434
2001-06-13 Not Zed <NotZed@Ximian.com>
* e-shell-view.c (switch_on_folder_tree_click): Check priv->uri
isn't null before strcmp'ing it here too.
svn path=/trunk/; revision=10206
* e-shell-view.c (destroy): Don't destroy the
offline_toggle_pixmap: the offline_toggle 0wnz it.
(update_for_current_uri): Check priv->uri isn't NULL before
strcmp()ing it.
svn path=/trunk/; revision=10187
2001-06-06 Jason Leach <jleach@ximian.com>
(Fix bug #3205: Component crash causes folder switch even when not
needed)
* e-shell-view.c (socket_destroy_cb): Only flip around the
ShellView to different folders when we're currently viewing the
URI that's being closed/crashed.
svn path=/trunk/; revision=10137
2001-06-06 Jason Leach <jleach@ximian.com>
(Fix bug #418: Save state of folder tree view)
* e-shell-view.c (e_shell_view_save_settings): Changed the char *
@prefix argument to an int @view_num.
(e_shell_view_load_settings): Ditto.
(get_local_prefix_for_view): New function that gets us a prefix
from a view_num.
* e-shell-view.c (e_shell_view_save_settings): Save the
expanded/collapsed information for each storage-set-view here.
(e_shell_view_load_settings): Load it here.
* e-storage-set-view.c (e_storage_set_view_construct): Make it so
new storage set views have their storages expanded by default, but
will respsect the expanded state information that we load into it.
(insert_storages): Minor change here too.
(new_folder_cb): Ditto.
svn path=/trunk/; revision=10135
2001-06-04 Jason Leach <jleach@ximian.com>
(Fixing bug #1299: Shell saves shortcuts when display name
changes)
* e-shortcuts.c (class_init): New signal: "update_shortcut".
* e-shortcuts-view-model.c (e_shortcuts_view_model_construct):
Connect thew new signal here.
* e-shortcuts-view-model.c (shortcuts_update_shortcut_cb): New
function, uses the new e_shortcut_model_update_item().
* e-shell-view.c (corba_interface_set_folder_bar_label): Fix a
warning here.
svn path=/trunk/; revision=10116
2001-05-30 Jason Leach <jleach@ximian.com>
* e-shell-view.c (e_shell_view_set_current_shortcuts_group_num):
New function (probably should just be static).
(e_shell_view_load_settings): Load the current shortcut group here
using the above new function.
(e_shell_view_save_settings): Save current shortcut group in here.
2001-05-30 Jason Leach <jleach@ximian.com>
* e-shell-folder-title-bar.c: New 'folder_bar_label' member for
EShellFolderTitleBar, it's for information that's shown to the
left of the icon like the dates in the calendar (or, potentially
total and unread numbers for mailer).
(e_shell_folder_title_bar_set_folder_bar_label): New function,
lets others set the title bar extra label.
* Evolution-ShellView.idl: New method 'setFolderBarLabel' for our
exposed ShellView interface.
* evolution-shell-view.c (class_init): New signal
"set_folder_bar_label" for EvolutionShellViewClass.
* evolution-shell-view.c (impl_ShellView_set_folder_bar_label):
Emit the new signal here.
* e-shell-view.c (setup_corba_interface): Connect the signal here.
* e-shell-view.c (corba_interface_set_folder_bar_label): New
function, callback for the above signals, does the actual extra
label setting for the folder title bar.
* e-shell-folder-commands.c (e_shell_command_add_to_shortcut_bar):
Fix a warning here.
svn path=/trunk/; revision=10059
2001-05-30 Jason Leach <jleach@ximian.com>
* e-shell.c (e_shell_construct): Removed an unecessary sleep(2)
call, so evolution will start up 2 seconds faster now.
2001-05-30 Jason Leach <jleach@ximian.com>
* e-shell-view-menu.c: Connect the AddFolderToShortcutBar verb to
their implementation functions.
* e-shell-view.c (e_shell_view_get_current_shortcuts_group_num):
New function, use it to find out which shourtcut group is
currently open on the shortcut bar.
* e-shell-folder-commands.c (e_shell_command_add_to_shortcut_bar):
Implement this using new function described above.
svn path=/trunk/; revision=10052