]> spindle.queued.net Git - midori/commitdiff
Properly rename speed dial item containing multiple spaces
authorPaweł Forysiuk <tuxator@o2.pl>
Sun, 3 Jul 2011 23:48:43 +0000 (01:48 +0200)
committerChristian Dywan <christian@twotoasts.de>
Mon, 4 Jul 2011 21:26:55 +0000 (23:26 +0200)
midori/midori-view.c

index c3ed4e080fbf45a94c53fb35b5658f8ef0ef1920..7b76dbeb01be53e2618995d4d2aeda6a3c816c37 100644 (file)
@@ -5391,7 +5391,10 @@ midori_view_speed_dial_save (MidoriView*  view,
         }
         else if (g_str_equal (action, "rename"))
         {
-            g_key_file_set_string (key_file, dial_id, "title", parts[2]);
+            guint offset = strlen (parts[0]) + strlen (parts[1]) + 2;
+            gchar* title = g_strdup (msg + offset);
+            g_key_file_set_string (key_file, dial_id, "title", title);
+            g_free (title);
         }
 
         g_free (dial_id);