Mailinglist Archive: yast-commit (535 mails)

< Previous Next >
[yast-commit] r41230 - in /trunk/add-on-creator: VERSION package/yast2-add-on-creator.changes src/AddOnCreator.ycp src/patterns.ycp
  • From: jsuchome@xxxxxxxxxxxxxxxx
  • Date: Wed, 03 Oct 2007 12:41:25 -0000
  • Message-id: <20071003124125.836972FC5E@xxxxxxxxxxxxxxxx>
Author: jsuchome
Date: Wed Oct  3 14:41:25 2007
New Revision: 41230

URL: http://svn.opensuse.org/viewcvs/yast?rev=41230&view=rev
Log:
- create patterns with correct key ordering (#328816)
- after pattern import, show also keys without value (#329738)
- remember patter import path (#329731)
- 2.16.0


Modified:
    trunk/add-on-creator/VERSION
    trunk/add-on-creator/package/yast2-add-on-creator.changes
    trunk/add-on-creator/src/AddOnCreator.ycp
    trunk/add-on-creator/src/patterns.ycp

Modified: trunk/add-on-creator/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/VERSION?rev=41230&r1=41229&r2=41230&view=diff
==============================================================================
--- trunk/add-on-creator/VERSION (original)
+++ trunk/add-on-creator/VERSION Wed Oct  3 14:41:25 2007
@@ -1 +1 @@
-2.15.21
+2.16.0

Modified: trunk/add-on-creator/package/yast2-add-on-creator.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/package/yast2-add-on-creator.changes?rev=41230&r1=41229&r2=41230&view=diff
==============================================================================
--- trunk/add-on-creator/package/yast2-add-on-creator.changes (original)
+++ trunk/add-on-creator/package/yast2-add-on-creator.changes Wed Oct  3 14:41:25 2007
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Mon Oct  1 11:23:59 CEST 2007 - jsuchome@xxxxxxx
+
+- create patterns with correct key ordering (#328816)
+- after pattern import, show also keys without value (#329738)
+- remember patter import path (#329731)
+- 2.16.0
+
+-------------------------------------------------------------------
 Fri Sep 14 08:39:09 CEST 2007 - jsuchome@xxxxxxx
 
 - enable deleting of pattern keys (#297195)

Modified: trunk/add-on-creator/src/AddOnCreator.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/AddOnCreator.ycp?rev=41230&r1=41229&r2=41230&view=diff
==============================================================================
--- trunk/add-on-creator/src/AddOnCreator.ycp (original)
+++ trunk/add-on-creator/src/AddOnCreator.ycp Wed Oct  3 14:41:25 2007
@@ -260,7 +260,7 @@
 
 
 // desctiption of pattern keys
-global map pattern_descr       = $[
+global map<string,map> pattern_descr     = $[
     "name"   : $[
        "internal"    : true,
     ],
@@ -873,6 +873,15 @@
        else
            ret[key]    = val;
     });
+    foreach (string key, map descr, pattern_descr, {
+       if (!haskey (ret, key) && !descr["internal"]:false)
+       {
+           y2debug ("adding empty key '%1'...", key);
+           // do not add default values - maybe imported pattern
+           // ignored them intentionally
+           ret[key]    = "";
+       }
+    });
     return ret;
 }
 
@@ -1563,7 +1572,10 @@
        if (filename == "")
            return;
        names           = add (names, filename);
-       string file     = "";
+       string file     = sformat ("=Ver: %1\n\n=Pat: %2\n",
+           pattern["Ver"]:pattern_descr["Ver","defval"]:"",
+           pattern["Pat"]:"");
+       pattern = remove (remove (pattern, "Ver"), "Pat");
        foreach (string key, any val, (map<string,any>) pattern, {
            map descr           = pattern_descr[key]:$[];
            // substring (key,0,3) is because of Des.lang, Sum.lang and Cat.lang

Modified: trunk/add-on-creator/src/patterns.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/patterns.ycp?rev=41230&r1=41229&r2=41230&view=diff
==============================================================================
--- trunk/add-on-creator/src/patterns.ycp (original)
+++ trunk/add-on-creator/src/patterns.ycp Wed Oct  3 14:41:25 2007
@@ -179,6 +179,7 @@
 
     map<string,map> patterns     = AddOnCreator::patterns;
     string requires            = AddOnCreator::content_map["REQUIRES"]:"";
+    string import_path         = AddOnCreator::rpm_path;
 
     // helper for generation of table items
     list get_pattern_items (map pattern) {
@@ -279,8 +280,7 @@
            }
        }
        else if (ret == `import_pt) {
-           string file = UI::AskForExistingFile (
-               AddOnCreator::rpm_path, "*.pat",
+           string file = UI::AskForExistingFile (import_path, "*.pat",
                // popup for file selection dialog
                _("Existing Pattern")
            );
@@ -300,6 +300,7 @@
                        get_patterns_items());
                    UI::ChangeWidget(`id(`patterns), `CurrentItem, name);
                }
+               import_path     = file;
            }
        }
        else if (ret == `delete_pt) {

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages