Git Repositories

2005-12-22 Benedikt Meurer <benny@xfce.org>
authorBenedikt Meurer <benny@xfce.org>
Thu, 22 Dec 2005 21:45:55 +0000 (21:45 +0000)
committerBenedikt Meurer <benny@xfce.org>
Thu, 22 Dec 2005 21:45:55 +0000 (21:45 +0000)
* configure.in.in: Use -Wall -Werror for --enable-debug=yes as well.
* thunar/thunar-list-model.c(thunar_list_model_get_value): The MIME info
  name is static.
* thunar/thunar-text-renderer.c: Don't copy static strings.
* pixmaps/Thunar-fallback-icon.png, pixmaps/Makefile.am,
  thunar/thunar-fallback-icon.{h,png}, thunar/Makefile.am,
  thunar/thunar-icon-factory.c: Load the fallback icon and the
  thumbnail frame on-demand.
* thunar/main.c(main): Use Thunar icon as default for new windows.
* thunar/thunar-icon-factory.c: Allocate the thumbnail factory and the
  thumbnail generator on-demand.
* thunar/thunar-file.c: Add "display-name" and "special-name" readonly
  properties and emit notifications on these properties whenever the
  file is changed/renamed.
* thunar/thunar-location-buttons.c(thunar_location_buttons_make_button):
  Automatically synchronize the button labels with the file's special
  names.
* configure.in.in: Add it translations to XDT_I18N().
* THANKS: Add credits for it translator Roberto Pariset.

(Old svn revision: 19125)

13 files changed:
ChangeLog
THANKS
configure.in.in
pixmaps/Makefile.am
pixmaps/Thunar-fallback-icon.png [moved from thunar/thunar-fallback-icon.png with 100% similarity]
thunar/Makefile.am
thunar/main.c
thunar/thunar-fallback-icon.h [deleted file]
thunar/thunar-file.c
thunar/thunar-icon-factory.c
thunar/thunar-list-model.c
thunar/thunar-location-buttons.c
thunar/thunar-text-renderer.c

index 34624ba..b21ee68 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2005-12-22     Benedikt Meurer <benny@xfce.org>
+
+       * configure.in.in: Use -Wall -Werror for --enable-debug=yes as well.
+       * thunar/thunar-list-model.c(thunar_list_model_get_value): The MIME info
+         name is static.
+       * thunar/thunar-text-renderer.c: Don't copy static strings.
+       * pixmaps/Thunar-fallback-icon.png, pixmaps/Makefile.am,
+         thunar/thunar-fallback-icon.{h,png}, thunar/Makefile.am,
+         thunar/thunar-icon-factory.c: Load the fallback icon and the
+         thumbnail frame on-demand.
+       * thunar/main.c(main): Use Thunar icon as default for new windows.
+       * thunar/thunar-icon-factory.c: Allocate the thumbnail factory and the
+         thumbnail generator on-demand.
+       * thunar/thunar-file.c: Add "display-name" and "special-name" readonly
+         properties and emit notifications on these properties whenever the
+         file is changed/renamed.
+       * thunar/thunar-location-buttons.c(thunar_location_buttons_make_button):
+         Automatically synchronize the button labels with the file's special
+         names.
+       * configure.in.in: Add it translations to XDT_I18N().
+       * THANKS: Add credits for it translator Roberto Pariset.
+
 2005-12-20     Benedikt Meurer <benny@xfce.org>
 
        * THANKS: Update credits.
diff --git a/THANKS b/THANKS
index da76c33..75f2f02 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -31,6 +31,9 @@ These people have translated Thunar to foreign languages.
  Szervác Attila <sas@321.hu>
   * hu translations
 
+ Roberto Pariset <r.pariset@gmail.com>
+  * it translations
+
  Daichi Kawahata <daichi@xfce.org>
   * ja translations
 
index 1c0a8b8..7f0b920 100644 (file)
@@ -151,7 +151,7 @@ AC_TRY_LINK([#include <sys/mman.h>], posix_madvise_test(),
 dnl ******************************
 dnl *** Check for i18n support ***
 dnl ******************************
-XDT_I18N([de el es fr hu ja pt_BR])
+XDT_I18N([de el es fr hu it ja pt_BR])
 
 dnl ***********************************
 dnl *** Check for required packages ***
@@ -277,9 +277,12 @@ if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
   ])
   CFLAGS="$save_CFLAGS"
 
