2 * gtkappchooser.c: app-chooser interface
4 * Copyright (C) 2010 Red Hat, Inc.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with the Gnome Library; see the file COPYING.LIB. If not,
18 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
21 * Authors: Cosimo Cecchi <ccecchi@redhat.com>
26 #include "gtkappchooser.h"
29 #include "gtkappchooserprivate.h"
30 #include "gtkwidget.h"
34 G_DEFINE_INTERFACE (GtkAppChooser, gtk_app_chooser, GTK_TYPE_WIDGET);
37 gtk_app_chooser_default_init (GtkAppChooserIface *iface)
41 pspec = g_param_spec_string ("content-type",
43 P_("The content type used by the open with object"),
45 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
46 G_PARAM_STATIC_STRINGS);
47 g_object_interface_install_property (iface, pspec);
51 gtk_app_chooser_get_content_type (GtkAppChooser *self)
55 g_return_val_if_fail (GTK_IS_APP_CHOOSER (self), NULL);
58 "content-type", &retval,
65 gtk_app_chooser_get_app_info (GtkAppChooser *self)
67 return GTK_APP_CHOOSER_GET_IFACE (self)->get_app_info (self);
71 gtk_app_chooser_refresh (GtkAppChooser *self)
73 GTK_APP_CHOOSER_GET_IFACE (self)->refresh (self);