No default image.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 24 May 2010 13:30:14 +0000 (13:30 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 24 May 2010 13:30:14 +0000 (13:30 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3807 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BBoardPage.py
wizard/BProjectPresets.py
wizard/ui/board_select.ui

index 0877ea50194bc372c667974bc9df5d01ba37abce..160ff610186bd4a9461d33828ca121979967801c 100644 (file)
@@ -111,10 +111,12 @@ class BBoardPage(BWizardPage):
             info_dict = qvariant_converter.getStringDict(info_dict["info"])
             description = info_dict.get("description", "")
             image = os.path.join(info_dict["path"], ".image.png")
-            if not os.path.exists(image):
-                image = ":/images/default_board_image.png"
+            if os.path.exists(image):
+                self.pageContent.imageLabel.setPixmap(QPixmap(image))
+                self.pageContent.imageLabel.setVisible(True)
+            else:
+                self.pageContent.imageLabel.setVisible(False)
             self.pageContent.descriptionLabel.setText(description)
-            self.pageContent.imageLabel.setPixmap(QPixmap(image))
 
     ####
 
index c0381a5c33df001949b7c23001832480456de348..18268e67eb023a227eaeb187581ca1dab30825a4 100644 (file)
@@ -84,9 +84,11 @@ class BProjectPresetsPage(QWidget):
             preset = self.preset_data["children"][preset_path]
             self.pageContent.descriptionLabel.setText(preset["info"].get("description", ""))
             image = os.path.join(preset["info"]["path"], const.PREDEFINED_BOARD_IMAGE_FILE)
-            if not os.path.exists(image):
-                image = const.PREDEFINED_BOARD_DEFAULT_IMAGE
-            self.pageContent.imageLabel.setPixmap(QPixmap(image))
+            if os.path.exists(image):
+                self.pageContent.imageLabel.setPixmap(QPixmap(image))
+                self.pageContent.imageLabel.setVisible(True)
+            else:
+                self.pageContent.imageLabel.setVisible(False)
     
     @property
     def selected(self):
index cca3695fa4f0a81766fa819f032d78a527330d61..9994953105337508a89265a06a8f7fc1a525d227 100644 (file)
    <item>
     <layout class="QVBoxLayout" name="verticalLayout">
      <item>
-      <widget class="QLabel" name="descriptionLabel">
+      <widget class="QLabel" name="imageLabel">
        <property name="text">
         <string/>
        </property>
-       <property name="wordWrap">
-        <bool>true</bool>
-       </property>
       </widget>
      </item>
      <item>
       </spacer>
      </item>
      <item>
-      <widget class="QLabel" name="imageLabel">
+      <widget class="QLabel" name="descriptionLabel">
        <property name="text">
         <string/>
        </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
       </widget>
      </item>
     </layout>