[gnome-boxes] Make wizard file chooser dialog, modal
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Make wizard file chooser dialog, modal
- Date: Mon, 23 Apr 2012 20:49:13 +0000 (UTC)
commit d4f54933153a5a029a7a07651442017001f126b1
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Apr 23 21:53:19 2012 +0300
Make wizard file chooser dialog, modal
https://bugzilla.gnome.org/show_bug.cgi?id=674647
src/wizard-source.vala | 8 +++++---
src/wizard.vala | 12 ++++++------
2 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/src/wizard-source.vala b/src/wizard-source.vala
index a8091ab..7147d33 100644
--- a/src/wizard-source.vala
+++ b/src/wizard-source.vala
@@ -42,9 +42,11 @@ private class Boxes.WizardSource: GLib.Object {
private Gtk.Image url_image;
public Gtk.Entry url_entry;
- MediaManager media_manager;
+ private MediaManager media_manager;
+ private Boxes.App app;
- public WizardSource (MediaManager media_manager) {
+ public WizardSource (Boxes.App app, MediaManager media_manager) {
+ this.app = app;
this.media_manager = media_manager;
notebook = new Gtk.Notebook ();
@@ -219,7 +221,7 @@ private class Boxes.WizardSource: GLib.Object {
private void launch_file_selection_dialog () {
var dialog = new Gtk.FileChooserDialog (_("Select a device or ISO file"),
- null,
+ app.window,
Gtk.FileChooserAction.OPEN,
Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL,
Gtk.Stock.OPEN, Gtk.ResponseType.ACCEPT);
diff --git a/src/wizard.vala b/src/wizard.vala
index c680a46..49c37fa 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -103,7 +103,12 @@ private class Boxes.Wizard: Boxes.UI {
steps = new GenericArray<Gtk.Label> ();
steps.length = WizardPage.LAST;
media_manager = new MediaManager ();
- wizard_source = new Boxes.WizardSource (media_manager);
+ }
+
+ public Wizard (App app) {
+ this.app = app;
+ vm_creator = new VMCreator (app);
+ wizard_source = new Boxes.WizardSource (app, media_manager);
wizard_source.notify["page"].connect(() => {
if (wizard_source.page == Boxes.SourcePage.MAIN)
next_button.sensitive = false;
@@ -132,11 +137,6 @@ private class Boxes.Wizard: Boxes.UI {
wizard_source.url_entry.activate.connect(() => {
page = page + 1;
});
- }
-
- public Wizard (App app) {
- this.app = app;
- vm_creator = new VMCreator (app);
setup_ui ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]