Changeset 32732


Ignore:
Timestamp:
Jan 26, 2015, 10:11:38 PM (5 years ago)
Author:
obi
Message:

update gmediarenderer

Location:
titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/gmediarender/gmediarender.h

    r32723 r32732  
    7777{
    7878        int rcret = -1, ret = 0;
    79         char* cmd = NULL, *buf = NULL;
    80         char* tmpstr = NULL;
     79        char* cmd = NULL, *buf = NULL, *tmpstr = NULL, *tmpstr1 = NULL;
    8180        int fifo = -1;
    8281        struct skin* gmediarender = getscreen("gmediarender");
    83        
     82        struct skin* servername = getscreennode(gmediarender, "servername");
     83        struct skin* connect = getscreennode(gmediarender, "connect");
     84
    8485        ret = servicestop(status.aktservice, 1, 1);
    8586        if(ret == 1) return;
     
    101102        drawscreen(gmediarender, 0, 0);
    102103
     104        tmpstr = ostrcat(status.boxtype, NULL, 0, 0);
     105        struct inetwork* net = getinetworkbydevice("eth0");
     106        if(net != NULL)
     107        {
     108                tmpstr = ostrcat(tmpstr, "-", 1, 0);
     109                tmpstr = ostrcat(tmpstr, net->ip, 1, 0);
     110        }
     111
    103112        if(file_exist("/var/usr/local/share/titan/plugins/gmediarender/gmediarender.sh") == 1)
    104                 cmd = ostrcat(cmd, "/var/usr/local/share/titan/plugins/gmediarender/gmediarender.sh gmediarender-", 1, 0);
     113                cmd = ostrcat(cmd, "/var/usr/local/share/titan/plugins/gmediarender/gmediarender.sh ", 1, 0);
    105114        else if(file_exist("/var/swap/usr/local/share/titan/plugins/gmediarender/gmediarender.sh") == 1)
    106                 cmd = ostrcat(cmd, "/var/swap/usr/local/share/titan/plugins/gmediarender/gmediarender.sh gmediarender-", 1, 0);
     115                cmd = ostrcat(cmd, "/var/swap/usr/local/share/titan/plugins/gmediarender/gmediarender.sh ", 1, 0);
    107116        else
    108                 cmd = ostrcat(cmd, "/mnt/swapextensions/usr/local/share/titan/plugins/gmediarender/gmediarender.sh gmediarender-", 1, 0);
     117                cmd = ostrcat(cmd, "/mnt/swapextensions/usr/local/share/titan/plugins/gmediarender/gmediarender.sh ", 1, 0);
    109118       
    110         cmd = ostrcat(cmd, status.boxtype, 1, 0);
     119        cmd = ostrcat(cmd, tmpstr, 1, 0);
    111120        cmd = ostrcat(cmd, " &", 1, 0);
    112121
     
    116125        free(cmd), cmd = NULL;
    117126
    118         tmpstr = ostrcat(tmpstr, _("Servername"), 1, 0);
    119         tmpstr = ostrcat(tmpstr, ": gmediarender-", 1, 0);
    120         tmpstr = ostrcat(tmpstr, status.boxtype, 1, 0);
    121         tmpstr = ostrcat(tmpstr, "\n\n", 1, 0);
    122         tmpstr = ostrcat(tmpstr, _("Wait for connect or press EXIT"), 1, 0);
    123 
    124         textbox(_("Message"), tmpstr, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 7, 0);
     127        tmpstr1 = ostrcat(tmpstr1, _("DLNA Renderer Name"), 1, 0);
     128        tmpstr1 = ostrcat(tmpstr1, ": ", 1, 0);
     129        tmpstr1 = ostrcat(tmpstr1, tmpstr, 1, 0);
     130        changetext(servername, tmpstr1);
    125131        free(tmpstr), tmpstr = NULL;
     132
     133        tmpstr = ostrcat(_("Wait for connect or press EXIT"), NULL, 0, 0);
     134        changetext(connect, tmpstr);
     135
    126136        drawscreen(gmediarender, 0, 0);
    127137
     
    143153                        if(ret > 0)
    144154                        {
     155                                changetext(connect, _("DLNA Control Client connected !"));
    145156                                buf[ret] = '\0';
    146157                                if(ostrcmp(buf, "clear.png") == 0) //clear screen
     
    213224
    214225        free(buf); buf = NULL;
     226        free(tmpstr), tmpstr = NULL;
     227        free(tmpstr1), tmpstr1 = NULL;
    215228
    216229        //close fifo
  • titan/skins/gmediarender/skin.xml

    r32723 r32732  
    11<screen fontcol=fontcol name=gmediarender pic=%pluginpath%/gmediarender/skin/background.jpg fontsize=30 posx=0 posy=0 width=100% height=100% bordersize=0>
    22<node name=picture picwidth=1280 picheight=720 valign=middle halign=center bordercol=bordercol bordersize=0 width=100% height=100%>
    3 <node textposx=100 name=picname posx=0 posy=30 width=100% height=30 fontcol=fontcol/>
     3<node textposx=50 name=servername posx=0 posy=90% width=100% height=30 fontcol=fontcol/>
     4<node textposx=50 name=connect posx=0 posy=95% width=100% height=30 fontcol=fontcol/>
    45</screen>
Note: See TracChangeset for help on using the changeset viewer.