diff --git a/thunar/thunar-shortcuts-model.c b/thunar/thunar-shortcuts-model.c index 1888cb3b..51434e84 100644 --- a/thunar/thunar-shortcuts-model.c +++ b/thunar/thunar-shortcuts-model.c @@ -559,6 +559,8 @@ thunar_shortcuts_model_get_value (GtkTreeModel *tree_model, ThunarShortcut *shortcut; gboolean can_eject; GFile *file; + gchar *device_string; + gchar *device_location; gchar *disk_usage; guint32 trash_items; gchar *trash_string; @@ -617,10 +619,42 @@ thunar_shortcuts_model_get_value (GtkTreeModel *tree_model, if (file != NULL) { + if (thunar_g_file_is_root (file)) + device_location = g_strdup (_("Browse the file system")); + else + device_location = thunar_g_file_get_location (file); + file_size_binary = THUNAR_SHORTCUTS_MODEL (tree_model)->file_size_binary; disk_usage = thunar_g_file_get_free_space_string (file, file_size_binary); + + device_string = g_strdup_printf ("%s\n%s", device_location, disk_usage); + + g_value_take_string (value, device_string); + + g_free (device_location); + g_free (disk_usage); + + g_object_unref (file); + } + break; + } + else if ((shortcut->group & THUNAR_SHORTCUT_GROUP_NETWORK_MOUNTS) != 0 ) + { + if (shortcut->device != NULL) + file = thunar_device_get_root (shortcut->device); + else + file = NULL; + + if (file != NULL) + { + device_location = g_file_get_uri (file); + device_string = g_strdup_printf ("%s", device_location); + + g_value_take_string (value, device_string); + + g_free (device_location); + g_object_unref (file); - g_value_take_string (value, disk_usage); } break; } @@ -649,7 +683,18 @@ thunar_shortcuts_model_get_value (GtkTreeModel *tree_model, else file = NULL; - if (G_LIKELY (file != NULL)) + if ((shortcut->group & THUNAR_SHORTCUT_GROUP_PLACES_DEFAULT) != 0 ) + { + if (thunar_g_file_is_home (file)) + shortcut->tooltip = g_strdup (_("Open the home folder")); + else + shortcut->tooltip = g_strdup (_("Open the desktop folder")); + } + else if ((shortcut->group & THUNAR_SHORTCUT_GROUP_PLACES_COMPUTER) != 0 ) + shortcut->tooltip = g_strdup (_("Browse the computer")); + else if ((shortcut->group & THUNAR_SHORTCUT_GROUP_NETWORK_DEFAULT) != 0 ) + shortcut->tooltip = g_strdup (_("Browse local network connections")); + else if (G_LIKELY (file != NULL)) { parse_name = g_file_get_parse_name (file); shortcut->tooltip = g_markup_escape_text (parse_name, -1);