Changeset 5140


Ignore:
Timestamp:
Jun 12, 2017, 3:37:20 PM (2 years ago)
Author:
joamuran
Message:

wip

Location:
lliurex-connect/trunk/fuentes
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • lliurex-connect/trunk/fuentes/debian/control

    r5015 r5140  
    1010Package: lliurex-connect
    1111Architecture: all
    12 Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
     12Depends: python-apt, ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
    1313Description: Communicate with your tablet
    1414 Tools to connect Android tablets
  • lliurex-connect/trunk/fuentes/debian/rules

    r5016 r5140  
    22       
    33%:
    4         dh $@ --with llxdev
     4        dh $@ --with llxsrc,llxdev
  • lliurex-connect/trunk/fuentes/lliurex-connect/usr/share/lliurex-connect/help/info.css

    r5015 r5140  
    2828       
    2929.infotext{
    30     width: auto;
     30    width: 500px;
    3131    float: left;
    3232    clear: right;
     
    3737}
    3838
     39
     40
     41.chrome{
     42    background-image: url(../img/chrome.png);
     43}
     44
     45
     46.allcast_reveicer{
     47    background-image: url(../img/allcast_receiver.png);
     48}
     49
     50
    3951.xsdl{
    4052    background-image: url(../img/xsdl.png);
  • lliurex-connect/trunk/fuentes/lliurex-connect/usr/share/lliurex-connect/help/info.html

    r5015 r5140  
    33        <link rel="stylesheet" href="info.css">
    44        <script src="jquery-2.1.4.js"></script>
     5        <script>
     6            function populateText(description, google_desc, google_link, allcast_desc, allcast_link, mirroring_desc,
     7                                  mirroring_link, xserver_desc, xserver_link){
     8                $("#info").append(description);
     9                $("#desc_chrome").append(google_desc);
     10                $("#google_link").append(google_link);
     11                $("#desc_allcast_rcv").append(allcast_desc);
     12                $("#allcast_link").append(allcast_link);
     13                $("#mirror_description").append(mirroring_desc);
     14                $("#mirroring_link").append(mirroring_link);
     15                $("#xsdl_description").append(xserver_desc);
     16                $("#xserver_link").append(xserver_link);
     17               
     18            }
     19        </script>
    520    </head>
    621   
     22    <!--body onload="tralari();"-->
    723    <body>
    824    <h1>Help</h1>
    9     <div id="info"></div>
     25    <div id="info">
     26   
     27    </div>
     28   
     29   
     30    <div class="inforow">
     31        <div class="infoicon chrome"></div>
     32        <div class="infotext">
     33        <span id="desc_chrome"></span>
     34        <a id="google_link" class="link" href="https://www.google.es/chrome/browser/desktop/index.html">
     35        </a>
     36        </div>
     37    </div>
     38   
     39    <div class="inforow">
     40        <div class="infoicon allcast_reveicer"></div>
     41        <div class="infotext">
     42        <span id="desc_allcast_rcv"></span>
     43        <a id="allcast_link" class="link" href="https://chrome.google.com/webstore/detail/allcast-receiver/hjbljnpdahefgnopeohlaeohgkiidnoe?hl=ca&utm_source=chrome-ntp-launcher"></a>
     44        </div>
     45    </div>
     46   
    1047   
    1148    <div class="inforow">
    1249        <div class="infoicon mirror"></div>
    13         <div class="infotext" id="mirror_description">
    14         <a class="link" href="https://play.google.com/store/apps/details?id=x.org.server">
    15         <!--a id="mirrror_app_link">
    16             Go to app XServer XSDL in Google Play
    17         </a-->
     50        <div class="infotext">
     51            <span id="mirror_description"></span>
     52        <a id="mirroring_link" class="link" href="https://play.google.com/store/apps/details?id=com.koushikdutta.mirror">
     53        </a>
    1854        </div>
    1955       
     
    2258    <div class="inforow">
    2359        <div class="infoicon xsdl"></div>
    24         <div class="infotext" id="xsdl_description">This is an application...
    25         <!--a class="link" href="https://play.google.com/store/apps/details?id=com.koushikdutta.mirror"-->
    26         <a id="xsdl_app_link">
    27             Go to app Screen Recording and Mirror in Google Play
    28         </a>
     60        <div class="infotext" id="xsdl_description">
     61            <span id="xserver_desc"></span>
     62        <a id="xserver_link" class="link" href="https://play.google.com/store/apps/details?id=x.org.server"></a>
    2963        </div>
    3064    </div>
  • lliurex-connect/trunk/fuentes/lliurex-connect/usr/share/lliurex-connect/splash.py

    r5015 r5140  
    22import gi
    33import os
     4import apt
    45import subprocess
    56gi.require_version('Gtk', '3.0')
     
    910import iniparse
    1011from appdirs import *
     12
     13import gettext
     14gettext.textdomain('lliurex-connect')
     15_ = gettext.gettext
    1116
    1217
     
    2833        # Set check status
    2934        self.active=False;
     35        self.chromeInstalled=False;
     36       
    3037        if (checked=="True"):
    3138            self.active=True;
     39           
     40        # Is google chrome installed
     41        cache=apt.Cache()
     42        self.chromeInstalled=cache['google-chrome-stable'].is_installed
     43                       
    3244       
    3345        # Creating main container       
     
    3850        #Create Webkit view
    3951       
    40         view = WebKit.WebView();
    41         view.open(os.path.abspath("help/info.html"));
    42         view.connect('navigation-policy-decision-requested', self.on_nav_request)
     52        self.view = WebKit.WebView();
     53        self.view.open(os.path.abspath("help/info.html"));
     54        self.view.connect('navigation-policy-decision-requested', self.on_nav_request)
     55        self.view.connect('load-finished', self._finished_loading)
    4356        #view.connect("navigation-requested", self.on_click_link)
    4457       
     
    6073        hbox.pack_end(buttonClose, False, True, 0);
    6174       
    62         container.add(view);
     75        container.add(self.view);
    6376        container.add(row);
    6477        container.add(hbox);
    6578
    66         view.execute_script("$('#info').html('%s')" % "Pajaritos tralari");
     79        #view.execute_script("$('#info').html('%s')" % "Pajaritos tralari");
    6780       
    68     def on_click_link(self, view, frame, request):
    69         print("Mavigation change requested")
    70         #self.webview.get_back_forward_list().clear()
    71         return False
     81        #view.execute_script('tralari()');
     82       
     83    #def on_click_link(self, view, frame, request):
     84    #   print("Mavigation change requested")
     85    #   #self.webview.get_back_forward_list().clear()
     86    #   return False
     87    #    pass
     88   
     89    def _finished_loading(self, webview, webfame):
     90        description=_("LliureX Connect is a suite of tools to achieve the connection between tablet and your LliureX computer. For the mirroring capabilities, you need an Chrome extension called AllCast Receicer.");
     91        google_desc=_("You need Google Chrome to use Mirroring capabilities in this computer. Press the following link to download Google Chrome.");
     92        google_link=_("Download Chrome");
     93        allcast_desc=_("Allcast Receiver is a Google Chrome App to receive video streaming from an Android Device through Recording and Mirroring App.");
     94        allcast_link=_("Download AllCast Receiver");
     95        mirroring_desc=_("Screen Recording and Mirror allows you to send video streaming to AllCast Receiver Google Chrome app.");
     96        mirroring_link=_("Go to app Screen Recording and Mirror in Google Play");
     97        xserver_desc=_("XDSL Server is a Linux graphical server for your Android device. It alloys you to launch any application in yout system and see it in your device.");
     98        xserver_link=_("Go to app X Server for Android in Google Play");
     99   
     100        parameters='"'+description+'","'+google_desc+'","'+google_link+'","'+allcast_desc+'","'+allcast_link+'","'+mirroring_desc+'","'+mirroring_link+'","'+xserver_desc+'","'+xserver_link+'"';
     101       
     102        print (parameters);
     103       
     104        self.view.execute_script('populateText('+parameters+')');
    72105        pass
    73106   
    74107    def on_nav_request(self, view, frame, request, action, policy, data=None):
     108       
    75109        # Loading URL in Firefox
    76110        url = request.get_uri()
    77         command='firefox '+url;
     111       
     112        browser="firefox ";
     113        if (self.chromeInstalled):
     114            browser="/opt/google/chrome/google-chrome ";
     115       
     116        command=browser+url;
    78117   
    79118        proc = subprocess.Popen([command], shell=True, stdout=subprocess.PIPE)
Note: See TracChangeset for help on using the changeset viewer.