aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-corba-shortcuts.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-07-10 03:49:15 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-07-10 03:49:15 +0800
commit4139f5b3ccabe156364d1999b793804094ac707d (patch)
treecae98a48a7dc52d7e190593fe80ba86d2682b6d1 /shell/e-corba-shortcuts.c
parent992fafd1905a462d10d0db219f7fd7d7dd717106 (diff)
downloadgsoc2013-evolution-4139f5b3ccabe156364d1999b793804094ac707d.tar.gz
gsoc2013-evolution-4139f5b3ccabe156364d1999b793804094ac707d.tar.zst
gsoc2013-evolution-4139f5b3ccabe156364d1999b793804094ac707d.zip
If the custom_icon_name is not NULL, return the pixbuf for it.
* e-shortcuts-view-model.c (get_icon_for_item): If the custom_icon_name is not NULL, return the pixbuf for it. * e-storage-set-view.c: #include "e-icon-factory.h". * e-shortcuts-view.c (impl_shortcut_dropped): Pass the custom_icon_name. (get_shortcut_info): New arg @custom_icon_name_return. (rename_shortcut_cb): Pass the custom_icon_name here. * e-shell-view-menu.c (new_shortcut_dialog_folder_selected_cb): Pass the custom_icon_name for the folder's shortcut. * e-shell-folder-commands.c (e_shell_command_add_to_shortcut_bar): Pass the custom_icon_name for the folder's shortcut. * e-corba-shortcuts.c (impl_add): Use the customIconName member in struct ::Shortcuts::Shortcut. (shorcut_list_to_corba): Set the customIconName member on the returned shortcuts. (impl_get): Likewise. * Evolution-Shortcuts.idl: New member customIconName in struct Shortcut. * e-shortcuts.c (shortcut_item_new): New arg @custom_icon_name; initialize the member in EShortcutItem from it. (shortcut_item_update): New arg @custom_icon_name; set the custom_icon_name from it. Also remove some braindeadness from this code. (update_shortcut_and_emit_signal): New arg @custom_icon_name. (load_shortcuts): Load the custom icon name from the XML [eg. <item name="foo" type="mail" icon="inbox">]. (save_shortcuts): Save the custom icon name in the XML. (e_shortcuts_add_shortcut): New arg @custom_icon_name. (update_shortcuts_by_path): Pass the custom_icon_name to update_shortcut_and_emit_signal(). (e_shortcuts_update_shortcut): New arg @custom_icon_name; pass it to update_shortcut_and_emit_signal(). (e_shortcuts_add_default_group): Pass "inbox" as the custom_icon_name for the inbox shortcut, and NULL for the other shortcuts. * e-shortcuts.h: New member custom_icon_name in EShortcutItem. svn path=/trunk/; revision=17394
Diffstat (limited to 'shell/e-corba-shortcuts.c')
-rw-r--r--shell/e-corba-shortcuts.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/shell/e-corba-shortcuts.c b/shell/e-corba-shortcuts.c
index fa416f6723..06f68144d0 100644
--- a/shell/e-corba-shortcuts.c
+++ b/shell/e-corba-shortcuts.c
@@ -74,9 +74,10 @@ shortcut_list_to_corba (const GSList *shortcut_list,
item = (const EShortcutItem *) p->data;
- buffer[i].uri = CORBA_string_dup (e_safe_corba_string (item->uri));
- buffer[i].name = CORBA_string_dup (e_safe_corba_string (item->name));
- buffer[i].type = CORBA_string_dup (e_safe_corba_string (item->type));
+ buffer[i].uri = CORBA_string_dup (e_safe_corba_string (item->uri));
+ buffer[i].name = CORBA_string_dup (e_safe_corba_string (item->name));
+ buffer[i].type = CORBA_string_dup (e_safe_corba_string (item->type));
+ buffer[i].customIconName = CORBA_string_dup (e_safe_corba_string (item->custom_icon_name));
}
CORBA_sequence_set_release (shortcut_list_return, TRUE);
@@ -119,7 +120,8 @@ impl_add (PortableServer_Servant servant,
string_from_corba (shortcut->uri),
string_from_corba (shortcut->name),
0,
- string_from_corba (shortcut->type));
+ string_from_corba (shortcut->type),
+ string_from_corba (shortcut->customIconName));
}
static void
@@ -159,9 +161,10 @@ impl_get (PortableServer_Servant servant,
}
retval = GNOME_Evolution_Shortcuts_Shortcut__alloc ();
- retval->uri = CORBA_string_dup (e_safe_corba_string (item->uri));
- retval->name = CORBA_string_dup (e_safe_corba_string (item->name));
- retval->type = CORBA_string_dup (e_safe_corba_string (item->type));
+ retval->uri = CORBA_string_dup (e_safe_corba_string (item->uri));
+ retval->name = CORBA_string_dup (e_safe_corba_string (item->name));
+ retval->type = CORBA_string_dup (e_safe_corba_string (item->type));
+ retval->customIconName = CORBA_string_dup (e_safe_corba_string (item->custom_icon_name));
return retval;
}