banshee r3840 - in trunk/banshee: . src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio src/Extensions/Banshee.Lastfm/Resources



Author: gburt
Date: Mon Apr 28 23:18:24 2008
New Revision: 3840
URL: http://svn.gnome.org/viewvc/banshee?rev=3840&view=rev

Log:
2008-04-28  Gabriel Burt  <gabriel burt gmail com>

	* src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationEditor.cs:
	* src/Extensions/Banshee.Lastfm/Resources/lastfm.glade: Remove name entry
	from Last.fm dialog.


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationEditor.cs
   trunk/banshee/src/Extensions/Banshee.Lastfm/Resources/lastfm.glade

Modified: trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationEditor.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationEditor.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationEditor.cs	Mon Apr 28 23:18:24 2008
@@ -49,7 +49,6 @@
         private LastfmSource lastfm;
         private StationSource source;
 
-        [Widget] private Gtk.Entry name_entry;
         [Widget] private Gtk.ComboBox type_combo;
         [Widget] private Gtk.Entry arg_entry;
         [Widget] private Gtk.Label arg_label;
@@ -60,7 +59,6 @@
         {
             this.lastfm = lastfm;
             this.source = source;
-            SourceName = source.Name;
             Arg = source.Arg;
             Initialize ();
             Dialog.Title = Catalog.GetString ("Edit Station");
@@ -102,9 +100,8 @@
 
             type_combo.Changed += HandleTypeChanged;
             type_combo.Active = active_type;
-            arg_entry.Changed += HandleArgChanged;
             ok_button.Sensitive = true;
-            name_entry.GrabFocus ();
+            type_combo.GrabFocus ();
         }
 
         public void RunDialog ()
@@ -152,18 +149,8 @@
                 arg_label.Text = type.ArgLabel;
         }
 
-        private string last_arg = String.Empty;
-        private void HandleArgChanged (object sender, EventArgs args)
-        {
-            if (name_entry.Text == last_arg) {
-                name_entry.Text = arg_entry.Text;
-                last_arg = arg_entry.Text;
-            }
-        }
-
         private string SourceName {
-            get { return name_entry.Text; }
-            set { name_entry.Text = value; }
+            get { return source != null ? source.Name : arg_entry.Text; }
         }
 
         private StationType Type {

Modified: trunk/banshee/src/Extensions/Banshee.Lastfm/Resources/lastfm.glade
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Lastfm/Resources/lastfm.glade	(original)
+++ trunk/banshee/src/Extensions/Banshee.Lastfm/Resources/lastfm.glade	Mon Apr 28 23:18:24 2008
@@ -26,30 +26,6 @@
                 <property name="column_spacing">12</property>
                 <property name="row_spacing">6</property>
                 <child>
-                  <widget class="GtkLabel" id="name_label">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">_Name:</property>
-                    <property name="use_underline">True</property>
-                  </widget>
-                  <packing>
-                    <property name="x_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="name_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
                   <widget class="GtkLabel" id="type_label">
                     <property name="visible">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>



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