Changeset 9209fef


Ignore:
Timestamp:
Jun 3, 2013 12:44:42 PM (11 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
4be6e6e
Parents:
9bdcc26
Message:

Replace the user home directory with "~" on the new module dialog whenever applicable (makes better screenshots)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/EasyPBI/newModuleDialog.cpp

    r1620346 r9209fef  
    11#include "newModuleDialog.h" 
    22#include "ui_newModuleDialog.h" 
     3#include <QDir> 
    34#include <QDebug> 
    45 
     
    3536  }else if(ui->radio_local->isChecked() ){ 
    3637    moduleType="local"; 
    37     moduleData = ui->line_sources->text(); 
     38    moduleData = ui->line_sources->text().replace("~",QDir::homePath()); 
    3839  }else{ 
    3940    moduleType.clear(); moduleData.clear(); 
    4041  } 
    41   moduleIcon = ui->line_icon->text(); 
    42   if(moduleIcon.isEmpty()){ moduleIcon = ui->line_icon->placeholderText(); } 
     42  moduleIcon = ui->line_icon->text().replace("~",QDir::homePath()); 
     43  if(moduleIcon.isEmpty()){ moduleIcon = ui->line_icon->placeholderText().replace("~",QDir::homePath()); } 
    4344  //Now close the UI 
    4445  this->close(); 
     
    8687  if(Sel.isEmpty()){return;} //action cancelled or closed        
    8788  else{ 
    88     ui->line_sources->setText(Sel); 
     89    ui->line_sources->setText(Sel.replace(QDir::homePath(),"~")); 
    8990  } 
    9091} 
     
    100101 
    101102void NewModuleDialog::setDefaultIconFile(QString icon){ 
    102   ui->line_icon->setPlaceholderText(icon); 
     103  ui->line_icon->setPlaceholderText(icon.replace(QDir::homePath(),"~")); 
    103104} 
Note: See TracChangeset for help on using the changeset viewer.