2010-11-19 17:00:55 +00:00
|
|
|
/*
|
2010-11-23 16:23:37 +00:00
|
|
|
* gtkappchoosermodule.c: an extension point for online integration
|
2010-11-19 17:00:55 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with the Gnome Library; see the file COPYING.LIB. If not,
|
|
|
|
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* Authors: Cosimo Cecchi <ccecchi@redhat.com>
|
|
|
|
*/
|
|
|
|
|
2010-11-24 23:32:05 +00:00
|
|
|
#include "config.h"
|
2010-11-19 17:00:55 +00:00
|
|
|
|
2010-11-23 16:23:37 +00:00
|
|
|
#include "gtkappchoosermodule.h"
|
2010-11-19 17:00:55 +00:00
|
|
|
|
|
|
|
#include <gio/gio.h>
|
|
|
|
|
2010-11-23 16:23:37 +00:00
|
|
|
#include "gtkappchooseronline.h"
|
2010-11-19 17:00:55 +00:00
|
|
|
|
|
|
|
#ifdef ENABLE_PACKAGEKIT
|
2010-11-23 16:23:37 +00:00
|
|
|
#include "gtkappchooseronlinepk.h"
|
2010-11-19 17:00:55 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
G_LOCK_DEFINE_STATIC (registered_ep);
|
|
|
|
|
|
|
|
void
|
2010-11-23 16:23:37 +00:00
|
|
|
_gtk_app_chooser_module_ensure (void)
|
2010-11-19 17:00:55 +00:00
|
|
|
{
|
|
|
|
static gboolean registered_ep = FALSE;
|
|
|
|
GIOExtensionPoint *ep;
|
|
|
|
|
|
|
|
G_LOCK (registered_ep);
|
|
|
|
|
|
|
|
if (!registered_ep)
|
2010-11-29 17:10:06 +00:00
|
|
|
{
|
|
|
|
registered_ep = TRUE;
|
2010-11-19 17:00:55 +00:00
|
|
|
|
2010-11-29 17:10:06 +00:00
|
|
|
ep = g_io_extension_point_register ("gtkappchooser-online");
|
|
|
|
g_io_extension_point_set_required_type (ep, GTK_TYPE_APP_CHOOSER_ONLINE);
|
2010-11-19 17:00:55 +00:00
|
|
|
|
|
|
|
#ifdef ENABLE_PACKAGEKIT
|
2010-11-29 17:10:06 +00:00
|
|
|
_gtk_app_chooser_online_pk_get_type ();
|
2010-11-19 17:00:55 +00:00
|
|
|
#endif
|
2010-11-29 17:10:06 +00:00
|
|
|
}
|
2010-11-19 17:00:55 +00:00
|
|
|
|
|
|
|
G_UNLOCK (registered_ep);
|
|
|
|
}
|