Mailinglist Archive: yast-commit (939 mails)

< Previous Next >
[yast-commit] r53206 - in /trunk/printer: ./ package/ src/
  • From: jsmeix@xxxxxxxxxxxxxxxx
  • Date: Wed, 12 Nov 2008 14:11:46 -0000
  • Message-id: <20081112141146.7BE8D34691@xxxxxxxxxxxxxxxx>
Author: jsmeix
Date: Wed Nov 12 15:11:46 2008
New Revision: 53206

URL: http://svn.opensuse.org/viewcvs/yast?rev=53206&view=rev
Log:

- Remove the queue if it was only partially added and removed
duplicate error messages when adding or deleting a queue.
- Enforced a consistent meaning of the "OK" button
(see Novell/Suse Bugzilla bnc#443676).
- 2.17.36


Modified:
trunk/printer/VERSION
trunk/printer/package/yast2-printer.changes
trunk/printer/src/Printer.ycp
trunk/printer/src/autoconfig.ycp
trunk/printer/src/basicadd.ycp
trunk/printer/src/overview.ycp
trunk/printer/src/policies.ycp
trunk/printer/src/printingvianetwork.ycp
trunk/printer/src/sharing.ycp
trunk/printer/src/wizards.ycp

Modified: trunk/printer/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/printer/VERSION?rev=53206&r1=53205&r2=53206&view=diff
==============================================================================
--- trunk/printer/VERSION (original)
+++ trunk/printer/VERSION Wed Nov 12 15:11:46 2008
@@ -1 +1 @@
-2.17.35
+2.17.36

Modified: trunk/printer/package/yast2-printer.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/printer/package/yast2-printer.changes?rev=53206&r1=53205&r2=53206&view=diff
==============================================================================
--- trunk/printer/package/yast2-printer.changes (original)
+++ trunk/printer/package/yast2-printer.changes Wed Nov 12 15:11:46 2008
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Wed Nov 12 14:55:36 CET 2008 - jsmeix@xxxxxxx
+
+- Remove the queue if it was only partially added and removed
+ duplicate error messages when adding or deleting a queue.
+- Enforced a consistent meaning of the "OK" button
+ (see Novell/Suse Bugzilla bnc#443676).
+- 2.17.36
+
+-------------------------------------------------------------------
Wed Nov 12 12:52:57 CET 2008 - jsmeix@xxxxxxx

- Added captions and the printer icon to the dialog header line

Modified: trunk/printer/src/Printer.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/Printer.ycp?rev=53206&r1=53205&r2=53206&view=diff
==============================================================================
--- trunk/printer/src/Printer.ycp (original)
+++ trunk/printer/src/Printer.ycp Wed Nov 12 15:11:46 2008
@@ -1650,11 +1650,21 @@
{ Popup::ErrorDetails( sformat( // Popup::ErrorDetails message where %1 will
be replaced by the queue name.
// Only a simple message because this error
does not happen on a normal system
// (i.e. a system which is not totally
broken or totally messed up).
- _("Failed to set up queue %1."),
+ _("Failed to add queue %1."),
queue_name
),
Printerlib::result["stderr"]:""
);
+ // When the PPD file is totally broken, it will not be accepted by the
cupsd.
+ // In this case lpadmin shows an error message and exits with non-zero
exit code
+ // but nevertherless the queue is created without a PPD file, i.e. as a
raw queue.
+ // It seems that first of all lpadmin creates the queue and then
+ // in a second step it is modified to assign the PPD file,
+ // see http://www.cups.org/newsgroups.php?gcups.bugs+T+Q"STR+%232949";
+ // Because this AddQueue function is only used to add a not-yet-existing
queue,
+ // it is safe to try to remove the queue in any case if the setup had
failed
+ // but ignore any possible errors here (e.g. when the queue does not
exist).
+ Printerlib::ExecuteBashCommand( "/usr/sbin/lpadmin -h localhost -x '" +
queue_name + "'" );
return false;
}
return true;
@@ -1686,7 +1696,7 @@
{ Popup::ErrorDetails( sformat( // Popup::ErrorDetails message where %1 will
be replaced by the queue name.
// Only a simple message because this error
does not happen on a normal system
// (i.e. a system which is not totally
broken or totally messed up).
- _("Failed to delete queue %1."),
+ _("Failed to delete configuration %1."),
queue_name
),
Printerlib::result["stderr"]:""

Modified: trunk/printer/src/autoconfig.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/autoconfig.ycp?rev=53206&r1=53205&r2=53206&view=diff
==============================================================================
--- trunk/printer/src/autoconfig.ycp (original)
+++ trunk/printer/src/autoconfig.ycp Wed Nov 12 15:11:46 2008
@@ -194,6 +194,9 @@
{ if( `back == event["ID"]:nil )
{ return `autoconfig_back;
}
+ if( `next == event["ID"]:nil )
+ { return `autoconfig_next;
+ }
}
return nil;
}

