banshee r3952 - in trunk/banshee: . src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastManager/Dialog



Author: gburt
Date: Thu May 22 04:01:22 2008
New Revision: 3952
URL: http://svn.gnome.org/viewvc/banshee?rev=3952&view=rev

Log:
2008-05-21  Gabriel Burt  <gabriel burt gmail com>

	* src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellPodcast.cs:
	Replace the disc image for 'All Podcasts' with the podcast icon.

	* src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastManager/Dialog/PodcastSubscribeDialog.cs:
	If the user has some text on the clipboard that starts with http,
	automatically put that in the url entry.  Make the dialog a big wider.


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellPodcast.cs
   trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastManager/Dialog/PodcastSubscribeDialog.cs

Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellPodcast.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellPodcast.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellPodcast.cs	Thu May 22 04:01:22 2008
@@ -49,7 +49,8 @@
         private static int pixbuf_spacing = 4;
         private static int pixbuf_size = 48;
         
-        private static Gdk.Pixbuf default_cover_pixbuf = IconThemeUtils.LoadIcon (pixbuf_size, "media-optical");
+        // TODO replace this w/ new icon installation etc
+        private static Gdk.Pixbuf default_cover_pixbuf = Gdk.Pixbuf.LoadFromResource ("podcast-icon-48.png");
         
         private ArtworkManager artwork_manager;
 
@@ -166,4 +167,4 @@
             return (height < pixbuf_size ? pixbuf_size : height) + 6;
         }
     }
-}
\ No newline at end of file
+}

Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastManager/Dialog/PodcastSubscribeDialog.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastManager/Dialog/PodcastSubscribeDialog.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastManager/Dialog/PodcastSubscribeDialog.cs	Thu May 22 04:01:22 2008
@@ -31,11 +31,12 @@
 using Gtk;
 using Mono.Unix;
 
-using Banshee.Gui;
-using Banshee.Base;
+using Hyena.Widgets;
 
 using Migo.Syndication;
 
+using Banshee.Gui;
+using Banshee.Base;
 using Banshee.Podcasting;
 using Banshee.Podcasting.Data;
 
@@ -66,7 +67,7 @@
 
         private void BuildWindow ()
         {
-            this.Resizable = false;
+            DefaultWidth = 475;
 
             BorderWidth = 6;
             VBox.Spacing = 12;
@@ -88,20 +89,20 @@
             contentBox.Spacing = 12;
 
             Label header = new Label();
-            header.Markup = "<big><b>" + GLib.Markup.EscapeText (
-                Catalog.GetString ("Subscribe to New Podcast")
-            ) + "</b></big>";
+            header.Markup = String.Format (
+                "<big><b>{0}</b></big>",
+                GLib.Markup.EscapeText (Catalog.GetString ("Subscribe to New Podcast"))
+            );
             
             header.Justify = Justification.Left;
             header.SetAlignment (0.0f, 0.0f);
 
-            Label message = new Label (Catalog.GetString (
+            WrapLabel message = new WrapLabel ();
+            message.Markup = Catalog.GetString (
                 "Please enter the URL of the podcast to which you would like to subscribe."
-            ));
+            );
             
             message.Wrap = true;
-            message.Justify = Justification.Left;
-            message.SetAlignment (0.0f, 0.0f);
 
             VBox sync_vbox = new VBox ();
 
@@ -126,6 +127,19 @@
             url_entry = new Entry ();
             url_entry.ActivatesDefault = true;
 
+            // If the user has copied some text to the clipboard that starts with http, set
+            // our url entry to it and select it
+            Clipboard clipboard = Clipboard.Get (Gdk.Atom.Intern ("CLIPBOARD", false));
+            if (clipboard != null) {
+                string pasted = clipboard.WaitForText ();
+                if (!String.IsNullOrEmpty (pasted)) {
+                    if (pasted.StartsWith ("http")) {
+                        url_entry.Text = pasted;
+                        url_entry.SelectRegion (0, pasted.Length);
+                    }
+                }
+            }
+
             Table table = new Table (1, 2, false);
             table.RowSpacing = 6;
             table.ColumnSpacing = 12;
@@ -147,12 +161,12 @@
                 AttachOptions.Shrink, 0, 0
             );
 
-            contentBox.PackStart (header, false, true, 0);
-            contentBox.PackStart (message, false, true, 0);
+            contentBox.PackStart (header, true, true, 0);
+            contentBox.PackStart (message, true, true, 0);
 
-            contentBox.PackStart (table, false, true, 0);
+            contentBox.PackStart (table, true, true, 0);
 
-            box.PackStart (contentBox, false, true, 0);
+            box.PackStart (contentBox, true, true, 0);
 
             AddButton (Gtk.Stock.Cancel, Gtk.ResponseType.Cancel, true);
             AddButton (Catalog.GetString ("Subscribe"), ResponseType.Ok, true);



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