eric6/CondaInterface/CondaInfoDialog.py

Sat, 31 Aug 2019 12:58:11 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 31 Aug 2019 12:58:11 +0200
branch
without_py2_and_pyqt4
changeset 7192
a22eee00b052
parent 6942
2602857055c5
child 7229
53054eb5b15a
permissions
-rw-r--r--

Started removing runtime support for Python2 and PyQt4.

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
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3 # Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de>
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 __future__ import unicode_literals
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 from PyQt5.QtCore import Qt
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 from PyQt5.QtWidgets import QDialog
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 from .Ui_CondaInfoDialog import Ui_CondaInfoDialog
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 import UI.PixmapCache
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
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 CondaInfoDialog(QDialog, Ui_CondaInfoDialog):
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 Class implementing the conda information dialog.
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 def __init__(self, infoDict, parent=None):
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 Constructor
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 @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
29 @type dict
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 @param parent reference to the parent widget
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 @type QWidget
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 """
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 super(CondaInfoDialog, self).__init__(parent)
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 self.setupUi(self)
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 self.setWindowFlags(Qt.Window)
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 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
38 UI.PixmapCache.getPixmap("miniconda48"))
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39
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
40 # version information
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 if "conda_version" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 self.condaVersionLabel.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 infoDict["conda_version"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 if "conda_build_version" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 self.condaBuildVersionLabel.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 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
47 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
48 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
49 infoDict["conda_env_version"])
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 if "python_version" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 self.pythonVersionLabel.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 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
53
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
54 # 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
55 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
56 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
57 self.activeEnvironmentEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 "{0} ({1})".format(infoDict["active_prefix_name"],
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 infoDict["active_prefix"]))
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 elif infoDict["active_prefix"]:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 self.activeEnvironmentEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 infoDict["active_prefix"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 elif infoDict["active_prefix_name"]:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 self.activeEnvironmentEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 infoDict["active_prefix_name"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 else:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 self.activeEnvironmentEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 self.tr("None"))
6730
35576138c927 CondaInfoDialog: did some fine tuning.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6724
diff changeset
69 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
70 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
71 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
72 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
73 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
74 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
75 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
76 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
77 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
78 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
79 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
80 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
81 "\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
82
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
83 # configurations
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 if "rc_path" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 self.userConfigEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 infoDict["rc_path"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 if "user_rc_path" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 # overwrite with more specific info
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 self.userConfigEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 infoDict["user_rc_path"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 if "sys_rc_path" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 self.systemConfigEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 infoDict["sys_rc_path"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 if "config_files" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 self.configurationsEdit.setPlainText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 "\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
97 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
98 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
99 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
100
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
101 # channels
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 if "channels" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 self.channelsEdit.setPlainText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 "\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
105
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
106 # various
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 if "pkgs_dirs" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 self.cachesEdit.setPlainText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 "\n".join(infoDict["pkgs_dirs"]))
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 if "platform" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 self.platformLabel.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 infoDict["platform"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 if "user_agent" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 self.useragentEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 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
116 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
117 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
118 self.useragentEdit.hide()
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 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
120 self.uidGidDataLabel.setText(
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 "{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
122 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
123 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
124 self.uidGidDataLabel.hide()
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 if "netrc_file" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 if infoDict["netrc_file"]:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 self.netrcEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 infoDict["netrc_file"])
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 else:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 self.netrcEdit.setText(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 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
132 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
133 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
134 self.netrcEdit.hide()
6724
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 if "offline" in infoDict:
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136 self.offlineCheckBox.setChecked(
ca89c7d94c94 Conda: started implementing the conda menu functionality
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137 infoDict["offline"])
6730
35576138c927 CondaInfoDialog: did some fine tuning.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6724
diff changeset
138
35576138c927 CondaInfoDialog: did some fine tuning.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6724
diff changeset
139 msh = self.minimumSizeHint()
35576138c927 CondaInfoDialog: did some fine tuning.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6724
diff changeset
140 self.resize(max(self.width(), msh.width()), msh.height())

eric ide

mercurial