[gnome-boxes/wip/wizard-n-props-in-dialog2: 8/20] wizard: Specify step number in title
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/wizard-n-props-in-dialog2: 8/20] wizard: Specify step number in title
- Date: Sun, 23 Nov 2014 20:24:16 +0000 (UTC)
commit d4dc438e2df0b94e7582bc820e8b5a65d40ce821
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Nov 21 18:54:34 2014 +0000
wizard: Specify step number in title
src/wizard-dialog.vala | 16 ++++++++++++++++
src/wizard.vala | 2 +-
2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/wizard-dialog.vala b/src/wizard-dialog.vala
index 468a180..5d867fd 100644
--- a/src/wizard-dialog.vala
+++ b/src/wizard-dialog.vala
@@ -28,6 +28,22 @@ private class Boxes.WizardDialog : Gtk.Dialog, Boxes.UI {
notify["ui-state"].connect (ui_state_changed);
}
+ public void set_title_for_page (WizardPage page) {
+ switch (page) {
+ case WizardPage.LAST:
+
+ break;
+ case WizardPage.INTRODUCTION:
+ title = _("Create a box");
+
+ break;
+ default:
+ title = _("Create a box (step %d/5)").printf (page);
+
+ break;
+ }
+ }
+
private void ui_state_changed () {
wizard.set_state (ui_state);
diff --git a/src/wizard.vala b/src/wizard.vala
index 3ac3dbd..91757f0 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -134,7 +134,7 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
return;
_page = value;
- window.wizard_dialog.sidebar.set_page (value);
+ window.wizard_dialog.set_title_for_page (value);
visible_child_name = page_names[value];
if (value == WizardPage.SOURCE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]