summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornecoro <>2007-07-13 04:38:04 +0000
committernecoro <>2007-07-13 04:38:04 +0000
commit0a8d3b8add548efbc44a67c3eb1223ff94aaffc5 (patch)
tree3def310b4ee8657ae2b9356bf4ce19e240358cf6
parentfc6d232a9357211a44dad3300ff64571620aa1bf (diff)
downloadportato-0a8d3b8add548efbc44a67c3eb1223ff94aaffc5.tar.gz
portato-0a8d3b8add548efbc44a67c3eb1223ff94aaffc5.tar.bz2
portato-0a8d3b8add548efbc44a67c3eb1223ff94aaffc5.zip
fixes
Diffstat (limited to '')
-rw-r--r--portato/__init__.py6
-rw-r--r--portato/gui/gtk/windows.py26
-rw-r--r--portato/gui/qt/windows.py23
-rw-r--r--portato/helper.py9
4 files changed, 37 insertions, 27 deletions
diff --git a/portato/__init__.py b/portato/__init__.py
index 0166170..f10b9ef 100644
--- a/portato/__init__.py
+++ b/portato/__init__.py
@@ -52,6 +52,6 @@ formatter = OutputFormatter("%(message)s (%(filename)s:%(lineno)s)")
handler = logging.StreamHandler()
handler.setFormatter(formatter)
-logging.getLogger().addHandler(handler)
-
-logging.getLogger().setLevel(logging.DEBUG)
+logging.getLogger("portatoLogger").addHandler(handler)
+logging.getLogger("portatoLogger").setLevel(logging.DEBUG)
+logging.getLogger("portatoLogger").propagate = False
diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py
index ac87b01..51179c3 100644
--- a/portato/gui/gtk/windows.py
+++ b/portato/gui/gtk/windows.py
@@ -510,7 +510,18 @@ class PackageTable:
self.comboVB.remove(c)
self.comboVB.pack_start(self.vCombo)
- # the label (must be here, because it depends on the combo box)
+ if not self.queue or not self.doEmerge:
+ self.emergeBtn.set_sensitive(False)
+ self.unmergeBtn.set_sensitive(False)
+
+ # current status
+ self.cb_combo_changed(self.vCombo)
+ self.table.show_all()
+
+ def hide (self):
+ self.table.hide_all()
+
+ def set_desc_label (self):
desc = self.actual_package().get_package_settings("DESCRIPTION").replace("&","&amp;")
if not desc:
desc = "<no description>"
@@ -527,17 +538,6 @@ class PackageTable:
self.descLabel.set_use_markup(use_markup)
self.descLabel.set_label(desc)
- if not self.queue or not self.doEmerge:
- self.emergeBtn.set_sensitive(False)
- self.unmergeBtn.set_sensitive(False)
-
- # current status
- self.cb_combo_changed(self.vCombo)
- self.table.show_all()
-
- def hide (self):
- self.table.hide_all()
-
def fill_use_list(self, store):
"""Fills a given ListStore with the use-flag data.
@@ -644,6 +644,8 @@ class PackageTable:
"""Callback for the changed ComboBox.
It then rebuilds the useList and the checkboxes."""
+ self.set_desc_label()
+
# remove old useList
w = self.useListScroll.get_child()
if w:
diff --git a/portato/gui/qt/windows.py b/portato/gui/qt/windows.py
index 2f40dcf..5aa0e24 100644
--- a/portato/gui/qt/windows.py
+++ b/portato/gui/qt/windows.py
@@ -412,7 +412,16 @@ class PackageDetails:
# comboBox
self.set_combo()
- # the labels
+ # disable buttons when emerging is not allowed
+ if not self.queue or not self.doEmerge:
+ self.window.pkgEmergeBtn.setEnabled(False)
+ self.window.pkgUnmergeBtn.setEnabled(False)
+
+ self._show_tab()
+
+ self.window.tabWidget.setCurrentIndex(self.window.PKG_PAGE)
+
+ def set_labels (self):
desc = self.actual_package().get_package_settings("DESCRIPTION").replace("&","&amp;")
if not desc:
@@ -430,15 +439,6 @@ class PackageDetails:
self.window.descLabel.setText(desc)
self.window.nameLabel.setText(name)
- # disable buttons when emerging is not allowed
- if not self.queue or not self.doEmerge:
- self.window.pkgEmergeBtn.setEnabled(False)
- self.window.pkgUnmergeBtn.setEnabled(False)
-
- self._show_tab()
-
- self.window.tabWidget.setCurrentIndex(self.window.PKG_PAGE)
-
def set_combo (self):
"""Fills the version combo box with the right items and selects the correct one."""
@@ -622,6 +622,9 @@ class PackageDetails:
# ATTENTION: BIG'n'DIRTY :)
#
+ # labels
+ self.set_labels()
+
# build new
self.build_use_list()
pkg = self.actual_package()
diff --git a/portato/helper.py b/portato/helper.py
index f25fa34..d7a5366 100644
--- a/portato/helper.py
+++ b/portato/helper.py
@@ -15,10 +15,15 @@ Some nice functions used in the program.
"""
import types, os, signal, logging
-from logging import debug, info, warning, error, critical, exception
+
+debug = logging.getLogger("portatoLogger").debug
+info = logging.getLogger("portatoLogger").info
+warning = logging.getLogger("portatoLogger").warning
+error = logging.getLogger("portatoLogger").error
+critical = logging.getLogger("portatoLogger").critical
def set_log_level (lvl):
- logging.getLogger().setLevel(lvl)
+ logging.getLogger("portatoLogger").setLevel(lvl)
def send_signal_to_group (sig):
"""Sends a signal to all processes of our process group (w/o ourselves).