2006-08-30 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
[hildon] / hildon-widgets / hildon-code-dialog.c
index 0f027cf..adc847e 100644 (file)
@@ -3,12 +3,12 @@
  *
  * Copyright (C) 2006 Nokia Corporation.
  *
- * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@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; either version 2.1 of
- * the License, or (at your option) any later version.
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License.
  *
  * This library is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,7 +25,7 @@
 
 #include "hildon-code-dialog.h"
 #include "hildon-defines.h"
-#include "gtk-infoprint.h"
+#include "hildon-banner.h"
 
 #include <gdk/gdkkeysyms.h>
 
 #define WIDTH  (60-HILDON_MARGIN_DEFAULT)
 #define BACKSPACE_ICON    "qgn_calculator_backspace"
 
-#define _(String) dgettext(PACKAGE, String)
-#define DEVICELOCK_OK     _("secu_enter_lock_code_dialog_ok")
-#define DEVICELOCK_CANCEL _("secu_enter_lock_code_dialog_cancel")
-#define DEVICELOCK_TITLE  _("secu_application_title")
+#define _(String)  dgettext(PACKAGE, String)
+#define c_(String) dgettext("hildon-common-strings", String)
+#define DEVICELOCK_OK               _("secu_enter_lock_code_dialog_ok")
+#define DEVICELOCK_CANCEL           _("secu_enter_lock_code_dialog_cancel")
+#define DEVICELOCK_TITLE            _("secu_application_title")
+#define DEVICELOCK_MAX_CHAR_REACHED c_("ckdg_ib_maximum_characters_reached")
+        
 
 
 #define MAX_PINCODE_LEN   (10)
@@ -353,7 +356,9 @@ static void hildon_code_dialog_insert_text (GtkEditable *editable,
 
     if (length == MAX_PINCODE_LEN)
     {
-        gtk_infoprint(NULL, "ckdg_ib_maximum_characters_reached");
+        hildon_banner_show_information (dialog,
+                                        NULL,
+                                        DEVICELOCK_MAX_CHAR_REACHED);
     }
 
     else if (!length)