eric6/CondaInterface/CondaInfoDialog.py

Sun, 02 Feb 2020 11:04:32 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 02 Feb 2020 11:04:32 +0100
changeset 7380
c99320e859ca
parent 7360
9190402e4505
child 7780
41420f82c0ac
permissions
-rw-r--r--

Fixed an issue related to showing the application name in the menu bar of Gnome desktop under Wayland.

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

eric ide

mercurial