st-entry: Disable cut/copy actions in password entries
Curently it is possible to copy the content of password entries, and paste it elsewhere in clear text. This is undesirable, so follow GTK+'s behavior and disable the cut/copy actions for password entries. https://bugzilla.gnome.org/show_bug.cgi?id=695104
This commit is contained in:
parent
00eb764880
commit
b52f4ed25b
@ -602,7 +602,8 @@ st_entry_key_press_event (ClutterActor *actor,
|
||||
|
||||
/* copy */
|
||||
if ((event->modifier_state & CLUTTER_CONTROL_MASK)
|
||||
&& event->keyval == CLUTTER_c)
|
||||
&& event->keyval == CLUTTER_c &&
|
||||
clutter_text_get_password_char ((ClutterText*) priv->entry) == 0)
|
||||
{
|
||||
StClipboard *clipboard;
|
||||
gchar *text;
|
||||
@ -622,7 +623,8 @@ st_entry_key_press_event (ClutterActor *actor,
|
||||
|
||||
/* cut */
|
||||
if ((event->modifier_state & CLUTTER_CONTROL_MASK)
|
||||
&& event->keyval == CLUTTER_x)
|
||||
&& event->keyval == CLUTTER_x &&
|
||||
clutter_text_get_password_char ((ClutterText*) priv->entry) == 0)
|
||||
{
|
||||
StClipboard *clipboard;
|
||||
gchar *text;
|
||||
|
Loading…
Reference in New Issue
Block a user