+  dnl Make sure we detect possible errors
+  PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Werror -Wall"
+
   dnl Paranoia for --enable-debug=full
   if test x"$enable_debug" = x"full"; then
-    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3 -Werror -Wall"
+    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3"
     PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_DEPRECATED -DG_ENABLE_DEBUG"
   fi
 else
index ca98f6a..efbab73 100644 (file)
@@ -2,7 +2,8 @@
 
 pixmapsdir = $(datadir)/pixmaps/Thunar
 pixmaps_DATA =                                                         \
-       Thunar-about-logo.png
+       Thunar-about-logo.png                                           \
+       Thunar-fallback-icon.png
 
 EXTRA_DIST =                                                           \
        $(pixmaps_DATA)
index ed3f966..b51dff6 100644 (file)
@@ -42,8 +42,6 @@ Thunar_SOURCES =                                                      \
        thunar-dnd.h                                                    \
        thunar-emblem-chooser.c                                         \
        thunar-emblem-chooser.h                                         \
-       thunar-fallback-icon.c                                          \
-       thunar-fallback-icon.h                                          \
        thunar-shortcuts-model.c                                        \
        thunar-shortcuts-model.h                                        \
        thunar-shortcuts-pane.c                                         \
@@ -155,7 +153,6 @@ CLEANFILES =                                                                \
 DISTCLEANFILES =                                                       \
        $(thunar_built_sources)                                         \
        stamp-thunar-marshal.h                                          \
-       thunar-fallback-icon.c                                          \
        thunar-icon-view-ui.h                                           \
        thunar-standard-view-ui.h                                       \
        thunar-thumbnail-frame.c                                        \
@@ -163,15 +160,11 @@ DISTCLEANFILES =                                                  \
 
 BUILT_SOURCES =                                                                \
        $(thunar_built_sources)                                         \
-       thunar-fallback-icon.c                                          \
        thunar-icon-view-ui.h                                           \
        thunar-standard-view-ui.h                                       \
        thunar-thumbnail-frame.c                                        \
        thunar-window-ui.h
 
-thunar-fallback-icon.c: $(srcdir)/thunar-fallback-icon.png Makefile
-       (echo "#include <thunar/thunar-fallback-icon.h>" && gdk-pixbuf-csource --extern --raw --stream --name=thunar_fallback_icon $(srcdir)/thunar-fallback-icon.png) > thunar-fallback-icon.c
-
 thunar-thumbnail-frame.c: $(srcdir)/thunar-thumbnail-frame.png Makefile
        (echo "#include <thunar/thunar-thumbnail-frame.h>" && gdk-pixbuf-csource --extern --raw --stream --name=thunar_thumbnail_frame $(srcdir)/thunar-thumbnail-frame.png) > thunar-thumbnail-frame.c
 
@@ -203,7 +196,6 @@ thunar-marshal.c: thunar-marshal.list Makefile
 endif
 
 EXTRA_DIST =                                                           \
-       thunar-fallback-icon.png                                        \
        thunar-icon-view-ui.xml                                         \
        thunar-marshal.list                                             \
        thunar-standard-view-ui.xml                                     \
index 48b349d..0aa8fa8 100644 (file)
@@ -66,6 +66,9 @@ main (int argc, char **argv)
   /* acquire a reference on the global application */
   application = thunar_application_get ();
 
