summaryrefslogtreecommitdiff
path: root/geneticone/gui
diff options
context:
space:
mode:
authornecoro <>2006-09-27 19:02:22 +0000
committernecoro <>2006-09-27 19:02:22 +0000
commit72b50cf8b1fc358463cf1bb068bf03e7ba55362e (patch)
tree05d09be4dca3e3606603c35b3ddb7bc4721ade48 /geneticone/gui
parentf02952925b50a232a31f3714e529637f6311e6ef (diff)
downloadportato-72b50cf8b1fc358463cf1bb068bf03e7ba55362e.tar.gz
portato-72b50cf8b1fc358463cf1bb068bf03e7ba55362e.tar.bz2
portato-72b50cf8b1fc358463cf1bb068bf03e7ba55362e.zip
Added AboutWindow
Diffstat (limited to 'geneticone/gui')
-rw-r--r--geneticone/gui/main.py48
1 files changed, 43 insertions, 5 deletions
diff --git a/geneticone/gui/main.py b/geneticone/gui/main.py
index 48838c9..93decf2 100644
--- a/geneticone/gui/main.py
+++ b/geneticone/gui/main.py
@@ -12,6 +12,11 @@
# Written by Necoro d.M. <necoro@necoro.net>
# our backend stuff
+
+VERSION = "0.3.1"
+MENU_EMERGE = 1
+MENU_UNEMERGE = 2
+
import geneticone
from geneticone import flags
@@ -249,6 +254,38 @@ class EmergeQueue:
self.tree.remove(it)
+class AboutWindow:
+
+ def __init__ (self, parent):
+ # window
+ self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
+ self.window.set_title("About Genetic/One")
+ self.window.set_modal(True)
+ self.window.set_transient_for(parent)
+ self.window.set_destroy_with_parent(True)
+ self.window.set_resizable(False)
+ self.window.set_default_size(1,1)
+
+ box = gtk.VBox(False)
+ self.window.add(box)
+
+ label = gtk.Label()
+ label.set_justify(gtk.JUSTIFY_CENTER)
+ label.set_markup("""
+<big><b>Genetic/One v.%s</b></big>
+A Portage-GUI
+
+This software is licensed under the terms of the GPLv2.
+Copyright (C) 2006 Necoro d.M. &lt;necoro@necoro.net&gt;
+""" % VERSION)
+ box.pack_start(label)
+
+ okBtn = gtk.Button("OK")
+ okBtn.connect("clicked", lambda x: self.window.destroy())
+ box.pack_start(okBtn)
+
+ self.window.show_all()
+
class PackageWindow:
"""A window with data about a specfic package."""
@@ -655,10 +692,10 @@ class MainWindow:
( "/_File", None, None, 0, "<Branch>"),
( "/File/_Close", None, self.cb_destroy, 0, ""),
( "/_Emerge", None, None, 0, "<Branch>"),
- ( "/Emerge/_Emerge", None, self.cb_emerge_clicked, 0, ""),
- ( "/Emerge/_Unmerge", None, self.cb_emerge_clicked, 0, ""),
+ ( "/Emerge/_Emerge", None, self.cb_emerge_clicked, MENU_EMERGE, ""),
+ ( "/Emerge/_Unmerge", None, self.cb_emerge_clicked, MENU_UNEMERGE, ""),
( "/_?", None, None, 0, "<Branch>"),
- ( "/?/_About", None, None, 0, "")
+ ( "/?/_About", None, lambda x,y: AboutWindow(self.window), 0, "")
]
self.itemFactory = gtk.ItemFactory(gtk.MenuBar, "<main>", None)
self.itemFactory.create_items(mainMenuDesc)
@@ -768,7 +805,8 @@ class MainWindow:
def cb_emerge_clicked (self, button, data = None):
"""Do emerge or unemerge."""
- if button == self.emergeBtn:
+ print 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,
"You have changed use flags. Genetic/One will write these changes into the appropriate files. Please backup them if you think it is necessairy.")
@@ -776,7 +814,7 @@ class MainWindow:
hintMB.destroy()
flags.write_use_flags()
self.queue.emerge(force=True)
- elif button == self.unmergeBtn:
+ elif button == self.unmergeBtn or button == MENU_UNEMERGE:
self.queue.unmerge(force=True)
return True
ato.git/commit/portato/gui/gtk/glade/portato.glade?h=v0.13&id=d572410a8899f9be35274db073eed6fa3037c93c&follow=1'>moved *.glade and *.ui to one directory to omit the change of the config.py e...necoro1-1340/+0 2007-04-24added dialogs to warn you when the queue is running on quitting portatonecoro8-214/+267 2007-04-20Made qt plugin-ready; lots of documentationnecoro15-81/+351 2007-04-18nomsgnecoro1-1/+0 2007-04-18finished Qt-Frontendnecoro5-15/+117 2007-04-17marking installed packages in pkglistnecoro5-14/+50 2007-04-16added ebuild window for Qt-Frontendnecoro4-2/+229 2007-04-16added preferences for Qt-Frontendnecoro9-279/+710 2007-04-13Improved masking display and made most of the Qt-Frontend worknecoro7-35/+334 2007-04-10Some more functionality for the Qt-Frontend (complete emerge)necoro8-217/+347 2007-04-07Some more functionality for the Qt-Frontendnecoro11-88/+463 2007-04-07Added Qt-Terminalnecoro4-4/+213 2007-04-06First qt draftnecoro6-1/+796 2007-04-04showed masked packages unmasked by the user similar to stable marked testing ...necoro5-13/+40 2007-03-31changed changelognecoro1-1/+2 2007-03-31Some small changes for etcproposals 1.1necoro1-2/+2 2007-03-31Some small changes for etcproposals 1.1necoro2-3/+3 2007-03-31Some small changes for etcproposals 1.1necoro1-6/+13 2007-03-31Allowed Plugins to have a menunecoro7-201/+315 2007-03-15Added etc-proposals pluginnecoro7-28/+121 2007-03-10Added USE_EXPAND-supportnecoro5-11/+63 2007-03-10Added plugin-data to about-dialognecoro3-197/+264