| 1102 static void |
1102 static void |
| 1103 setup_entry_field(GtkWidget *entry, PurpleRequestField *field) |
1103 setup_entry_field(GtkWidget *entry, PurpleRequestField *field) |
| 1104 { |
1104 { |
| 1105 const char *type_hint; |
1105 const char *type_hint; |
| 1106 |
1106 |
| 1107 g_object_set(entry, "activates-default", TRUE, NULL); |
|
| 1108 |
|
| 1109 g_signal_connect(entry, "changed", G_CALLBACK(req_entry_field_changed_cb), |
1107 g_signal_connect(entry, "changed", G_CALLBACK(req_entry_field_changed_cb), |
| 1110 field); |
1108 field); |
| 1111 |
1109 |
| 1112 if ((type_hint = purple_request_field_get_field_type_hint(field)) != NULL) |
1110 if ((type_hint = purple_request_field_get_field_type_hint(field)) != NULL) |
| 1113 { |
1111 { |
| 1199 { |
1197 { |
| 1200 GtkEventController *controller = NULL; |
1198 GtkEventController *controller = NULL; |
| 1201 |
1199 |
| 1202 if (purple_request_field_string_is_masked(field)) { |
1200 if (purple_request_field_string_is_masked(field)) { |
| 1203 widget = gtk_password_entry_new(); |
1201 widget = gtk_password_entry_new(); |
| 1204 gtk_password_entry_set_show_peek_icon(GTK_PASSWORD_ENTRY(widget), |
1202 g_object_set(widget, "activates-default", TRUE, |
| 1205 TRUE); |
1203 "show-peek-icon", TRUE, NULL); |
| 1206 } else { |
1204 } else { |
| 1207 widget = gtk_entry_new(); |
1205 widget = gtk_entry_new(); |
| |
1206 gtk_entry_set_activates_default(GTK_ENTRY(widget), TRUE); |
| 1208 } |
1207 } |
| 1209 |
1208 |
| 1210 setup_entry_field(widget, field); |
1209 setup_entry_field(widget, field); |
| 1211 |
1210 |
| 1212 if(value != NULL) { |
1211 if(value != NULL) { |