← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n] Rev 408: Merge with trunk rev 402

 

Merge authors:
  Razzloss (razzloss)
  Steven Sheehy (steven-sheehy)
------------------------------------------------------------
revno: 408 [merge]
committer: Steven Sheehy <steven.sheehy@xxxxxxxxx>
branch nick: linuxdcpp-i18n
timestamp: Sun 2010-11-28 10:53:55 -0600
message:
  Merge with trunk rev 402
modified:
  Changelog.txt
  Readme.txt
  SConstruct
  dcpp/SettingsManager.cpp
  linux/search.cc


--
lp:~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n
https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n

Your team LinuxDC++ Team is subscribed to branch lp:~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n.
To unsubscribe from this branch go to https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n/+edit-subscription
=== modified file 'Changelog.txt'
--- Changelog.txt	2010-10-14 06:00:38 +0000
+++ Changelog.txt	2010-11-28 16:53:55 +0000
@@ -62,6 +62,7 @@
 [2010-09-07] Added icons to the notebook tab labels. (Steven)
 [2010-09-09] PM tab label now shows when user's nick, hub or online status changes. (Steven)
 [2010-10-13] Added file path (fileFN) and magnet (fileMN) variables to user commands. (thanks DjSlash)
+[2010-10-29] lp#667491: Unexpected results deleting multiple selected search results. (Razzloss)
 
 *** 1.0.3 2009-02-01 ***
 [2008-08-10] lp#256236: Fixed a crash on startup when using auto-open options.

=== modified file 'Readme.txt'
--- Readme.txt	2009-11-26 03:08:38 +0000
+++ Readme.txt	2010-11-05 13:09:29 +0000
@@ -19,7 +19,7 @@
 -------------
 scons >= 0.96
 pkg-config
-g++ >= 3.4
+g++ >= 4.1
 gtk+-2.0 >= 2.10
 gthread-2.0 >= 2.4
 libglade-2.0 >= 2.4

=== modified file 'SConstruct'
--- SConstruct	2010-11-28 16:48:17 +0000
+++ SConstruct	2010-11-28 16:53:55 +0000
@@ -207,13 +207,6 @@
 		print '\tNote: You might have the lib but not the headers'
 		Exit(1)
 
-	# TODO: Implement a plugin system so libnotify doesn't have compile-time dependencies
-	if not conf.CheckPKG('libnotify >= 0.4.1'):
-		print '\tlibnotify >= 0.4.1 not found, disabling notifications.'
-		print '\tNote: You might have the lib but not the headers'
-	else:
-		conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY')
-		conf.env.ParseConfig('pkg-config --libs libnotify')
 	
 	if not conf.CheckCXXHeader('boost/version.hpp', '<>'):
 		print '\tboost not found.'
@@ -268,6 +261,14 @@
 	if conf.CheckHeader(['sys/types.h', 'sys/socket.h', 'ifaddrs.h', 'net/if.h']):
 		conf.env.Append(CPPDEFINES = 'HAVE_IFADDRS_H')
 
+	# TODO: Implement a plugin system so libnotify doesn't have compile-time dependencies
+	if not conf.CheckPKG('libnotify >= 0.4.1'):
+		print '\tlibnotify >= 0.4.1 not found, disabling notifications.'
+		print '\tNote: You might have the lib but not the headers'
+	else:
+		conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY')
+		conf.env.ParseConfig('pkg-config --libs libnotify')
+
 	conf.CheckBZRRevision()
 
 	env = conf.Finish()

=== modified file 'dcpp/SettingsManager.cpp'
--- dcpp/SettingsManager.cpp	2010-10-11 06:05:22 +0000
+++ dcpp/SettingsManager.cpp	2010-11-28 16:53:55 +0000
@@ -149,7 +149,7 @@
 	setDefault(IGNORE_BOT_PMS, false);
 	setDefault(LIST_DUPES, true);
 	setDefault(BUFFER_SIZE, 64);
-	setDefault(HUBLIST_SERVERS, "http://dchublist.com/hublist.xml.bz2;http://www.hublista.hu/hublist.xml.bz2;http://hublist.openhublist.org/hublist.xml.bz2;";);
+	setDefault(HUBLIST_SERVERS, "http://dchublist.com/hublist.xml.bz2;http://www.hublista.hu/hublist.xml.bz2";);
 	setDefault(DOWNLOAD_SLOTS, 3);
 	setDefault(MAX_DOWNLOAD_SPEED, 0);
 	setDefault(LOG_DIRECTORY, Util::getPath(Util::PATH_USER_LOCAL) + "Logs" PATH_SEPARATOR_STR);

=== modified file 'linux/search.cc'
--- linux/search.cc	2010-11-12 08:07:06 +0000
+++ linux/search.cc	2010-11-28 16:53:55 +0000
@@ -1461,20 +1461,34 @@
 		GtkTreeIter filterIter;
 		GtkTreePath *path;
 		GList *list = gtk_tree_selection_get_selected_rows(s->selection, NULL);
+		GList *refList = NULL;
 
+		// Convert it to list of GtkTreeRowReferences since modifying the model with a list of Paths is bad.
 		for (GList *i = list; i; i = i->next)
 		{
 			path = (GtkTreePath *)i->data;
-			if (gtk_tree_model_get_iter(s->sortedFilterModel, &iter, path))
+			refList = g_list_append(refList, gtk_tree_row_reference_new(s->sortedFilterModel, path));
+			gtk_tree_path_free(path);
+		}
+		g_list_free(list);
+
+		for (GList *i = refList; i; i = i->next)
+		{
+			path = gtk_tree_row_reference_get_path((GtkTreeRowReference*)i->data);	
+			if (path != NULL)
 			{
-				// Remove the top-level node and it will remove any children nodes (if applicable)
-				gtk_tree_model_sort_convert_iter_to_child_iter(GTK_TREE_MODEL_SORT(s->sortedFilterModel), &filterIter, &iter);
-				gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(s->searchFilterModel), &iter, &filterIter);
-				gtk_tree_store_remove(s->resultStore, &iter);
+				if (gtk_tree_model_get_iter(s->sortedFilterModel, &iter, path))
+				{
+					// Remove the top-level node and it will remove any children nodes (if applicable)
+					gtk_tree_model_sort_convert_iter_to_child_iter(GTK_TREE_MODEL_SORT(s->sortedFilterModel), &filterIter, &iter);
+					gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(s->searchFilterModel), &iter, &filterIter);
+					gtk_tree_store_remove(s->resultStore, &iter);
+				}
+				gtk_tree_path_free(path);
 			}
-			gtk_tree_path_free(path);
+			gtk_tree_row_reference_free((GtkTreeRowReference*)i->data);
 		}
-		g_list_free(list);
+		g_list_free(refList);
 	}
 }
 
@@ -1548,7 +1562,7 @@
 	}
 	else
 	{
-	 	string path = WulforUtil::linuxSeparator(result->getFile());
+		string path = WulforUtil::linuxSeparator(result->getFile());
 		resultMap["Filename"] = WulforUtil::linuxSeparator(result->getFileName());
 		resultMap["Path"] = Util::getFilePath(path.substr(0, path.length() - 1)); // getFilePath just returns path unless we chop the last / off
 		if (resultMap["Path"].find("/") == string::npos)