Commit ca78e5e6 authored by Jim Krehl's avatar Jim Krehl

svn path=/branches/openSUSE-10.3/; revision=356



svn path=/branches/openSUSE-10.3/; revision=356
parent 45167e9f
......@@ -84,6 +84,7 @@ GnomeDesktopItem *
libslab_gnome_desktop_item_new_from_unknown_id (const gchar *id)
{
GnomeDesktopItem *item;
gchar *basename;
GError *error = NULL;
......@@ -118,6 +119,19 @@ libslab_gnome_desktop_item_new_from_unknown_id (const gchar *id)
error = NULL;
}
basename = g_strrstr (id, "/");
if (basename)
basename++;
item = gnome_desktop_item_new_from_basename (basename, 0, &error);
if (! error)
return item;
else {
g_error_free (error);
error = NULL;
}
return NULL;
}
......
......@@ -148,39 +148,50 @@ load_desktop_item_from_gconf_key (const gchar * key)
}
GnomeDesktopItem *
load_desktop_item_from_unknown (const gchar * id)
load_desktop_item_from_unknown (const gchar *id)
{
GnomeDesktopItem *item;
GError *error;
gchar *basename;
GError *error = NULL;
error = NULL;
item = gnome_desktop_item_new_from_uri (id, 0, &error);
if (!error)
if (! error)
return item;
else
{
else {
g_error_free (error);
error = NULL;
}
item = gnome_desktop_item_new_from_file (id, 0, &error);
if (!error)
if (! error)
return item;
else
{
else {
g_error_free (error);
error = NULL;
}
item = gnome_desktop_item_new_from_basename (id, 0, &error);
if (!error)
if (! error)
return item;
else
{
else {
g_error_free (error);
error = NULL;
}
basename = g_strrstr (id, "/");
if (basename)
basename++;
item = gnome_desktop_item_new_from_basename (basename, 0, &error);
if (! error)
return item;
else {
g_error_free (error);
error = NULL;
}
......
......@@ -1008,10 +1008,30 @@ item_to_dir_tile (BookmarkItem *item, gpointer data)
static Tile *
item_to_system_tile (BookmarkItem *item, gpointer data)
{
Tile *tile;
gchar *basename;
if (app_is_in_blacklist (item->uri))
return NULL;
return TILE (system_tile_new (item->uri, item->title));
tile = TILE (system_tile_new (item->uri, item->title));
if (tile)
return tile;
basename = g_strrstr (item->uri, "/");
if (basename)
basename++;
else
basename = item->uri;
if (! libslab_strcmp (basename, "control-center.desktop"))
tile = TILE (system_tile_new ("gnomecc.desktop", item->title));
else if (! libslab_strcmp (basename, "zen-installer.desktop"))
tile = TILE (system_tile_new ("package-manager.desktop", item->title));
return tile;
}
static BookmarkItem *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment