[maemo-commits] [maemo-commits] r9956 - in projects/haf/branches/hildon-libs/hildon-1: . debian src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Feb 16 16:11:05 EET 2007
Author: mdk
Date: 2007-02-16 16:11:04 +0200 (Fri, 16 Feb 2007)
New Revision: 9956

Modified:
   projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2
   projects/haf/branches/hildon-libs/hildon-1/debian/changelog
   projects/haf/branches/hildon-libs/hildon-1/src/hildon-code-dialog.c
   projects/haf/branches/hildon-libs/hildon-1/src/hildon-code-dialog.h
Log:
Adding the hildon_code_dialog_set_input_sensitive function requested by Santtu Lakkala to enable/disable the input on the code dialog.


Modified: projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2	2007-02-16 14:02:00 UTC (rev 9955)
+++ projects/haf/branches/hildon-libs/hildon-1/ChangeLog.2	2007-02-16 14:11:04 UTC (rev 9956)
@@ -1,5 +1,13 @@
 2007-02-16  Michael Dominic Kostrzewa  <michael.kostrzewa at 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 at nokia.com> 
+
 	* doc/Makefile.am:
 	* doc/hildon-docs.sgml:
 	* doc/visual_index.xml: Documentation fixes.

Modified: projects/haf/branches/hildon-libs/hildon-1/debian/changelog
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/debian/changelog	2007-02-16 14:02:00 UTC (rev 9955)
+++ projects/haf/branches/hildon-libs/hildon-1/debian/changelog	2007-02-16 14:11:04 UTC (rev 9956)
@@ -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 at nokia.com>  Fri, 02 Feb 2007 12:00:00 +0300
 
+

Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-code-dialog.c
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/src/hildon-code-dialog.c	2007-02-16 14:02:00 UTC (rev 9955)
+++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-code-dialog.c	2007-02-16 14:11:04 UTC (rev 9956)
@@ -541,3 +541,32 @@
     /* 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);
+}

Modified: projects/haf/branches/hildon-libs/hildon-1/src/hildon-code-dialog.h
===================================================================
--- projects/haf/branches/hildon-libs/hildon-1/src/hildon-code-dialog.h	2007-02-16 14:02:00 UTC (rev 9955)
+++ projects/haf/branches/hildon-libs/hildon-1/src/hildon-code-dialog.h	2007-02-16 14:11:04 UTC (rev 9956)
@@ -79,6 +79,10 @@
 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__ */


More information about the maemo-commits mailing list