aboutsummaryrefslogtreecommitdiff
path: root/src/slider-menu-item.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-06-18 10:02:20 +0100
committerConor Curran <conor.curran@canonical.com>2010-06-18 10:02:20 +0100
commit5e7e3b4a09d5b5ea431d6e86f40fa1229756f4a1 (patch)
treeda9a8887e7bd2b87845c96be90d4b1278f0fc2c8 /src/slider-menu-item.c
parent9d081fd7a4c36606854008ae72c960d419399e9a (diff)
downloadayatana-indicator-sound-5e7e3b4a09d5b5ea431d6e86f40fa1229756f4a1.tar.gz
ayatana-indicator-sound-5e7e3b4a09d5b5ea431d6e86f40fa1229756f4a1.tar.bz2
ayatana-indicator-sound-5e7e3b4a09d5b5ea431d6e86f40fa1229756f4a1.zip
reformatted old files to fix all spacing issues
Diffstat (limited to 'src/slider-menu-item.c')
-rw-r--r--src/slider-menu-item.c49
1 files changed, 24 insertions, 25 deletions
diff --git a/src/slider-menu-item.c b/src/slider-menu-item.c
index 8a21fcf..d56422a 100644
--- a/src/slider-menu-item.c
+++ b/src/slider-menu-item.c
@@ -4,16 +4,16 @@ Copyright 2010 Canonical Ltd.
Authors:
Conor Curran <conor.curran@canonical.com>
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 3, as published
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 3, as published
by the Free Software Foundation.
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranties of
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranties of
+MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
-You should have received a copy of the GNU General Public License along
+You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
@@ -28,9 +28,8 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
typedef struct _SliderMenuItemPrivate SliderMenuItemPrivate;
-struct _SliderMenuItemPrivate
-{
- gdouble slider_value;
+struct _SliderMenuItemPrivate {
+ gdouble slider_value;
};
#define SLIDER_MENU_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SLIDER_MENU_ITEM_TYPE, SliderMenuItemPrivate))
@@ -46,58 +45,58 @@ G_DEFINE_TYPE (SliderMenuItem, slider_menu_item, DBUSMENU_TYPE_MENUITEM);
static void slider_menu_item_class_init (SliderMenuItemClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (SliderMenuItemPrivate));
+ g_type_class_add_private (klass, sizeof (SliderMenuItemPrivate));
- object_class->dispose = slider_menu_item_dispose;
- object_class->finalize = slider_menu_item_finalize;
+ object_class->dispose = slider_menu_item_dispose;
+ object_class->finalize = slider_menu_item_finalize;
DbusmenuMenuitemClass * mclass = DBUSMENU_MENUITEM_CLASS(klass);
mclass->handle_event = handle_event;
- return;
+ return;
}
static void slider_menu_item_init (SliderMenuItem *self)
{
- g_debug("Building new Slider Menu Item");
- return;
+ g_debug("Building new Slider Menu Item");
+ return;
}
static void slider_menu_item_dispose (GObject *object)
{
- G_OBJECT_CLASS (slider_menu_item_parent_class)->dispose (object);
- return;
+ G_OBJECT_CLASS (slider_menu_item_parent_class)->dispose (object);
+ return;
}
static void
slider_menu_item_finalize (GObject *object)
{
- G_OBJECT_CLASS (slider_menu_item_parent_class)->finalize (object);
+ G_OBJECT_CLASS (slider_menu_item_parent_class)->finalize (object);
}
static void
handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp)
{
- g_debug("in the handle event method of slider_menu_item");
+ g_debug("in the handle event method of slider_menu_item");
gdouble volume_input = 0;
volume_input = g_value_get_double(value);
- if(value != NULL)
- set_sink_volume(volume_input);
+ if (value != NULL)
+ set_sink_volume(volume_input);
}
SliderMenuItem* slider_menu_item_new(gboolean sinks_available, gdouble start_volume)
{
- SliderMenuItem *self = g_object_new(SLIDER_MENU_ITEM_TYPE, NULL);
+ SliderMenuItem *self = g_object_new(SLIDER_MENU_ITEM_TYPE, NULL);
dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_SLIDER_MENUITEM_TYPE);
dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_ENABLED, sinks_available);
dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_VISIBLE, sinks_available);
- return self;
+ return self;
}
-
+