gnome-commander r1504 - in branches/gcmd-1-3: . doc/C src



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

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

Modified:
   branches/gcmd-1-3/ChangeLog
   branches/gcmd-1-3/doc/C/gnome-commander.xml
   branches/gcmd-1-3/src/gnome-cmd-data.cc

Modified: branches/gcmd-1-3/doc/C/gnome-commander.xml
==============================================================================
--- branches/gcmd-1-3/doc/C/gnome-commander.xml	(original)
+++ branches/gcmd-1-3/doc/C/gnome-commander.xml	Thu Jan 10 21:44:30 2008
@@ -4965,27 +4965,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>
@@ -5237,13 +5216,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>
@@ -5488,6 +5460,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>
@@ -5544,21 +5544,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: branches/gcmd-1-3/src/gnome-cmd-data.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-data.cc	(original)
+++ branches/gcmd-1-3/src/gnome-cmd-data.cc	Thu Jan 10 21:44:30 2008
@@ -913,7 +913,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);
 
@@ -925,14 +925,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");
 }
 
 
@@ -1042,7 +1053,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);
 
@@ -1067,11 +1078,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]