2
* Copyright (C) 2010 Intel, Inc
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
* Author: Thomas Wood <thomas.wood@intel.com>
22
#include "cc-display-panel.h"
24
#include "xrandr-capplet.h"
26
G_DEFINE_DYNAMIC_TYPE (CcDisplayPanel, cc_display_panel, CC_TYPE_PANEL)
28
#define DISPLAY_PANEL_PRIVATE(o) \
29
(G_TYPE_INSTANCE_GET_PRIVATE ((o), CC_TYPE_DISPLAY_PANEL, CcDisplayPanelPrivate))
31
struct _CcDisplayPanelPrivate
38
cc_display_panel_get_property (GObject *object,
46
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
51
cc_display_panel_set_property (GObject *object,
59
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
64
cc_display_panel_dispose (GObject *object)
66
G_OBJECT_CLASS (cc_display_panel_parent_class)->dispose (object);
70
cc_display_panel_finalize (GObject *object)
72
G_OBJECT_CLASS (cc_display_panel_parent_class)->finalize (object);
76
cc_display_panel_class_init (CcDisplayPanelClass *klass)
78
GObjectClass *object_class = G_OBJECT_CLASS (klass);
80
g_type_class_add_private (klass, sizeof (CcDisplayPanelPrivate));
82
object_class->get_property = cc_display_panel_get_property;
83
object_class->set_property = cc_display_panel_set_property;
84
object_class->dispose = cc_display_panel_dispose;
85
object_class->finalize = cc_display_panel_finalize;
89
cc_display_panel_class_finalize (CcDisplayPanelClass *klass)
94
cc_display_panel_init (CcDisplayPanel *self)
98
self->priv = DISPLAY_PANEL_PRIVATE (self);
100
widget = run_application ();
102
gtk_widget_show (widget);
103
gtk_container_add (GTK_CONTAINER (self), widget);
107
cc_display_panel_register (GIOModule *module)
109
cc_display_panel_register_type (G_TYPE_MODULE (module));
110
g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
111
CC_TYPE_DISPLAY_PANEL,