More cleanup,
authorLuc Pionchon <luc.pionchon@nokia.com>
Thu, 16 Mar 2006 14:21:57 +0000 (14:21 +0000)
committerLuc Pionchon <luc.pionchon@nokia.com>
Thu, 16 Mar 2006 14:21:57 +0000 (14:21 +0000)
* hildon-widgets/hildon-dialoghelp.h: use G_BEGIN_DECLS +
        coding style cleanup

        * hildon-widgets/hildon-color-popup.h: likewise.

        * hildon-widgets/hildon-color-popup.[ch] (hildon_color_popup_new):
        use const parameter

        * hildon-widgets/hildon-color-selector.c
        (hildon_color_selector_new): use g_return_val_if_fail instead of
        g_assert.
        (select_color): use g_assert instead of g_return_if_fail

        * hildon-widgets/hildon-calendar-popup.c
        (hildon_calendar_allow_exit): use g_assert instead of g_return_if_fail.

ChangeLog
hildon-widgets/hildon-calendar-popup.c
hildon-widgets/hildon-color-popup.c
hildon-widgets/hildon-color-popup.h
hildon-widgets/hildon-color-selector.c
hildon-widgets/hildon-dialoghelp.h

index 10a598c..0d4e69d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
            the program
 
 
+2006-03-02  Luc Pionchon  <luc.pionchon@nokia.com>
+
+        More cleanup,
+
+       * hildon-widgets/hildon-dialoghelp.h: use G_BEGIN_DECLS +
+        coding style cleanup
+
+       * hildon-widgets/hildon-color-popup.h: likewise.
+
+       * hildon-widgets/hildon-color-popup.[ch] (hildon_color_popup_new):
+        use const parameter
+
+       * hildon-widgets/hildon-color-selector.c
+       (hildon_color_selector_new): use g_return_val_if_fail instead of
+       g_assert.
+       (select_color): use g_assert instead of g_return_if_fail
+
+       * hildon-widgets/hildon-calendar-popup.c
+       (hildon_calendar_allow_exit): use g_assert instead of g_return_if_fail.
+
+
 2006-03-01  Luc Pionchon  <luc.pionchon@nokia.com>
 
         Cleanup font selection dialog,
index 0ad3ba3..95ebfe2 100644 (file)
@@ -45,7 +45,7 @@
 #include <time.h>
 #include <libintl.h>
 #include <hildon-widgets/hildon-calendar-popup.h>
-#include <hildon-widgets/gtk-infoprint.h> /* FIXME: broken include ? */
+#include <hildon-widgets/gtk-infoprint.h> /* FIXME: use GtkInfoprint instead of gtk-infoprint (deprecated). */
 
 #define _(String) dgettext(PACKAGE, String)
 
@@ -416,8 +416,8 @@ hildon_calendar_allow_exit(GtkWidget * self, gpointer data)
     HildonCalendarPopup *cal;
     HildonCalendarPopupPrivate *priv;
 
-    g_return_if_fail (GTK_IS_WIDGET (self));
-    g_return_if_fail (HILDON_IS_CALENDAR_POPUP (data)); 
+    g_assert(GTK_IS_WIDGET (self));
+    g_assert(HILDON_IS_CALENDAR_POPUP (data)); 
     
     cal = HILDON_CALENDAR_POPUP(data);
     priv = HILDON_CALENDAR_POPUP_GET_PRIVATE(cal);
index 2911a62..792f0f9 100644 (file)
@@ -79,7 +79,7 @@ hildon_popup_palette_expose (GtkWidget * widget,
  */
 
 GtkWidget *
-hildon_color_popup_new(GtkWindow *parent, GdkColor *initial_color, 
+hildon_color_popup_new(GtkWindow *parent, const GdkColor *initial_color, 
                HildonColorPopup *popup_data)
 {
   GtkWidget *popup;
index 9d3a4da..67eee5a 100644 (file)
 #include <gtk/gtkwindow.h>
 #include <gtk/gtkdialog.h>
 
+G_BEGIN_DECLS
+
 typedef struct
 {
-         GtkWidget *ctrlbar_red, *ctrlbar_green, *ctrlbar_blue;
+  GtkWidget *ctrlbar_red;
+  GtkWidget *ctrlbar_green;
+  GtkWidget *ctrlbar_blue;
+
 } HildonColorPopup;
 
-GtkWidget *hildon_color_popup_new(GtkWindow * parent, GdkColor *initial_color, HildonColorPopup *popupdata);
+GtkWidget *hildon_color_popup_new(GtkWindow        *parent,
+                                  const GdkColor   *initial_color,
+                                  HildonColorPopup *popupdata);
+
+void       hildon_color_popup_set_color_from_sliders(GdkColor *color,
+                                                     HildonColorPopup *popupdata);
+
+
+G_END_DECLS
 
-void hildon_color_popup_set_color_from_sliders(GdkColor *color, HildonColorPopup *popupdata);
-#endif
+#endif /* __HILDON_COLOR_POPUP_H__ */
index b63cc20..95b2ba3 100644 (file)
@@ -230,7 +230,7 @@ GtkWidget *hildon_color_selector_new(GtkWindow * parent)
 {
     GtkWidget *dialog = g_object_new(HILDON_TYPE_COLOR_SELECTOR, NULL);
 
-    g_assert(dialog);
+    g_return_val_if_fail(dialog, NULL);
 
     if (parent) 
     {
@@ -640,7 +640,7 @@ select_color(HildonColorSelector * selector, int event_x, int event_y,
 {
     gint x, y;
 
-    g_return_if_fail(HILDON_IS_COLOR_SELECTOR(selector));
+    g_assert(HILDON_IS_COLOR_SELECTOR(selector));
 
     /* Get the selection coordinates */ 
     x = ( (event_x - HILDON_COLOR_SELECTOR_BOX_BORDER) /
index f518517..badc89b 100644 (file)
 #ifndef __HILDON_DIALOG_HELP_H__
 #define __HILDON_DIALOG_HELP_H__
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*#include <gtk/gtk.h>*/
 #include <gtk/gtkdialog.h>
 
-void gtk_dialog_help_enable(GtkDialog * dialog);
-void gtk_dialog_help_disable(GtkDialog * dialog);
+G_BEGIN_DECLS
+
+void gtk_dialog_help_enable  (GtkDialog * dialog);
+void gtk_dialog_help_disable (GtkDialog * dialog);
+
+G_END_DECLS
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* __DIALOG_HELP_H__ */
+#endif /* __HILDON_DIALOG_HELP_H__ */