diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 515ab9e..b26cfc7 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -146,22 +146,6 @@ void GParted_Core::set_user_devices( const std::vector<Glib::ustring> & user_dev
 	
 void GParted_Core::set_devices( std::vector<Device> & devices )
 {
-	Glib::Thread::create( sigc::bind(
-				sigc::mem_fun( *this, &GParted_Core::set_devices_thread ),
-				&devices),
-			      false );
-	Gtk::Main::run();
-}
-
-static bool _mainquit( void *dummy )
-{
-	Gtk::Main::quit();
-	return false;
-}
-
-void GParted_Core::set_devices_thread( std::vector<Device> * pdevices )
-{
-	std::vector<Device> &devices = *pdevices;
 	devices .clear() ;
 	Device temp_device ;
 	Proc_Partitions_Info pp_info( true ) ;  //Refresh cache of proc partition information
@@ -349,7 +333,6 @@ void GParted_Core::set_devices_thread( std::vector<Device> * pdevices )
 	//NOTE that we cannot clear mountinfo since it might be needed in get_all_mountpoints()
 	set_thread_status_message("") ;
 	fstab_info .clear() ;
-	g_idle_add( (GSourceFunc)_mainquit, NULL );
 }
 
 // runs gpart on the specified parameter
