Adding a special '--enable-xan' configure option that turns off the -Werror compilati...
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Thu, 24 May 2007 14:46:00 +0000 (14:46 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Thu, 24 May 2007 14:46:00 +0000 (14:46 +0000)
ChangeLog
configure.ac
src/hildon-calendar.c
src/hildon-number-editor.c
src/hildon-time-picker.c

index b386e8e..bf52dcd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-05-24  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
+
+       * configure.ac: Adding a special '--enable-xan' configure option that
+       turns off the -Werror compilation setting. Usefull for development.
+
+       * src/hildon-calendar.c:
+       * src/hildon-number-editor.c:
+       * src/hildon-time-picker.c: Adding the 5* multiplier to
+       gtk-timeout-update.
+
 2007-05-24  Xan Lopez  <xan.lopez@nokia.com>
 
        * src/hildon-note.c (hildon_note_init): Use g_object_ref_sink
index 568eac4..cccdfc3 100644 (file)
@@ -114,6 +114,8 @@ else
     AC_MSG_NOTICE(Will not use Maemo GTK+ specific API)
 fi
 
+AC_ARG_ENABLE 
+
 # build with assertion checks (or not)
 AC_ARG_WITH(asserts, 
     AC_HELP_STRING([--with-asserts], [Build with the assertion checks]),
@@ -134,11 +136,31 @@ else
     ASSERT_CFLAGS="-DG_DISABLE_ASSERT"
 fi
 
+# build with relaxed flags or not
+AC_ARG_ENABLE(xan, 
+    AC_HELP_STRING([--enable-xan], [Build with relaxed warning settings]),
+    [
+     case "${enableval}" in
+         yes) BUILD_WITH_XAN=yes ;;
+         no)  BUILD_WITH_XAN=no ;;
+         *)   AC_MSG_ERROR(bad value ${enableval} for --enable-xan) ;;
+     esac],
+     [BUILD_WITH_XAN=no])
+
+# just print out our status
+if test x$BUILD_WITH_XAN = xyes; then
+    AC_MSG_NOTICE(Will build with relaxed warning settings)
+    XAN_CFLAGS=""
+else
+    AC_MSG_NOTICE(Will build with strict warning settings)
+    XAN_CFLAGS="-Werror"
+fi
+
 # Check support (c unit test)
 PKG_CHECK_MODULES(CHECK, check , [BUILD_TESTS="yes"], [BUILD_TESTS="no"])
 AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes")
 
-CFLAGS="$CFLAGS ${ASSERT_CFLAGS} -Wall -Wmissing-prototypes -Wmissing-declarations -Werror -Wno-format"
+CFLAGS="$CFLAGS ${ASSERT_CFLAGS} -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-format ${XAN_FLAGS}"
 # -Wno-format due to way translation string are done
 
 ### enable MAEMO platform extensions
@@ -177,5 +199,6 @@ Configuration:
 - Build examples.....: ${BUILD_EXAMPLES}
 - Build with asserts.: ${BUILD_WITH_ASSERTS}
 - Build unit tests...: ${BUILD_TESTS}
+- Allow warnings.....: ${BUILD_WITH_XAN}
 
 "
index 3a6e7d8..6217523 100644 (file)
@@ -3092,6 +3092,7 @@ calendar_timer                                  (gpointer data)
 
     settings = gtk_settings_get_default ();
     g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL);
+    timeout *= 5;
 
     GDK_THREADS_ENTER ();
 
@@ -3125,6 +3126,7 @@ start_spinning                                  (GtkWidget *widget,
 
     settings = gtk_settings_get_default ();
     g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL);
+    timeout *= 5;
 
     private_data->click_child = click_child;
 
index 0d07fe2..ce87f20 100644 (file)
@@ -504,6 +504,7 @@ hildon_number_editor_start_timer                (HildonNumberEditor *editor)
     priv = HILDON_NUMBER_EDITOR_GET_PRIVATE (editor);
     settings = gtk_settings_get_default ();
     g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL);
+    timeout *= 5;
 
     priv->button_event_id = g_timeout_add (timeout,
             (GSourceFunc) do_mouse_timeout,
index 24ab648..fc07032 100644 (file)
@@ -639,6 +639,8 @@ hildon_time_picker_arrow_press                  (GtkWidget *widget,
     g_object_get (gtk_widget_get_settings (widget), 
                     "gtk-timeout-repeat", &key_repeat, NULL);
 
+    key_repeat *= 5;
+
     /* Keep changing the time as long as button is being pressed.
        The first repeat takes 3 times longer to start than the rest. */
     
@@ -856,6 +858,8 @@ hildon_time_picker_key_repeat_timeout           (gpointer tpicker)
         /* Get button press repeater timeout from settings (in milliseconds) */
         g_object_get (gtk_widget_get_settings ((GtkWidget *) tpicker), 
                         "gtk-timeout-repeat", &key_repeat, NULL);
+
+        key_repeat *= 5;
             
         /* This is the first repeat. Shorten the timeout to key_repeat
            (instead of the first time's 3*key_repeat) */