From: "Wiktor W Brodlo" <wiktor@brodlo.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/anaconda:master commit in: iw/
Date: Mon, 4 Jul 2011 14:17:59 +0000 (UTC) [thread overview]
Message-ID: <8c490ea65b7ec64d6f5055263e696aa39651227e.wiktor@gentoo> (raw)
commit: 8c490ea65b7ec64d6f5055263e696aa39651227e
Author: wiktor w brodlo <wiktor <AT> brodlo <DOT> net>
AuthorDate: Mon Jul 4 14:17:40 2011 +0000
Commit: Wiktor W Brodlo <wiktor <AT> brodlo <DOT> net>
CommitDate: Mon Jul 4 14:17:40 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/anaconda.git;a=commit;h=8c490ea6
iw/use_gui.py: Check flags enabled by the profile
---
iw/use_gui.py | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/iw/use_gui.py b/iw/use_gui.py
index d903c42..d121cc4 100644
--- a/iw/use_gui.py
+++ b/iw/use_gui.py
@@ -28,6 +28,7 @@ import sys
import gui
import subprocess
import re
+import shutil
from iw_gui import *
@@ -45,6 +46,14 @@ class UseWindow(InstallWindow):
(self.xml, self.align) = gui.getGladeWidget("use.glade", "use_align")
+ # Temporarily move the make.conf file and query emerge to find out the flags selected by the profile
+ shutil.move("/etc/make.conf", "/etc/make.conf.anaconda-backup")
+ emerge = subprocess.check_output(["emerge", "--info"])
+ shutil.move("/etc/make.conf.anaconda-backup", "/etc/make.conf")
+ m = re.search('USE="(.*?)"', emerge)
+ use_enabled = m.group(1)
+ use_enabled = use_enabled.split
+
usef = open("/usr/portage/profiles/use.desc")
lines = usef.read().split("\n")
@@ -67,10 +76,17 @@ class UseWindow(InstallWindow):
rows = table.get_property("n-rows")
table.resize(rows+1, cols)
+ cb = gtk.CheckButton(label=flag)
+ if flag in use_enabled:
+ cb.active = True
+
l = gtk.Label(use[flag])
l.set_alignment(0,0)
- table.attach(gtk.CheckButton(label=flag), 0, 1, rows, rows+1, gtk.FILL)
+
+ table.attach(cb, 0, 1, rows, rows+1, gtk.FILL)
table.attach(l, 1, 2, rows, rows+1)
+
+
return self.align
next reply other threads:[~2011-07-04 14:18 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-04 14:17 Wiktor W Brodlo [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-08-21 0:03 [gentoo-commits] proj/anaconda:master commit in: iw/ Wiktor W Brodlo
2011-08-21 0:03 Wiktor W Brodlo
2011-08-21 0:03 Wiktor W Brodlo
2011-08-21 0:03 Wiktor W Brodlo
2011-08-11 12:58 Wiktor W Brodlo
2011-08-04 2:16 Wiktor W Brodlo
2011-08-04 2:16 Wiktor W Brodlo
2011-08-04 2:16 Wiktor W Brodlo
2011-08-03 11:30 Wiktor W Brodlo
2011-08-03 9:47 Wiktor W Brodlo
2011-08-03 9:31 Wiktor W Brodlo
2011-08-03 9:16 Wiktor W Brodlo
2011-08-03 8:59 Wiktor W Brodlo
2011-08-03 8:51 Wiktor W Brodlo
2011-08-03 8:40 Wiktor W Brodlo
2011-08-03 2:52 Wiktor W Brodlo
2011-08-01 9:47 Wiktor W Brodlo
2011-08-01 9:39 Wiktor W Brodlo
2011-08-01 9:32 Wiktor W Brodlo
2011-08-01 9:09 Wiktor W Brodlo
2011-08-01 8:58 Wiktor W Brodlo
2011-08-01 1:59 Wiktor W Brodlo
2011-08-01 1:50 Wiktor W Brodlo
2011-08-01 1:41 Wiktor W Brodlo
2011-08-01 1:32 Wiktor W Brodlo
2011-08-01 1:24 Wiktor W Brodlo
2011-08-01 1:01 Wiktor W Brodlo
2011-08-01 0:53 Wiktor W Brodlo
2011-08-01 0:44 Wiktor W Brodlo
2011-08-01 0:35 Wiktor W Brodlo
2011-08-01 0:28 Wiktor W Brodlo
2011-08-01 0:17 Wiktor W Brodlo
2011-07-30 3:16 Wiktor W Brodlo
2011-07-26 11:38 Wiktor W Brodlo
2011-07-26 11:27 Wiktor W Brodlo
2011-07-26 11:12 Wiktor W Brodlo
2011-07-23 0:18 Wiktor W Brodlo
2011-07-22 21:22 Wiktor W Brodlo
2011-07-22 19:34 Wiktor W Brodlo
2011-07-22 19:27 Wiktor W Brodlo
2011-07-22 19:16 Wiktor W Brodlo
2011-07-21 21:37 Wiktor W Brodlo
2011-07-21 21:21 Wiktor W Brodlo
2011-07-21 20:40 Wiktor W Brodlo
2011-07-21 16:40 Wiktor W Brodlo
2011-07-21 15:21 Wiktor W Brodlo
2011-07-21 15:04 Wiktor W Brodlo
2011-07-21 14:47 Wiktor W Brodlo
2011-07-21 14:36 Wiktor W Brodlo
2011-07-21 14:19 Wiktor W Brodlo
2011-07-21 13:47 Wiktor W Brodlo
2011-07-21 13:42 Wiktor W Brodlo
2011-07-21 12:43 Wiktor W Brodlo
2011-07-10 1:44 Wiktor W Brodlo
2011-07-09 22:43 Wiktor W Brodlo
2011-07-09 19:20 Wiktor W Brodlo
2011-07-09 19:06 Wiktor W Brodlo
2011-07-09 18:43 Wiktor W Brodlo
2011-07-08 16:18 Wiktor W Brodlo
2011-07-08 15:42 Wiktor W Brodlo
2011-07-07 20:35 Wiktor W Brodlo
2011-07-07 20:22 Wiktor W Brodlo
2011-07-07 18:58 Wiktor W Brodlo
2011-07-07 18:58 Wiktor W Brodlo
2011-07-05 12:36 Wiktor W Brodlo
2011-07-05 12:33 Wiktor W Brodlo
2011-07-05 12:22 Wiktor W Brodlo
2011-07-05 12:07 Wiktor W Brodlo
2011-07-04 16:32 Wiktor W Brodlo
2011-07-04 16:19 Wiktor W Brodlo
2011-07-04 15:16 Wiktor W Brodlo
2011-07-04 14:53 Wiktor W Brodlo
2011-07-04 14:40 Wiktor W Brodlo
2011-07-04 14:18 Wiktor W Brodlo
2011-07-04 12:56 Wiktor W Brodlo
2011-07-04 12:42 Wiktor W Brodlo
2011-07-03 19:28 Wiktor W Brodlo
2011-07-03 19:21 Wiktor W Brodlo
2011-07-03 19:06 Wiktor W Brodlo
2011-07-03 18:59 Wiktor W Brodlo
2011-07-03 17:52 Wiktor W Brodlo
2011-07-03 17:15 Wiktor W Brodlo
2011-07-03 16:49 Wiktor W Brodlo
2011-07-03 16:41 Wiktor W Brodlo
2011-07-03 16:00 Wiktor W Brodlo
2011-07-03 15:54 Wiktor W Brodlo
2011-07-01 2:03 Wiktor W Brodlo
2011-06-21 13:40 Wiktor W Brodlo
2011-06-21 13:12 Wiktor W Brodlo
2011-06-21 13:04 Wiktor W Brodlo
2011-06-21 12:56 Wiktor W Brodlo
2011-06-21 12:43 Wiktor W Brodlo
2011-06-21 12:40 Wiktor W Brodlo
2011-06-21 12:15 Wiktor W Brodlo
2011-06-20 19:28 Wiktor W Brodlo
2011-06-20 19:07 Wiktor W Brodlo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8c490ea65b7ec64d6f5055263e696aa39651227e.wiktor@gentoo \
--to=wiktor@brodlo.net \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox