Changeset View
Changeset View
Standalone View
Standalone View
b/gtksecentry/gtksecentry.c
Context not available. | |||||
#include "gtksecentry.h" | #include "gtksecentry.h" | ||||
#include "memory.h" | #include "memory.h" | ||||
#ifndef _ | |||||
# include <libintl.h> | |||||
# define _(x) gettext(x) | |||||
#endif | |||||
#define MIN_SECURE_ENTRY_WIDTH 150 | #define MIN_SECURE_ENTRY_WIDTH 150 | ||||
#define DRAW_TIMEOUT 20 | #define DRAW_TIMEOUT 20 | ||||
#define INNER_BORDER 2 | #define INNER_BORDER 2 | ||||
Context not available. | |||||
g_object_class_install_property(gobject_class, | g_object_class_install_property(gobject_class, | ||||
PROP_CURSOR_POSITION, | PROP_CURSOR_POSITION, | ||||
g_param_spec_int("cursor_position", | g_param_spec_int("cursor_position", | ||||
_("Cursor Position"), | "Cursor Position", | ||||
_ | "The current position of the insertion cursor in chars", | ||||
("The current position of the insertion cursor in chars"), | |||||
0, MAX_SIZE, 0, | 0, MAX_SIZE, 0, | ||||
G_PARAM_READABLE)); | G_PARAM_READABLE)); | ||||
g_object_class_install_property(gobject_class, | g_object_class_install_property(gobject_class, | ||||
PROP_SELECTION_BOUND, | PROP_SELECTION_BOUND, | ||||
g_param_spec_int("selection_bound", | g_param_spec_int("selection_bound", | ||||
_("Selection Bound"), | "Selection Bound", | ||||
_ | "The position of the opposite end of the selection from the cursor in chars", | ||||
("The position of the opposite end of the selection from the cursor in chars"), | |||||
0, MAX_SIZE, 0, | 0, MAX_SIZE, 0, | ||||
G_PARAM_READABLE)); | G_PARAM_READABLE)); | ||||
g_object_class_install_property(gobject_class, | g_object_class_install_property(gobject_class, | ||||
PROP_MAX_LENGTH, | PROP_MAX_LENGTH, | ||||
g_param_spec_int("max_length", | g_param_spec_int("max_length", | ||||
_("Maximum length"), | "Maximum length", | ||||
_ | "Maximum number of characters for this entry. Zero if no maximum", | ||||
("Maximum number of characters for this entry. Zero if no maximum"), | |||||
0, MAX_SIZE, 0, | 0, MAX_SIZE, 0, | ||||
G_PARAM_READABLE | | G_PARAM_READABLE | | ||||
G_PARAM_WRITABLE)); | G_PARAM_WRITABLE)); | ||||
Context not available. | |||||
g_object_class_install_property(gobject_class, | g_object_class_install_property(gobject_class, | ||||
PROP_HAS_FRAME, | PROP_HAS_FRAME, | ||||
g_param_spec_boolean("has_frame", | g_param_spec_boolean("has_frame", | ||||
_("Has Frame"), | "Has Frame", | ||||
_ | "FALSE removes outside bevel from entry", | ||||
("FALSE removes outside bevel from entry"), | |||||
TRUE, | TRUE, | ||||
G_PARAM_READABLE | | G_PARAM_READABLE | | ||||
G_PARAM_WRITABLE)); | G_PARAM_WRITABLE)); | ||||
Context not available. | |||||
g_object_class_install_property(gobject_class, | g_object_class_install_property(gobject_class, | ||||
PROP_INVISIBLE_CHAR, | PROP_INVISIBLE_CHAR, | ||||
g_param_spec_unichar("invisible_char", | g_param_spec_unichar("invisible_char", | ||||
_ | "Invisible character", | ||||
("Invisible character"), | "The character to use when masking entry contents (in \"password mode\")", | ||||
_ | |||||
("The character to use when masking entry contents (in \"password mode\")"), | |||||
'*', | '*', | ||||
G_PARAM_READABLE | | G_PARAM_READABLE | | ||||
G_PARAM_WRITABLE)); | G_PARAM_WRITABLE)); | ||||
Context not available. | |||||
PROP_ACTIVATES_DEFAULT, | PROP_ACTIVATES_DEFAULT, | ||||
g_param_spec_boolean | g_param_spec_boolean | ||||
("activates_default", | ("activates_default", | ||||
_("Activates default"), | "Activates default", | ||||
_ | "Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed", | ||||
("Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed"), | |||||
FALSE, | FALSE, | ||||
G_PARAM_READABLE | G_PARAM_WRITABLE)); | G_PARAM_READABLE | G_PARAM_WRITABLE)); | ||||
g_object_class_install_property(gobject_class, PROP_WIDTH_CHARS, | g_object_class_install_property(gobject_class, PROP_WIDTH_CHARS, | ||||
g_param_spec_int("width_chars", | g_param_spec_int("width_chars", | ||||
_("Width in chars"), | "Width in chars", | ||||
_ | "Number of characters to leave space for in the entry", | ||||
("Number of characters to leave space for in the entry"), | |||||
-1, G_MAXINT, -1, | -1, G_MAXINT, -1, | ||||
G_PARAM_READABLE | | G_PARAM_READABLE | | ||||
G_PARAM_WRITABLE)); | G_PARAM_WRITABLE)); | ||||
Context not available. | |||||
g_object_class_install_property(gobject_class, | g_object_class_install_property(gobject_class, | ||||
PROP_SCROLL_OFFSET, | PROP_SCROLL_OFFSET, | ||||
g_param_spec_int("scroll_offset", | g_param_spec_int("scroll_offset", | ||||
_("Scroll offset"), | "Scroll offset", | ||||
_ | "Number of pixels of the entry scrolled off the screen to the left", | ||||
("Number of pixels of the entry scrolled off the screen to the left"), | |||||
0, G_MAXINT, 0, | 0, G_MAXINT, 0, | ||||
G_PARAM_READABLE)); | G_PARAM_READABLE)); | ||||
g_object_class_install_property(gobject_class, | g_object_class_install_property(gobject_class, | ||||
PROP_TEXT, | PROP_TEXT, | ||||
g_param_spec_string("text", | g_param_spec_string("text", | ||||
_("Text"), | "Text", | ||||
_ | "The contents of the entry", | ||||
("The contents of the entry"), | |||||
"", | "", | ||||
G_PARAM_READABLE | | G_PARAM_READABLE | | ||||
G_PARAM_WRITABLE)); | G_PARAM_WRITABLE)); | ||||
Context not available. |