Author: benny
Date: 2007-08-17 12:07:39 +0000 (Fri, 17 Aug 2007)
New Revision: 25987

Modified:
   thunar/trunk/ChangeLog
   thunar/trunk/thunar/thunar-standard-view.c
Log:
2007-08-17      Benedikt Meurer <[EMAIL PROTECTED]>

        * thunar/thunar-standard-view.c: Preselect the complete filename when
          renaming a folder. Bug #3057.




Modified: thunar/trunk/ChangeLog
===================================================================
--- thunar/trunk/ChangeLog      2007-08-15 13:53:38 UTC (rev 25986)
+++ thunar/trunk/ChangeLog      2007-08-17 12:07:39 UTC (rev 25987)
@@ -1,3 +1,8 @@
+2007-08-17     Benedikt Meurer <[EMAIL PROTECTED]>
+
+       * thunar/thunar-standard-view.c: Preselect the complete filename when
+         renaming a folder. Bug #3057.
+
 2007-08-11     Benedikt Meurer <[EMAIL PROTECTED]>
 
        * thunar-vfs/thunar-vfs-thumb-jpeg.c: Better way to detect recursion

Modified: thunar/trunk/thunar/thunar-standard-view.c
===================================================================
--- thunar/trunk/thunar/thunar-standard-view.c  2007-08-15 13:53:38 UTC (rev 
25986)
+++ thunar/trunk/thunar/thunar-standard-view.c  2007-08-17 12:07:39 UTC (rev 
25987)
@@ -2250,19 +2250,23 @@
       /* setup the old filename */
       gtk_entry_set_text (GTK_ENTRY (entry), filename);
 
-      /* check if the filename contains a dot */
-      text = g_utf8_strrchr (filename, -1, '.');
-      if (G_LIKELY (text != NULL))
+      /* check if we don't have a directory here */
+      if (!thunar_file_is_directory (file))
         {
-          /* grab focus to the entry first, else the selection will be altered 
later */
-          gtk_widget_grab_focus (entry);
+          /* check if the filename contains a dot */
+          text = g_utf8_strrchr (filename, -1, '.');
+          if (G_LIKELY (text != NULL))
+            {
+              /* grab focus to the entry first, else the selection will be 
altered later */
+              gtk_widget_grab_focus (entry);
 
-          /* determine the UTF-8 char offset */
-          offset = g_utf8_pointer_to_offset (filename, text);
+              /* determine the UTF-8 char offset */
+              offset = g_utf8_pointer_to_offset (filename, text);
 
-          /* select the text prior to the dot */
-          if (G_LIKELY (offset > 0))
-            gtk_entry_select_region (GTK_ENTRY (entry), 0, offset);
+              /* select the text prior to the dot */
+              if (G_LIKELY (offset > 0))
+                gtk_entry_select_region (GTK_ENTRY (entry), 0, offset);
+            }
         }
 
       /* run the dialog */

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to