Ok, it seems as if the more interesting file is the panel-menu-items.c
I just did:
apt-get source gnome-panel
to get the sources and am fast-reading it a bit, since I never ever before touched this code. ;)
oh boy, seems as if this is actually a rather hardcoded option in the panel-menu:
Lines 1041 to 1069 in panel-menu-items.c:
panel_menu_items_append_place_item (PANEL_ICON_HOME, NULL,
name,
_("Open your personal folder"), places_menu,
G_CALLBACK (activate_home_uri),
uri);
g_free (name);
g_free (uri);
if (!gconf_client_get_bool (panel_gconf_get_client (), DESKTOP_IS_HOME_DIR_KEY,
NULL)) {
file = g_file_new_for_path (g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP));
uri = g_file_get_uri (file);
g_object_unref (file);
panel_menu_items_append_place_item (
PANEL_ICON_DESKTOP, NULL,
/* Translators: Desktop is used here as in
* "Desktop Folder" (this is not the Desktop
* environment). */
C_("Desktop Folder", "Desktop"),
_("Open the contents of your desktop in a folder"),
places_menu,
G_CALLBACK (activate_desktop_uri),
/* FIXME: if the dir changes, we'd need to update the drag data since the uri is not the same */
uri);
g_free (uri);
}
Maybe this gives you enough pointers for you code :)
Ok, it seems as if the more interesting file is the panel-menu-items.c
I just did:
apt-get source gnome-panel
to get the sources and am fast-reading it a bit, since I never ever before touched this code. ;)
oh boy, seems as if this is actually a rather hardcoded option in the panel-menu: menu_items_ append_ place_item (PANEL_ICON_HOME, NULL,
places_ menu, home_uri) ,
Lines 1041 to 1069 in panel-menu-items.c:
panel_
name,
_("Open your personal folder"),
G_CALLBACK (activate_
uri);
g_free (name);
g_free (uri);
if (!gconf_ client_ get_bool (panel_ gconf_get_ client (),
DESKTOP_ IS_HOME_ DIR_KEY, user_special_ dir (G_USER_ DIRECTORY_ DESKTOP) );
NULL)) {
file = g_file_new_for_path (g_get_
uri = g_file_get_uri (file);
g_object_unref (file);
panel_ menu_items_ append_ place_item ( ICON_DESKTOP, NULL, desktop_ uri),
PANEL_
/* Translators: Desktop is used here as in
* "Desktop Folder" (this is not the Desktop
* environment). */
C_("Desktop Folder", "Desktop"),
_("Open the contents of your desktop in a folder"),
places_menu,
G_CALLBACK (activate_
/* FIXME: if the dir changes, we'd need to update the drag data since the uri is not the same */
uri);
g_free (uri);
}
Maybe this gives you enough pointers for you code :)