gnome-commander r1503 - in trunk: . doc/C src



Author: epiotr
Date: Thu Jan 10 21:44:15 2008
New Revision: 1503
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1503&view=rev

Log:
Yet another fix for storing advrename data (regex patterns)

Modified:
   trunk/ChangeLog
   trunk/doc/C/gnome-commander.xml
   trunk/src/gnome-cmd-data.cc

Modified: trunk/doc/C/gnome-commander.xml
==============================================================================
--- trunk/doc/C/gnome-commander.xml	(original)
+++ trunk/doc/C/gnome-commander.xml	Thu Jan 10 21:44:15 2008
@@ -5124,27 +5124,6 @@
                                 </row>
                                 <row valign="top">
                                     <entry><para></para></entry>
-                                    <entry><para>counter_increment</para></entry>
-                                    <entry><para></para></entry>
-                                    <entry><para></para></entry>
-                                    <entry><para></para></entry>
-                                </row>
-                                <row valign="top">
-                                    <entry><para></para></entry>
-                                    <entry><para>counter_precision</para></entry>
-                                    <entry><para></para></entry>
-                                    <entry><para></para></entry>
-                                    <entry><para></para></entry>
-                                </row>
-                                <row valign="top">
-                                    <entry><para></para></entry>
-                                    <entry><para>counter_start</para></entry>
-                                    <entry><para></para></entry>
-                                    <entry><para></para></entry>
-                                    <entry><para></para></entry>
-                                </row>
-                                <row valign="top">
-                                    <entry><para></para></entry>
                                     <entry><para>date_disp_mode</para></entry>
                                     <entry><para></para></entry>
                                     <entry><para></para></entry>
@@ -5396,13 +5375,6 @@
                                 </row>
                                 <row valign="top">
                                     <entry><para></para></entry>
-                                    <entry><para>template-auto-update</para></entry>
-                                    <entry><para></para></entry>
-                                    <entry><para></para></entry>
-                                    <entry><para></para></entry>
-                                </row>
-                                <row valign="top">
-                                    <entry><para></para></entry>
                                     <entry><para>theme_icon_dir</para></entry>
                                     <entry><para></para></entry>
                                     <entry><para></para></entry>
@@ -5640,6 +5612,34 @@
                                     <entry><para></para></entry>
                                 </row>
                                 <row valign="top">
+                                    <entry><para></para></entry>
+                                    <entry><para>template_auto_update</para></entry>
+                                    <entry><para></para></entry>
+                                    <entry><para></para></entry>
+                                    <entry><para></para></entry>
+                                </row>
+                                <row valign="top">
+                                    <entry><para></para></entry>
+                                    <entry><para>counter_start</para></entry>
+                                    <entry><para></para></entry>
+                                    <entry><para></para></entry>
+                                    <entry><para></para></entry>
+                                </row>
+                                <row valign="top">
+                                    <entry><para></para></entry>
+                                    <entry><para>counter_precision</para></entry>
+                                    <entry><para></para></entry>
+                                    <entry><para></para></entry>
+                                    <entry><para></para></entry>
+                                </row>
+                                <row valign="top">
+                                    <entry><para></para></entry>
+                                    <entry><para>counter_increment</para></entry>
+                                    <entry><para></para></entry>
+                                    <entry><para></para></entry>
+                                    <entry><para></para></entry>
+                                </row>
+                                <row valign="top">
                                     <entry><para>[local_bookmarks]</para></entry>
                                     <entry><para>count</para></entry>
                                     <entry><para></para></entry>
@@ -5696,21 +5696,28 @@
                                     <entry><para></para></entry>
                                 </row>
                                 <row valign="top">
-                                    <entry><para>[rename-history-from]</para></entry>
+                                    <entry><para>[rename-history]</para></entry>
+                                    <entry><para>size</para></entry>
+                                    <entry><para>integer</para></entry>
+                                    <entry><para>Number of from/to/csens<emphasis><subscript>n</subscript></emphasis> entries</para></entry>
+                                    <entry><para></para></entry>
+                                </row>
+                                <row valign="top">
+                                    <entry><para></para></entry>
                                     <entry><para>from<emphasis><subscript>n</subscript></emphasis></para></entry>
                                     <entry><para></para></entry>
                                     <entry><para></para></entry>
                                     <entry><para></para></entry>
                                 </row>
                                 <row valign="top">
-                                    <entry><para>[rename-history-to]</para></entry>
+                                    <entry><para></para></entry>
                                     <entry><para>to<emphasis><subscript>n</subscript></emphasis></para></entry>
                                     <entry><para></para></entry>
                                     <entry><para></para></entry>
                                     <entry><para></para></entry>
                                 </row>
                                 <row valign="top">
-                                    <entry><para>[rename-history-csens]</para></entry>
+                                    <entry><para></para></entry>
                                     <entry><para>csens<emphasis><subscript>n</subscript></emphasis></para></entry>
                                     <entry><para></para></entry>
                                     <entry><para></para></entry>

