Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49785 - /branches/tmp/lslezak/product-creator-cross-arch/src/dialogs.ycp
  • From: lslezak@xxxxxxxxxxxxxxxx
  • Date: Wed, 06 Aug 2008 14:41:24 -0000
  • Message-id: <20080806144124.CE48529FE8@xxxxxxxxxxxxxxxx>
Author: lslezak
Date: Wed Aug 6 16:41:24 2008
New Revision: 49785

URL: http://svn.opensuse.org/viewcvs/yast?rev=49785&view=rev
Log:
- display the target architecture in the source selection dialog

Modified:
branches/tmp/lslezak/product-creator-cross-arch/src/dialogs.ycp

Modified: branches/tmp/lslezak/product-creator-cross-arch/src/dialogs.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/product-creator-cross-arch/src/dialogs.ycp?rev=49785&r1=49784&r2=49785&view=diff
==============================================================================
--- branches/tmp/lslezak/product-creator-cross-arch/src/dialogs.ycp (original)
+++ branches/tmp/lslezak/product-creator-cross-arch/src/dialogs.ycp Wed Aug 6
16:41:24 2008
@@ -442,9 +442,9 @@

term content = `MarginBox(1, 0.5,
`VBox(
- `Label(sformat(_("The source does not support the architecture of
this machine (%1).
+ `Label(sformat(_("The source does not support the target
architecture (%1).
Change the target architecture?
-"), Arch::architecture())),
+"), ProductCreator::GetArch)),
`VSpacing(1),
`Frame(_("Target Architecture"),
`RadioButtonGroup(`id(`rb),
@@ -580,12 +580,21 @@


term buttons =
- `HBox(
- `PushButton(`id(`select), Label::SelectButton() ),
- `PushButton(`id(`remove), Label::RemoveButton() ),
- // push button label
- `PushButton(`id(`create), _("Cr&eate New..."))
- );
+ `VBox(
+ `HBox(
+ `ReplacePoint(`id(`rp),
+ `Label(sformat(_("Target Architecture: %1"),
ProductCreator::GetArch()))
+ ),
+ `HSpacing(1),
+ `PushButton(`id(`arch), _("Change..."))
+ ),
+ `HBox(
+ `PushButton(`id(`select), Label::SelectButton() ),
+ `PushButton(`id(`remove), Label::RemoveButton() ),
+ // push button label
+ `PushButton(`id(`create), _("Cr&eate New..."))
+ )
+ );


term contents =
@@ -629,6 +638,7 @@
else if (ret == `select)
{
integer SrcID = (integer)UI::QueryWidget(`id(`table),
`CurrentItem);
+ string target_arch = ProductCreator::GetArch();

boolean repo_ok = CheckArchitecture(SrcID);

@@ -648,6 +658,14 @@
}

UI::ChangeWidget(`id(`table), `Item(SrcID, 0) , _("X"));
+
+ // refresh the target architecture if it has been changed
+ if (target_arch != ProductCreator::GetArch())
+ {
+ UI::ReplaceWidget(`rp,
+ `Label(sformat(_("Target Architecture: %1"),
ProductCreator::GetArch()))
+ );
+ }
}
}
else if (ret == `remove)
@@ -713,7 +731,6 @@
// TODO: check archs onece again (needed after switching
architecture multiple times)
// reload repositories
Pkg::SourceFinishAll();
-// Pkg::TargetInit("/");
Pkg::SourceStartManager(false);
}

@@ -724,6 +741,10 @@
else if( ret == `back) {
break;
}
+ else if (ret == `arch)
+ {
+ // TODO FIXME: ask for the target architecture
+ }
else {
y2error("unexpected retcode: %1", ret);
continue;

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

< Previous Next >
This Thread
  • No further messages