Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "StdAfx.h"
+#include "lists.h"
-#ifdef _WIN32
+#ifdef WIN32
#pragma warning(disable : 4786)
#endif
-#include "lists.h"
+#include <glib.h>
+#include <gtk/gtk.h>
+
#include "misc.h"
-bool LoadExclusionList( char* filename, list<Str>* exclusionList ){
+bool LoadExclusionList( char* filename, std::list<Str>* exclusionList ){
FILE* eFile = fopen( filename, "r" );
if ( eFile ) {
char buffer[256];
return TRUE;
}
- Sys_ERROR( "Failed To Load Exclusion List: %s\n", filename );
+ globalErrorStream() << "Failed To Load Exclusion List: " << filename << "\n";
return FALSE;
}
-bool LoadGList( char* filename, GList** loadlist ){
+bool LoadGList( char* filename, ui::ListStore loadlist ){
FILE* eFile = fopen( filename, "r" );
if ( eFile ) {
char buffer[256];
if ( strlen( buffer ) > 0 ) {
char* buffer2 = new char[strlen( buffer ) + 1];
strcpy( buffer2, buffer );
- *loadlist = g_list_append( *loadlist, buffer2 );
+ GtkTreeIter iter;
+ gtk_list_store_append(loadlist, &iter);
+ gtk_list_store_set(loadlist, &iter, 0, buffer2, -1);
}
else{
cnt++;
return TRUE;
}
- Sys_ERROR( "Failed To Load GList: %s\n", filename );
+ globalErrorStream() << "Failed To Load GList: " << filename << "\n";
return FALSE;
}