Mailinglist Archive: yast-commit (870 mails)
| < Previous | Next > |
[yast-commit] r49120 - in /branches/tmp/mzugec/printer2/src: dialogs.ycp overview.ycp wizards.ycp
- From: mzugec@xxxxxxxxxxxxxxxx
- Date: Tue, 15 Jul 2008 15:58:44 -0000
- Message-id: <20080715155844.E9ABC34577@xxxxxxxxxxxxxxxx>
Author: mzugec
Date: Tue Jul 15 17:58:44 2008
New Revision: 49120
URL: http://svn.opensuse.org/viewcvs/yast?rev=49120&view=rev
Log:
initial DialogTree redesign
Modified:
branches/tmp/mzugec/printer2/src/dialogs.ycp
branches/tmp/mzugec/printer2/src/overview.ycp
branches/tmp/mzugec/printer2/src/wizards.ycp
Modified: branches/tmp/mzugec/printer2/src/dialogs.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/mzugec/printer2/src/dialogs.ycp?rev=49120&r1=49119&r2=49120&view=diff
==============================================================================
--- branches/tmp/mzugec/printer2/src/dialogs.ycp (original)
+++ branches/tmp/mzugec/printer2/src/dialogs.ycp Tue Jul 15 17:58:44 2008
@@ -35,8 +35,11 @@
import "Wizard";
import "Printer";
import "Popup";
+import "DialogTree";
+import "Mode";
include "printer/helps.ycp";
+include "printer/overview.ycp";
/**
* DriverOptionsDialog dialog
@@ -157,5 +160,80 @@
return ret;
}
+map<string, map<string,any> > wd = $[
+ "OVERVIEW" : $[
+ "widget" : `custom,
+ "custom_widget" :
+ `VBox(
+ `Left(`HBox( `Label( _("Show") ), `HSpacing(),
+ `CheckBox( `id(`local_content_checkbox),`opt(`notify),
_("local queues")),
+ `CheckBox( `id(`remote_content_checkbox),`opt(`notify),
_("remote queues")))),
+ `VWeight(2,`Table (`id (`overview_table), `opt (`notify,
`immediate),
+// `header(_("Queue Name"),_("Device"),
_("Model"), _("Default Queue"))
+ `header( // Header of a Table column with a
list of print queues.
+ // Where the queue configuration exists
(local or remote):
+ _("Configuration"),
+ // Header of a Table column with a list
of print queues.
+ // Print queue name:
+ _("Name"),
+ // Header of a Table column with a list
of print queues.
+ // Print queue description (e.g. model or
driver):
+ _("Description"),
+ // Header of a Table column with a list
of print queues.
+ // Location of the printer (e.g. second
floor, room 2.3):
+ _("Location"),
+ // Header of a Table column with a list
of print queues.
+ // Whether or not is is the default queue:
+ _("Default"),
+ // Header of a Table column with a list
of print queues.
+ // Queue status (accepting/rejecting and
enabled/disabled):
+ _("Status")
+ )
+
+ )),
+ `HBox (
+ `PushButton (`id (`add), Label::AddButton ()),
+ `PushButton (`id (`edit), _("Configure")),
+ `PushButton (`id (`delete), Label::DeleteButton ()),
+ `HStretch (),
+ `PushButton (`id (`test), _("Print test page"))
+ )
+ ),
+ "init" : initOverview,
+ "handle" : handleOverview
+
+ ]
+];
+
+map tabs_descr = $[
+ "overview" : $[
+ "header" : _("Printers and Queues"),
+ "tree_item_label" : _("Printers and Queues"),
+ "contents" : `VBox (
+ "OVERVIEW"
+ ),
+ "widget_names" : ["OVERVIEW"]
+ ],
+];
+
+
+symbol runMainDialog(){
+ string caption = _("Detected Printers");
+
+ symbol ret = DialogTree::ShowAndRun ($[
+ "ids_order" : [ "overview" ],
+ "initial_screen" : "overview",
+ "screens" : tabs_descr,
+ "widget_descr" : wd,
+ "back_button" : nil,//Label::BackButton(),
+ "abort_button" : Label::AbortButton(),
+ "next_button" : (Mode::normal() ?
+ Label::NextButton () : Label::OKButton ()
+ )
+ ]);
+ return ret;
+}
+
+
/* EOF */
}
Modified: branches/tmp/mzugec/printer2/src/overview.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/mzugec/printer2/src/overview.ycp?rev=49120&r1=49119&r2=49120&view=diff
==============================================================================
--- branches/tmp/mzugec/printer2/src/overview.ycp (original)
+++ branches/tmp/mzugec/printer2/src/overview.ycp Tue Jul 15 17:58:44 2008
@@ -42,6 +42,26 @@
include "printer/helps.ycp";
+
+void initOverview(string key){
+ UI::ChangeWidget(`local_content_checkbox, `Value,
Printer::queue_filter_show_local);
+ UI::ChangeWidget(`remote_content_checkbox, `Value,
Printer::queue_filter_show_remote);
+ UI::ChangeWidget(`overview_table, `Items, Printer::QueueItems(
Printer::queue_filter_show_local, Printer::queue_filter_show_remote ));
+}
+
+symbol handleOverview(string key, map event){
+ if (event["EventReason"]:""=="ValueChanged" &&
(event["ID"]:nil==`remote_content_checkbox ||
event["ID"]:nil==`local_content_checkbox)){
+ y2milestone("Refreshing overview items");
+ Printer::queue_filter_show_local =
(boolean)UI::QueryWidget(`local_content_checkbox, `Value);
+ Printer::queue_filter_show_remote =
(boolean)UI::QueryWidget(`remote_content_checkbox, `Value);
+ UI::ChangeWidget(`overview_table, `Items, Printer::QueueItems(
Printer::queue_filter_show_local, Printer::queue_filter_show_remote ));
+ }
+y2internal("event %1", event);
+ return nil;
+}
+
+
+
/**
* Overview dialog
* @return dialog result
Modified: branches/tmp/mzugec/printer2/src/wizards.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/mzugec/printer2/src/wizards.ycp?rev=49120&r1=49119&r2=49120&view=diff
==============================================================================
--- branches/tmp/mzugec/printer2/src/wizards.ycp (original)
+++ branches/tmp/mzugec/printer2/src/wizards.ycp Tue Jul 15 17:58:44 2008
@@ -48,7 +48,7 @@
* @return sequence result
*/
any MainSequence()
-{ map aliases = $[ "overview" : ``( OverviewDialog() ),
+{ map aliases = $[ "overview" : ``( runMainDialog() ),
"add" : ``( BasicAddDialog() ),
"add_connection_wizard" : ``( ConnectionWizardDialog() ),
"modify" : ``( BasicModifyDialog() ),
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
Date: Tue Jul 15 17:58:44 2008
New Revision: 49120
URL: http://svn.opensuse.org/viewcvs/yast?rev=49120&view=rev
Log:
initial DialogTree redesign
Modified:
branches/tmp/mzugec/printer2/src/dialogs.ycp
branches/tmp/mzugec/printer2/src/overview.ycp
branches/tmp/mzugec/printer2/src/wizards.ycp
Modified: branches/tmp/mzugec/printer2/src/dialogs.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/mzugec/printer2/src/dialogs.ycp?rev=49120&r1=49119&r2=49120&view=diff
==============================================================================
--- branches/tmp/mzugec/printer2/src/dialogs.ycp (original)
+++ branches/tmp/mzugec/printer2/src/dialogs.ycp Tue Jul 15 17:58:44 2008
@@ -35,8 +35,11 @@
import "Wizard";
import "Printer";
import "Popup";
+import "DialogTree";
+import "Mode";
include "printer/helps.ycp";
+include "printer/overview.ycp";
/**
* DriverOptionsDialog dialog
@@ -157,5 +160,80 @@
return ret;
}
+map<string, map<string,any> > wd = $[
+ "OVERVIEW" : $[
+ "widget" : `custom,
+ "custom_widget" :
+ `VBox(
+ `Left(`HBox( `Label( _("Show") ), `HSpacing(),
+ `CheckBox( `id(`local_content_checkbox),`opt(`notify),
_("local queues")),
+ `CheckBox( `id(`remote_content_checkbox),`opt(`notify),
_("remote queues")))),
+ `VWeight(2,`Table (`id (`overview_table), `opt (`notify,
`immediate),
+// `header(_("Queue Name"),_("Device"),
_("Model"), _("Default Queue"))
+ `header( // Header of a Table column with a
list of print queues.
+ // Where the queue configuration exists
(local or remote):
+ _("Configuration"),
+ // Header of a Table column with a list
of print queues.
+ // Print queue name:
+ _("Name"),
+ // Header of a Table column with a list
of print queues.
+ // Print queue description (e.g. model or
driver):
+ _("Description"),
+ // Header of a Table column with a list
of print queues.
+ // Location of the printer (e.g. second
floor, room 2.3):
+ _("Location"),
+ // Header of a Table column with a list
of print queues.
+ // Whether or not is is the default queue:
+ _("Default"),
+ // Header of a Table column with a list
of print queues.
+ // Queue status (accepting/rejecting and
enabled/disabled):
+ _("Status")
+ )
+
+ )),
+ `HBox (
+ `PushButton (`id (`add), Label::AddButton ()),
+ `PushButton (`id (`edit), _("Configure")),
+ `PushButton (`id (`delete), Label::DeleteButton ()),
+ `HStretch (),
+ `PushButton (`id (`test), _("Print test page"))
+ )
+ ),
+ "init" : initOverview,
+ "handle" : handleOverview
+
+ ]
+];
+
+map tabs_descr = $[
+ "overview" : $[
+ "header" : _("Printers and Queues"),
+ "tree_item_label" : _("Printers and Queues"),
+ "contents" : `VBox (
+ "OVERVIEW"
+ ),
+ "widget_names" : ["OVERVIEW"]
+ ],
+];
+
+
+symbol runMainDialog(){
+ string caption = _("Detected Printers");
+
+ symbol ret = DialogTree::ShowAndRun ($[
+ "ids_order" : [ "overview" ],
+ "initial_screen" : "overview",
+ "screens" : tabs_descr,
+ "widget_descr" : wd,
+ "back_button" : nil,//Label::BackButton(),
+ "abort_button" : Label::AbortButton(),
+ "next_button" : (Mode::normal() ?
+ Label::NextButton () : Label::OKButton ()
+ )
+ ]);
+ return ret;
+}
+
+
/* EOF */
}
Modified: branches/tmp/mzugec/printer2/src/overview.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/mzugec/printer2/src/overview.ycp?rev=49120&r1=49119&r2=49120&view=diff
==============================================================================
--- branches/tmp/mzugec/printer2/src/overview.ycp (original)
+++ branches/tmp/mzugec/printer2/src/overview.ycp Tue Jul 15 17:58:44 2008
@@ -42,6 +42,26 @@
include "printer/helps.ycp";
+
+void initOverview(string key){
+ UI::ChangeWidget(`local_content_checkbox, `Value,
Printer::queue_filter_show_local);
+ UI::ChangeWidget(`remote_content_checkbox, `Value,
Printer::queue_filter_show_remote);
+ UI::ChangeWidget(`overview_table, `Items, Printer::QueueItems(
Printer::queue_filter_show_local, Printer::queue_filter_show_remote ));
+}
+
+symbol handleOverview(string key, map event){
+ if (event["EventReason"]:""=="ValueChanged" &&
(event["ID"]:nil==`remote_content_checkbox ||
event["ID"]:nil==`local_content_checkbox)){
+ y2milestone("Refreshing overview items");
+ Printer::queue_filter_show_local =
(boolean)UI::QueryWidget(`local_content_checkbox, `Value);
+ Printer::queue_filter_show_remote =
(boolean)UI::QueryWidget(`remote_content_checkbox, `Value);
+ UI::ChangeWidget(`overview_table, `Items, Printer::QueueItems(
Printer::queue_filter_show_local, Printer::queue_filter_show_remote ));
+ }
+y2internal("event %1", event);
+ return nil;
+}
+
+
+
/**
* Overview dialog
* @return dialog result
Modified: branches/tmp/mzugec/printer2/src/wizards.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/mzugec/printer2/src/wizards.ycp?rev=49120&r1=49119&r2=49120&view=diff
==============================================================================
--- branches/tmp/mzugec/printer2/src/wizards.ycp (original)
+++ branches/tmp/mzugec/printer2/src/wizards.ycp Tue Jul 15 17:58:44 2008
@@ -48,7 +48,7 @@
* @return sequence result
*/
any MainSequence()
-{ map aliases = $[ "overview" : ``( OverviewDialog() ),
+{ map aliases = $[ "overview" : ``( runMainDialog() ),
"add" : ``( BasicAddDialog() ),
"add_connection_wizard" : ``( ConnectionWizardDialog() ),
"modify" : ``( BasicModifyDialog() ),
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |