On cancel, the status will be set to:
Failed to mark all available upgrades!
which is not correct.
This should rather not-set/clear the status message, as per cancelling other operations (see gtk/rgmainwindow.cc:2905, for example), or at least change to mention “cancelled”. Below is a patch for this. Note that the final call to showErrors is a noop on cancel, since askStateChange will discard pending errors if the user cancels.
- if (res)
+ if (!changed)
+ me->setStatusText();
+ else if (res) me->setStatusText(_("Successfully marked available upgrades"));
else me->setStatusText(_("Failed to mark all available upgrades!"));
On cancel, the status will be set to:
Failed to mark all available upgrades!
which is not correct.
This should rather not-set/clear the status message, as per cancelling other operations (see gtk/rgmainwindo w.cc:2905, for example), or at least change to mention “cancelled”. Below is a patch for this. Note that the final call to showErrors is a noop on cancel, since askStateChange will discard pending errors if the user cancels.
=== modified file 'gtk/rgmainwind ow.cc' >upgrade( );
--- gtk/rgmainwindow.cc 2012-07-12 20:03:08 +0000
+++ gtk/rgmainwindow.cc 2012-11-13 01:58:53 +0000
@@ -3247,10 +3247,12 @@
else
res = me->_lister-
- me->askStateCha nge(state) ; nge(state) ; >refreshTable( pkg);
+ bool changed = me->askStateCha
me-
- if (res) xt();
me->setStatusTe xt(_("Successfu lly marked available upgrades"));
me->setStatusTe xt(_("Failed to mark all available upgrades!"));
+ if (!changed)
+ me->setStatusTe
+ else if (res)
else