2009-02-27 Alberto Garcia <agarcia@igalia.com>
[hildon] / src / hildon-hvolumebar.c
index 67a2a8d..2f528c1 100644 (file)
@@ -3,12 +3,12 @@
  *
  * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
  *
- * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
+ * Contact: Rodrigo Novo <rodrigo.novo@nokia.com>
  *
  * 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 */
 
-#define                                         DEFAULT_TBUTTON_WIDTH 26
+#define                                         DEFAULT_TBUTTON_WIDTH 60
 
-#define                                         DEFAULT_TBUTTON_HEIGHT 26
+#define                                         DEFAULT_TBUTTON_HEIGHT 60
 
 /* Volume bar */
 #define                                         MINIMUM_BAR_WIDTH 147
 
-#define                                         DEFAULT_BAR_HEIGHT 58
+#define                                         DEFAULT_BAR_HEIGHT 60
 
 #define                                         DEFAULT_ENDING_SIZE 20
 
 /* Gap to leave for mute button */
-#define                                         VERTICAL_MUTE_GAP 16
+#define                                         VERTICAL_MUTE_GAP 0
 
-#define                                         HORIZONTAL_MUTE_GAP 6
+#define                                         HORIZONTAL_MUTE_GAP 0
 
 /* Sizes inside a toolbar */
 /* Toggle button */
@@ -149,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));