Modified: trunk/src/gnome-cmd-data.cc
==============================================================================
--- trunk/src/gnome-cmd-data.cc	(original)
+++ trunk/src/gnome-cmd-data.cc	Thu Jan 10 21:44:15 2008
@@ -912,7 +912,7 @@
         csens = g_list_append (csens, (gpointer) (entry->case_sens ? "T" : "F"));
     }
 
-    gnome_cmd_data_set_int ("/options/template-auto-update", data->priv->advrename_defaults->auto_update);
+    gnome_cmd_data_set_int ("/advrename/template_auto_update", data->priv->advrename_defaults->auto_update);
     gnome_cmd_data_set_int ("/advrename/width", data->priv->advrename_defaults->width);
     gnome_cmd_data_set_int ("/advrename/height", data->priv->advrename_defaults->height);
 
@@ -924,14 +924,25 @@
     gnome_cmd_data_set_int ("/template-history/size", g_list_length (data->priv->advrename_defaults->templates->ents));
     gnome_cmd_data_set_string_history ("/template-history/template%d", data->priv->advrename_defaults->templates->ents);
 
-    gnome_cmd_data_set_int ("/options/counter_start", data->priv->advrename_defaults->counter_start);
-    gnome_cmd_data_set_int ("/options/counter_precision", data->priv->advrename_defaults->counter_precision);
-    gnome_cmd_data_set_int ("/options/counter_increment", data->priv->advrename_defaults->counter_increment);
-
-    gnome_cmd_data_set_int ("/options/rename-history-size",g_list_length (data->priv->advrename_defaults->patterns));
-    gnome_cmd_data_set_string_history ("/rename-history-from/from%d", from);
-    gnome_cmd_data_set_string_history ("/rename-history-to/to%d", to);
-    gnome_cmd_data_set_string_history ("/rename-history-csens/csens%d", csens);
+    gnome_cmd_data_set_int ("/advrename/counter_start", data->priv->advrename_defaults->counter_start);
+    gnome_cmd_data_set_int ("/advrename/counter_precision", data->priv->advrename_defaults->counter_precision);
+    gnome_cmd_data_set_int ("/advrename/counter_increment", data->priv->advrename_defaults->counter_increment);
+
+    gnome_cmd_data_set_int ("/rename-history/size",g_list_length (data->priv->advrename_defaults->patterns));
+    gnome_cmd_data_set_string_history ("/rename-history/from%d", from);
+    gnome_cmd_data_set_string_history ("/rename-history/to%d", to);
+    gnome_cmd_data_set_string_history ("/rename-history/csens%d", csens);
+
+    // removing config data used by gcmd < 1.2.5
+
+    gnome_config_clean_key (G_DIR_SEPARATOR_S PACKAGE "/options/template-auto-update");
+    gnome_config_clean_key (G_DIR_SEPARATOR_S PACKAGE "/options/counter_start");
+    gnome_config_clean_key (G_DIR_SEPARATOR_S PACKAGE "/options/counter_precision");
+    gnome_config_clean_key (G_DIR_SEPARATOR_S PACKAGE "/options/counter_increment");
+    gnome_config_clean_key (G_DIR_SEPARATOR_S PACKAGE "/options/rename-history-size");
+    gnome_config_clean_section (G_DIR_SEPARATOR_S PACKAGE "/rename-history-from");
+    gnome_config_clean_section (G_DIR_SEPARATOR_S PACKAGE "/rename-history-to");
+    gnome_config_clean_section (G_DIR_SEPARATOR_S PACKAGE "/rename-history-csens");
 }
 
 
@@ -1041,7 +1052,7 @@
 
     data->priv->advrename_defaults = g_new0 (AdvrenameDefaults, 1);
 
-    data->priv->advrename_defaults->auto_update = gnome_cmd_data_get_int ("/advrename/template-auto-update", TRUE);
+    data->priv->advrename_defaults->auto_update = gnome_cmd_data_get_int ("/advrename/template_auto_update", TRUE);
     data->priv->advrename_defaults->width = gnome_cmd_data_get_int ("/advrename/width", 450);
     data->priv->advrename_defaults->height = gnome_cmd_data_get_int ("/advrename/height", 400);
 
@@ -1066,11 +1077,11 @@
     data->priv->advrename_defaults->counter_increment = gnome_cmd_data_get_int ("/advrename/counter_increment", 1);
 
     data->priv->advrename_defaults->patterns = NULL;
-    size = gnome_cmd_data_get_int ("/advrename/rename-history-size", 0);
+    size = gnome_cmd_data_get_int ("/rename-history/size", 0);
 
-    tmp_from = from = load_string_history ("/rename-history-from/from%d", size);
-    tmp_to = to = load_string_history ("/rename-history-to/to%d", size);
-    tmp_csens = csens = load_string_history ("/rename-history-csens/csens%d", size);
+    tmp_from = from = load_string_history ("/rename-history/from%d", size);
+    tmp_to = to = load_string_history ("/rename-history/to%d", size);
+    tmp_csens = csens = load_string_history ("/rename-history/csens%d", size);
 
     while (tmp_from && size > 0)
     {



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