Index: uspace/app/shutdown-dlg/shutdown-dlg.c
===================================================================
--- uspace/app/shutdown-dlg/shutdown-dlg.c	(revision f35749ea567f56991e775945db2ae2ded40751e6)
+++ uspace/app/shutdown-dlg/shutdown-dlg.c	(revision 0ae9e18465809a5520c51c76be2866b19c48bd0e)
@@ -41,6 +41,8 @@
 #include <ui/fixed.h>
 #include <ui/label.h>
+#include <ui/list.h>
 #include <ui/msgdialog.h>
 #include <ui/resource.h>
+#include <ui/selectdialog.h>
 #include <ui/ui.h>
 #include <ui/window.h>
@@ -50,7 +52,7 @@
 static errno_t bg_wnd_paint(ui_window_t *, void *);
 static void shutdown_progress_destroy(shutdown_progress_t *);
-static errno_t shutdown_confirm_msg_create(shutdown_dlg_t *);
+static errno_t shutdown_confirm_create(shutdown_dlg_t *);
 static errno_t shutdown_failed_msg_create(shutdown_dlg_t *);
-static errno_t shutdown_start(shutdown_dlg_t *);
+static errno_t shutdown_start(shutdown_dlg_t *, sd_action_t);
 
 static ui_window_cb_t bg_window_cb = {
@@ -71,10 +73,12 @@
 };
 
-static void shutdown_confirm_msg_button(ui_msg_dialog_t *, void *, unsigned);
-static void shutdown_confirm_msg_close(ui_msg_dialog_t *, void *);
-
-static ui_msg_dialog_cb_t shutdown_confirm_msg_cb = {
-	.button = shutdown_confirm_msg_button,
-	.close = shutdown_confirm_msg_close
+static void shutdown_confirm_bok(ui_select_dialog_t *, void *, void *);
+static void shutdown_confirm_bcancel(ui_select_dialog_t *, void *);
+static void shutdown_confirm_close(ui_select_dialog_t *, void *);
+
+static ui_select_dialog_cb_t shutdown_confirm_cb = {
+	.bok = shutdown_confirm_bok,
+	.bcancel = shutdown_confirm_bcancel,
+	.close = shutdown_confirm_close
 };
 
@@ -166,23 +170,43 @@
  * @return EOK on success or an error code
  */
-static errno_t shutdown_confirm_msg_create(shutdown_dlg_t *sddlg)
-{
-	ui_msg_dialog_params_t params;
-	ui_msg_dialog_t *dialog;
-	errno_t rc;
-
-	ui_msg_dialog_params_init(&params);
+static errno_t shutdown_confirm_create(shutdown_dlg_t *sddlg)
+{
+	ui_select_dialog_params_t params;
+	ui_select_dialog_t *dialog;
+	ui_list_entry_attr_t attr;
+	errno_t rc;
+
+	ui_select_dialog_params_init(&params);
 	params.caption = "Shutdown";
-	params.text = "Do you want to shut the system down?";
-	params.choice = umdc_ok_cancel;
-	params.flags |= umdf_topmost | umdf_center;
-
-	rc = ui_msg_dialog_create(sddlg->ui, &params, &dialog);
+	params.prompt = "Do you want to shut the system down?";
+	params.flags |= usdf_topmost | usdf_center;
+
+	rc = ui_select_dialog_create(sddlg->ui, &params, &dialog);
 	if (rc != EOK)
 		return rc;
 
-	ui_msg_dialog_set_cb(dialog, &shutdown_confirm_msg_cb, sddlg);
+	/* Need an entry to select */
+	ui_list_entry_attr_init(&attr);
+
+	attr.caption = "Power off";
+	attr.arg = (void *)sd_poweroff;
+	rc = ui_select_dialog_append(dialog, &attr);
+	if (rc != EOK)
+		goto error;
+
+	attr.caption = "Restart";
+	attr.arg = (void *)sd_restart;
+	rc = ui_select_dialog_append(dialog, &attr);
+	if (rc != EOK)
+		goto error;
+
+	ui_select_dialog_set_cb(dialog, &shutdown_confirm_cb, sddlg);
+
+	(void)ui_select_dialog_paint(dialog);
 
 	return EOK;
+error:
+	ui_select_dialog_destroy(dialog);
+	return rc;
 }
 
@@ -211,33 +235,43 @@
 }
 
-/** Shutdown confirm message dialog button press.
+/** Shutdown confirm dialog OK button press.
  *
  * @param dialog Message dialog
  * @param arg Argument (ui_demo_t *)
- * @param bnum Button number
- */
-static void shutdown_confirm_msg_button(ui_msg_dialog_t *dialog,
-    void *arg, unsigned bnum)
+ * @param earg Entry argument
+ */
+static void shutdown_confirm_bok(ui_select_dialog_t *dialog, void *arg,
+    void *earg)
 {
 	shutdown_dlg_t *sddlg = (shutdown_dlg_t *) arg;
 
-	ui_msg_dialog_destroy(dialog);
-
-	if (bnum == 0)
-		shutdown_start(sddlg);
-	else
-		ui_quit(sddlg->ui);
-}
-
-/** Shutdown confirm message dialog close request.
+	ui_select_dialog_destroy(dialog);
+
+	shutdown_start(sddlg, (sd_action_t)earg);
+}
+
+/** Shutdown confirm dialog Cancel button press.
  *
  * @param dialog Message dialog
  * @param arg Argument (ui_demo_t *)
  */
-static void shutdown_confirm_msg_close(ui_msg_dialog_t *dialog, void *arg)
+static void shutdown_confirm_bcancel(ui_select_dialog_t *dialog, void *arg)
 {
 	shutdown_dlg_t *sddlg = (shutdown_dlg_t *) arg;
 
-	ui_msg_dialog_destroy(dialog);
+	ui_select_dialog_destroy(dialog);
+	ui_quit(sddlg->ui);
+}
+
+/** Shutdown confirm message dialog close request.
+ *
+ * @param dialog Message dialog
+ * @param arg Argument (ui_demo_t *)
+ */
+static void shutdown_confirm_close(ui_select_dialog_t *dialog, void *arg)
+{
+	shutdown_dlg_t *sddlg = (shutdown_dlg_t *) arg;
+
+	ui_select_dialog_destroy(dialog);
 	ui_quit(sddlg->ui);
 }
@@ -386,5 +420,11 @@
 }
 
-static errno_t shutdown_start(shutdown_dlg_t *sddlg)
+/** Start shutdown.
+ *
+ * @param sddlg Shutdown dialog
+ * @param action Shutdown actin
+ * @return EOK on success or an error code
+ */
+static errno_t shutdown_start(shutdown_dlg_t *sddlg, sd_action_t action)
 {
 	errno_t rc;
@@ -400,5 +440,15 @@
 	}
 
-	rc = system_poweroff(sddlg->system);
+	rc = EINVAL;
+
+	switch (action) {
+	case sd_poweroff:
+		rc = system_poweroff(sddlg->system);
+		break;
+	case sd_restart:
+		rc = system_restart(sddlg->system);
+		break;
+	}
+
 	if (rc != EOK) {
 		printf("Failed requesting system shutdown.\n");
@@ -469,5 +519,5 @@
 	}
 
-	(void)shutdown_confirm_msg_create(&sddlg);
+	(void)shutdown_confirm_create(&sddlg);
 
 	ui_run(ui);
