/*
* This file is part of hildon-libs
*
- * Copyright (C) 2005 Nokia Corporation.
+ * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
*
- * 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
break;
case PROP_PASSWORD:
gtk_entry_set_text(GTK_ENTRY
- (gtk_bin_get_child(GTK_BIN(priv->passwordEntry))),
+ (hildon_caption_get_control (priv->passwordEntry)),
g_value_get_string(value));
break;
case PROP_NUMBERS_ONLY:
/* Set input mode for the password entry */
- g_object_set(G_OBJECT(gtk_bin_get_child(GTK_BIN(priv->passwordEntry))),
+ g_object_set(G_OBJECT(hildon_caption_get_control(priv->passwordEntry)),
"input-mode",
(g_value_get_boolean(value)
? HILDON_INPUT_MODE_HINT_NUMERIC
g_value_set_string(value, string);
break;
case PROP_PASSWORD:
- string = gtk_entry_get_text(GTK_ENTRY(priv->passwordEntry));
+ string = gtk_entry_get_text(GTK_ENTRY (hildon_caption_get_control(priv->passwordEntry)));
g_value_set_string(value, string);
break;
case PROP_NUMBERS_ONLY:
/* This property is set if and only if the input mode
of the password entry has been set to numeric only */
- g_object_get(G_OBJECT(gtk_bin_get_child(GTK_BIN(priv->passwordEntry))),
- "input-mode", &input_mode);
+ g_object_get(G_OBJECT(hildon_caption_get_control(priv->passwordEntry)),
+ "input-mode", &input_mode, NULL);
g_value_set_boolean(value,
(input_mode == HILDON_INPUT_MODE_HINT_NUMERIC));
break;
/* Create password text entry */
control = gtk_entry_new();
+ gtk_entry_set_width_chars (GTK_ENTRY (control), 20);
+
+ g_object_set (control, "hildon-input-mode", HILDON_GTK_INPUT_MODE_FULL, NULL);
gtk_entry_set_visibility(GTK_ENTRY(control), FALSE);
priv->passwordEntry = HILDON_CAPTION
(hildon_caption_new(group,
priv = HILDON_GET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
/* Retrieve the password entry widget */
- entry1 = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(
- priv->passwordEntry)));
-
+ entry1 = GTK_ENTRY (hildon_caption_get_control(priv->passwordEntry));
text1 = GTK_ENTRY(entry1)->text;
return text1;