[california] Enforce max length and width chars in RRULE editor GtkEntrys
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california] Enforce max length and width chars in RRULE editor GtkEntrys
- Date: Wed, 24 Sep 2014 22:50:33 +0000 (UTC)
commit 251388261c154b535e8e7e5a38153d4f05e4fef3
Author: Jim Nelson <jim yorba org>
Date: Wed Sep 24 15:49:48 2014 -0700
Enforce max length and width chars in RRULE editor GtkEntrys
For some reason, setting the max-length and max-width-chars fields
in Glade is not being honored by GTK+, and so they must be set
manually in the code.
src/host/host-create-update-recurring.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/host/host-create-update-recurring.vala b/src/host/host-create-update-recurring.vala
index a81b7fa..8db8719 100644
--- a/src/host/host-create-update-recurring.vala
+++ b/src/host/host-create-update-recurring.vala
@@ -176,6 +176,10 @@ public class CreateUpdateRecurring : Gtk.Grid, Toolkit.Card {
BindingFlags.SYNC_CREATE, transform_to_ok_button_sensitive);
after_entry.bind_property("text", ok_button, "sensitive",
BindingFlags.SYNC_CREATE, transform_to_ok_button_sensitive);
+
+ // These values are set in the Glade file, but apparently are not being honored by GTK+
+ every_entry.max_length = after_entry.max_length = 4;
+ every_entry.max_width_chars = after_entry.max_width_chars = 5;
}
private bool transform_repeats_active_to_on_days_visible(Binding binding, Value source_value,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]