Commit 6f0da176 authored by Ting-Wei Lan's avatar Ting-Wei Lan Committed by Matthias Clasen

Change 'x-nautilus-search:' to 'Search' on tooltips.

If the location string starts with 'x-nautilus-search://', set
the tooltip to the window slot title instead of the location.
parent 039038da
......@@ -33,6 +33,7 @@
#include "nautilus-window-slot.h"
#include "nautilus-window-slot-dnd.h"
#include <eel/eel-vfs-extensions.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
......@@ -293,6 +294,7 @@ nautilus_notebook_sync_tab_label (NautilusNotebook *notebook,
GtkWidget *hbox, *label;
char *location_name;
GFile *location;
const gchar *title_name;
g_return_if_fail (NAUTILUS_IS_NOTEBOOK (notebook));
g_return_if_fail (NAUTILUS_IS_WINDOW_SLOT (slot));
......@@ -311,7 +313,12 @@ nautilus_notebook_sync_tab_label (NautilusNotebook *notebook,
* so it covers all of the tab label.
location_name = g_file_get_parse_name (location);
gtk_widget_set_tooltip_text (gtk_widget_get_parent (label), location_name);
title_name = nautilus_window_slot_get_title (slot);
if (g_str_has_prefix (location_name, EEL_SEARCH_URI)) {
gtk_widget_set_tooltip_text (gtk_widget_get_parent (label), title_name);
} else {
gtk_widget_set_tooltip_text (gtk_widget_get_parent (label), location_name);
g_free (location_name);
} else {
gtk_widget_set_tooltip_text (gtk_widget_get_parent (label), NULL);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment