2008-11-25 Alberto Garcia <agarcia@igalia.com>
[hildon] / src / hildon-hvolumebar.c
index cd61957..68fc8ac 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This file is part of hildon-libs
+ * This file is a part of hildon
  *
  * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
  *
@@ -8,7 +8,7 @@
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
  * as published by the Free Software Foundation; version 2.1 of
- * the License.
+ * the License, or (at your option) any later version.
  *
  * This library is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
 
 /**
  * SECTION:hildon-hvolumebar
- * @short_description: A widget that displays a horizontal volume bar
+ * @short_description: A widget that displays a horizontal volume bar.
  * @see_also: #HildonVVolumebar, #HildonVolumebar
  * 
  * The #HildonHVolumebar widget displays a horizontal volume bar that allows
  * increasing or decreasing volume within a pre-defined range, and includes 
  * a mute icon which users can click to mute the sound.
+ * 
+ * <example>
+ * <programlisting>
+ * GtkWidget *volbar = hildon_hvolumebar_new ();
+ * g_signal_connect (G_OBJECT(volbar), "mute_toggled", G_CALLBACK(mute_toggle), NULL);
+ * g_signal_connect (G_OBJECT(volbar), "level_changed", G_CALLBACK(level_change), NULL);
+ * </programlisting>
+ * </example>
+ *
  */
 
+#undef                                          HILDON_DISABLE_DEPRECATED
+
 #include                                        "hildon-hvolumebar.h"
 #include                                        "hildon-volumebar.h"
 #include                                        "hildon-volumebar-range.h"
 #include                                        "hildon-volumebar-private.h"
-#include                                        <gtk/gtktoolbar.h>
 
 /* Defines for normal version of HVolumebar */
 /* Toggle button */
@@ -95,7 +105,13 @@ hildon_hvolumebar_size_allocate                 (GtkWidget *widget,
 static void 
 hildon_hvolumebar_map                           (GtkWidget *widget);
 
-
+/**
+ * hildon_hvolumebar_get_type:
+ *
+ * Returns GType for HildonHVolumebar.
+ *
+ * Returns: HildonHVolumebar type
+ */
 GType G_GNUC_CONST
 hildon_hvolumebar_get_type                      (void)
 {
@@ -143,8 +159,6 @@ hildon_hvolumebar_init                          (HildonHVolumebar *hvolumebar)
         HILDON_VOLUMEBAR_RANGE(hildon_volumebar_range_new
                 (GTK_ORIENTATION_HORIZONTAL));
 
-    GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (hvolumebar), GTK_CAN_FOCUS);
-
     gtk_widget_set_parent (GTK_WIDGET (priv->tbutton), GTK_WIDGET (hvolumebar));
     gtk_widget_set_parent (GTK_WIDGET (priv->volumebar), GTK_WIDGET (hvolumebar));
 
@@ -211,7 +225,6 @@ hildon_hvolumebar_expose                        (GtkWidget * widget,
                 widget->allocation.width,
                 widget->allocation.height);
 
-
         /* The contents of the widget can paint themselves */
         /* FIXME Not sure if this is even needed here */
         (*GTK_WIDGET_CLASS(parent_class)->expose_event) (widget, event);