[gnome-boxes] wizard-source: Static label to describe URL



commit 5b29873564e6c7064987759a49e53486c5205c15
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Feb 16 18:43:06 2015 +0000

    wizard-source: Static label to describe URL
    
    Instead of showing different icons and telling about the URL entered,
    lets simply describe what URLs are expected and provide a few examples
    instead. Typically, user is expected to get this URL from an external
    source (e-mail, irc, web browser etc) and simply copy&pasting it here
    rather than typing it manually.

 data/ui/wizard-source.ui |   47 +++++++++++++++------------------------------
 src/wizard-source.vala   |    9 --------
 src/wizard.vala          |    9 --------
 3 files changed, 16 insertions(+), 49 deletions(-)
---
diff --git a/data/ui/wizard-source.ui b/data/ui/wizard-source.ui
index 751a216..5bb48fe 100644
--- a/data/ui/wizard-source.ui
+++ b/data/ui/wizard-source.ui
@@ -257,48 +257,33 @@
             </style>
 
             <child>
-              <object class="GtkEntry" id="url_entry">
+              <object class="GtkLabel" id="url_description_label">
                 <property name="visible">True</property>
                 <property name="margin-top">10</property>
                 <property name="margin-start">20</property>
                 <property name="margin-end">20</property>
-                <signal name="activate" handler="on_url_entry_activated"/>
+                <property name="use-markup">True</property>
+                <property name="wrap">True</property>
+                <property name="halign">start</property>
+                <property name="label" translatable="yes">Enter an address for the box you want to add. 
Addresses can be of
+installation images, SPICE and VNC servers, or oVirt or Libvirt brokers.
+
+&lt;span color="grey"&gt;Examples: http://download./image.iso, spice://somehost:5051, 
ovirt://host/path&lt;/span&gt;</property>
               </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+              </packing>
             </child>
 
             <child>
-              <object class="GtkBox" id="url_entry_hbox">
+              <object class="GtkEntry" id="url_entry">
                 <property name="visible">True</property>
-                <property name="margin-bottom">10</property>
+                <property name="margin-top">10</property>
                 <property name="margin-start">20</property>
                 <property name="margin-end">20</property>
-                <property name="spacing">0</property>
-                <property name="orientation">horizontal</property>
-                <child>
-                  <object class="GtkImage" id="url_image">
-                    <property name="visible">True</property>
-                    <property name="icon-name">network-workgroup</property>
-                    <property name="icon-size">0</property>
-                    <property name="pixel-size">96</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-
-                <child>
-                  <object class="GtkLabel" id="url_description_label">
-                    <property name="visible">True</property>
-                    <property name="use-markup">True</property>
-                    <property name="wrap">True</property>
-                    <property name="halign">start</property>
-                  </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                  </packing>
-                </child>
+                <property name="margin-bottom">10</property>
+                <signal name="activate" handler="on_url_entry_activated"/>
               </object>
             </child>
           </object>
diff --git a/src/wizard-source.vala b/src/wizard-source.vala
index 5e52116..fa4ba22 100644
--- a/src/wizard-source.vala
+++ b/src/wizard-source.vala
@@ -114,10 +114,6 @@ private class Boxes.WizardSource: Gtk.Stack {
     [GtkChild]
     private Boxes.WizardScrolled media_scrolled;
     [GtkChild]
-    private Gtk.Label url_description_label;
-    [GtkChild]
-    private Gtk.Image url_image;
-    [GtkChild]
     private Gtk.Box url_entry_vbox;
     [GtkChild]
     public Gtk.Entry url_entry;
@@ -210,11 +206,6 @@ private class Boxes.WizardSource: Gtk.Stack {
         page = SourcePage.MAIN;
     }
 
-    public void update_url_page(string title, string text, string icon_name) {
-        url_description_label.set_markup ("<b>"  + title + "</b>\n\n" + text);
-        url_image.icon_name = icon_name;
-    }
-
     private async void add_media_entries () {
         var medias = yield media_manager.list_installer_medias ();
 
diff --git a/src/wizard.vala b/src/wizard.vala
index 7f3a87c..27141d4 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -168,23 +168,14 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
             if (wizard_source.uri.length == 0)
                 return;
 
-            var text = _("Please enter desktop or collection URI");
-            var icon = "preferences-desktop-remote-desktop";
             try {
                 prepare_for_location (wizard_source.uri, true);
 
-                if (source != null && App.app.has_broker_for_source_type (source.source_type)) {
-                    text = _("Will add boxes for all systems available from this account.");
-                    icon = "network-workgroup";
-                } else
-                    text = _("Will add a single box.");
-
                 next_button.sensitive = true;
             } catch (GLib.Error error) {
                 // ignore any parsing error
             }
 
-            wizard_source.update_url_page (_("Desktop Access"), text, icon);
             break;
 
         default:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]