Changeset 4018


Ignore:
Timestamp:
Mar 21, 2017, 6:32:17 PM (2 years ago)
Author:
jrpelegrina
Message:

Add lock control to gui

Location:
lliurex-gdrive/trunk/fuentes
Files:
1 added
1 deleted
9 edited

Legend:

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

    r3997 r4018  
    3434Package: lliurex-gdrive-indicator
    3535Architecture: all
    36 Depends: ${shlibs:Depends}, ${misc:Depends}, lliurex-gdrive-core (= ${binary:Version}), lliurex-gdrive-gui (= ${binary:Version})  python,
     36Depends: ${shlibs:Depends}, ${misc:Depends}, lliurex-gdrive-core (= ${binary:Version}), lliurex-gdrive-gui (= ${binary:Version}), python
    3737Description: Indicator menu to lliurex-google-drive
    3838 Indicator menu to lliurex-google-drive.
  • lliurex-gdrive/trunk/fuentes/lliurex-gdrive-core.install/usr/bin/lliurex-gdrive-autostart

    r3993 r4018  
    2525        def launch_indicator(self):
    2626                if not os.path.exists(self.disable_indicator):
    27                         os.system("lliurexGdriveIndicator")
     27                        os.system("/usr/bin/lliurexGdriveIndicator")
    2828               
    2929
  • lliurex-gdrive/trunk/fuentes/lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/LliurexGdrive.py

    r4006 r4018  
    2222#CONFIG_DIR=os.path.expanduser("~/.config/lliurex-google-drive-profiles/config")
    2323CSS_FILE="/usr/share/lliurex-gdrive/lliurex-gdrive.css"
    24 LOCK_PATH="/tmp/lgdIndicator.lock"
     24LOCK_INDICATOR="/tmp/lgdIndicator.lock"
     25LOCK_GUI="/tmp/lgdGUI.lock"
    2526DISABLE_INDICATOR="~/.config/lliurex-google-drive-profiles/disableIndicator"
    2627
     
    2930       
    3031        def __init__(self):
    31                
     32
     33                self.islgd_running()
    3234                self.core=Core.Core.get_core()
    3335                self.disable_indicator=os.path.expanduser(DISABLE_INDICATOR)
     36                self.createLockToken()
    3437
    3538        #def init
     39
     40       
     41        def islgd_running(self):
     42
     43                if os.path.exists(LOCK_GUI):
     44                        dialog = Gtk.MessageDialog(None,0,Gtk.MessageType.ERROR, Gtk.ButtonsType.CANCEL, "Lliurex GDrive")
     45                        dialog.format_secondary_text(_("Lliurex GDrive is now running."))
     46                        dialog.run()
     47                        sys.exit(1)
     48       
     49
     50        def createLockToken(self):
     51
     52                if not os.path.exists(LOCK_GUI):
     53                        f=open(LOCK_GUI,'w')
     54                        f.close
     55
     56        #def createLockToken   
    3657       
    3758        def load_gui(self):
     
    6586        #def load_gui
    6687
     88
     89               
    6790        def load_info(self):
    6891
     
    95118
    96119
    97                 #self.lockpath=R=os.path(LOCK_PATH)
    98                 if not os.path.exists(LOCK_PATH):
    99                         cmd="lliurexGdriveIndicator" + "&"
     120                #self.lockpath=R=os.path(LOCK_INDICATOR)
     121                if not os.path.exists(LOCK_INDICATOR):
     122                        cmd="/usr/bin/lliurexGdriveIndicator" + "&"
    100123                        os.system(cmd)
    101124
     
    113136
    114137
     138        def cleanLockToken(self):
     139
     140                if os.path.exists(LOCK_GUI):
     141                        os.remove(LOCK_GUI)
     142
     143        #def cleanIndicatorLock                 
     144
    115145        def quit(self,widget):
    116146
     
    121151                        self.launch_indicator()
    122152
     153                self.cleanLockToken()
    123154                Gtk.main_quit()
    124155       
  • lliurex-gdrive/trunk/fuentes/lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/rsrc/lliurex-gdrive.ui

    r3997 r4018  
    139139                    <property name="halign">start</property>
    140140                    <property name="margin_left">5</property>
    141                     <property name="label" translatable="yes">Profile: </property>
     141                    <property name="label" translatable="yes">Profile:</property>
    142142                  </object>
    143143                  <packing>
     
    154154                    <property name="margin_top">5</property>
    155155                    <property name="margin_bottom">5</property>
    156                     <property name="label" translatable="yes">E-mail: </property>
     156                    <property name="label" translatable="yes">E-mail:</property>
    157157                  </object>
    158158                  <packing>
     
    169169                    <property name="margin_top">5</property>
    170170                    <property name="margin_bottom">5</property>
    171                     <property name="label" translatable="yes">MountPoint: </property>
     171                    <property name="label" translatable="yes">MountPoint:</property>
    172172                  </object>
    173173                  <packing>
     
    184184                    <property name="margin_top">5</property>
    185185                    <property name="margin_bottom">5</property>
    186                     <property name="label" translatable="yes">Mount at login: </property>
     186                    <property name="label" translatable="yes">Mount at login:</property>
    187187                  </object>
    188188                  <packing>
     
    196196                    <property name="visible">True</property>
    197197                    <property name="can_focus">True</property>
     198                    <property name="margin_left">4</property>
    198199                    <property name="primary_icon_name">emblem-personal</property>
    199200                  </object>
     
    207208                    <property name="visible">True</property>
    208209                    <property name="can_focus">True</property>
     210                    <property name="margin_left">5</property>
    209211                    <property name="margin_top">5</property>
    210212                    <property name="margin_bottom">5</property>
     
    222224                    <property name="can_focus">True</property>
    223225                    <property name="halign">start</property>
     226                    <property name="margin_left">5</property>
    224227                  </object>
    225228                  <packing>
     
    232235                    <property name="visible">True</property>
    233236                    <property name="can_focus">False</property>
     237                    <property name="margin_left">5</property>
    234238                    <property name="margin_top">5</property>
    235239                    <property name="margin_bottom">5</property>
  • lliurex-gdrive/trunk/fuentes/lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator

    r4009 r4018  
    2525_ = gettext.gettext
    2626
    27 LOCK_PATH="/tmp/lgdIndicator.lock"
     27LOCK_INDICATOR="/tmp/lgdIndicator.lock"
     28LOCK_GUI="/tmp/lgdGUI.lock"
    2829RSRC="/usr/share/lliurex-gdrive/"
    2930MOUNT_ON_IMAGE=RSRC+"rsrc/mount_on.png"
     
    5960        def createLockToken(self):
    6061
    61                 #self.lockpath=os.path(LOCK_PATH)
    62                 if not os.path.exists(LOCK_PATH):
    63                         f=open(LOCK_PATH,'w')
     62                #self.lockpath=os.path(LOCK_INDICATOR)
     63                if not os.path.exists(LOCK_INDICATOR):
     64                        f=open(LOCK_INDICATOR,'w')
    6465                        f.close
    6566
     
    193194                       
    194195                item=Gtk.ImageMenuItem()
    195                 label_item=_("Open Lliurex Gdrive")
     196                label_item=_("Open Lliurex GDrive")
    196197                item.set_label(label_item)
    197198                img=Gtk.Image()
     
    230231                status_info=self.LliurexGoogleDriveManager.check_mountpoint_status(mountpoint)
    231232
     233                print type(mountpoint)
    232234                if self.current_status[profile]==status_info["status"]:
    233235
     
    263265        def open_gui(self,widget):
    264266               
    265                 cmd='lliurex-gdrive' +"&"
    266                 os.system(cmd)
     267                if not os.path.exists(LOCK_GUI):
     268                        cmd='/usr/bin/lliurex-gdrive' +"&"
     269                        os.system(cmd)
    267270
    268271        #def open_gui
     
    313316        def cleanIndicatorLock(self):
    314317
    315                 if os.path.exists(LOCK_PATH):
    316                         os.remove(LOCK_PATH)
     318                if os.path.exists(LOCK_INDICATOR):
     319                        os.remove(LOCK_INDICATOR)
    317320
    318321        #def cleanIndicatorLock                 
  • lliurex-gdrive/trunk/fuentes/lliurex-po/generate_po.sh

    r3997 r4018  
    11#!/bin/bash
    22
    3 xgettext --join-existing ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/rsrc/lliurex-gdrive.ui  -L python ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator -o ./lliurex-gdrive-gui/lliurex-gdrive.pot
     3xgettext --join-existing ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/LliurexGdrive.py ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/rsrc/lliurex-gdrive.ui  -L python ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator -o ./lliurex-gdrive-gui/lliurex-gdrive.pot
  • lliurex-gdrive/trunk/fuentes/lliurex-po/lliurex-gdrive-gui/ca_ES@valencia.po

    r3997 r4018  
    99"Project-Id-Version: PACKAGE VERSION\n"
    1010"Report-Msgid-Bugs-To: \n"
    11 "POT-Creation-Date: 2017-03-20 12:16+0100\n"
    12 "PO-Revision-Date: 2017-03-20 12:19+0100\n"
     11"POT-Creation-Date: 2017-03-21 17:55+0100\n"
     12"PO-Revision-Date: 2017-03-21 17:59+0100\n"
    1313"Last-Translator: lliurex <lliurex@gva.es>\n"
    1414"Language-Team: Spanish\n"
     
    2929#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:183
    3030#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:184
     31#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:171
    3132msgid "Cancel"
    3233msgstr ""
     
    3435#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:201
    3536#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:202
     37#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:189
    3638msgid "Create new profile"
    3739msgstr ""
     
    4143#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:208
    4244#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:382
     45#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:195
     46#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:362
    4347msgid "Edit profile"
    4448msgstr ""
     
    4751#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:215
    4852#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:222
     53#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:209
     54#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:213
    4955msgid "Close"
    5056msgstr ""
     
    5258#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:373
    5359#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:374
     60#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:354
    5461msgid "Delete profile"
    5562msgstr ""
     
    5865#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:280
    5966#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:429
     67#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:399
     68#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:279
    6069msgid "Dismount now"
    6170msgstr ""
     
    6473#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:285
    6574#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:434
     75#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:404
     76#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:284
    6677msgid "Mount now"
    6778msgstr ""
     
    6980#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:463
    7081#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:464
     82#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:434
    7183msgid "Connecting with google to get account access..."
    7284msgstr ""
     
    7486#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:471
    7587#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:472
     88#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:442
    7689msgid "Apply changes"
    7790msgstr ""
     
    7992#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:492
    8093#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:493
     94#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:463
    8195msgid "You must indicate a profile"
    8296msgstr ""
     
    8498#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:495
    8599#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:496
     100#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:466
    86101msgid "Profile can not contain blanks"
    87102msgstr ""
     
    89104#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:498
    90105#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:499
     106#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:469
    91107msgid "Profile already exists"
    92108msgstr ""
     
    94110#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:501
    95111#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:502
     112#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:472
    96113msgid "Mounting point already used by another profile"
    97114msgstr ""
     
    99116#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:523
    100117#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:524
     118#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:494
    101119msgid "Creating profile... "
    102120msgstr ""
     
    104122#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:531
    105123#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:532
     124#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:502
    106125msgid "Profile created successfully"
    107126msgstr ""
     
    109128#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:537
    110129#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:538
     130#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:508
    111131msgid "An error ocurred creating profile. See log file for more information"
    112132msgstr ""
     
    114134#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:563
    115135#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:564
     136#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:534
    116137msgid "Error getting authorization"
    117138msgstr ""
     
    146167
    147168#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:167
     169#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:165
    148170msgid "Open folder"
    149171msgstr ""
    150172
    151173#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:198
    152 msgid "Open Lliurex Gdrive"
     174#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:196
     175msgid "Open Lliurex GDrive"
    153176msgstr ""
    154177
    155178#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:281
     179#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:280
    156180#, python-format
    157181msgid "Used: %s of %s"
     
    159183
    160184#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:286
     185#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:285
    161186msgid "Used: not available"
    162187msgstr ""
     188
     189#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/LliurexGdrive.py:45
     190msgid "Lliurex GDrive is now running."
     191msgstr ""
  • lliurex-gdrive/trunk/fuentes/lliurex-po/lliurex-gdrive-gui/lliurex-gdrive.pot

    r3997 r4018  
    99"Project-Id-Version: PACKAGE VERSION\n"
    1010"Report-Msgid-Bugs-To: \n"
    11 "POT-Creation-Date: 2017-03-20 12:16+0100\n"
     11"POT-Creation-Date: 2017-03-21 17:55+0100\n"
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    2828#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:183
    2929#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:184
     30#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:171
    3031msgid "Cancel"
    3132msgstr ""
     
    3334#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:201
    3435#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:202
     36#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:189
    3537msgid "Create new profile"
    3638msgstr ""
     
    4042#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:208
    4143#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:382
     44#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:195
     45#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:362
    4246msgid "Edit profile"
    4347msgstr ""
     
    4650#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:215
    4751#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:222
     52#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:209
     53#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:213
    4854msgid "Close"
    4955msgstr ""
     
    5157#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:373
    5258#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:374
     59#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:354
    5360msgid "Delete profile"
    5461msgstr ""
     
    5764#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:280
    5865#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:429
     66#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:399
     67#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:279
    5968msgid "Dismount now"
    6069msgstr ""
     
    6372#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:285
    6473#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:434
     74#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:404
     75#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:284
    6576msgid "Mount now"
    6677msgstr ""
     
    6879#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:463
    6980#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:464
     81#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:434
    7082msgid "Connecting with google to get account access..."
    7183msgstr ""
     
    7385#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:471
    7486#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:472
     87#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:442
    7588msgid "Apply changes"
    7689msgstr ""
     
    7891#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:492
    7992#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:493
     93#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:463
    8094msgid "You must indicate a profile"
    8195msgstr ""
     
    8397#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:495
    8498#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:496
     99#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:466
    85100msgid "Profile can not contain blanks"
    86101msgstr ""
     
    88103#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:498
    89104#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:499
     105#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:469
    90106msgid "Profile already exists"
    91107msgstr ""
     
    93109#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:501
    94110#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:502
     111#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:472
    95112msgid "Mounting point already used by another profile"
    96113msgstr ""
     
    98115#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:523
    99116#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:524
     117#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:494
    100118msgid "Creating profile... "
    101119msgstr ""
     
    103121#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:531
    104122#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:532
     123#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:502
    105124msgid "Profile created successfully"
    106125msgstr ""
     
    108127#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:537
    109128#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:538
     129#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:508
    110130msgid "An error ocurred creating profile. See log file for more information"
    111131msgstr ""
     
    113133#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:563
    114134#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:564
     135#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/ProfileBox.py:534
    115136msgid "Error getting authorization"
    116137msgstr ""
     
    145166
    146167#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:167
     168#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:165
    147169msgid "Open folder"
    148170msgstr ""
    149171
    150172#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:198
    151 msgid "Open Lliurex Gdrive"
     173#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:196
     174msgid "Open Lliurex GDrive"
    152175msgstr ""
    153176
    154177#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:281
     178#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:280
    155179#, python-format
    156180msgid "Used: %s of %s"
     
    158182
    159183#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:286
     184#: ../lliurex-gdrive-indicator.install/usr/bin/lliurexGdriveIndicator:285
    160185msgid "Used: not available"
    161186msgstr ""
     187
     188#: ../lliurex-gdrive-gui.install/usr/share/lliurex-gdrive/LliurexGdrive.py:45
     189msgid "Lliurex GDrive is now running."
     190msgstr ""
  • lliurex-gdrive/trunk/fuentes/python-lliurex-gdrive/lliurex/lliurexgdrive/__init__.py

    r4009 r4018  
    187187        def mount_drives(self):
    188188               
    189                 for profile in self.profiles_config:
    190                         automount=self.profiles_config[profile]["automount"]
    191                         if automount:
    192                                 mountpoint=self.profiles_config[profile]["mountpoint"]
    193                                 profile=profile.encode("utf-8")
    194                                 mountpoint=mountpoint.encode("utf-8")
    195                                 self.mount_drive(profile,mountpoint)
     189                connection=self.check_google_connection()
     190                if connection:
     191                        for profile in self.profiles_config:
     192                                automount=self.profiles_config[profile]["automount"]
     193                                if automount:
     194                                        mountpoint=self.profiles_config[profile]["mountpoint"]
     195                                        profile=profile.encode("utf-8")
     196                                        mountpoint=mountpoint.encode("utf-8")
     197                                        self.mount_drive(profile,mountpoint)
    196198                                               
    197199               
     
    224226                mountpoint_available=""
    225227                mountpoint_per=""
     228                tmp=[]
    226229
    227230               
     
    233236                if len(poutput)>0:
    234237                        status=True
    235                         mountpoint_size=poutput.split(" ")[4]
    236                         mountpoint_used=poutput.split(" ")[8]
    237                         mountpoint_available=poutput.split(" ")[11]
    238                         mountpoint_per=poutput.split(" ")[14]
     238                        for item in poutput.split(" "):
     239                                if len(item)>1:
     240                                        tmp.append(item)
     241
     242                        mountpoint_size=tmp[1]
     243                        mountpoint_used=tmp[2]
     244                        mountpoint_available=tmp[3]
     245                        mountpoint_per=tmp[4]
    239246
    240247                else:
     
    284291
    285292        def create_profile(self,profile):
    286 
    287                 print profile,type(profile)
    288293
    289294                profile=unicode(profile).encode("utf-8")
Note: See TracChangeset for help on using the changeset viewer.