Mailinglist Archive: opensuse-commit (2092 mails)

< Previous Next >
commit yast2-printer
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Mon, 06 Aug 2007 23:36:48 +0200
  • Message-id: <20070806213648.B0A8A67817A@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package yast2-printer
checked in at Mon Aug 6 23:36:48 CEST 2007.

--------
--- yast2-printer/yast2-printer.changes 2007-07-26 10:42:52.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-printer/yast2-printer.changes    2007-08-06 10:07:18.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Aug  6 10:00:35 CEST 2007 - mzugec@xxxxxxx
+
+- reverted factory patch (remove tabs)
+- 2.15.4 
+
+-------------------------------------------------------------------

Old:
----
  yast2-printer-2.15.3.tar.bz2

New:
----
  yast2-printer-2.15.4.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.qT9930/_old  2007-08-06 23:36:16.000000000 +0200
+++ /var/tmp/diff_new_pack.qT9930/_new  2007-08-06 23:36:16.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package yast2-printer (Version 2.15.3)
+# spec file for package yast2-printer (Version 2.15.4)
 #
 # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
 # This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
 # norootforbuild
 
 Name:           yast2-printer
-Version:        2.15.3
+Version:        2.15.4
 Release:        1
 License:        GPL v2 or later
 Group:          System/YaST
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source0:        yast2-printer-2.15.3.tar.bz2
+Source0:        yast2-printer-2.15.4.tar.bz2
 prefix:                /usr
 BuildRequires:  blocxx-devel cups-devel cups-drivers cups-drivers-stp docbook-xsl-stylesheets doxygen gcc-c++ libxcrypt-devel libxslt openssl-devel perl-XML-Writer popt-devel sgml-skel update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-testsuite zlib-devel
 Requires:       yast2 netcat zlib blocxx
@@ -28,15 +28,15 @@
 Obsoletes:      yast2-agent-cups-devel yast2-agent-printerdb-devel y2d_prnt y2t_prnt yast2-db-printer yast2-printerdb
 Summary:        YaST2 - Printer Configuration
 %package devel-doc
-Version:        2.15.3
+Version:        2.15.4
 Release:        1
 License:        GPL v2 or later
 Group:          System/YaST
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source0:        yast2-printer-2.15.3.tar.bz2
+Source0:        yast2-printer-2.15.4.tar.bz2
 prefix:                /usr
 BuildRequires:  cups-devel yast2-core-devel zlib-devel
-Summary:        Developer documentation for yast2-printer
+Summary:        YaST2 - Developer documentation for yast2-printer
 
 %description
 This package contains the YaST2 component for printer configuration.
@@ -51,7 +51,7 @@
 
 
 %prep
-%setup -n yast2-printer-2.15.3
+%setup -n yast2-printer-2.15.4
 
 %build
 %{prefix}/bin/y2tool y2autoconf
@@ -134,6 +134,9 @@
 %exclude %{prefix}/share/doc/packages/yast2-printer/README
 
 %changelog
+* Mon Aug 06 2007 - mzugec@xxxxxxx
+- reverted factory patch (remove tabs)
+- 2.15.4
 * Thu Jul 26 2007 - mzugec@xxxxxxx
 - package splitted into yast2-printer and yast2-printer-devel-doc
 - 2.15.3

++++++ yast2-printer-2.15.3.tar.bz2 -> yast2-printer-2.15.4.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.15.3/configure new/yast2-printer-2.15.4/configure
--- old/yast2-printer-2.15.3/configure  2007-07-26 10:32:31.000000000 +0200
+++ new/yast2-printer-2.15.4/configure  2007-08-06 09:38:13.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for yast2-printer 2.15.2.
+# Generated by GNU Autoconf 2.60 for yast2-printer 2.15.3.
 #
 # Report bugs to <http://bugs.opensuse.org/>.
 #
@@ -713,8 +713,8 @@
 # Identity of this package.
 PACKAGE_NAME='yast2-printer'
 PACKAGE_TARNAME='yast2-printer'
-PACKAGE_VERSION='2.15.2'
-PACKAGE_STRING='yast2-printer 2.15.2'
+PACKAGE_VERSION='2.15.3'
+PACKAGE_STRING='yast2-printer 2.15.3'
 PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
 
 ac_unique_file="RPMNAME"
@@ -1431,7 +1431,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures yast2-printer 2.15.2 to adapt to many kinds of systems.
+\`configure' configures yast2-printer 2.15.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1502,7 +1502,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of yast2-printer 2.15.2:";;
+     short | recursive ) echo "Configuration of yast2-printer 2.15.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1607,7 +1607,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-yast2-printer configure 2.15.2
+yast2-printer configure 2.15.3
 generated by GNU Autoconf 2.60
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1621,7 +1621,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by yast2-printer $as_me 2.15.2, which was
+It was created by yast2-printer $as_me 2.15.3, which was
 generated by GNU Autoconf 2.60.  Invocation command line was
 
   $ $0 $@
@@ -2422,7 +2422,7 @@
 
 # Define the identity of the package.
  PACKAGE='yast2-printer'
- VERSION='2.15.2'
+ VERSION='2.15.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2649,7 +2649,7 @@
 
 
 
-VERSION="2.15.2"
+VERSION="2.15.3"
 RPMNAME="yast2-printer"
 MAINTAINER="Michal Zugec <mzugec@xxxxxxx>"
 
@@ -23268,7 +23268,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by yast2-printer $as_me 2.15.2, which was
+This file was extended by yast2-printer $as_me 2.15.3, which was
 generated by GNU Autoconf 2.60.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -23321,7 +23321,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-yast2-printer config.status 2.15.2
+yast2-printer config.status 2.15.3
 configured by $0, generated by GNU Autoconf 2.60,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.15.3/configure.in new/yast2-printer-2.15.4/configure.in
--- old/yast2-printer-2.15.3/configure.in       2007-07-26 10:32:21.000000000 +0200
+++ new/yast2-printer-2.15.4/configure.in       2007-08-06 09:38:01.000000000 +0200
@@ -3,7 +3,7 @@
 dnl -- This file is generated by y2autoconf 2.15.0 - DO NOT EDIT! --
 dnl    (edit configure.in.in instead)
 
-AC_INIT(yast2-printer, 2.15.2, http://bugs.opensuse.org/, yast2-printer)
+AC_INIT(yast2-printer, 2.15.3, http://bugs.opensuse.org/, yast2-printer)
 dnl Check for presence of file 'RPMNAME'
 AC_CONFIG_SRCDIR([RPMNAME])
 
@@ -17,7 +17,7 @@
 AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
 
 dnl Important YaST2 variables
-VERSION="2.15.2"
+VERSION="2.15.3"
 RPMNAME="yast2-printer"
 MAINTAINER="Michal Zugec <mzugec@xxxxxxx>"
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.15.3/src/common/dialogs.ycp new/yast2-printer-2.15.4/src/common/dialogs.ycp
--- old/yast2-printer-2.15.3/src/common/dialogs.ycp     2007-07-23 16:22:12.000000000 +0200
+++ new/yast2-printer-2.15.4/src/common/dialogs.ycp     2007-08-06 10:01:28.000000000 +0200
@@ -8,7 +8,7 @@
  * Authors:
  *  Petr Blahos <pblahos@xxxxxxx>
  *
- * $Id: dialogs.ycp 39603 2007-07-23 14:22:23Z mzugec $
+ * $Id: dialogs.ycp 39964 2007-08-06 08:01:27Z mzugec $
  * Main dialogs.
  */
 {
@@ -28,8 +28,7 @@
     import "Stage";
     import "Wizard";
     import "Wizard_hw";
-    import "CWMTab";
-    import "CWM";
+    import "WizardHW";
 
     include "printer/helps.ycp";
     include "printer/misc.ycp";
@@ -2145,178 +2144,15 @@
        return add (items, `item (`id (-1), _("Other (not detected)"),
            !selected));
     }
-
-
-
-    /**
-     * Restart detection of printers.
-     * @return symbol always `next
-     */
-    define symbol runProbeDialog () ``{
-       Printer::Detect ();
-       return `next;
-    }
-
-   /**
-    * Run dialog for expert settings
-    * @return symbol ret (`change_ipp_listen, `cupsd, `cupsusb)
-    */
-   define symbol runCupsExpertDialog() ``{
-
-
- term contents = `HBox (`HStretch (), `VBox (
-            `VStretch (),
-            `RadioButtonGroup (`id (`rb),
-                        // frame
-                `Frame (_("Configure CUPS"),`HBox (
-                    `HSpacing (3),
-                    `VBox (
-                        `VSpacing (3),
-                                // radiobutton
-          `Left(`RadioButton( `id(0), _("Change IPP Listen"))),
-          `Left(`RadioButton( `id(1), _("CUPS Server Se&ttings"))),
-          `Left(`RadioButton( `id(2), _("CUPS &USB Device Settings"))),
-                        // radiobutton
-                        `VSpacing (3)
-                    ),
-                    `HSpacing (3)
-                )
-            )),
-            `VStretch ()
-        ), `HStretch ());
-
-  Wizard::SetContentsButtons (_("Expert CUPS Settings"), contents,  getHelpCupsExperts() ,
-               Label::BackButton (), Label::NextButton () );
-
-        UI::ChangeWidget (`id (`rb), `CurrentButton,0);
-
-  any ret = UI::UserInput();
-  if (ret == `next){
-     integer option = tointeger(UI::QueryWidget(`id(`rb), `CurrentButton));
-     switch (option){
-      case 0 : return `change_ipp_listen;
-      case 1 : return `cupsd;
-      case 2 : return `cupsusb;
-     };
-  }
-  return (symbol) ret;
- }
-
-void initServerType (string key) {
- CUPS::ReadCupsSettings ();
- if (CUPS::InstallationType () == `server){
-  UI::ChangeWidget(`id(`server_type), `CurrentButton, `local);
-  } else {
-         UI::ChangeWidget(`id(`server_type), `CurrentButton, `remote);
-        }
- if ( contains (CUPS::cups_server_settings["Browsing"]:["On"],"On") ) UI::ChangeWidget(`ipp_listen, `Value, true);
-}
-
-list<string> getAddresses(list<string> addr_orig){
- list<string> addresses=addr_orig;
- term contents = `Frame (_("Browsing Settings"), `VBox (
-               // selectionbox label
-               `HBox (`HSpacing (3), `SelectionBox (`id (`addr), _("Browse Addre&sses")), `HSpacing (3)),
-               `HBox (
-                   `HSpacing (3),
-                   `PushButton (`id (`add), `opt (`key_F3), Label::AddButton ()),
-                   `PushButton (`id (`edit), `opt (`key_F4), Label::EditButton ()),
-                   `PushButton (`id (`del), `opt (`key_F5), Label::DeleteButton ()),
-                   `HStretch (),
-                   // push button
-//                 `PushButton (`id (`propose_server), _("&Propose")),
-                   `PushButton (`id (`ok), Label::OKButton()),
-                   `HSpacing (3)
-               )
-           ));
- UI::OpenDialog(contents);
- symbol ret = nil;
- do {
-     UI::ChangeWidget(`addr, `Items, addresses);
-     boolean enabled = (size(addresses)>0);
-     UI::ChangeWidget(`edit, `Enabled, enabled);
-     UI::ChangeWidget(`del, `Enabled, enabled);
-     ret = (symbol) UI::UserInput();
-     string curr = (string)UI::QueryWidget(`addr, `CurrentItem);
-     switch(ret){
-      case `add:
-               curr="";
-      case `edit:
-               UI::OpenDialog(`VBox(`TextEntry(`id(`ip_addr), _("IP Address"), curr),
-                               `HBox(`PushButton(`id(`cancel), Label::CancelButton()), `PushButton(`id(`ok), Label::OKButton()))));
-               if ((symbol)UI::UserInput()==`ok){
-                list<string> tmp_list = [];
-                foreach(string row, addresses, {
-                if (row==curr && curr!="") tmp_list = add(tmp_list, (string)UI::QueryWidget(`ip_addr, `Value));
-                       else tmp_list = add(tmp_list, row);
-                });
-                if (curr=="") tmp_list = add(tmp_list, (string)UI::QueryWidget(`ip_addr, `Value));
-               addresses = tmp_list;
-               }
-               UI::CloseDialog();
-               break;
-      case `del:
-               addresses = filter(string item, addresses, {return (item != curr);});
-               break;
-      case `cancel:
-               addresses = addr_orig;
-      case `ok:
-               ret = nil;
-               break;
-     }
-    }while (ret !=nil);
-
- UI::CloseDialog();
- return addresses;
-}
-
-symbol handleServerType (string key, map event) ``{
- boolean local = (UI::QueryWidget(`id(`server_type), `CurrentButton) == `local);
-
- UI::ChangeWidget(`ipp_listen, `Enabled, local);
- if (local){
-        boolean listen = (boolean)UI::QueryWidget(`ipp_listen, `Value);
-        UI::ChangeWidget(`select_addr, `Enabled, listen);
-       }
- UI::ChangeWidget(`server_name, `Enabled, !local);
- UI::ChangeWidget(`lookup_server, `Enabled, !local);
- UI::ChangeWidget(`test_ipp, `Enabled, !local);
- UI::ChangeWidget(`use_default, `Enabled, !local);
-
-  boolean use_def=false;
- if (!local) use_def=!(boolean) UI::QueryWidget(`use_default, `Value);
- UI::ChangeWidget(`queues, `Enabled, use_def);
- UI::ChangeWidget(`lookup_queue, `Enabled, use_def);
- if (event["EventReason"]:""=="Activated" && event["ID"]:`nil==`select_addr) {
-       CUPS::cups_server_settings["BrowseAddress"] = getAddresses(CUPS::cups_server_settings["BrowseAddress"]:[]);
- }
- return nil;
-}
-
-void storeServerType(string key, map event){
- boolean local = (UI::QueryWidget(`id(`server_type), `CurrentButton) == `local);
- if (local){
-        CUPS::cups_installation=`server;
-        boolean listen = (boolean)UI::QueryWidget(`ipp_listen, `Value);
-         CUPS::cups_server_settings["Browsing"] = listen ? ["On"] : ["Off"];
-       }else{
-        CUPS::cups_installation=`client;
-       }
-}
-
-
     /**
      * Function to set the data to the hardware dialog
      * get inspired by summary and getAutoprobedSelectionBox when writing it
      */
-
-list<map<string,any> > o_items = nil;
-
-void initHWDialogData (string key) {
+void SetHWDialogData () {
         string new_spooler = Spooler::Get ();
         if (new_spooler == "cups" && CUPS::InstallationType () == `client) new_spooler = "cups-client";
        y2milestone("%1", new_spooler);
-         o_items = [];
+         list < map<string,any> > printers = [];
      if (new_spooler == "cups")
       {
         list < map<string,any> > items = maplist (map i, Printer::printcap, ``{
@@ -2364,7 +2200,7 @@
        integer pos=0;
        Printer::conf_unconf_printers = items;
        maplist(map<string,any> s, items, {
-               o_items = add(o_items,  $[ 
+               printers = add(printers,  $[ 
                                                "id" : tostring(pos), 
                                                "rich_descr" : s["DESCR"]:"none",
                                                "table_descr":[  
@@ -2376,7 +2212,7 @@
                pos = pos + 1;
                });
        } else {
-       o_items = [ $[
+       printers = [ $[
                                                 "id" : "0",
                                                 "rich_descr" : "<b>" + CUPS::server_hostname + "</b><br>" 
                                                + ((CUPS::server_default == true) ? _("Default Queue") : (_(" With Spool ") + Printer::default_queue)),
@@ -2387,24 +2223,73 @@
                                                                 "" ]
                                            ] ];
        }
-    list<term> term_items = maplist (map<string,any> i, o_items, {
-        term t = `item (`id (i["id"]:""));
-        foreach (string l, i["table_descr"]:[], {
-            t = add (t, l);
-        });
-        return t;
-    });
-    UI::ChangeWidget (`id (`_hw_items), `Items, term_items);
+  WizardHW::SetContents ( printers );
 }
+
+
+
+    /**
+     * Restart detection of printers.
+     * @return symbol always `next
+     */
+    define symbol runProbeDialog () ``{
+       Printer::Detect ();
+       return `next;
+    }
+
+   /**
+    * Run dialog for expert settings
+    * @return symbol ret (`change_ipp_listen, `cupsd, `cupsusb)
+    */
+   define symbol runCupsExpertDialog() ``{
+
+
+ term contents = `HBox (`HStretch (), `VBox (
+            `VStretch (),
+            `RadioButtonGroup (`id (`rb),
+                        // frame
+                `Frame (_("Configure CUPS"),`HBox (
+                    `HSpacing (3),
+                    `VBox (
+                        `VSpacing (3),
+                                // radiobutton
+          `Left(`RadioButton( `id(0), _("Change IPP Listen"))),
+          `Left(`RadioButton( `id(1), _("CUPS Server Se&ttings"))),
+          `Left(`RadioButton( `id(2), _("CUPS &USB Device Settings"))),
+                        // radiobutton
+                        `VSpacing (3)
+                    ),
+                    `HSpacing (3)
+                )
+            )),
+            `VStretch ()
+        ), `HStretch ());
+
+  Wizard::SetContentsButtons (_("Expert CUPS Settings"), contents,  getHelpCupsExperts() ,
+               Label::BackButton (), Label::NextButton () );
+
+        UI::ChangeWidget (`id (`rb), `CurrentButton,0);
+
+  any ret = UI::UserInput();
+  if (ret == `next){
+     integer option = tointeger(UI::QueryWidget(`id(`rb), `CurrentButton));
+     switch (option){
+      case 0 : return `change_ipp_listen;
+      case 1 : return `cupsd;
+      case 2 : return `cupsusb;
+     };
+  }
+  return (symbol) ret;
+ }
+
     /**
      * Common detected hardware dialog.
      * @return symbol for ws
      */
-    define symbol handleDetected (string key, map event) ``{
+    define symbol runDetectedDialog () ``{
        y2milestone ("Starting detected dialog");
 
        // several functions dialog
-/*
        WizardHW::CreateHWDialog (_("Printer Configuration"), getComplexHelp (),
            [_("Queue Name"),_("Device"), _("Model"),  _("Default Queue") ],
            [
@@ -2414,213 +2299,87 @@
                [ `change_ipp_listen, _("Change IPP Listen") ],
                [ `change_remote_access, _("Change Remote Access Settings") ]
            ]);
-*/
-//  Wizard::SetContentsButtons (_("Expert CUPS Settings"), contents,  "" ,
-//                Label::BackButton (), Label::NextButton () );
-       
-//     initHWDialogData ();
+       SetHWDialogData ();
 
-//     Wizard::SetNextButton(`next, _("Finish"));
+       Wizard::SetNextButton(`next, _("Finish"));
 
-//     WizardHW::SetSelectedItem (Printer::runAutoprobedListDialog__current);
+       WizardHW::SetSelectedItem (Printer::runAutoprobedListDialog__current);
 
 
+       boolean cont = true;
        symbol ret=nil;
         string new_spooler = Spooler::Get ();
-           integer selected = tointeger( UI::QueryWidget(`id(`_hw_items), `CurrentItem));
-               if (selected != nil) Printer::selectPrinter(selected);
+       while (cont)
+       {
+           map<string,any> hw_ret = WizardHW::WaitForEvent ();
+           map event = hw_ret["event"]:$[];
+           string selected = hw_ret["selected"]:"";
+           ret = (symbol) event["ID"]:nil;
+               if (tointeger(selected) != nil) Printer::selectPrinter(tointeger(selected));
                        else Printer::selectPrinter(-1);
-        if (new_spooler == "cups" && CUPS::InstallationType () == `client) new_spooler = "cups-client";
-
-       // FIXME : test if this is string or term
-       if ( (symbol)event["ID"]:nil==nil ) { ret=nil; }
-        else{
-         ret = (symbol) event["ID"]:nil;
-       switch((symbol) event["ID"]:nil){
-        case `delete :
+        if (new_spooler == "cups" && CUPS::InstallationType () == `client)
+        {
+            new_spooler = "cups-client";
+        }
+       if (ret == `delete)
+           {
                if (new_spooler == "cups-client") {CUPS::cups_installation=`server;new_spooler="cups";}
-                       else if ( (Printer::conf_unconf_printers[selected, "SPOOL"]:"" != "not configured") && Popup::YesNo (sformat (_("Really delete printer %1?"), Printer::printer["name"]:""))) Printer::deletePrinter ();
-               initHWDialogData("");
-               ret=nil;
-               break;
+                       else if ( (Printer::conf_unconf_printers[tointeger(selected), "SPOOL"]:"" != "not configured") && Popup::YesNo (sformat (_("Really delete printer %1?"), Printer::printer["name"]:""))) Printer::deletePrinter ();
+               SetHWDialogData();
+               continue;
+           }
 // TODO handle all events here
-       case `default_q :
-               Printer::setDefaultPrinter ();
-               ret = `restart_button;
-               break;
-       case `add :
-               Printer::selectPrinter(-1);
-               ret = `configure_button; 
-               break;
-       case `edit :
-               if (new_spooler == "cups")
-                {
-                 if (Printer::printer == $["type":"yast2"]) 
-                  {
-                   integer from_detect = -1;
-                   integer count = 0;
-                   string prn_id="";
-                   foreach(map<string, any> temp_printer, Printer::Detect(), {
-                       string temp_string = splitstring(temp_printer["uri"]:"", ":")[1]:"";
-                        if (selected >= count)
-                        {
-                         if (Printerlib::getReplacedString(temp_string, false) ==
-                                                               Printer::conf_unconf_printers[selected, "ID"]:"")
-                          {
-                           from_detect = from_detect + 1;
-                           break;
-                          }
-                         if (temp_string != prn_id)
-                          {
-                           from_detect = from_detect+1;
-                           prn_id = temp_printer["ID"]:"";
-                          }
-                         count=count + 1;
-                        }
-                   });
-                   Printer::editDetected(Printer::Detect()[from_detect]:$[]);
-                   y2milestone("Configuring detected, non-configured printer %1", Printer::Detect()[from_detect]:$[]);
-                  }
-                 if (Printer::printer["ppd_info", "model"]:nil == nil) ret=`edit_unconf;
-                       else ret = `edit_button;
-                } else ret=`connection_cups;
-               break;
-       case `redetect:
-               ret = `restart_button;
-               break;
+           else
+               if (ret == `default_q) 
+                       {
+                       Printer::setDefaultPrinter ();
+                       ret = `restart_button;
+                       }
+               if (ret == `add) 
+                       {
+                        Printer::selectPrinter(-1);
+                        ret = `configure_button; 
+                       }
+               if (ret == `edit)
+                   {
+                          if (new_spooler == "cups")
+                               {
+                                if (Printer::printer == $["type":"yast2"]) 
+                                       {
+                                         integer from_detect = -1;
+                                         integer count = 0;
+                                         string prn_id="";
+
+                                       foreach(map<string, any> temp_printer, Printer::Detect(), {
+                                               string temp_string = splitstring(temp_printer["uri"]:"", ":")[1]:"";
+                                              if (tointeger(selected) >= count)
+                                               {
+                                                if (Printerlib::getReplacedString(temp_string, false) ==
+                                                               Printer::conf_unconf_printers[tointeger(selected), "ID"]:"")
+                                                 {
+                                                  from_detect = from_detect + 1;
+                                                  break;
+                                                 }
+                                                if (temp_string != prn_id)
+                                                       {
+                                                       from_detect = from_detect+1;
+                                                       prn_id = temp_printer["ID"]:"";
+                                                       }
+                                                 count=count + 1;
+                                                }
+                                               });
+                                        Printer::editDetected(Printer::Detect()[from_detect]:$[]);
+                                y2milestone("Configuring detected, non-configured printer %1", Printer::Detect()[from_detect]:$[]);
+                                       }
+                               if (Printer::printer["ppd_info", "model"]:nil == nil) ret=`edit_unconf;
+                                       else ret = `edit_button;
+                               } else ret=`connection_cups;
+                    }
+                        else if (ret == `redetect) ret = `restart_button;
+               cont = false;
        }
-       }
-
-  string descr = "";
-  foreach(map<string, any> row, o_items, {
-   if (row["id"]:"" == tostring(selected)) descr = row["rich_descr"]:"";
-  });
-  UI::ChangeWidget(`_hw_sum, `Value, descr);
-
-  boolean enabled=size((list)UI::QueryWidget(`id(`_hw_items), `Items))>0;
-  UI::ChangeWidget(`id(`edit), `Enabled, enabled);
-  UI::ChangeWidget(`id(`delete), `Enabled, enabled);
-
- return ret; // FIXME
-}
-
-void runCups(string key){
- runCupsServerDialog ();
-}
-
-
-map<string, map<string,any> > wd = $[
-          "SERVER_TYPE" : $[
-            "widget" : `custom,
-            "custom_widget" :
-            `MarginBox(1,0,
-             `VBox(
-               `Frame(_("Print via"),
-                `RadioButtonGroup( `id( `server_type ),
-                 `VBox(
-                       `VBox(
-                        `Left( `RadioButton(`id(`local), `opt(`notify), "Local CUPS Server")),
-                         `HBox(`CheckBox(`id(`ipp_listen), `opt(`notify), _("Listen to IPP Broadcast Packets")),
-                               `PushButton(`id(`select_addr), _("Select Addresses"))
-                             )
-                            ),
-                       `VBox(
-                        `Left(`RadioButton(`id(`remote), `opt(`notify), "Remote CUPS Server" )),
-                        `HBox(
-                               `TextEntry(`id(`server_name), _("Server Name")),
-                               `PushButton(`id(`lookup_server), _("Lookup")),
-                               `PushButton(`id(`test_ipp), _("Test Remote IPP Access"))
-                             ),
-                        `CheckBox(`id(`use_default), `opt(`notify), _("Use Server's Default Queue")),
-                        `HBox(
-                               `ComboBox(`id(`queues), _("Queues")),
-                               `PushButton(`id(`lookup_queue), _("Lookup"))
-                             )
-                       )
-                ))),
-               `VStretch()
-            )),
-           "init"   : initServerType,
-           "handle" : handleServerType,
-           "store"  : storeServerType
-         ],
-          "OVERVIEW" : $[
-            "widget" : `custom,
-            "custom_widget" :
-                `VBox(
-                  `VWeight(2,`Table (`id (`_hw_items), `opt (`notify, `immediate), 
-                                       `header(_("Queue Name"),_("Device"), _("Model"),  _("Default Queue")))),
-                  `VWeight(1,`RichText (`id (`_hw_sum), "")),
-                  `HBox (
-                        `PushButton (`id (`add), Label::AddButton ()),
-                        `PushButton (`id (`edit), _("Configure")),
-                        `PushButton (`id (`delete), Label::DeleteButton ()),
-                        `HStretch ()
-                        )
-                ),
-            "init" : initHWDialogData,
-            "handle" : handleDetected,
-//          "store" : storeOverview,
-//            "help" : help["overview"]:""
-          ],
-          "SERVER" : $[
-            "widget" : `custom,
-            "custom_widget" : `Empty(),
-           "init" : runCups
-          ]
-        ];
-
-map tabs_descr = $[
-        "global" : $[
-          "header" : _("Global Settings"),
-          "contents" : `VBox (
-            "SERVER_TYPE"
-          ),
-         "widget_names" : ["SERVER_TYPE"]
-        ],
-        "overview" : $[
-          "header" : _("Printers and Queues"),
-          "contents" : `VBox (
-            "OVERVIEW"
-          ),
-         "widget_names" : ["OVERVIEW"]
-        ],
-        "server" : $[
-          "header" : _("Some server settings"),
-          "contents" : `VBox (),
-         "widget_names" : ["SERVER"]
-        ],
-];
-
-
-symbol runDetectedDialog(){
-
-    string caption = _("Detected Printers");
-    map widget_descr = $[
-        "tab": CWMTab::CreateWidget($[
-            "tab_order":  [ "global", "overview", "server" ],
-            "tabs": tabs_descr,
-            "widget_descr": wd,
-            "initial_tab" :  "overview",
-            "tab_help" : "",
-        ]),
-    ];
-    term contents = `VBox( "tab");
-
-    list<map <string, any> > w = CWM::CreateWidgets (["tab"], (map <string, map <string, any> >)widget_descr);
-    string help = CWM::MergeHelps(w);
-    contents = CWM::PrepareDialog(contents, w);
-
-    Wizard::SetContentsButtons(caption, contents, help, Label::BackButton (), Label::AcceptButton ());
-    Wizard::DisableBackButton();
-
-    symbol ret = CWM::Run(w, $[]);
-
-    return ret;
-
-}
-
-
+       return ret; // FIXME
+    }
 
 define symbol runRemoteAccessDialog(){
  term contents = `HBox (`HStretch (), `VBox (
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.15.3/src/modules/CUPS.ycp new/yast2-printer-2.15.4/src/modules/CUPS.ycp
--- old/yast2-printer-2.15.3/src/modules/CUPS.ycp       2007-05-15 18:11:42.000000000 +0200
+++ new/yast2-printer-2.15.4/src/modules/CUPS.ycp       2007-08-06 10:01:28.000000000 +0200
@@ -11,7 +11,7 @@
  * Authors:
  *   Jiri Srain <jsrain@xxxxxxx>
  *
- * $Id: CUPS.ycp 37980 2007-05-15 16:11:36Z mzugec $
+ * $Id: CUPS.ycp 39964 2007-08-06 08:01:27Z mzugec $
  *
  * Printer library exported functions. What else?!?
  */
@@ -188,8 +188,6 @@
  * @return boolean true on success
  */
 global boolean ReadCupsSettings () {
- if (cups_server_settings==nil || cups_server_permissions==nil)
-  {
     list<string> options = (list<string>)
        SCR::Dir (.etc.cups.cupsd_conf.value);
     options = toset (options);
@@ -224,7 +222,6 @@
     y2milestone ("CUPS permissions read: %1", permissions);
     cups_server_settings = settings;
     cups_server_permissions = permissions;
-  } else y2warning("CUPS already readed");
     return true;
 }
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.15.3/VERSION new/yast2-printer-2.15.4/VERSION
--- old/yast2-printer-2.15.3/VERSION    2007-07-26 10:37:53.000000000 +0200
+++ new/yast2-printer-2.15.4/VERSION    2007-08-06 10:00:32.000000000 +0200
@@ -1 +1 @@
-2.15.3
+2.15.4


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

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

< Previous Next >
This Thread
  • No further messages