Only accept numbers on the port entry for server options

Signed-off-by: Chris Michael <devilhorns@comcast.net>
This commit is contained in:
Chris Michael 2014-01-14 08:51:12 +00:00
parent 3b04a53b7a
commit 3603f243f7
1 changed files with 6 additions and 0 deletions

View File

@ -139,6 +139,7 @@ _options_servers(Evas_Object *box, Evas_Object *base EINA_UNUSED, Config_Network
Evas_Object *fr, *vbox, *tb, *o;
Eina_List *l = NULL;
Config_Server *cfg_srv;
static Elm_Entry_Filter_Accept_Set filter;
_cfg_net = cfg_net;
@ -260,6 +261,11 @@ _options_servers(Evas_Object *box, Evas_Object *base EINA_UNUSED, Config_Network
elm_table_pack(tb, o_port, 1, 1, 2, 1);
evas_object_show(o_port);
filter.accepted = "0123456789";
filter.rejected = NULL;
elm_entry_markup_filter_append(o_port,
elm_entry_filter_accept_set, &filter);
elm_object_disabled_set(o_name, EINA_TRUE);
elm_object_disabled_set(o_port, EINA_TRUE);
}