Author: lslezak
Date: Wed Jul 20 12:59:59 2011
New Revision: 64914
URL: http://svn.opensuse.org/viewcvs/yast?rev=64914&view=rev
Log:
reverted commit r62689 ("backported layout change for repository (bnc#510794)"),
it should not go out as a maintenance update, it's for SP2 only
adjusted version to 2.17.79.1
Modified:
branches/SuSE-Code-11-SP1-Branch/packager/VERSION
branches/SuSE-Code-11-SP1-Branch/packager/package/yast2-packager.changes
branches/SuSE-Code-11-SP1-Branch/packager/src/clients/repositories.ycp
Modified: branches/SuSE-Code-11-SP1-Branch/packager/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/packager/VERSION?rev=64914&r1=64913&r2=64914&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/packager/VERSION (original)
+++ branches/SuSE-Code-11-SP1-Branch/packager/VERSION Wed Jul 20 12:59:59 2011
@@ -1 +1 @@
-2.17.79.1
+2.17.78.1
Modified: branches/SuSE-Code-11-SP1-Branch/packager/package/yast2-packager.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/packager/package/yast2-packager.changes?rev=64914&r1=64913&r2=64914&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/packager/package/yast2-packager.changes (original)
+++ branches/SuSE-Code-11-SP1-Branch/packager/package/yast2-packager.changes Wed Jul 20 12:59:59 2011
@@ -5,13 +5,7 @@
libzypp mode (bnc#616708) (backported commits 62714,
partly 54940)
- support for download in advance mode in yast2-wagon (fate#308951)
-- 2.17.79.1
-
--------------------------------------------------------------------
-Wed Oct 27 10:14:52 CEST 2010 - mzugec@suse.cz
-
-- backported layout change for repository (bnc#510794)
-- 2.17.79
+- 2.17.78.1
-------------------------------------------------------------------
Thu May 6 13:28:47 CEST 2010 - jsrain@suse.cz
Modified: branches/SuSE-Code-11-SP1-Branch/packager/src/clients/repositories.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/packager/src/clients/repositories.ycp?rev=64914&r1=64913&r2=64914&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/packager/src/clients/repositories.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/packager/src/clients/repositories.ycp Wed Jul 20 12:59:59 2011
@@ -69,8 +69,6 @@
const string priority_label = _("&Priority");
- const string keeppackages_label = _("Keep Downloaded Packages");
-
// current view:
// selected service (or empty) if all services are selected
string displayed_service = "";
@@ -209,7 +207,6 @@
"type" : generalData["type"]:"",
"priority" : source["priority"]:default_priority,
"service" : source["service"]:"",
- "keeppackages" : source["keeppackages"]:false,
];
return out;
@@ -265,14 +262,7 @@
string url = sformat (_("URL: %1"), raw_url);
- string ret = sformat("<P>%1<B><BIG>%2</BIG></B></P><P>%3</P><P>%4</P>", icon_tag, name, url, category);
-
- if (service != "")
- {
- ret = ret + sformat("<P>%1</P>", service);
- }
-
- return ret;
+ return sformat("<P>%1<B><BIG>%2</BIG></B></P><P>%3</P><P>%4</P><P>%5</P>", icon_tag, name, url, category, service);
}
term repoInfoTerm(string name, string url, string category, string service)
@@ -285,7 +275,7 @@
`Left(`Label(`id(`service), `opt(`hstretch), service))
)
:
- `VSquash(`MinHeight(6, `RichText(`id(`repo_info), "")));
+ `VSquash(`MinHeight(7, `RichText(`id(`repo_info), "")));
}
void fillRepoInfo(integer index, map source, boolean repo_mode, string service_name)
@@ -337,9 +327,8 @@
if (repo_mode)
{
- // priority and keeppackages are displayed only for repositories
+ // priority is displayed only for repositories
UI::ChangeWidget (`id (`priority), `Value, info["priority"]:default_priority);
- UI::ChangeWidget (`id (`keeppackages), `Value, info["keeppackages"]:false);
}
}
@@ -508,7 +497,7 @@
// otherwise we will not get their details
list<integer> added = newSources (sourceStatesIn, sourceStatesOut);
list<integer> deleted = newSources (sourceStatesOut, sourceStatesIn);
- boolean have_rug = !norug && (integer)SCR::Read (.target.size, "/usr/bin/rug") >= 0;
+ boolean have_rug = false;
boolean any_changed = added != [] || deleted != []; // #217697
if (success && have_rug && any_changed) {
UI::OpenDialog (
@@ -562,32 +551,28 @@
return success;
}
-list<term> buildList()
+list<term> buildTree()
{
- list<term> ret = [
- `item(`id(`all_repositories), _("All repositories")),
- `item(`id(`all_services), _("All services"))
- ];
+ list<term> ret = [];
+
+ list<term> services_t = [];
foreach(map srv_state, serviceStatesOut,
{
- term t = `item(`id(srv_state["alias"]:""), sformat(_("Service '%1'"), srv_state["name"]:""));
- ret = add(ret, t);
+ term t = `item(`id(srv_state["alias"]:""), srv_state["name"]:"");
+ services_t = add(services_t, t);
}
);
- return ret;
-}
-
-term RepoFilterWidget()
-{
- // combobox label
- return `ComboBox(`id(`service_filter), `opt(`notify), _("View"), buildList());
-}
-
-void UpdateCombobox()
-{
- UI::ReplaceWidget(`id(`filter_rp), RepoFilterWidget());
+ // alphabetically sort the repositories (by "name" key)
+ // TODO FIXME: use lsort
+// repositories_t = sort(term repo1, term repo2, repositories_t, {y2internal("val: %1", repo1[1]:""); return repo1[1]:"" < repo2[1]:"";});
+
+ return [
+ // true = open the node
+ `item(`id(`services), _("Services"), true, services_t),
+ `item(`id(`repositories), _("Repositories"), true, [])
+ ];
}
// return table widget definition
@@ -629,7 +614,6 @@
UI::ReplaceWidget(`id(`tabrp), TableWidget(repo_mode));
UI::ReplaceWidget(`id(`priorp), repo_mode ? `IntField(`id(`priority), `opt(`notify), priority_label, 0, 200, default_priority) : `Empty());
- UI::ReplaceWidget(`id(`keeppkg_rp), repo_mode ? `CheckBox(`id(`keeppackages), `opt(`notify), keeppackages_label) : `Empty());
}
void RemoveReposFromService(string service_alias)
@@ -710,59 +694,74 @@
}
term contents =
- `VBox(
- `Right(`ReplacePoint(`id(`filter_rp), RepoFilterWidget())),
- `VWeight(1, `ReplacePoint(`id(`tabrp), TableWidget(repository_view))),
- repoInfoTerm("", "", "", ""),
-
- // label
- `Left (`Label (_("Properties"))),
-
- `HBox(
- `HSquash(
- `VBox(
- // check box
- `Left (`CheckBox (`id (`enable), `opt(`notify), _("&Enabled"))),
- // check box
- `Left (`CheckBox (`id (`autorefresh), `opt(`notify), _("Automatically &Refresh"))),
- // check box
- `Left(`ReplacePoint(`id(`keeppkg_rp), `CheckBox(`id(`keeppackages), `opt(`notify), keeppackages_label)))
- )
+ `HBox(
+ `Tree(`id(`tree), `opt(`notify), "", buildTree()),
+ `VBox(
+ `HBox(
+ `VSpacing(9),
+ `ReplacePoint(`id(`tabrp), TableWidget(repository_view)),
+ `HSpacing()
),
- `HSpacing(1),
- `HSquash(`ReplacePoint(`id(`priorp), `IntField(`id(`priority), `opt(`notify), priority_label, 0, 200, default_priority))),
- `HStretch()
- ),
- `VSpacing (0.4),
-
- (have_rug) ?
- // Checkbox label
- `Left (`CheckBox (`id (`zmdsync), _("Synchronize Changes with &ZENworks"), !norug && sync_zmd))
- : `Empty(),
-
- `HBox(
- `PushButton (`id (`add), `opt(`key_F3),
- Label::AddButton ()),
- `PushButton(`id(`replace), `opt(`key_F4),
- Label::EditButton ()),
- `PushButton (`id(`delete), `opt(`key_F5),
- Label::DeleteButton ()),
- `HStretch (),
- // push button label
- `PushButton (`id (`key_mgr), _("&GPG Keys...")),
- // menu button label
- `MenuButton (`id(`menu_button), `opt(`key_F6), _("Refresh"), [
- `item(`id(`refresh), refreshButtonLabel ),
+ `HBox (
+ `HSpacing(0.35),
+ `HWeight (1, `Frame ("",
+ `HBox (
+ `HSpacing (1),
+ `HWeight( 1, `VBox (
+ repoInfoTerm("", "", "", ""),
+ // label
+ `Left (`Label (_("Properties"))),
+ // check box
+ `HBox(
+ `HSquash(
+ `VBox(
+ `Left (`CheckBox (`id (`enable), `opt(`notify), _("&Enabled"))),
+ // check box
+ `Left (`CheckBox (`id (`autorefresh), `opt(`notify), _("Automatically &Refresh")))
+ )
+ ),
+ `HSquash(`ReplacePoint(`id(`priorp), `IntField(`id(`priority), `opt(`notify), priority_label, 0, 200, default_priority))),
+ `HStretch()
+ ),
+ `VSpacing (0.4),
+ (have_rug) ?
+ `Left (`CheckBox (`id (`zmdsync),
+ // Checkbox label
+ _("Synchronize Changes with &ZENworks"),
+ !norug && sync_zmd))
+ : `Empty()
+ )),
+ `HSpacing (0.4)
+ )
+ )),
+ `HSpacing (1.35)
+ ),
+ `VSpacing(0.3),
+ `HBox(
+ `PushButton (`id (`add), `opt(`key_F3),
+ Label::AddButton ()),
+ `PushButton(`id(`replace), `opt(`key_F4),
+ Label::EditButton ()),
+ `PushButton (`id(`delete), `opt(`key_F5),
+ Label::DeleteButton ()),
+ `HStretch (),
+ `PushButton (`id (`key_mgr), _("&GPG Keys...")),
// menu button label
- `item(`id(`autorefresh_all), _("Refresh All Autor&efreshed")),
- // menu button label
- `item(`id(`refresh_enabled), _("Refresh All &Enabled"))
- ])
+ `MenuButton (`id(`menu_button), `opt(`key_F6), _("Refresh"), [
+ `item(`id(`refresh), refreshButtonLabel ),
+ // menu button label
+ `item(`id(`autorefresh_all), _("Refresh All Autor&efreshed")),
+ // menu button label
+ `item(`id(`refresh_enabled), _("Refresh All &Enabled"))
+ ])
+ ),
+ `VSpacing( 0.5 )
)
);
// dialog caption
string title = _("Configured Software Repositories");
+// string title = _("Media Containing the Software Repository");
// help
string help_text = _("<p>
@@ -816,21 +815,20 @@
help_text = help_text + _("<P><B>Priority of a Repository</B><BR>
Priority of a repository is an integer value between 0 (the highest priority) and 200 (the lowest priority). Default priority is 99. If a package is available in more repositories the repository with the highest priority is used.</P>");
- // help text, continued
help_text = help_text + _("<P>Use the tree displayed on the left side for navigation in repositories and services.</P>");
- // help text, continued
- help_text = help_text + _("<P><B>Keep Downloaded Packages</B><BR>Check this option to keep downloaded packages in a local cache so they can be reused later when the packages are reinstalled. If unchecked the downloaded packages are deleted after installation.</P>") + _("<P>The default local cache is located in directory <B>/var/cache/zypp/packages</B>, the location can be changed in <B>/etc/zypp/zypp.conf</B> file.</P>");
-
Wizard::SetNextButton(`next, Label::OKButton() );
Wizard::SetAbortButton(`abort, Label::CancelButton() );
Wizard::SetContents(title, contents, help_text, false, true);
- Wizard::HideBackButton();
+ Wizard::DisableBackButton();
fillTable(repository_view, displayed_service);
fillCurrentRepoInfo();
+ // set the current view to repositories
+ UI::ChangeWidget(`id(`tree), `CurrentItem, `repositories);
+
symbol input = nil;
integer current = -1;
@@ -925,23 +923,23 @@
// start the GPG key manager
//RunGPGKeyMgmt();
}
- else if (input == `service_filter)
+ else if (input == `tree)
{
- // handle the combobox events here...
- any current_item = UI::QueryWidget(`id(`service_filter), `Value);
+ // handle tree events here...
+ any current_item = UI::QueryWidget(`id(`tree), `CurrentItem);
// rebuild the dialog if needed
- y2milestone("Current combobox item: %1", current_item);
+ y2milestone("Current tree item: %1", current_item);
boolean update_table_widget = false;
- if (current_item == `all_repositories)
+ if (current_item == `repositories)
{
update_table_widget = !repository_view || displayed_service != "";
y2milestone("Switching to repository view");
repository_view = true;
displayed_service = "";
}
- else if (current_item == `all_services)
+ else if (current_item == `services)
{
update_table_widget = repository_view;
y2milestone("Switching to service view");
@@ -1108,8 +1106,8 @@
fillTable(repository_view, displayed_service);
fillCurrentRepoInfo();
- // refresh also the combobox widget
- UpdateCombobox();
+ // refresh also the tree widget
+ UI::ChangeWidget(`id(`tree), `Items, buildTree());
}
}
else
@@ -1145,8 +1143,8 @@
}
);
- // refresh also the combobox widget
- UpdateCombobox();
+ // refresh also the tree widget
+ UI::ChangeWidget(`id(`tree), `Items, buildTree());
}
}
@@ -1295,8 +1293,8 @@
fillTable(repository_view, displayed_service);
fillCurrentRepoInfo();
- // refresh also the combobox widget
- UpdateCombobox();
+ // refresh also the tree widget
+ UI::ChangeWidget(`id(`tree), `Items, buildTree());
}
}
}
@@ -1404,25 +1402,6 @@
y2error("Ignoring event `priority: the widget should NOT be displayed in service mode!");
}
}
- else if (input == `keeppackages)
- {
- if (repository_view)
- {
- // refresh the value in the table
- boolean new_keep = (boolean)UI::QueryWidget(`id(`keeppackages), `Value);
- y2internal("New keep packages option: %1", new_keep);
-
- sourceState[ "keeppackages" ] = new_keep;
- sourceStatesOut[ global_current ] = sourceState;
-
- // do not refresh the item in the table
- current = -1;
- }
- else
- {
- y2error("Ignoring event `keeppackages: the widget should NOT be displayed in service mode!");
- }
- }
else if (input != `table)
{
y2warning("Unknown user input: %1", input);
@@ -1472,7 +1451,7 @@
}
else
{
- selected_url_scheme = URL::Parse(SourceDialogs::GetURL())["scheme"]:"";
+ selected_url_scheme = URL::Parse(SourceDialogs::GetRawURL())["scheme"]:"";
y2milestone("Selected URL scheme: %1", selected_url_scheme);
if (selected_url_scheme == nil || selected_url_scheme == "")
@@ -1509,7 +1488,7 @@
// main function - start the workflow
symbol StartInstSource()
{
- have_rug = (integer)SCR::Read (.target.size, "/usr/bin/rug") >= 0;
+ have_rug = false;
norug = !have_rug || (size(WFM::Args()) > 0 && WFM::Args(0) == "norug");
Wizard::CreateDialog();
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org