Adding the hildon_code_dialog_set_input_sensitive function requested by Santtu Lakkal...
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Fri, 16 Feb 2007 14:11:04 +0000 (14:11 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Fri, 16 Feb 2007 14:11:04 +0000 (14:11 +0000)
ChangeLog.2
debian/changelog
src/hildon-code-dialog.c
src/hildon-code-dialog.h

index acae844..ebe05dc 100644 (file)
@@ -1,5 +1,13 @@
 2007-02-16  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
 
+       * debian/changelog:
+       * src/hildon-code-dialog.c:
+       * src/hildon-code-dialog.h: Adding the
+       hildon_code_dialog_set_input_sensitive function requested by Santtu
+       Lakkala to enable/disable the input on the code dialog.
+
+2007-02-16  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
+
        * doc/Makefile.am:
        * doc/hildon-docs.sgml:
        * doc/visual_index.xml: Documentation fixes.
index c1c5e4e..6f521f3 100644 (file)
@@ -1,6 +1,7 @@
-libhildon (0.9.9-5) unstable; urgency=low
+libhildon (0.9.9-6) unstable; urgency=low
 
   * Unreleased.
 
  -- Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>  Fri, 02 Feb 2007 12:00:00 +0300
 
+
index f48ccb1..8cbd5fd 100644 (file)
@@ -541,3 +541,32 @@ hildon_code_dialog_input                        (HildonCodeDialog *dialog)
     /* Emit the signal */
     g_signal_emit (dialog, input_signal, 0);
 }
+
+/**
+ * hildon_code_dialog_set_input_sensitive
+ * @dialog: The #HildonCodeDialog whose state is to be changed
+ * @sensitive: The new state 
+ *
+ * This function will block or enable the input on the code dialog by
+ * making the input button sensitive (or not).
+ **/
+void
+hildon_code_dialog_set_input_sensitive          (HildonCodeDialog *dialog, 
+                                                 gboolean sensitive)
+{
+    int i;
+    int k;
+
+    g_return_if_fail (HILDON_IS_CODE_DIALOG (dialog));
+
+    HildonCodeDialogPrivate *priv = HILDON_CODE_DIALOG_GET_PRIVATE (dialog);
+    g_assert (priv);
+
+    for (i = 0; i < 5; i++)
+        for (k = 0; k < 3; k++) 
+            if (i != 4 && (k != 0 || k != 2))
+                gtk_widget_set_sensitive (priv->buttons [i][k], sensitive);
+
+    gtk_widget_set_sensitive (priv->help_text, sensitive);
+    gtk_widget_set_sensitive (priv->entry, sensitive);
+}
index bbc1b3b..0e2ca7a 100644 (file)
@@ -79,6 +79,10 @@ void
 hildon_code_dialog_set_help_text                (HildonCodeDialog *dialog,
                                                  const gchar *text);
 
+void
+hildon_code_dialog_set_input_sensitive          (HildonCodeDialog *dialog, 
+                                                 gboolean sensitive);
+
 G_END_DECLS
 
 #endif                                          /* __HILDON_CODE_DIALOG_H__ */