Commit Graph

17 Commits

Author SHA1 Message Date
6bf0ba97e2 Use xmlMemStrdup() to override the type as it's expected to be allocated
* e-shortcuts.c (load_shortcuts): Use xmlMemStrdup() to override
the type as it's expected to be allocated by libxml later on.
Also, get the icon for the storage if the shortcut points to a
storage.

* e-storage-set-view.c (etree_icon_at): Don't special case the
Summary storage.  Rather, use `e_storage_get_toplevel_node_type()'
for getting the type of the node.

* e-shortcuts-view-model.c (get_icon_for_item): New helper
function.
(shortcuts_update_shortcut_cb): Use it.
(shortcuts_new_shortcut_cb): Use it.
(load_group_into_model): Use it.

svn path=/trunk/; revision=12232
2001-08-20 01:22:09 +00:00
385ba85d42 [Removing Evolution::LocalStorage interface, abstracting the unread counts
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
2001-08-03 23:08:38 +00:00
8a9d50f560 [The following makes the shell able to create the `shortcuts.xml'
file by itself when the file is not present or corrupted.  Fixes
#3668, failure to handle malformed shortcuts.xml file.]

* e-shell.c (e_shell_construct): If the `e_shortcuts_new()'
returns an object with no shortcuts in it, fill it in with
`e_shortcuts_add_default_group()'.

* e-shortcuts.c: New member `num_groups' in EShortcutsPrivate.
(init): Init to zero.
(e_shortcuts_add_group): Increment.
(e_shortcuts_remove_group): Decrement.
(e_shortcuts_get_num_groups): New.
(e_shortcuts_add_default_group): New function to set up the
default shortcuts.
(e_shortcuts_new): Return an empty EShortcuts object if loading
the file files, instead of returning NULL.

svn path=/trunk/; revision=10744
2001-07-03 13:29:12 +00:00
8fc1cb82fe Implemented a "Rename Group" command. Unfortunately, it doesn't work
very well due to EShortcutBar breakage.  But we'll fix that later.

svn path=/trunk/; revision=10653
2001-07-01 07:12:56 +00:00
6077a94d84 Change EShortcuts to not use group titles to access specific groups.
Also, allow more than one group with the same title.

svn path=/trunk/; revision=10652
2001-07-01 06:25:43 +00:00
d6372c9ae9 This is a first shoot at making shortcuts renameable [#3719];
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-30 02:28:44 +00:00
019a20555b Change EShortcuts to use GSLists instead of GLists.
svn path=/trunk/; revision=10615
2001-06-30 00:15:11 +00:00
8f366de2a4 (Fixing bug #1299: Shell saves shortcuts when display name changes)
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-06-05 17:10:32 +00:00
f7926820ed Remove <config.h> #includes from the `.h' files, which is known to be,
um, a wrong thing to do.

svn path=/trunk/; revision=7983
2001-02-05 20:45:36 +00:00
0b8f99546e Update copyrights for files modified in year 2001.
svn path=/trunk/; revision=7872
2001-01-28 10:46:00 +00:00
fb06ffa383 (Bug #883: Shortcut bar does not update when a folders display name
2001-01-17  Jason Leach  <jasonleach@usa.net>

	(Bug #883: Shortcut bar does not update when a folders display
	 name changes)

	 * e-local-storage.c (class_init): Define a new "folder_updated"
	 signal here.
	 (bonobo_interface_update_folder_cb): Emit the new folder_updated
	 signal here.

	 * e-shell-view.c (e_shell_view_construct): Connect the
	 EShell::ELocalStorage folder_updated signal here.  Also connect
	 the updated_folder signal coming from EShell::EStorageSet to the
	 new callback.

	 * e-shell-view.c (folder_updated_cb): Callback that actually
	 initiates the shell updating.

	 * e-shortcuts.c (e_shortcuts_update_shortcut_by_uri): New
	 function.  Given a uri for a shortcut bar item, we'll update it.

	 * e-shortcuts.c (e_shortcuts_remove_shortcut_by_uri): New
	 function.  Given a uri for a shortcut bar item, we'll remove it.

	 * e-shortcuts.c (removed_folder_cb): Connect this callback that
	 will remove a renamed vfolder from the shortcut bar.  Temporary
	 fix to the problem of renaming vfolders and having the shortcut
	 bar think the old vfolder still exists.

	 (Bug #1168: Shortcut bar and icon size persistence)

	 * e-shell-view.c (save_shortcut_bar_icon_modes): New static
	 function, save the icon modes (for all shortcut bar groups, even
	 though we only have one group now).
	 (load_shortcut_bar_icon_modes): New static function, load the
	 saved shortcut bar group icon modes and apply them to our
	 shortcut bar.

svn path=/trunk/; revision=7639
2001-01-19 07:36:55 +00:00
a75e971a55 Update the shortcut bar in the shell view to match the changes in the
way drag and drop is handled.  Separate the handling for the view into
a separate object.

This should make the shortcut bar work again, but it's untested.

svn path=/trunk/; revision=5575
2000-09-25 19:11:15 +00:00
a718dec073 Implemented right-click menus for the shell's shortcut bar (the user
can remove shortcuts now) and added status bar to the shell view.
Also, added an API call to EShortcutBar to get the view type for a
specified group.

svn path=/trunk/; revision=3318
2000-06-01 00:56:00 +00:00
bdf6f37a8a Added a title bar for the folder view. Removed title bar from the
shortcut view.  Made shortcuts behave correctly when moved around.
Also, implemented automatic re-saving of the shortcuts when they
change.

svn path=/trunk/; revision=3276
2000-05-30 06:32:14 +00:00
bb241192eb Reorganized the shell to allow dynamic registration of storages and
folder types, and changed all the components to work with the new
setup.

svn path=/trunk/; revision=3199
2000-05-25 05:55:59 +00:00
e927ce214f Fixed drag and drop so that it properly handles pointer grabbing in
the widget with `gtk_grab_add' and `gtk_grab_remove'.  Removed leaks
from Iain's patch.  Moved shortcut view initialization from the model
into the view.

svn path=/trunk/; revision=3047
2000-05-15 17:09:44 +00:00
725d0a088d Big shell reorganization.
svn path=/trunk/; revision=2848
2000-05-07 01:57:49 +00:00