[gnome-control-center] sound: Allow switching tabs from the command-line
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] sound: Allow switching tabs from the command-line
- Date: Thu, 8 Sep 2011 16:03:51 +0000 (UTC)
commit d592244514a8d385ea0cd2a74602e5553ac5be2c
Author: Bastien Nocera <hadess hadess net>
Date: Thu Sep 8 15:44:42 2011 +0100
sound: Allow switching tabs from the command-line
panels/sound/cc-sound-panel.c | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/panels/sound/cc-sound-panel.c b/panels/sound/cc-sound-panel.c
index e3f0b1d..820bda0 100644
--- a/panels/sound/cc-sound-panel.c
+++ b/panels/sound/cc-sound-panel.c
@@ -36,14 +36,46 @@
G_DEFINE_DYNAMIC_TYPE (CcSoundPanel, cc_sound_panel, CC_TYPE_PANEL)
+enum {
+ PROP_0,
+ PROP_ARGV
+};
+
static void cc_sound_panel_finalize (GObject *object);
static void
+cc_sound_panel_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ CcSoundPanel *self = CC_SOUND_PANEL (object);
+
+ switch (property_id) {
+ case PROP_ARGV: {
+ gchar **args;
+
+ args = g_value_get_boxed (value);
+
+ if (args && args[0]) {
+ gvc_mixer_dialog_set_page (self->dialog, args[0]);
+ }
+ break;
+ }
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ }
+}
+
+static void
cc_sound_panel_class_init (CcSoundPanelClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = cc_sound_panel_finalize;
+ object_class->set_property = cc_sound_panel_set_property;
+
+ g_object_class_override_property (object_class, PROP_ARGV, "argv");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]