Modified: trunk/printer/src/basicadd.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/basicadd.ycp?rev=53206&r1=53205&r2=53206&view=diff
==============================================================================
--- trunk/printer/src/basicadd.ycp (original)
+++ trunk/printer/src/basicadd.ycp Wed Nov 12 15:11:46 2008
@@ -256,14 +256,8 @@
}
Wizard::DisableBackButton();
Wizard::DisableNextButton();
- if( ! Printer::AddQueue( queue_name ) )
- { Popup::Error( // Message of a Popup::Error
- // where %1 will be replaced by the queue name.
- // Only a simple message because before the function
Printer::AddQueue
- // was called and this function would have shown more
specific messages.
- sformat( _("Failed to add queue %1."), queue_name )
- );
- }
+ // No error messages here because Printer::AddQueue already shows them:
+ Printer::AddQueue( queue_name );
// After a local queue was added, enforce to show also local queues
// in particular when no local queues were shown before:
Printer::queue_filter_show_local = true;

Modified: trunk/printer/src/overview.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/overview.ycp?rev=53206&r1=53205&r2=53206&view=diff
==============================================================================
--- trunk/printer/src/overview.ycp (original)
+++ trunk/printer/src/overview.ycp Wed Nov 12 15:11:46 2008
@@ -328,14 +328,8 @@
{ // To be safe invalidate Printer::selected_queues_index in any case:
Printer::selected_queues_index = -1;
y2milestone( "To be deleted:'%1', selected_queue_index = %2",
queue_name, selected_queue_index );
- if( ! Printer::DeleteQueue( queue_name ) )
- { Popup::Error( // Message of a Popup::Error
- // where %1 will be replaced by the queue name.
- // Only a simple message because before the function
Printer::DeleteQueue
- // was called and this function would have shown more
specific messages.
- sformat( _("Failed to delete configuration %1."),
queue_name )
- );
- }
+ // No error messages here because Printer::DeleteQueue already shows
them:
+ Printer::DeleteQueue( queue_name );
// Re-run the OverviewDialog (with a re-created list of queues) via the
sequencer:
return `delete;
}

Modified: trunk/printer/src/policies.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/policies.ycp?rev=53206&r1=53205&r2=53206&view=diff
==============================================================================
--- trunk/printer/src/policies.ycp (original)
+++ trunk/printer/src/policies.ycp Wed Nov 12 15:11:46 2008
@@ -217,6 +217,9 @@
{ if( `back == event["ID"]:nil )
{ return `policies_back;
}
+ if( `next == event["ID"]:nil )
+ { return `policies_next;
+ }
}
return nil;
}

Modified: trunk/printer/src/printingvianetwork.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/printingvianetwork.ycp?rev=53206&r1=53205&r2=53206&view=diff
==============================================================================
--- trunk/printer/src/printingvianetwork.ycp (original)
+++ trunk/printer/src/printingvianetwork.ycp Wed Nov 12 15:11:46 2008
@@ -964,6 +964,9 @@
{ if( `back == event["ID"]:nil )
{ return `printing_via_network_back;
}
+ if( `next == event["ID"]:nil )
+ { return `printing_via_network_next;
+ }
if( `connection_wizard == event["ID"]:nil )
{ return `printing_via_network_connection_wizard;
}

Modified: trunk/printer/src/sharing.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/sharing.ycp?rev=53206&r1=53205&r2=53206&view=diff
==============================================================================
--- trunk/printer/src/sharing.ycp (original)
+++ trunk/printer/src/sharing.ycp Wed Nov 12 15:11:46 2008
@@ -930,6 +930,9 @@
{ if( `back == event["ID"]:nil )
{ return `sharing_back;
}
+ if( `next == event["ID"]:nil )
+ { return `sharing_next;
+ }
switch( event["WidgetID"]:`nil )
{ integer current_item = -1;
map ret = nil;

Modified: trunk/printer/src/wizards.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/wizards.ycp?rev=53206&r1=53205&r2=53206&view=diff
==============================================================================
--- trunk/printer/src/wizards.ycp (original)
+++ trunk/printer/src/wizards.ycp Wed Nov 12 15:11:46 2008
@@ -66,10 +66,14 @@
`modify : "modify",
`delete : "overview",
`printing_via_network_back : "overview",
+ `printing_via_network_next : "overview",
`printing_via_network_connection_wizard :
"printing_via_network_connection_wizard",
`sharing_back : "overview",
+ `sharing_next : "overview",
`policies_back : "overview",
- `autoconfig_back : "overview"
+ `policies_next : "overview",
+ `autoconfig_back : "overview",
+ `autoconfig_next : "overview"
],
"add" : $[ `abort : `abort,
`back : "overview",

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

< Previous Next >
This Thread
  • No further messages