[gnome-boxes] WizardWindow.set_title_for_page() -> WizardToolbar
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] WizardWindow.set_title_for_page() -> WizardToolbar
- Date: Wed, 26 Nov 2014 14:44:25 +0000 (UTC)
commit 24818a5dd22864706fd2302ffb40ea6d09fb1a7b
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Nov 26 14:40:35 2014 +0000
WizardWindow.set_title_for_page() -> WizardToolbar
Move WizardWindow.set_title_for_page() to WizardToolbar. If the window
is using a custom titlebar, its not supposed to set title on itself
then.
src/wizard-toolbar.vala | 16 ++++++++++++++++
src/wizard-window.vala | 16 ----------------
src/wizard.vala | 2 +-
3 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/src/wizard-toolbar.vala b/src/wizard-toolbar.vala
index efd79de..13aee87 100644
--- a/src/wizard-toolbar.vala
+++ b/src/wizard-toolbar.vala
@@ -21,4 +21,20 @@ private class Boxes.WizardToolbar: HeaderBar {
if (continue_btn.sensitive)
continue_btn.clicked ();
}
+
+ 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;
+ }
+ }
}
diff --git a/src/wizard-window.vala b/src/wizard-window.vala
index 29e3d65..b7ee5ae 100644
--- a/src/wizard-window.vala
+++ b/src/wizard-window.vala
@@ -19,22 +19,6 @@ private class Boxes.WizardWindow : Gtk.Window, 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 905d9cc..8c1902f 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -135,7 +135,7 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
return;
_page = value;
- window.wizard_window.set_title_for_page (value);
+ window.wizard_window.topbar.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]