aboutsummaryrefslogtreecommitdiff
path: root/src/title-widget.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-09-30 18:10:42 +0100
committerConor Curran <conor.curran@canonical.com>2010-09-30 18:10:42 +0100
commit44f66544728cbcebf379debb377f677ef5921615 (patch)
tree8fcbe6f2f282a949fb422a6c3ae198ce00c16343 /src/title-widget.c
parent3282a81299408614457ce01168f23feb7574e368 (diff)
parent82f328d8f7bff69e2b186024e0a8ba96dcd93290 (diff)
downloadayatana-indicator-sound-44f66544728cbcebf379debb377f677ef5921615.tar.gz
ayatana-indicator-sound-44f66544728cbcebf379debb377f677ef5921615.tar.bz2
ayatana-indicator-sound-44f66544728cbcebf379debb377f677ef5921615.zip
background gradient bug fixed
Diffstat (limited to 'src/title-widget.c')
-rw-r--r--src/title-widget.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/title-widget.c b/src/title-widget.c
index bc1d453..af5a2cb 100644
--- a/src/title-widget.c
+++ b/src/title-widget.c
@@ -32,7 +32,7 @@ typedef struct _TitleWidgetPrivate TitleWidgetPrivate;
struct _TitleWidgetPrivate
{
- DbusmenuMenuitem* twin_item;
+ DbusmenuMenuitem* twin_item;
};
#define TITLE_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TITLE_WIDGET_TYPE, TitleWidgetPrivate))
@@ -63,15 +63,15 @@ G_DEFINE_TYPE (TitleWidget, title_widget, GTK_TYPE_IMAGE_MENU_ITEM);
static void
title_widget_class_init (TitleWidgetClass *klass)
{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- widget_class->button_press_event = title_widget_button_press_event;
-
- g_type_class_add_private (klass, sizeof (TitleWidgetPrivate));
+ widget_class->button_press_event = title_widget_button_press_event;
+
+ g_type_class_add_private (klass, sizeof (TitleWidgetPrivate));
- gobject_class->dispose = title_widget_dispose;
- gobject_class->finalize = title_widget_finalize;
+ gobject_class->dispose = title_widget_dispose;
+ gobject_class->finalize = title_widget_finalize;
}
static void
@@ -92,7 +92,7 @@ title_widget_init (TitleWidget *self)
+ 1 /* padding */,
height);
gtk_misc_set_alignment(GTK_MISC(icon), 0.5 /* right aligned */, 0);
- gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(self), GTK_WIDGET(icon));
+ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(self), GTK_WIDGET(icon));
gtk_widget_show(icon);
}
@@ -118,7 +118,7 @@ title_widget_button_press_event (GtkWidget *menuitem,
TitleWidgetPrivate * priv = TITLE_WIDGET_GET_PRIVATE(menuitem);
GValue value = {0};
- g_value_init(&value, G_TYPE_BOOLEAN);
+ g_value_init(&value, G_TYPE_BOOLEAN);
g_value_set_boolean(&value, TRUE);
dbusmenu_menuitem_handle_event (priv->twin_item, "Title menu event", &value, 0);
@@ -134,8 +134,8 @@ title_widget_property_update(DbusmenuMenuitem* item, gchar* property,
TitleWidget* mitem = TITLE_WIDGET(userdata);
if(g_ascii_strcasecmp(DBUSMENU_TITLE_MENUITEM_NAME, property) == 0){
- gtk_menu_item_set_label (GTK_MENU_ITEM(mitem),
- g_value_get_string(value));
+ gtk_menu_item_set_label (GTK_MENU_ITEM(mitem),
+ g_value_get_string(value));
}
}
@@ -158,8 +158,7 @@ title_widget_set_twin_item(TitleWidget* self,
gtk_menu_item_set_label (GTK_MENU_ITEM(self),
dbusmenu_menuitem_property_get(priv->twin_item,
- DBUSMENU_TITLE_MENUITEM_NAME));
-
+ DBUSMENU_TITLE_MENUITEM_NAME));
}
static gboolean
@@ -218,7 +217,7 @@ title_widget_new(DbusmenuMenuitem *item)
{
GtkWidget* widget = g_object_new (TITLE_WIDGET_TYPE,
NULL);
- gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (widget), TRUE);
+ gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (widget), TRUE);
title_widget_set_twin_item((TitleWidget*)widget, item);
return widget;