Placate compiler.
* e-shell-view-menu.c (launch_pilot_settings): Placate compiler. * e-shell-folder-commands.c (xfer_result_callback): When FOLDER_COMMAND_MOVE, update the shortcuts by using e_shortcuts_update_shortcuts_for_changed_uri(). * e-shortcuts.c (e_shortcuts_update_shortcuts_for_changed_uri): New. svn path=/trunk/; revision=18206
This commit is contained in:
@ -1,3 +1,17 @@
|
||||
2002-09-24 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
[Fix #11645 for menu-based folder move operations. Still requires
|
||||
fixage for the DnD case.]
|
||||
|
||||
* e-shell-view-menu.c (launch_pilot_settings): Placate compiler.
|
||||
|
||||
* e-shell-folder-commands.c (xfer_result_callback): When
|
||||
FOLDER_COMMAND_MOVE, update the shortcuts by using
|
||||
e_shortcuts_update_shortcuts_for_changed_uri().
|
||||
|
||||
* e-shortcuts.c (e_shortcuts_update_shortcuts_for_changed_uri):
|
||||
New.
|
||||
|
||||
2002-09-24 Dan Winship <danw@ximian.com>
|
||||
|
||||
* e-shell.c (folder_selection_dialog_folder_selected_cb): Don't
|
||||
|
||||
@ -149,6 +149,21 @@ xfer_result_callback (EStorageSet *storage_set,
|
||||
g_free (msg);
|
||||
}
|
||||
|
||||
if (folder_command_data->command == FOLDER_COMMAND_MOVE) {
|
||||
char *source_uri;
|
||||
char *destination_uri;
|
||||
|
||||
source_uri = g_strconcat (E_SHELL_URI_PREFIX, folder_command_data->source_path, NULL);
|
||||
destination_uri = g_strconcat (E_SHELL_URI_PREFIX, folder_command_data->destination_path, NULL);
|
||||
|
||||
e_shortcuts_update_shortcuts_for_changed_uri
|
||||
(e_shell_get_shortcuts (folder_command_data->shell),
|
||||
source_uri, destination_uri);
|
||||
|
||||
g_free (source_uri);
|
||||
g_free (destination_uri);
|
||||
}
|
||||
|
||||
folder_command_data_free (folder_command_data);
|
||||
}
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ launch_pilot_settings (const char *extra_arg)
|
||||
{
|
||||
char *args[] = {
|
||||
"gpilotd-control-applet",
|
||||
extra_arg,
|
||||
(char *) extra_arg,
|
||||
NULL
|
||||
};
|
||||
int pid;
|
||||
|
||||
@ -1236,5 +1236,40 @@ e_shortcuts_get_group_uses_small_icons (EShortcuts *shortcuts,
|
||||
return group->use_small_icons;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
e_shortcuts_update_shortcuts_for_changed_uri (EShortcuts *shortcuts,
|
||||
const char *old_uri,
|
||||
const char *new_uri)
|
||||
{
|
||||
EShortcutsPrivate *priv;
|
||||
GSList *p;
|
||||
|
||||
g_return_if_fail (E_IS_SHORTCUTS (shortcuts));
|
||||
g_return_if_fail (old_uri != NULL);
|
||||
g_return_if_fail (new_uri != NULL);
|
||||
|
||||
priv = shortcuts->priv;
|
||||
|
||||
for (p = priv->groups; p != NULL; p = p->next) {
|
||||
ShortcutGroup *group;
|
||||
GSList *q;
|
||||
|
||||
group = (ShortcutGroup *) p->data;
|
||||
for (q = group->shortcuts; q != NULL; q = q->next) {
|
||||
EShortcutItem *item;
|
||||
|
||||
item = (EShortcutItem *) q->data;
|
||||
|
||||
if (strcmp (item->uri, old_uri) == 0) {
|
||||
g_free (item->uri);
|
||||
item->uri = g_strdup (new_uri);
|
||||
|
||||
make_dirty (shortcuts);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
E_MAKE_TYPE (e_shortcuts, "EShortcuts", EShortcuts, class_init, init, PARENT_TYPE)
|
||||
|
||||
@ -156,6 +156,10 @@ void e_shortcuts_set_group_uses_small_icons (EShortcuts *shortcuts,
|
||||
gboolean e_shortcuts_get_group_uses_small_icons (EShortcuts *shortcuts,
|
||||
int group_num);
|
||||
|
||||
void e_shortcuts_update_shortcuts_for_changed_uri (EShortcuts *shortcuts,
|
||||
const char *old_uri_,
|
||||
const char *new_uri);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
Reference in New Issue
Block a user