diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-09-07 21:03:57 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-09-07 21:03:57 +0100 |
commit | 7569d1ceb769afcd429eec614c3a0c0b9ca0a2c0 (patch) | |
tree | 8138bdf1b9eb7a6527fc977ec2b632bc36c10311 /src | |
parent | 39680a792b250f478fcdd430c7c09a734ab35590 (diff) | |
download | ayatana-indicator-sound-7569d1ceb769afcd429eec614c3a0c0b9ca0a2c0.tar.gz ayatana-indicator-sound-7569d1ceb769afcd429eec614c3a0c0b9ca0a2c0.tar.bz2 ayatana-indicator-sound-7569d1ceb769afcd429eec614c3a0c0b9ca0a2c0.zip |
removed unnecessary hbox and label and set the text directly on the menuitem
Diffstat (limited to 'src')
-rw-r--r-- | src/title-widget.c | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/src/title-widget.c b/src/title-widget.c index 245c14c..1925b6d 100644 --- a/src/title-widget.c +++ b/src/title-widget.c @@ -32,8 +32,6 @@ typedef struct _TitleWidgetPrivate TitleWidgetPrivate; struct _TitleWidgetPrivate { - //GtkWidget* hbox; - //GtkWidget* name; GtkWidget* image_item; DbusmenuMenuitem* twin_item; }; @@ -55,8 +53,6 @@ static void title_widget_property_update(DbusmenuMenuitem* item, gchar* property GValue* value, gpointer userdata); static void title_widget_set_twin_item( TitleWidget* self, DbusmenuMenuitem* twin_item); -//static void title_widget_style_name_text(TitleWidget* self); - static gboolean title_widget_triangle_draw_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data); @@ -86,10 +82,6 @@ title_widget_init (TitleWidget *self) TitleWidgetPrivate * priv = TITLE_WIDGET_GET_PRIVATE(self); - //GtkWidget *hbox; - - //hbox = gtk_hbox_new(FALSE, 0); - //priv->hbox = hbox; // Add image to the 'gutter' gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM(self), TRUE); @@ -123,7 +115,7 @@ title_widget_init (TitleWidget *self) gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(self), GTK_WIDGET(icon)); - //gtk_widget_show_all(icon); + gtk_widget_show_all(icon); // DEBUG g_debug("title widget init - Is there a pixbuf from image loaded with helper : %i", GDK_IS_PIXBUF(buf)); @@ -204,8 +196,6 @@ title_widget_property_update(DbusmenuMenuitem* item, gchar* property, 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_label_set_text(GTK_LABEL(priv->name), g_value_get_string(value)); - //title_widget_style_name_text(mitem); } } @@ -220,33 +210,12 @@ title_widget_set_twin_item(TitleWidget* self, g_signal_connect_after(G_OBJECT (self), "expose_event", G_CALLBACK (title_widget_triangle_draw_cb), twin_item); - // Add the application name - //priv->name = gtk_label_new(dbusmenu_menuitem_property_get(priv->twin_item, - // DBUSMENU_TITLE_MENUITEM_NAME)); - //gtk_misc_set_padding(GTK_MISC(priv->name), 0, 0); - //gtk_box_pack_start (GTK_BOX (priv->hbox), priv->name, FALSE, FALSE, 0); - - //title_widget_style_name_text(self); gtk_menu_item_set_label (GTK_MENU_ITEM(self), dbusmenu_menuitem_property_get(priv->twin_item, - DBUSMENU_TITLE_MENUITEM_NAME)); - - //gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET(priv->hbox)); - gtk_widget_show_all (GTK_WIDGET(self)); + DBUSMENU_TITLE_MENUITEM_NAME)); + //gtk_widget_show_all (GTK_WIDGET(self)); } -/*static void -title_widget_style_name_text(TitleWidget* self) -{ - TitleWidgetPrivate * priv = TITLE_WIDGET_GET_PRIVATE(self); - - char* markup; - markup = g_markup_printf_escaped ("<span size=\"medium\">%s</span>", - gtk_label_get_text(GTK_LABEL(priv->name))); - gtk_label_set_markup (GTK_LABEL (priv->name), markup); - g_free(markup); -}*/ - static gboolean title_widget_triangle_draw_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) { |