Package: gnome-art
Version: 0.2-6

The bug has been described on
https://bugs.launchpad.net/ubuntu/+source/gnome-art/+bug/60258

"I opened Gnome Art Manager and tried to download a wallpaper to my
desktop. I clicked "Download Only", and seconds later got a crash
dialog. I am running a fully up-to-date Edgy installation on VMWare
Player.
..."

Andy Matteson has attached a patch to the bug, I'm sending it on the
report
Index: gnome-art-0.2/gnome-art/lib/gnome-art/ui/main_window.rb
===================================================================
--- gnome-art-0.2/gnome-art/lib/gnome-art/ui/main_window.rb	2005-04-19 19:26:16.000000000 -0400
+++ gnome-art-0.2.patch/gnome-art/lib/gnome-art/ui/main_window.rb	2007-07-18 00:51:09.698778613 -0400
@@ -24,10 +24,10 @@
 require 'rexml/document'
 
 module GnomeArt
-  class MainWindow
 
-   
+  class MainWindow
 
+   @@lastfilename = nil
     #Signalhandlers begin
 
   	def on_button_preview_clicked
@@ -76,6 +76,7 @@
 
   	def on_button_download_only_clicked
       #Download the selected item
+		
   		download_only_art
   	end
 
@@ -238,21 +239,18 @@
       location = iter[3]
 
       Thread.new {
+  	file_save_as = Gtk::FileSelection.new("Download Background")
+	filename = GetArt.get_filename_by_location(location)
 
-    		file_save_as = Gtk::FileChooserDialog.new("Download Background", 
-    																																					@main_window, 
-    																																					Gtk::FileChooser::ACTION_SAVE,
-             																																	nil,
-    	  																                                      [Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL],
-                                       																				[Gtk::Stock::SAVE, Gtk::Dialog::RESPONSE_ACCEPT])			
-      
-        filename = GetArt.get_filename_by_location(location)
+	if (@@lastfilename != nil)
+		file_save_as.filename = @@lastfilename
+	end
 
-        file_save_as.set_current_name(filename)																																			
+	file_save_as.set_filename (filename)
 
-    		if (file_save_as.run == Gtk::Dialog::RESPONSE_ACCEPT)
+	file_save_as.ok_button.signal_connect("clicked") do
           #Save the stuff
-
+  	  @@lastfilename= file_save_as.filename
           temp_file =  Config::Temp_dir + "/" + filename
 
           if (FileTest.exist?(temp_file))     
@@ -271,10 +269,17 @@
 
           end
 
-      	end		
+	  file_save_as.destroy
+      	end
+	 file_save_as.cancel_button.signal_connect("clicked") do
+	 file_save_as.destroy
+	end
+
+
+	file_save_as.show_all
 
-      	file_save_as.destroy
       }
+
   	end
 
   	def method(handler, *other_args) 

Reply via email to