summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2013-04-30 12:45:17 +0800
committerMatthias Clasen <mclasen@redhat.com>2013-06-16 16:59:17 -0400
commit6f0da176c672944b1dfbdd0d9e01cd303d199976 (patch)
tree723eb86f1cc26719144331cc7f067ece87a0aabb
parent039038da3d399029ab8e4d82c8cade1c9a98265d (diff)
downloadnautilus-6f0da176c672944b1dfbdd0d9e01cd303d199976.tar.gz
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. https://bugzilla.gnome.org/show_bug.cgi?id=610789
-rw-r--r--src/nautilus-notebook.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nautilus-notebook.c b/src/nautilus-notebook.c
index 3ffe0245d..1542ac6bd 100644
--- a/src/nautilus-notebook.c
+++ b/src/nautilus-notebook.c
@@ -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);