Changeset 38396
- Timestamp:
- 08/28/16 11:27:56 (7 years ago)
- Location:
- titan/titan
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/ca.h
r38256 r38396 419 419 int cammiAPDU(struct dvbdev* dvbnode, int sessionnr, unsigned char *tag, void *data, int len) 420 420 { 421 char* tmpstr = NULL, *tmpstr1 = NULL ;421 char* tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL; 422 422 struct casession* casession = NULL; 423 423 struct menulist* mlist = NULL, *mbox = NULL; … … 484 484 ostrcat(tmpstr, getconfig("ca0_pin", NULL), 0, 0); 485 485 } 486 } 486 tmpstr2 = ostrcat(tmpstr2, "ca0_pin", 1, 0); 487 } 488 if(ostrstr(str, "Bitte versuchen Sie es erneut") != NULL) 489 tmpstr2 = ostrcat(tmpstr2, "ca0_pin", 1, 0); 487 490 if(ca0autopin == 0) 488 tmpstr = textinput (str, tmpstr1);491 tmpstr = textinputsave(str, tmpstr1, tmpstr2); 489 492 if(tmpstr == NULL) 490 493 cammicancelenq(dvbnode, sessionnr); … … 496 499 free(tmpstr); tmpstr = NULL; 497 500 free(tmpstr1); tmpstr1 = NULL; 501 free(tmpstr2); tmpstr2 = NULL; 498 502 499 503 } -
titan/titan/textinput.h
r28058 r38396 73 73 } 74 74 75 char* textinputsave(char* title, char* text, char* tconfig) 76 { 77 int rcret = -1, fromthread = 0, height = 0; 78 struct skin* textinput = getscreen("textinput"); 79 struct skin* input = getscreennode(textinput, "input"); 80 struct skin* framebuffer = getscreen("framebuffer"); 81 char* ret = NULL, *bg = NULL; 82 83 if(pthread_self() != status.mainthread) 84 fromthread = 1; 85 86 if(title == NULL) title = ostrcat(_("Input field"), NULL, 0, 0); 87 88 changetitle(textinput, title); 89 height = textinput->height; 90 if(title != NULL) 91 textinput->height += textinput->fontsize + 6 + (textinput->bordersize * 2); 92 changeinput(input, text); 93 94 if(fromthread == 1) 95 { 96 delrc(getrcconfigint("rcvolup", NULL), NULL, NULL); 97 delrc(getrcconfigint("rcvoldown", NULL), NULL, NULL); 98 delrc(getrcconfigint("rcmute", NULL), NULL, NULL); 99 m_lock(&status.drawingmutex, 0); 100 m_lock(&status.rcmutex, 10); 101 setnodeattr(textinput, framebuffer, 2); 102 status.rcowner = textinput; 103 bg = savescreen(textinput); 104 drawscreen(textinput, 0, 2); 105 } 106 else 107 drawscreen(textinput, 0, 0); 108 addscreenrc(textinput, input); 109 110 while(1) 111 { 112 rcret = waitrc(textinput, 0, 0); 113 if(rcret == getrcconfigint("rcexit", NULL)) break; 114 if(rcret == getrcconfigint("rcyellow", NULL)) 115 { 116 ret = ostrcat(input->input, NULL, 0, 0); 117 if(tconfig != NULL) 118 addconfig(tconfig, ret); 119 break; 120 } 121 if(rcret == getrcconfigint("rcok", NULL)) 122 { 123 ret = ostrcat(input->input, NULL, 0, 0); 124 break; 125 } 126 } 127 128 delownerrc(textinput); 129 130 if(fromthread == 1) 131 { 132 clearscreennolock(textinput); 133 restorescreen(bg, textinput); 134 blitfb(0); 135 sleep(1); 136 status.rcowner = NULL; 137 m_unlock(&status.rcmutex, 3); 138 m_unlock(&status.drawingmutex, 0); 139 addrc(getrcconfigint("rcvolup", NULL), screenvolumeup, NULL, NULL); 140 addrc(getrcconfigint("rcvoldown", NULL), screenvolumedown, NULL, NULL); 141 addrc(getrcconfigint("rcmute", NULL), screenmute, NULL, NULL); 142 } 143 else 144 { 145 clearscreen(textinput); 146 drawscreen(skin, 0, 0); 147 } 148 149 textinput->height = height; 150 return ret; 151 } 152 75 153 #endif
Note: See TracChangeset
for help on using the changeset viewer.