]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtksearchengine.c
Really keep GtkBubbleWindow private
[~andy/gtk] / gtk / gtksearchengine.c
index 196e944d8e341a6562fbe1b25251002cf4f108d5..b68408cacf41d4ac4ff0505c1686dbe08da2be91 100644 (file)
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  *
  * Author: Anders Carlsson <andersca@imendio.com>
  *
  * Based on nautilus-search-engine.c
  */
 
-#include <config.h>
+#include "config.h"
 #include "gtksearchengine.h"
-#include "gtksearchenginebeagle.h"
 #include "gtksearchenginesimple.h"
 #include "gtksearchenginetracker.h"
+#include "gtksearchenginequartz.h"
 
-#define HAVE_BEAGLE  1 
+#include <gdk/gdk.h> /* for GDK_WINDOWING_QUARTZ */
+
+#ifndef G_OS_WIN32  /* No tracker on Windows */
 #define HAVE_TRACKER 1
+#endif
 
 enum 
 {
@@ -104,7 +106,7 @@ _gtk_search_engine_init (GtkSearchEngine *engine)
 GtkSearchEngine *
 _gtk_search_engine_new (void)
 {
-  GtkSearchEngine *engine;
+  GtkSearchEngine *engine = NULL;
        
 #ifdef HAVE_TRACKER
   engine = _gtk_search_engine_tracker_new ();
@@ -112,13 +114,15 @@ _gtk_search_engine_new (void)
     return engine;
 #endif
   
-#ifdef HAVE_BEAGLE
-  engine = _gtk_search_engine_beagle_new ();
+#ifdef GDK_WINDOWING_QUARTZ
+  engine = _gtk_search_engine_quartz_new ();
   if (engine)
     return engine;
 #endif
 
-  engine = _gtk_search_engine_simple_new ();
+  if (g_thread_supported ())
+    engine = _gtk_search_engine_simple_new ();
+  
   return engine;
 }