~nataliabidart/ubuntuone-control-panel/fix-setup-for-qt

« back to all changes in this revision

Viewing changes to ubuntuone/controlpanel/gui/qt/folders.py

  • Committer: Tarmac
  • Author(s): Natalia B. Bidart
  • Date: 2011-09-09 18:41:15 UTC
  • mfrom: (221.1.1 shares-real-path)
  • Revision ID: tarmac-20110909184115-qwrp4qnjz0jnue5w
- Use real path for shares when building the QT UI (LP: #831424).

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
            self.ui.folders.addTopLevelItem(item)
133
133
 
134
134
            for volume in volumes:
 
135
                is_root = volume[u'type'] == self.backend.ROOT_TYPE
 
136
                is_share = volume[u'type'] == self.backend.SHARE_TYPE
 
137
 
135
138
                child = QtGui.QTreeWidgetItem()
136
139
                child.setSizeHint(FOLDER_NAME_COL, QtCore.QSize(-1, 35))
137
 
                child.volume_path = volume['path']
 
140
                if is_share and 'realpath' in volume:
 
141
                    child.volume_path = volume['realpath']
 
142
                else:
 
143
                    child.volume_path = volume['path']
138
144
                child.volume_id = volume['volume_id']
139
145
 
140
146
                name = self._process_name(volume[u'display_name'])
142
148
                child.setToolTip(FOLDER_NAME_COL, name)
143
149
                child.setToolTip(EXPLORE_COL, EXPLORE)
144
150
 
145
 
                is_root = volume[u'type'] == self.backend.ROOT_TYPE
146
 
                is_share = volume[u'type'] == self.backend.SHARE_TYPE
147
 
 
148
151
                icon_name = FOLDER_ICON_NAME
149
152
                if is_share:
150
153
                    icon_name = SHARE_ICON_NAME