summaryrefslogtreecommitdiff
path: root/geneticone/gui
diff options
context:
space:
mode:
authornecoro <>2006-09-29 19:12:30 +0000
committernecoro <>2006-09-29 19:12:30 +0000
commit196d7959b4a28cce680154277a764d8799238453 (patch)
tree98d9e818e2959cbc9e3d83ac04c007928c1a3afe /geneticone/gui
parent3193cdc4a5f7db003b838d4b1785ea7da5ac679c (diff)
downloadportato-196d7959b4a28cce680154277a764d8799238453.tar.gz
portato-196d7959b4a28cce680154277a764d8799238453.tar.bz2
portato-196d7959b4a28cce680154277a764d8799238453.zip
Replaced "print" by "debug"
Diffstat (limited to 'geneticone/gui')
-rw-r--r--geneticone/gui/gui_helper.py4
-rw-r--r--geneticone/gui/windows.py10
2 files changed, 8 insertions, 6 deletions
diff --git a/geneticone/gui/gui_helper.py b/geneticone/gui/gui_helper.py
index 5801d1a..7b5094e 100644
--- a/geneticone/gui/gui_helper.py
+++ b/geneticone/gui/gui_helper.py
@@ -11,6 +11,7 @@
import geneticone
from geneticone import flags
+from geneticone.helper import *
from subprocess import *
from threading import Thread
@@ -130,9 +131,8 @@ class EmergeQueue:
cat = geneticone.split_package_name(p)[0] # get category
while cat[0] in ["=",">","<","!"]:
cat = cat[1:]
- print "Category: "+cat ,
del self.packages[cat]
- print "marked for refreshing"
+ debug("Category %s marked for refreshing" % cat)
except KeyError: # not in self.packages - ignore
pass
diff --git a/geneticone/gui/windows.py b/geneticone/gui/windows.py
index 02613db..3add5da 100644
--- a/geneticone/gui/windows.py
+++ b/geneticone/gui/windows.py
@@ -23,6 +23,7 @@ import gobject
import geneticone
from geneticone import flags
+from geneticone.helper import *
from gui_helper import *
# for the terminal
@@ -229,8 +230,9 @@ class PackageWindow:
return True
def cb_cancel_clicked (self, button, data = None):
- if self.delOnClose: self.actual_package().remove_new_use_flags()
- if self.flagChanged:
+ if self.delOnClose:
+ self.actual_package().remove_new_use_flags()
+ elif self.flagChanged:
if self.queue:
self.queue.append(self.actual_package().get_cpv(), update = True)
self.window.destroy()
@@ -238,7 +240,7 @@ class PackageWindow:
def cb_emerge_clicked (self, button, data = None):
"""Adds the package to the EmergeQueue."""
- if not geneticone.am_i_root():
+ if not am_i_root():
errorMB = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, "You cannot (un)merge without being root.")
errorMB.run()
errorMB.destroy()
@@ -583,7 +585,7 @@ class MainWindow:
def cb_emerge_clicked (self, button, data = None):
"""Do emerge or unemerge."""
- print button
+ debug(button)
if button == self.emergeBtn or button == MENU_EMERGE:
if len(flags.newUseFlags) > 0:
hintMB = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK,