[nautilus/gnome-3-8] Change 'x-nautilus-search:' to 'Search' on tooltips.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-8] Change 'x-nautilus-search:' to 'Search' on tooltips.
- Date: Sun, 16 Jun 2013 21:00:53 +0000 (UTC)
commit 3e2fcb51d571372f8c6c029420e9772eb0c21e53
Author: Ting-Wei Lan <lantw44 gmail com>
Date: Tue Apr 30 12:45:17 2013 +0800
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
src/nautilus-notebook.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-notebook.c b/src/nautilus-notebook.c
index 3ffe024..1542ac6 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]