~kroq-gar78/ubuntu/precise/gnome-control-center/fix-885947

« back to all changes in this revision

Viewing changes to panels/display/cc-display-panel.c

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya
  • Date: 2011-05-17 10:47:27 UTC
  • mfrom: (0.1.11 experimental) (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20110517104727-lqel6m8vhfw5jby1
Tags: 1:3.0.1.1-1ubuntu1
* Rebase on Debian, remaining Ubuntu changes:
* debian/control:
  - Build-Depend on hardening-wrapper, dpkg-dev and dh-autoreconf
  - Add dependency on ubuntu-system-service
  - Remove dependency on gnome-icon-theme-symbolic
  - Move dependency on apg, gnome-icon-theme-symbolic and accountsservice to
    be a Recommends: until we get them in main
* debian/rules:
  - Use autoreconf
  - Add binary-post-install rule for gnome-control-center-data
  - Run dh-autoreconf
* debian/gnome-control-center.dirs:
* debian/gnome-control-center.links:
  - Add a link to the control center shell for indicators
* debian/patches/00_disable-nm.patch:
  - Temporary patch to disable building with NetworkManager until we get
    the new one in the archive
* debian/patches/01_git_remove_gettext_calls.patch:
  - Remove calls to AM_GNU_GETTEXT, IT_PROG_INTLTOOL should be enough
* debian/patches/01_git_kill_warning.patch:
  - Kill warning
* debian/patches/50_ubuntu_systemwide_prefs.patch:
  - Ubuntu specific proxy preferences
* debian/patches/51_ubuntu_system_keyboard.patch:
  - Implement the global keyboard spec at https://wiki.ubuntu.com/DefaultKeyboardSettings

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2010 Intel, Inc
 
3
 *
 
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.
 
8
 *
 
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.
 
13
 *
 
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.
 
17
 *
 
18
 * Author: Thomas Wood <thomas.wood@intel.com>
 
19
 *
 
20
 */
 
21
 
 
22
#include "cc-display-panel.h"
 
23
 
 
24
#include "xrandr-capplet.h"
 
25
 
 
26
G_DEFINE_DYNAMIC_TYPE (CcDisplayPanel, cc_display_panel, CC_TYPE_PANEL)
 
27
 
 
28
#define DISPLAY_PANEL_PRIVATE(o) \
 
29
  (G_TYPE_INSTANCE_GET_PRIVATE ((o), CC_TYPE_DISPLAY_PANEL, CcDisplayPanelPrivate))
 
30
 
 
31
struct _CcDisplayPanelPrivate
 
32
{
 
33
  gpointer dummy;
 
34
};
 
35
 
 
36
 
 
37
static void
 
38
cc_display_panel_get_property (GObject    *object,
 
39
                               guint       property_id,
 
40
                               GValue     *value,
 
41
                               GParamSpec *pspec)
 
42
{
 
43
  switch (property_id)
 
44
    {
 
45
    default:
 
46
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
 
47
    }
 
48
}
 
49
 
 
50
static void
 
51
cc_display_panel_set_property (GObject      *object,
 
52
                               guint         property_id,
 
53
                               const GValue *value,
 
54
                               GParamSpec   *pspec)
 
55
{
 
56
  switch (property_id)
 
57
    {
 
58
    default:
 
59
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
 
60
    }
 
61
}
 
62
 
 
63
static void
 
64
cc_display_panel_dispose (GObject *object)
 
65
{
 
66
  G_OBJECT_CLASS (cc_display_panel_parent_class)->dispose (object);
 
67
}
 
68
 
 
69
static void
 
70
cc_display_panel_finalize (GObject *object)
 
71
{
 
72
  G_OBJECT_CLASS (cc_display_panel_parent_class)->finalize (object);
 
73
}
 
74
 
 
75
static void
 
76
cc_display_panel_class_init (CcDisplayPanelClass *klass)
 
77
{
 
78
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
79
 
 
80
  g_type_class_add_private (klass, sizeof (CcDisplayPanelPrivate));
 
81
 
 
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;
 
86
}
 
87
 
 
88
static void
 
89
cc_display_panel_class_finalize (CcDisplayPanelClass *klass)
 
90
{
 
91
}
 
92
 
 
93
static void
 
94
cc_display_panel_init (CcDisplayPanel *self)
 
95
{
 
96
  GtkWidget *widget;
 
97
 
 
98
  self->priv = DISPLAY_PANEL_PRIVATE (self);
 
99
 
 
100
  widget = run_application ();
 
101
 
 
102
  gtk_widget_show (widget);
 
103
  gtk_container_add (GTK_CONTAINER (self), widget);
 
104
}
 
105
 
 
106
void
 
107
cc_display_panel_register (GIOModule *module)
 
108
{
 
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,
 
112
                                  "display", 0);
 
113
}
 
114