Author: jsrain
Date: Fri Aug 22 13:22:43 2008
New Revision: 50327
URL: http://svn.opensuse.org/viewcvs/yast?rev=50327&view=rev
Log:
renamed schemes to profiles, some more clean-up
Modified:
trunk/power-management/package/yast2-power-management.changes
trunk/power-management/src/PowerManagement.ycp
trunk/power-management/src/commandline.ycp
trunk/power-management/src/dialogs.ycp
trunk/power-management/src/helps.ycp
trunk/power-management/src/widgets.ycp
Modified: trunk/power-management/package/yast2-power-management.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/power-management/package/yast2-power-management.changes?rev=50327&r1=50326&r2=50327&view=diff
==============================================================================
--- trunk/power-management/package/yast2-power-management.changes (original)
+++ trunk/power-management/package/yast2-power-management.changes Fri Aug 22 13:22:43 2008
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Fri Aug 22 13:22:26 CEST 2008 - jsrain@suse.cz
+
+- renamed schemes to profiles, some more clean-up
+
+-------------------------------------------------------------------
Thu Aug 21 15:35:43 CEST 2008 - jsrain@suse.cz
- updated to use pm-profiler for servers (fate #302521)
Modified: trunk/power-management/src/PowerManagement.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/power-management/src/PowerManagement.ycp?rev=50327&r1=50326&r2=50327&view=diff
==============================================================================
--- trunk/power-management/src/PowerManagement.ycp (original)
+++ trunk/power-management/src/PowerManagement.ycp Fri Aug 22 13:22:43 2008
@@ -168,14 +168,14 @@
/* Progress stage 2/3 */
_("Read general settings"),
/* Progress stage 3/3 */
- _("Read power saving schemes"),
+ _("Read power saving profiles"),
], [
/* Progress step 1/3 */
_("Checking the environment..."),
/* Progress step 2/3 */
_("Reading general settings..."),
/* Progress step 3/3 */
- _("Reading power saving schemes..."),
+ _("Reading power saving profiles..."),
/* Progress finished */
_("Finished")
],
@@ -246,7 +246,7 @@
if(! stage_success)
{
/* Error message */
- Report::Warning(_("Cannot read power saving schemes."));
+ Report::Warning(_("Cannot read power saving profiles."));
}
sleep(sl);
@@ -286,14 +286,14 @@
// We do not set help text here, because it was set outside
Progress::New(caption, " ", steps, [
/* Progress stage 1/3 */
- _("Write schemes"),
+ _("Write profiles"),
/* Progress stage 2/3 */
_("Write general settings"),
/* Progress stage 3/3 */
_("Restart pm-profiler daemon")
], [
/* Progress step 1/3 */
- _("Writing schemes..."),
+ _("Writing profiles..."),
/* Progress step 2/3 */
_("Writing general settings..."),
/* Progress step 3/3 */
@@ -349,7 +349,7 @@
if(! stage_success)
{
/* Error message */
- Report::Error(_("Cannot write power saving schemes."));
+ Report::Error(_("Cannot write power saving profiles."));
}
success = success && stage_success;
stage_success = true;
@@ -452,7 +452,7 @@
list<string> ret = [
// summary text, %1 is scheme name
- sformat (_("Selected Scheme: %1"), scheme),
+ sformat (_("Selected Profile: %1"), scheme),
];
y2milestone ("Power management summary: %1", ret);
Modified: trunk/power-management/src/commandline.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/power-management/src/commandline.ycp?rev=50327&r1=50326&r2=50327&view=diff
==============================================================================
--- trunk/power-management/src/commandline.ycp (original)
+++ trunk/power-management/src/commandline.ycp Fri Aug 22 13:22:43 2008
@@ -26,14 +26,14 @@
define boolean PrintHandler (map options) {
boolean print_all = false;
boolean printed = false;
- if (! (haskey (options, "selected_scheme")
- || haskey (options, "scheme")))
+ if (! (haskey (options, "selected_profile")
+ || haskey (options, "profile")))
{
print_all = true;
}
- if (print_all || haskey (options, "scheme"))
+ if (print_all || haskey (options, "profile"))
{
- string scheme = options["scheme"]:"";
+ string scheme = options["profile"]:"";
boolean all_schemes = print_all || scheme == "";
foreach (map s, PowerManagement::schemes, {
if (all_schemes || s["SCHEME_NAME"]:"" == scheme)
@@ -41,10 +41,10 @@
if (printed)
CommandLine::Print ("\n");
// cmdline output, %1 is scheme name
- CommandLine::Print (sformat (_("Scheme Name: %1"),
+ CommandLine::Print (sformat (_("Profile Name: %1"),
s["SCHEME_NAME"]:""));
// cmdline output, %1 is scheme description
- CommandLine::Print (sformat (_("Scheme Description: %1"),
+ CommandLine::Print (sformat (_("Profile Description: %1"),
s["SCHEME_DESCRIPTION"]:""));
foreach (string k, string v, s, {
if (k != "SCHEME_NAME" && k != "SCHEME_DESCRIPTION"
@@ -58,15 +58,15 @@
}
});
}
- if (print_all || haskey (options, "selected_scheme"))
+ if (print_all || haskey (options, "selected_profile"))
{
if (printed)
CommandLine::Print ("\n");
// header for commandline output
- CommandLine::Print (_("Power Saving Schemes:\n"));
+ CommandLine::Print (_("Power Saving Profiles:\n"));
string scheme = PowerManagement::global_settings["SCHEME"]:"";
if (scheme == "")
- scheme = "performance";
+ scheme = _("Default Profile");
foreach (map s, PowerManagement::schemes, {
if (s["_scheme_id"]:"" == scheme)
{
@@ -75,7 +75,7 @@
}
});
scheme = PowerManagement::TranslateSchemeName (scheme);
- CommandLine::Print (sformat (_("Selected Scheme: %1"), scheme));
+ CommandLine::Print (sformat (_("Selected Profile: %1"), scheme));
list<string> available = maplist (map s,
PowerManagement::schemes,
{
@@ -83,7 +83,7 @@
});
available = filter (string s, available, {return s != nil;});
// cmdline about power saving schemes, %1 is list of schemes,
- CommandLine::Print (sformat (_("Available Schemes: %1"),
+ CommandLine::Print (sformat (_("Available Profiles: %1"),
mergestring (available, ", ")));
printed = true;
}
@@ -96,9 +96,9 @@
* @return boolean true if settings have been changed
*/
boolean SetHandler (map options) {
- if (haskey (options, "scheme"))
+ if (haskey (options, "profile"))
{
- string scheme = options["scheme"]:"";
+ string scheme = options["profile"]:"";
string scheme_id = nil;
boolean ret = false;
foreach (map s, PowerManagement::schemes, {
@@ -113,7 +113,7 @@
else if (scheme != "")
{
// error report
- CommandLine::Error (_("Specified scheme not found."));
+ CommandLine::Error (_("Specified profile not found."));
}
return ret;
}
@@ -132,13 +132,13 @@
if (! (s_add || s_edit || s_delete))
{
// error report
- CommandLine::Error (_("Operation with the scheme not specified."));
+ CommandLine::Error (_("Operation with the profile not specified."));
return false;
}
if (! haskey (options, "name"))
{
// error report
- CommandLine::Error (_("Scheme name not specified."));
+ CommandLine::Error (_("Profile name not specified."));
return false;
}
string scheme_name = options["name"]:"";
@@ -213,58 +213,58 @@
// command line help text for an action
"help" : _("Set general settings"),
],
- "scheme" : $[
+ "profile" : $[
"handler" : SchemeHandler,
// command line help text for an action
- "help" : _("Set options of a scheme"),
+ "help" : _("Set options of a profile"),
],
],
"options" : $[
- "scheme" : $[
+ "profile" : $[
"type" : "string",
// command line help text for an option
- "help" : _("Display only specified scheme"),
+ "help" : _("Display only specified profile"),
],
- "selected_scheme" : $[
+ "selected_profile" : $[
// command line help text for an option
- "help" : _("Display only scheme selected for being used"),
+ "help" : _("Display only profile selected for being used"),
],
- "scheme" : $[
+ "profile" : $[
// command line help text for an option
- "help" : _("Scheme to use when running on AC power source"),
+ "help" : _("Profile to be used"),
"type" : "string",
],
"name" : $[
// command line help text for an option
- "help" : _("The scheme name"),
+ "help" : _("The profile name"),
"type" : "string",
],
"add" : $[
// command line help text for an option
- "help" : _("Add a new scheme"),
+ "help" : _("Add a new profile"),
],
"edit" : $[
// command line help text for an option
- "help" : _("Edit an existing scheme"),
+ "help" : _("Edit an existing profile"),
],
"delete" : $[
// command line help text for an option
- "help" : _("Remove an existing scheme"),
+ "help" : _("Remove an existing profile"),
],
"description" : $[
// command line help text for an option
- "help" : _("The description of the scheme"),
+ "help" : _("The description of the profile"),
"type" : "string",
],
"clone" : $[
// command line help text for an option
- "help" : _("The scheme to clone"),
+ "help" : _("The profile to clone"),
"type" : "string",
],
"option" : $[
// command line help text for an option
- "help" : _("Option of a scheme to modify"),
+ "help" : _("Option of a profile to modify"),
"type" : "string",
],
"value" : $[
@@ -274,15 +274,15 @@
],
"rename" : $[
// command line help text for an option
- "help" : _("New name of the scheme to rename"),
+ "help" : _("New name of the profile to rename"),
"type" : "string",
],
],
"mappings" : $[
- "print" : [ "selected_scheme", "scheme", ],
- "set" : [ "scheme", ],
- "scheme" : ["add", "edit", "delete", "name", "description",
+ "print" : [ "selected_profile", "profile", ],
+ "set" : [ "profile", ],
+ "profile" : ["add", "edit", "delete", "name", "description",
"clone", "option", "value", "rename"],
],
];
Modified: trunk/power-management/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/power-management/src/dialogs.ycp?rev=50327&r1=50326&r2=50327&view=diff
==============================================================================
--- trunk/power-management/src/dialogs.ycp (original)
+++ trunk/power-management/src/dialogs.ycp Fri Aug 22 13:22:43 2008
@@ -138,7 +138,7 @@
), `HSpacing (2));
// dialog caption
- string caption = _("Power Management Scheme Setup");
+ string caption = _("Power Management Profile Setup");
return CWM::ShowAndRun ($[
"widget_names" : ["schemes_list"],
@@ -167,7 +167,7 @@
), `HSpacing (2));
// dialog caption
- string caption = _("Power Management Scheme Setup");
+ string caption = _("Power Management Profile Setup");
return CWM::ShowAndRun ($[
"widget_names" : ["scheme_name", "scheme_descr"],
@@ -196,7 +196,7 @@
), `HStretch ());
// dialog caption
- string caption = _("Power Management Scheme Setup");
+ string caption = _("Power Management Profile Setup");
return CWM::ShowAndRun ($[
"widget_names" : ["hard_disk", "cpu"],
Modified: trunk/power-management/src/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/power-management/src/helps.ycp?rev=50327&r1=50326&r2=50327&view=diff
==============================================================================
--- trunk/power-management/src/helps.ycp (original)
+++ trunk/power-management/src/helps.ycp Fri Aug 22 13:22:43 2008
@@ -34,119 +34,44 @@
Abort the save procedure by pressing <b>Abort</b>.</p>"),
- // Battery warning dialog help 1/3
- "battery_warning" : _("<p><b><big>Battery Capacity Feedback</big></b><br>
-Set three battery capacity levels and assign actions for
-each of these capacity levels.</p>")
- +
- // Battery warning dialog help 2/3
- _("<p>Use <b>Warning Capacity</b>, <b>Low Capacity</b>, and
-<b>Critical Capacity</b> to set battery levels as a percentage of full
-capacity.</p>")
- +
- // Battery warning dialog help 3/3
- _("<p>Use <b>Warning Level Action</b>, <b>Low Level Action</b>, and
-<b>Critical Level Action</b> to set actions to perform if the relevant
-battery level is reached.</p>"),
-
-
- // ACPI buttons dialog help 1/1
- "acpi_buttons" : _("<p><b><big>ACPI Buttons</big></b><br>
-Assign events to perform after a button is
-pressed. Events can be set for the <b>Power Button</b> and <b>Sleep Button</b>.
-To assign an event to perform when the lid of the laptop is
-closed, use <b>Laptop Lid Closing</b>.</p>"),
-
- // enabling standby/suspend dialog help 1/6
- "suspend_preword" : _("<p><b><big>Modes Permitted for Users</big></b><br>
-Configure which power-saving modes users should be able to switch to.</p>"),
-
- // enabling standby/suspend dialog help 2/6
- "enable_std" : _("<p><b>Suspend to Disk</b> allows users to suspend the
-computer to the disk (ACPI mode 4).
-Resuming after suspending to disk takes longer than resuming
-after suspending to RAM.</p>"),
-
- // enabling standby/suspend dialog help 3/6
- "enable_str" : _("<p><b>Suspend to RAM</b> allows users to suspend
-the computer to RAM (ACPI mode 3).
-A computer suspended to RAM still consumes electricity and
-unsaved data will be lost if it is disconnected or the battery drains.</p>"),
-
- // enabling standby/suspend dialog help 4/6
- "enable_standby" : _("<p><b>Standby Mode</b> allows users to
-switch the computer to the standby power saving mode
-(ACPI mode 1).</p>"),
-
- // enabling standby/suspend dialog help 5/6
- "str_standby_additional_info" : _("<p><b><big>Supported Power-Saving Modes
-</big></b><br>
-Some machines do not support all power-saving modes. If a mode is not supported
-by your machine, the appropriate check box is disabled.</p>
-")
-
- // enabling standby/suspend dialog help 6/6
- // %1 is file path
- + sformat (_("<p><b><big>Warning</big></b><br>
-Depending on your hardware, suspend to RAM or standby could fail and you may
-need to push the reset button to reboot your computer. This could lead to
-data loss.
-See <tt>%1</tt> for details.</p>"),
- "/usr/share/doc/packages/powersave/powersave_manual.html"),
-
// Main dialog help 1/5
- "scheme_selection" : _("<p><b><big>Energy Saving Schemes</big></b><br>
-Use <b>AC Powered</b> to adjust the energy saving scheme to use when your
-computer is AC powered.
-Use <b>Battery Powered</b> to adjust the energy saving scheme to use when your
-computer is powered by internal battery.</p>")
+ "profile_selection" : _("<p><b><big>Energy Saving Profiles</big></b><br>
+Use <b>Selected Profile</b> to adjust the energy saving profile to use.</p>")
+
// Main dialog help 2/5
- _("<p>Below the selected schemes, descriptions of both selected schemes
-are displayed.</p>")
+ _("<p>Below the selected profile, its description is displayed.</p>")
+
// Main dialog help 3/5
- _("<p><b><big>Adjusting Energy Saving Schemes</big></b><br>
-To adjust energy saving schemes, delete existing ones, or create new ones,
-use <b>Edit Schemes</b>.</p>"),
-
- // Main dialog help 4/5
- "other_settings_menu_button" : _("<p><b><big>Permissions</big></b><br>
-To adjust whether users are allowed to switch the computer to the standby or
-suspend mode, use <b>Suspend Permissions</b> button.</p>\n")+
-
- // Main dialog help 5/5
-_("<p>Beginning with openSUSE 10.2, a lot of configuration options have been
-removed from the Power Management YaST module. All vanished settings have to be
-configured with a graphical client such as <tt>gnome-power-manager</tt> or
-<tt>kpowersave</tt>.</p>")
-,
+ _("<p><b><big>Adjusting Energy Saving Profiles</big></b><br>
+To adjust energy saving profiles, delete existing ones, or create new ones,
+use <b>Edit Profiles</b>.</p>"),
+
// Schemes list dialog 1/3
- "schemes_list" : _("<p><b><big>Scheme Setup</big></b><br>
-Here, adjust the energy saving schemes. To modify a scheme, select
+ "profiles_list" : _("<p><b><big>Profile Setup</big></b><br>
+Here, adjust the energy saving Profiles. To modify a profile, select
it and click <b>Edit</b>.</p>")
+
// Schemes list dialog 2/3
- _("<p>To add a new scheme, select a scheme to clone then click
-<b>Add</b>. To delete an existing scheme, select it and click
+ _("<p>To add a new profile, select a profile to clone then click
+<b>Add</b>. To delete an existing profile, select it and click
<b>Delete</b>.</p>")
+
- // Schemes list dialog 3/3
- _("<p>In the main dialog, assign schemes to use when you
+ // Profiles list dialog 3/3
+ _("<p>In the main dialog, assign profiles to use when you
work on battery or AC power.</p>"),
- // Scheme editation dialog 1 help 1/6
- "scheme_name" : _("<p><big><b>Scheme Setup</b></big>
-Configure the settings of the scheme. Enter its name in <b>Scheme Name</b>
-and optionally a description in <b>Scheme Description</b>.</p>"),
+ // Profile editation dialog 1 help 1/6
+ "profile_name" : _("<p><big><b>Profile Setup</b></big>
+Configure the settings of the profile. Enter its name in <b>Profile Name</b>
+and optionally a description in <b>Profile Description</b>.</p>"),
- // Scheme editation dialog 1 help 2/6
+ // Profile editation dialog 1 help 2/6
// rwalter merged content into previous. sorry.
- "scheme_descr" : "",
+ "profile_descr" : "",
- // Scheme editation dialog 2 help 1/2
+ // Profile editation dialog 2 help 1/2
"hard_disk" : _("<p><b><big>Hard Disk Settings</big></b><br>
Use <b>Standby Policy</b> to adjust the power saving policy of the hard disks.
Remember that more power saving also means waiting more often until the disk
@@ -155,8 +80,8 @@
produced by the disk may be lowered by moving disk heads more slowly. Not all
disks support this feature.</p>"),
- // Scheme editation dialog 2 help 2/2
- "cooling_policy" : _("<p><b><big>Cooling Policy</big></b><br>
+ // Profile editation dialog 2 help 2/2
+ "cpu" : _("<p><b><big>Cooling Policy</big></b><br>
Use the cooling policy <b>Status</b> to adjust the active or passive cooling policy.
Active means that the cooling fan is
turned on if the system starts overheating.
@@ -167,31 +92,6 @@
or reaches critical temperature, use <b>Overheat Temperature Action</b> and
<b>Critical Temperature Action</b>.</p>"),
- // Scheme editation dialog 3 help 1/2
- "allow_screensaver" : _("<p><b><big>Enable Screen Saver</big></b><br>
-To enable the screen saver in this scheme, set <b>Enable Screen Saver</b>.
-Disabling the screen saver is useful for schemes used, for example, for
-presentations.</p>"),
-
- // Scheme editation dialog 3 help 2/2
- // Display is a substantive (screen)
- "dpms" : _("<p><b><big>Display Blanking</big></b><br>
-To allow blanking the display using DPMS, set
-<b>Enable Display Power Management</b>.
-To set the standby, suspend, and power off time-outs use
-<b>Display Standby Time-Out</b>, <b>Display Suspend Time-Out</b>, and
-<b>Display Power Off Time-Out</b>. To disable a time-out,
-set its value to <b>0</b>.</p>"),
-
- // Scheme editation dialog 3 help 3/3
-/* "suspend_timeout" : _("<p><b><big>System Suspend Settings</big></b><br>
-To enable system suspend when keyboard and mouse are not used for
-a specified time, set <b>Enable System Suspend Timeout</b>. To specify the
-timeout, use <b>Suspend Timeout</b> to set it in minutes.
-To set the suspend method, use
-<b>Suspend Method</b>. See the documentation to learn more information
-about power saving modes.</p>"),
-*/
];
/* EOF */
Modified: trunk/power-management/src/widgets.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/power-management/src/widgets.ycp?rev=50327&r1=50326&r2=50327&view=diff
==============================================================================
--- trunk/power-management/src/widgets.ycp (original)
+++ trunk/power-management/src/widgets.ycp Fri Aug 22 13:22:43 2008
@@ -49,7 +49,7 @@
{
// fallback scheme description, displayed in a rich text
// but without HTML tags!!!
- descr = _("No scheme description available");
+ descr = _("No profile description available");
}
UI::ChangeWidget (`id (`descr), `Value, descr);
}
@@ -73,7 +73,7 @@
UI::ReplaceWidget (`scheme_rp,
`ComboBox (`id (`scheme), `opt (`hstretch, `notify),
// combo box
- _("&Selected Scheme"), items));
+ _("&Selected Profile"), items));
string scheme = PowerManagement::global_settings["SCHEME"]:"";
UI::ChangeWidget (`id (`scheme), `Value, scheme);
SchemeSelectionHandle (key, $["ID" : `scheme ]);
@@ -97,7 +97,7 @@
return $[
"widget" : `custom,
// frame
- "custom_widget" : `Frame (_("Energy Saving Schemes"), `VBox (
+ "custom_widget" : `Frame (_("Energy Saving Profiles"), `VBox (
`HBox (
`HWeight (1, `VBox (
`ReplacePoint (`id (`scheme_rp),
@@ -111,7 +111,7 @@
`HStretch (),
`PushButton (`id (`schemes_edit),
// push button
- _("Ed&it Schemes")),
+ _("Ed&it Profiles")),
`HStretch ()
)
)),
@@ -141,7 +141,7 @@
if (descr == "")
{
// fallback scheme description, table entre
- descr = _("No scheme description available");
+ descr = _("No profile description available");
}
return `item (`id (scheme_id), name, descr);
});
@@ -180,7 +180,7 @@
if (selected == nil)
{
// popup message
- Popup::Message (_("No scheme selected."));
+ Popup::Message (_("No profile selected."));
}
if (selected == "performance" || selected == "powersave")
{
@@ -188,7 +188,7 @@
if (false)
{
// popup message
- Popup::Message (_("The selected scheme cannot be modified.
+ Popup::Message (_("The selected profile cannot be modified.
Add a new one instead."));
return nil;
}
@@ -203,7 +203,7 @@
if (selected == nil)
{
// popup message
- Popup::Message (_("No scheme selected."));
+ Popup::Message (_("No profile selected."));
}
PowerManagement::current_schemes = filter (
maps,
@@ -249,9 +249,9 @@
"custom_widget" : `VBox (
`Table (`id (`schemes), `opt (`notify, `immediate), `header (
// table header
- _("Scheme Name"),
+ _("Profile Name"),
// table header
- _("Scheme Description")),
+ _("Profile Description")),
[]),
`HBox (
`PushButton (`id (`add), Label::AddButton ()),
@@ -298,7 +298,7 @@
if (new_name == "")
{
// popup message
- Popup::Message (_("Scheme name must be set."));
+ Popup::Message (_("Profile name must be set."));
return false;
}
if (new_name == original_scheme_name)
@@ -309,14 +309,14 @@
if (contains (names, new_name))
{
// popup message
- Popup::Message (_("The specified scheme name is not unique."));
+ Popup::Message (_("The specified profile name is not unique."));
return false;
}
if (size (new_name) > 32)
{
Popup::Message (
// pop-up message
- _("The scheme name must not be longer than 32 characters."));
+ _("The profile name must not be longer than 32 characters."));
return false;
}
return true;
@@ -407,7 +407,7 @@
return $[
"widget" : `textentry,
// text entry
- "label" : _("Scheme &Description"),
+ "label" : _("Profile &Description"),
"help" : HELPS["scheme_descr"]:"",
"init" : SchemeDescrInit,
"store" : SchemeDescrStore,
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org