]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui: some attempt to make enum lists more usable.
authorAdam Sutton <dev@adamsutton.me.uk>
Tue, 10 Sep 2013 15:27:22 +0000 (16:27 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Tue, 10 Sep 2013 15:27:22 +0000 (16:27 +0100)
src/service.c
src/webui/static/app/idnode.js

index 44a0252db321d29ece1c2fd731af69e2847d4832..94316eaee82c92e82ba349150f2d5f5b62549c90 100644 (file)
@@ -127,14 +127,19 @@ static const char *
 service_class_get_title ( idnode_t *self )
 {
   static char *ret = NULL;
+  const char *str = NULL;
   service_t *s = (service_t*)self;
+  pthread_mutex_lock(&s->s_stream_mutex);
   if (ret) {
     free(ret);
     ret = NULL;
   }
-  pthread_mutex_lock(&s->s_stream_mutex); 
-  if (s->s_nicename)
-    ret = strdup(s->s_nicename);
+  if (s->s_channel_name)
+    str = s->s_channel_name(s);
+  if (!str)
+    str = s->s_nicename;
+  if (str)
+    ret = strdup(str);
   pthread_mutex_unlock(&s->s_stream_mutex);
   return ret;
 }
index 01e6c362f59dbef777876aeb4996dafc999b9251..9120235ed060c8bf1ab503f2d35920bbbd53a122 100644 (file)
@@ -128,10 +128,11 @@ tvheadend.idnode_editor_field = function(f, create)
           valueField      : 'key',
           displayField    : 'val',
           store           : tvheadend.idnode_enum_store(f),
-          typeAhead       : true,
-          forceSelection  : true,
+          /*typeAhead       : true,*/
+          /*forceSelection  : true,*/
           triggerAction   : 'all',
           emptyText       :'Select ' + f.caption +' ...',
+          clearFilterOnReset: false,
           listeners       : { 
             keyup: function() {
               this.store.filter('val', this.getRawValue(), true, false);