+  /* use the Thunar icon as default for new windows */
+  gtk_window_set_default_icon_name ("Thunar");
+
   path = (argc > 1) ? thunar_vfs_path_new (argv[1], &error) : thunar_vfs_path_get_for_home ();
   if (G_LIKELY (path != NULL))
     {
diff --git a/thunar/thunar-fallback-icon.h b/thunar/thunar-fallback-icon.h
deleted file mode 100644 (file)
index b99cc8b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* $Id$ */
-/*-
- * Copyright (c) 2005 Benedikt Meurer <benny@xfce.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __THUNAR_FALLBACK_ICON_H__
-#define __THUNAR_FALLBACK_ICON_H__
-
-#include <glib.h>
-
-G_BEGIN_DECLS;
-
-extern const guint8 thunar_fallback_icon[];
-
-G_END_DECLS;
-
-#endif /* !__THUNAR_FALLBACK_ICON_H__ */
index 20bfdb6..5c1e0df 100644 (file)
 
 
 
+/* Property identifiers */
+enum
+{
+  PROP_0,
+  PROP_DISPLAY_NAME,
+  PROP_SPECIAL_NAME,
+};
+
+/* Signal identifiers */
 enum
 {
   CHANGED,
@@ -67,6 +76,10 @@ static void               thunar_file_class_init               (ThunarFileClass
 static void               thunar_file_info_init                (ThunarxFileInfoIface   *iface);
 static void               thunar_file_dispose                  (GObject                *object);
 static void               thunar_file_finalize                 (GObject                *object);
+static void               thunar_file_get_property             (GObject                *object,
+                                                                guint                   prop_id,
+                                                                GValue                 *value,
+                                                                GParamSpec             *pspec);
 static gchar             *thunar_file_info_get_name            (ThunarxFileInfo        *file_info);
 static gchar             *thunar_file_info_get_uri             (ThunarxFileInfo        *file_info);
 static gchar             *thunar_file_info_get_parent_uri      (ThunarxFileInfo        *file_info);
@@ -202,10 +215,39 @@ thunar_file_class_init (ThunarFileClass *klass)
   gobject_class = G_OBJECT_CLASS (klass);
   gobject_class->dispose = thunar_file_dispose;
   gobject_class->finalize = thunar_file_finalize;
+  gobject_class->get_property = thunar_file_get_property;
 
   klass->changed = thunar_file_real_changed;
 
   /**
+   * ThunarFile::display-name:
+   *
+   * The file's display name, see thunar_file_get_display_name()
+   * for details.
+   **/
+  g_object_class_install_property (gobject_class,
+                                   PROP_DISPLAY_NAME,
+                                   g_param_spec_string ("display-name",
+                                                        "Display Name",
+                                                        "Display Name",
+                                                        NULL,
+                                                        EXO_PARAM_READABLE));
+
+  /**
+   * ThunarFile::special-name:
+   *
+   * The file's special name, see thunar_file_get_special_name()
+   * for details.
+   **/
+  g_object_class_install_property (gobject_class,
+                                   PROP_SPECIAL_NAME,
+                                   g_param_spec_string ("special-name",
+                                                        "Special Name",
+                                                        "Special Name",
+                                                        NULL,
+                                                        EXO_PARAM_READABLE));
+
+  /**
    * ThunarFile::changed:
    * @file : the #ThunarFile instance.
    *
@@ -319,6 +361,32 @@ thunar_file_finalize (GObject *object)
 
 
 
+static void
+thunar_file_get_property (GObject    *object,
+                          guint       prop_id,
+                          GValue     *value,
+                          GParamSpec *pspec)
+{
+  ThunarFile *file = THUNAR_FILE (object);
+
+  switch (prop_id)
+    {
+    case PROP_DISPLAY_NAME:
+      g_value_set_static_string (value, thunar_file_get_display_name (file));
+      break;
+
+    case PROP_SPECIAL_NAME:
+      g_value_set_static_string (value, thunar_file_get_special_name (file));
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+
+
 static gchar*
 thunar_file_info_get_name (ThunarxFileInfo *file_info)
 {
@@ -424,6 +492,12 @@ thunar_file_real_changed (ThunarFile *file)
    * invokation will recheck the thumbnail.
    */
   thunar_file_set_thumb_state (file, THUNAR_FILE_THUMB_STATE_UNKNOWN);
+
+  /* notify about changes of the display-name and special-name properties */
+  g_object_freeze_notify (G_OBJECT (file));
+  g_object_notify (G_OBJECT (file), "display-name");
+  g_object_notify (G_OBJECT (file), "special-name");
+  g_object_thaw_notify (G_OBJECT (file));
 }
 
 
index 1c96a04..76291bb 100644 (file)
@@ -32,7 +32,6 @@
 #include <string.h>
 #endif
 
-#include <thunar/thunar-fallback-icon.h>
 #include <thunar/thunar-gdk-pixbuf-extensions.h>
 #include <thunar/thunar-icon-factory.h>
 #include <thunar/thunar-thumbnail-frame.h>
@@ -88,6 +87,7 @@ static void       thunar_icon_factory_mark_recently_used    (ThunarIconFactory
 static guint      thunar_icon_key_hash                      (gconstpointer           data);
 static gboolean   thunar_icon_key_equal                     (gconstpointer           a,
                                                              gconstpointer           b);
+static GdkPixbuf *thunar_icon_factory_load_fallback         (gint                    size);
 
 
 
@@ -102,7 +102,6 @@ struct _ThunarIconFactory
 
   ThunarThumbnailGenerator *thumbnail_generator;
   ThunarVfsThumbFactory    *thumbnail_factory;
-  GdkPixbuf                *thumbnail_frame;
 
   GdkPixbuf                *recently[MAX_RECENTLY];  /* ring buffer */
   guint                     recently_pos;            /* insert position */
@@ -110,7 +109,6 @@ struct _ThunarIconFactory
   GHashTable               *icon_cache;
 
   GtkIconTheme             *icon_theme;
-  GdkPixbuf                *fallback_icon;
 
   gint                      changed_idle_id;
   gint                      sweep_timer_id;
@@ -209,22 +207,8 @@ thunar_icon_factory_init (ThunarIconFactory *factory)
   factory->changed_hook_id = g_signal_add_emission_hook (g_signal_lookup ("changed", GTK_TYPE_ICON_THEME),
                                                          0, thunar_icon_factory_changed, factory, NULL);
 
-  /* load the fallback icon */
-  factory->fallback_icon = gdk_pixbuf_new_from_inline (-1, thunar_fallback_icon, FALSE, NULL);
-
   /* allocate the hash table for the icon cache */
   factory->icon_cache = g_hash_table_new_full (thunar_icon_key_hash, thunar_icon_key_equal, g_free, g_object_unref);
-
-  /* allocate the thumbnail factory */
-  factory->thumbnail_factory = thunar_vfs_thumb_factory_new ((THUNAR_THUMBNAIL_SIZE > 128)
-                                                            ? THUNAR_VFS_THUMB_SIZE_LARGE
-                                                            : THUNAR_VFS_THUMB_SIZE_NORMAL);
-
-  /* allocate the thumbnail generator */
-  factory->thumbnail_generator = thunar_thumbnail_generator_new (factory->thumbnail_factory);
-
-  /* load the thumbnail frame */
-  factory->thumbnail_frame = gdk_pixbuf_new_from_inline (-1, thunar_thumbnail_frame, FALSE, NULL);
 }
 
 
@@ -263,17 +247,13 @@ thunar_icon_factory_finalize (GObject *object)
   /* clear the icon cache hash table */
   g_hash_table_destroy (factory->icon_cache);
 
-  /* drop the fallback icon reference */
-  g_object_unref (G_OBJECT (factory->fallback_icon));
-
-  /* release the thumbnail frame */
-  g_object_unref (G_OBJECT (factory->thumbnail_frame));
-
   /* disconnect from the thumbnail factory */
-  g_object_unref (G_OBJECT (factory->thumbnail_factory));
+  if (G_LIKELY (factory->thumbnail_factory != NULL))
+    g_object_unref (G_OBJECT (factory->thumbnail_factory));
 
   /* disconnect from the thumbnail generator */
-  g_object_unref (G_OBJECT (factory->thumbnail_generator));
+  if (G_LIKELY (factory->thumbnail_generator != NULL))
+    g_object_unref (G_OBJECT (factory->thumbnail_generator));
 
   /* remove the "changed" emission hook from the GtkIconTheme class */
   g_signal_remove_emission_hook (g_signal_lookup ("changed", GTK_TYPE_ICON_THEME), factory->changed_hook_id);
@@ -456,6 +436,7 @@ thunar_icon_factory_load_from_file (ThunarIconFactory *factory,
                                     gint               size)
 {
   GdkPixbuf *pixbuf;
+  GdkPixbuf *frame;
   GdkPixbuf *tmp;
   gboolean   needs_frame;
   gint       max_width;
@@ -501,9 +482,11 @@ thunar_icon_factory_load_from_file (ThunarIconFactory *factory,
       /* add a frame around thumbnail (large) images */
       if (G_LIKELY (needs_frame))
         {
-          /* add the frame */
-          tmp = thunar_gdk_pixbuf_frame (pixbuf, factory->thumbnail_frame, 3, 3, 6, 6);
+          /* add a frame to the thumbnail */
+          frame = gdk_pixbuf_new_from_inline (-1, thunar_thumbnail_frame, FALSE, NULL);
+          tmp = thunar_gdk_pixbuf_frame (pixbuf, frame, 3, 3, 6, 6);
           g_object_unref (G_OBJECT (pixbuf));
+          g_object_unref (G_OBJECT (frame));
           pixbuf = tmp;
         }
     }
@@ -558,13 +541,8 @@ thunar_icon_factory_lookup_icon (ThunarIconFactory *factory,
           /* check if we are allowed to return the fallback icon */
           if (!wants_default)
             return NULL;
-
-          /* already have the fallback icon loaded at 48x48 */
-          if (G_LIKELY (size == 48))
-            return g_object_ref (G_OBJECT (factory->fallback_icon));
-
-          /* return a scaled version of the fallback icon */
-          return exo_gdk_pixbuf_scale_ratio (factory->fallback_icon, size);
+          else
+            return thunar_icon_factory_load_fallback (size);
         }
 
       /* generate a key for the new cached icon */
@@ -657,6 +635,28 @@ thunar_icon_key_equal (gconstpointer a,
 
 
 
+static GdkPixbuf*
+thunar_icon_factory_load_fallback (gint size)
+{
+  static const gchar THUNAR_FALLBACK_ICON_PATH[] = DATADIR "/pixmaps/Thunar/Thunar-fallback-icon.png";
+  GdkPixbuf         *pixbuf;
+  GError            *error = NULL;
+
+  /* try to load the fallback icon */
+  pixbuf = gdk_pixbuf_new_from_file_at_scale (THUNAR_FALLBACK_ICON_PATH, size, size, TRUE, &error);
+
+  /* verify that it was loaded */
+  if (G_UNLIKELY (pixbuf == NULL))
+    {
+      g_error (_("Failed to load fallback icon from `%s' (%s). Check your installation!"), THUNAR_FALLBACK_ICON_PATH, error->message);
+      g_error_free (error);
+    }
+
+  return pixbuf;
+}
+
+
+
 /**
  * thunar_icon_factory_get_default:
  *
@@ -697,7 +697,7 @@ thunar_icon_factory_get_default (void)
  * @icon_theme and returns it.
  *
  * You need to explicitly free the returned #ThunarIconFactory object
- * using #g_object_unref() when you are done with it.
+ * using g_object_unref() when you are done with it.
  *
  * Return value: the #ThunarIconFactory for @icon_theme.
  **/
@@ -783,16 +783,9 @@ thunar_icon_factory_load_icon (ThunarIconFactory        *factory,
     {
       /* check if the caller will happly accept the fallback icon */
       if (G_LIKELY (wants_default))
-        {
-          if (G_LIKELY (size == 48))
-            return g_object_ref (G_OBJECT (factory->fallback_icon));
-          else
-            return exo_gdk_pixbuf_scale_ratio (factory->fallback_icon, size);
-        }
+        return thunar_icon_factory_load_fallback (size);
       else
-        {
-          return NULL;
-        }
+        return NULL;
     }
 
   /* lookup the icon */
@@ -851,6 +844,18 @@ thunar_icon_factory_load_file_icon (ThunarIconFactory  *factory,
           /* determine the ThunarVfsInfo for the file */
           info = thunar_file_get_info (file);
 
+          /* allocate the thumbnail factory and thumbnail generator on-demand */
+          if (G_UNLIKELY (factory->thumbnail_factory == NULL))
+            {
+              /* allocate the thumbnail factory */
+              factory->thumbnail_factory = thunar_vfs_thumb_factory_new ((THUNAR_THUMBNAIL_SIZE > 128)
+                                                                        ? THUNAR_VFS_THUMB_SIZE_LARGE
+                                                                        : THUNAR_VFS_THUMB_SIZE_NORMAL);
+
+              /* allocate the thumbnail generator */
+              factory->thumbnail_generator = thunar_thumbnail_generator_new (factory->thumbnail_factory);
+            }
+
           /* try to load an existing thumbnail for the file */
           thumb_path = thunar_vfs_thumb_factory_lookup_thumbnail (factory->thumbnail_factory, info);
 
index 1d1d3a5..bc670d7 100644 (file)
@@ -675,7 +675,7 @@ thunar_list_model_get_value (GtkTreeModel *model,
     case THUNAR_LIST_MODEL_COLUMN_MIME_TYPE:
       g_value_init (value, G_TYPE_STRING);
       mime_info = thunar_file_get_mime_info (row->file);
-      g_value_set_string (value, thunar_vfs_mime_info_get_name (mime_info));
+      g_value_set_static_string (value, thunar_vfs_mime_info_get_name (mime_info));
       break;
 
     case THUNAR_LIST_MODEL_COLUMN_NAME:
index 83a4bab..e5b774c 100644 (file)
@@ -901,7 +901,8 @@ thunar_location_buttons_make_button (ThunarLocationButtons *buttons,
   if (!thunar_file_is_root (file))
     {
       /* only non-root nodes have a label */
-      label = gtk_label_new (thunar_file_get_special_name (file));
+      label = g_object_new (GTK_TYPE_LABEL, NULL);
+      exo_binding_new (G_OBJECT (file), "special-name", G_OBJECT (label), "label");
       g_object_set_qdata (G_OBJECT (button), gtk_label_quark, label);
       gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
       gtk_widget_show (label);
index c1d232f..26056d0 100644 (file)
@@ -119,7 +119,8 @@ struct _ThunarTextRenderer
 
   PangoLayout  *layout;
   GtkWidget    *widget;
-  gchar         text[256];
+  gboolean      text_static;
+  gchar        *text;
   gint          char_width;
   gint          char_height;
   PangoWrapMode wrap_mode;
@@ -282,6 +283,10 @@ thunar_text_renderer_finalize (GObject *object)
 {
   ThunarTextRenderer *text_renderer = THUNAR_TEXT_RENDERER (object);
 
+  /* release text (if not static) */
+  if (!text_renderer->text_static)
+    g_free (text_renderer->text);
+
   /* drop the cached widget */
   thunar_text_renderer_set_widget (text_renderer, NULL);
 
@@ -340,8 +345,14 @@ thunar_text_renderer_set_property (GObject      *object,
       break;
 
     case PROP_TEXT:
+      /* release the previous text (if not static) */
+      if (!text_renderer->text_static)
+        g_free (text_renderer->text);
       sval = g_value_get_string (value);
-      g_strlcpy (text_renderer->text, G_UNLIKELY (sval == NULL) ? "" : sval, sizeof (text_renderer->text));
+      text_renderer->text_static = (value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS);
+      text_renderer->text = (sval == NULL) ? "" : (gchar *)sval;
+      if (!text_renderer->text_static)
+        text_renderer->text = g_strdup (text_renderer->text);
       break;
 
     case PROP_WRAP_MODE:
@@ -626,7 +637,7 @@ thunar_text_renderer_invalidate (ThunarTextRenderer *text_renderer)
 
 static void
 thunar_text_renderer_set_widget (ThunarTextRenderer *text_renderer,
-                                 GtkWidget                     *widget)
+                                 GtkWidget          *widget)
 {
   // FIXME: The sample text should be translatable with a hint to translators!
   static const gchar SAMPLE_TEXT[] = "The Quick Brown Fox Jumps Over the Lazy Dog";
@@ -692,7 +703,7 @@ thunar_text_renderer_editing_done (GtkCellEditable    *editable,
   if (G_LIKELY (!GTK_ENTRY (editable)->editing_canceled))
     {
       text = gtk_entry_get_text (GTK_ENTRY (editable));
-      path = g_object_get_data (G_OBJECT (editable), I_("thunar-text-renderer-path"));
+      path = g_object_get_data (G_OBJECT (editable), "thunar-text-renderer-path");
       g_signal_emit (G_OBJECT (text_renderer), text_renderer_signals[EDITED], 0, path, text);
     }
 }