eric6/CondaInterface/CondaInfoDialog.py

Mon, 12 Oct 2020 19:28:42 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 12 Oct 2020 19:28:42 +0200
changeset 7781
607a6098cb44
parent 7780
41420f82c0ac
child 7923
91e843545d9a
permissions
-rw-r--r--

Performed some more code cleanup.

6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7360
9190402e4505 Updated copyright for 2020.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
3 # Copyright (c) 2019 - 2020 Detlev Offenbach <detlev@die-offenbachs.de>
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the conda information dialog.
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 from PyQt5.QtCore import Qt
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 from PyQt5.QtWidgets import QDialog
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 from .Ui_CondaInfoDialog import Ui_CondaInfoDialog
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 import UI.PixmapCache
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 class CondaInfoDialog(QDialog, Ui_CondaInfoDialog):
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 """
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 Class implementing the conda information dialog.
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 """
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 def __init__(self, infoDict, parent=None):
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 """
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 Constructor
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 @param infoDict dictionary containing the information to be shown
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 @type dict
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 @param parent reference to the parent widget
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 @type QWidget
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 """
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 super(CondaInfoDialog, self).__init__(parent)
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 self.setupUi(self)
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 self.setWindowFlags(Qt.Window)
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 self.iconLabel.setPixmap(
6796
eebd0a5f10f4 Conda Interface: converted the verbal action buttons to iconic ones.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6737
diff changeset
36 UI.PixmapCache.getPixmap("miniconda48"))
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37
6737
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
38 # version information
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 if "conda_version" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 self.condaVersionLabel.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 infoDict["conda_version"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 if "conda_build_version" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 self.condaBuildVersionLabel.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 infoDict["conda_build_version"])
6737
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
45 if "conda_env_version" in infoDict:
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
46 self.condaEnvVersionLabel.setText(
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
47 infoDict["conda_env_version"])
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 if "python_version" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 self.pythonVersionLabel.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 infoDict["python_version"])
6737
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
51
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
52 # prefixes
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
53 if "active_prefix" in infoDict or "active_prefix_name" in infoDict:
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 if infoDict["active_prefix_name"] and infoDict["active_prefix"]:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 self.activeEnvironmentEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 "{0} ({1})".format(infoDict["active_prefix_name"],
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 infoDict["active_prefix"]))
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 elif infoDict["active_prefix"]:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 self.activeEnvironmentEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 infoDict["active_prefix"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 elif infoDict["active_prefix_name"]:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 self.activeEnvironmentEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 infoDict["active_prefix_name"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 else:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 self.activeEnvironmentEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 self.tr("None"))
6730
35576138c927 CondaInfoDialog: did some fine tuning.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6724
diff changeset
67 else:
6737
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
68 self.activeEnvironmentLabel.hide()
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
69 self.activeEnvironmentEdit.hide()
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
70 if "root_prefix" in infoDict:
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
71 if "root_writable" in infoDict and infoDict["root_writable"]:
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
72 self.baseEnvironmentEdit.setText(
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
73 self.tr("{0} (writable)").format(infoDict["root_prefix"]))
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
74 else:
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
75 self.baseEnvironmentEdit.setText(
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
76 infoDict["root_prefix"])
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
77 if "envs_dirs" in infoDict:
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
78 self.envDirsEdit.setPlainText(
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
79 "\n".join(infoDict["envs_dirs"]))
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
80
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
81 # configurations
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 if "rc_path" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 self.userConfigEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 infoDict["rc_path"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 if "user_rc_path" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 # overwrite with more specific info
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 self.userConfigEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 infoDict["user_rc_path"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 if "sys_rc_path" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 self.systemConfigEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 infoDict["sys_rc_path"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 if "config_files" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 self.configurationsEdit.setPlainText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 "\n".join(infoDict["config_files"]))
6737
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
95 else:
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
96 self.configurationsLabel.hide()
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
97 self.configurationsEdit.hide()
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
98
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
99 # channels
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 if "channels" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 self.channelsEdit.setPlainText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 "\n".join(infoDict["channels"]))
6737
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
103
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
104 # various
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 if "pkgs_dirs" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 self.cachesEdit.setPlainText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 "\n".join(infoDict["pkgs_dirs"]))
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 if "platform" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 self.platformLabel.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 infoDict["platform"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 if "user_agent" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 self.useragentEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 infoDict["user_agent"])
6737
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
114 else:
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
115 self.useragentLabel.hide()
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
116 self.useragentEdit.hide()
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 if "UID" in infoDict and "GID" in infoDict:
6737
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
118 self.uidGidDataLabel.setText(
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 "{0}:{1}".format(infoDict["UID"], infoDict["GID"]))
6737
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
120 else:
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
121 self.uidGidLabel.hide()
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
122 self.uidGidDataLabel.hide()
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 if "netrc_file" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 if infoDict["netrc_file"]:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 self.netrcEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 infoDict["netrc_file"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 else:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 self.netrcEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 self.tr("None"))
6737
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
130 else:
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
131 self.netrcLabel.hide()
26a4738dd206 CondaInfoDialog: made some information displays dependent upon returned data and hide them, if the conda version doesn't deliver.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6730
diff changeset
132 self.netrcEdit.hide()
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133 if "offline" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 self.offlineCheckBox.setChecked(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 infoDict["offline"])
6730
35576138c927 CondaInfoDialog: did some fine tuning.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6724
diff changeset
136
35576138c927 CondaInfoDialog: did some fine tuning.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6724
diff changeset
137 msh = self.minimumSizeHint()
35576138c927 CondaInfoDialog: did some fine tuning.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6724
diff changeset
138 self.resize(max(self.width(), msh.width()), msh.height())

eric ide

mercurial