[Muine] Gconf Key for amazon dev tag



Here's a patch which adds a gconf key for amazon dev tags so you can
fetch albums.

I had to add a schema to muine.schemas but cvs diff didn't pick that up
(not managed by cvs) I didn't really understand that so here's the basic
schema.  Does some other file govern the creation of the schema file?

    <schema>
      <key>/schemas/apps/muine/amazon_dev_tag</key>
      <applyto>/apps/muine/amazon_dev_tag</applyto>
      <owner>muine</owner>
      <type>string</type>
      <default>amazondevtag</default>
      <locale name="C">
      	<short>Amazon Dev Tag</short>
	<long>Your Amazon Dev Tag for fetching albums</long>
      </locale>
    </schema>

Sorry if anything is wrong... it's my first patch ever, and I don't know
mono.

thanks
-Willis
Index: src/CoverGetter.cs
===================================================================
RCS file: /cvs/gnome/muine/src/CoverGetter.cs,v
retrieving revision 1.15
diff -u -r1.15 CoverGetter.cs
--- src/CoverGetter.cs	15 Mar 2005 11:25:47 -0000	1.15
+++ src/CoverGetter.cs	19 Nov 2005 12:11:25 -0000
@@ -34,7 +34,8 @@
 		// GConf
 		private const string GConfKeyAmazonLocale     = "/apps/muine/amazon_locale";
 		private const string GConfDefaultAmazonLocale = "us";
-
+		private const string GConfKeyDevTag = "/apps/muine/amazon_dev_tag";
+		private	const string GConfDefaultDevTag = "amazondevtag";
 		// Delegates
 		public delegate void GotCoverDelegate (Pixbuf pixbuf);
 														
@@ -45,6 +46,7 @@
 
 		// Variables
 		private string amazon_locale;
+		private string dev_tag;
 
 		// Variables :: Cover Filenames
 		//	TODO: Maybe make checking these case-insensitve instead
@@ -297,9 +299,14 @@
 			int current_page = 1;
 			int max_pages = 2; // check no more than 2 pages
 			
+			//Getting the GConf Dev Tag
+			
+		       	dev_tag = (string) Config.Get (GConfKeyDevTag, 
+				GConfDefaultDevTag);
+
 			// Create Encapsulated Request
 			Amazon.ArtistRequest asearch = new Amazon.ArtistRequest ();
-			asearch.devtag = "INSERT DEV TAG HERE"; // TODO: We really should have a devtag
+			asearch.devtag = dev_tag; // TODO: We really should have a devtag
 			asearch.artist = sane_artist;
 			asearch.keywords = sane_album_title;
 			asearch.type = "heavy";


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