Changeset 769c378f66d18dc35bcdc76339da83552f6404a4


Ignore:
Timestamp:
08/30/11 14:13:39 (9 months ago)
Author:
Luper Rouch <luper.rouch@…>
Children:
7f9cb327ac44d3c8931b40d1a24253cf6e3c681a, 18221a9ef61aa11ec5adaa28690516cb44257a36, 08bf1a42b169043a053781d2d139c0022fc65330
Parents:
7cebbdb62a64026be49de41d00e78e6af5cedef2, 2ea9020881fe9a419dc98171219dfb471ea8a2bc
git-committer:
Luper Rouch <luper.rouch@…> (08/30/11 14:13:39)
Message:

Merge branch 'master' of /var/git/repositories/projects

Files:
16 added
3 edited

Legend:

Unmodified
Added
Removed
  • pyflu/pyflu/__init__.py

    r2fda9e3 r2ea9020  
    55 
    66def version(): 
    7     return "0.8.4" 
     7    return "0.9.1" 
    88 
  • pyflu/pyflu/qt/util.py

    reaad234 r2ea9020  
    6363        dlg.setNameFilter(format_file_dialog_filter_string(filter)) 
    6464    if dlg.exec_() != QDialog.Accepted: 
    65         return None 
     65        return 
    6666    save_path = unicode(dlg.selectedFiles()[0]) 
    6767    # Remember save location directory 
     
    7070 
    7171 
    72 def get_open_path(parent, settings_path=None, filter=None): 
     72def get_open_path(parent, settings_path=None, filter=None, 
     73        default_dir=None, default_filename=None): 
    7374    """ 
    7475    Shows an 'open file' dialog and returns the selected path. 
    7576 
    76     Also remembers the selected folder, so that subsequent calls to this 
     77    Also remembers the selected directory, so that subsequent calls to this 
    7778    function with the same *settings_path* will open in the last selected 
    78     directory. 
     79    directory. The default directory can also be forced with *default_dir*. 
    7980 
    8081    If *filter* is specified, it must be an iterable containing filters 
     
    8283    details. 
    8384 
    84     Returns None if the user canceled. 
     85    If *default_filename* is given, select this file. 
     86 
     87    Return None if the user canceled. 
    8588    """ 
    8689    # Get the last used save directory 
    8790    settings = QSettings() 
     91    if default_dir is None: 
     92        if settings_path is not None: 
     93            last_dir = unicode(settings.value(settings_path, 
     94                QVariant(u"")).toString()) 
     95        else: 
     96            last_dir = QString() 
     97        default_dir = last_dir  
     98    # Get open location 
     99    dlg = QFileDialog(parent) 
     100    dlg.setWindowTitle(parent.trUtf8("Open")) 
     101    dlg.setFileMode(QFileDialog.ExistingFile) 
     102    dlg.setAcceptMode(QFileDialog.AcceptOpen) 
     103    dlg.setDirectory(default_dir) 
     104    if default_filename is not None: 
     105        dlg.selectFile(default_filename) 
     106    if filter is not None: 
     107        dlg.setNameFilter(format_file_dialog_filter_string(filter)) 
     108    if dlg.exec_() != QDialog.Accepted: 
     109        return 
     110    open_path = unicode(dlg.selectedFiles()[0]) 
    88111    if settings_path is not None: 
    89         last_dir = unicode(settings.value(settings_path, 
    90             QVariant(u"")).toString()) 
    91     else: 
    92         last_dir = QString() 
    93     # Get save location 
    94     if filter is not None: 
    95         filter = format_file_dialog_filter_string(filter) 
    96     else: 
    97         filter = QString() 
    98     open_path = QFileDialog.getOpenFileName(parent, parent.trUtf8("Open"),  
    99             last_dir, filter) 
    100     if open_path.isNull(): 
    101         return None 
    102     open_path = unicode(open_path) 
    103     if settings_path is not None: 
    104         # Remember save location directory 
     112        # Remember opened location directory 
    105113        settings.setValue(settings_path, QVariant(dirname(open_path))) 
    106114    return open_path 
  • various/cv.html

    r0dec9f8 r7cebbdb  
    304304            </ul> 
    305305            </li> 
     306            <li> 
     307                <span class="job-location"> 
     308                    <strong>1996, Baccalauréat Scientifique (mention assez bien)</strong> 
     309                    - lycée technique de Lorgues 
     310                </span> 
     311            </li> 
     312            </ul> 
    306313        </ul>   
    307314 
Note: See TracChangeset for help on using the changeset viewer.