[gnome-commander] Fixed problem with toggling path/basename/filename selections in copy/move dialogs



commit 3623a5768e9d44be4f8734d4f71557ba4dadaf66
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Thu Dec 16 17:36:34 2010 +0100

    Fixed problem with toggling path/basename/filename selections in copy/move dialogs

 NEWS                      |    1 +
 doc/C/gnome-commander.xml |    3 +++
 src/utils.cc              |    2 +-
 3 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 8b37241..ec7085f 100644
--- a/NEWS
+++ b/NEWS
@@ -35,6 +35,7 @@ gnome-commander 1.2.8.10
 
 Bug fixes:
  * Fixed problem #448941 (numeric keypad arrows don't work in the main window)
+ * Fixed problem with toggling path/basename/filename selections in copy/move dialogs
  * Updated translations: de
 
 
diff --git a/doc/C/gnome-commander.xml b/doc/C/gnome-commander.xml
index 706ed11..0d75404 100644
--- a/doc/C/gnome-commander.xml
+++ b/doc/C/gnome-commander.xml
@@ -7605,6 +7605,9 @@
                             <para>Fixed problem #448941 (numeric keypad arrows don't work in the main window)</para>
                         </listitem>
                         <listitem>
+                            <para>Fixed problem with toggling path/basename/filename selections in copy/move dialogs</para>
+                        </listitem>
+                        <listitem>
                             <para>Updated translations: de</para>
                         </listitem>
                     </itemizedlist>
diff --git a/src/utils.cc b/src/utils.cc
index 9f84043..c22ecfa 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -1330,7 +1330,7 @@ void gnome_cmd_toggle_file_name_selection (GtkWidget *entry)
     {
         glong text_len = g_utf8_strlen (text, -1);
 
-        s = strrchr(text,'.');                                      // '.' is ASCII, g_utf8_strrchr() is not needed here
+        s = strrchr(s ? s : text,'.');                                      // '.' is ASCII, g_utf8_strrchr() is not needed here
         glong ext = s ? g_utf8_pointer_to_offset (text, s) : -1;
 
         if (beg==0 && end==text_len)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]