Re: Request for freeze break: pessulus
- From: "Vincent Untz" <vuntz gnome org>
- To: "Alexander Larsson" <alexl redhat com>
- Cc: release-team gnome org
- Subject: Re: Request for freeze break: pessulus
- Date: Mon, 13 Mar 2006 14:59:23 +0100 (CET)
On Mon, March 13, 2006 14:27, Alexander Larsson wrote:
> On Mon, 2006-03-13 at 13:49 +0100, Vincent Untz wrote:
>> With the current patch, no. I'm attaching a patch that creates a
>> GnomeProgram if none is passed.
>
> That strikes me as very wrong. Either sabayon has a GnomeProgram (and a
> libgnome dependency, which it doesn't have atm), and then it should
> create one itself, or there shouldn't be one at all.
I agree it's wrong and my (bad) excuse is that opening help requires a
valid GnomeProgram, which I find quite silly.
> I'm not sure adding one to sabayon is bad, but there is none atm, and I
> haven't thought about this much. Thus, it would be nice if passing None
> just disabled the stuff that needs it.
Patch #3 does this.
>> Another solution is to simply hide the button when it's in sabayon.
>
> Yeah. Is the docs that is opened by this button interesting for sabayon
> users btw? I.E. is it general or specific to pessulus.
The opened section explains what settings can be locked down and what
they're doing. Right now, it's specific to pessulus I believe (I only
quickly read it this morning).
Vincent
--
Les gens heureux ne sont pas pressés.
? po/stamp-it
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/pessulus/ChangeLog,v
retrieving revision 1.60
diff -u -p -r1.60 ChangeLog
--- ChangeLog 13 Mar 2006 04:44:30 -0000 1.60
+++ ChangeLog 13 Mar 2006 13:56:19 -0000
@@ -1,3 +1,11 @@
+2006-03-13 Vincent Untz <vuntz gnome org>
+
+ * Pessulus/main.py: pass a GnomeProgram to the PessulusMainDialog
+ * Pessulus/maindialog.py: (__init__): hide the help button if no
+ GnomeProgram has been passed in argument
+ (__on_dialog_response): open the pessulus section in the System Admin
+ Guide for help
+
2006-03-13 Runa Bhattacharjee <runa bengalinux org>
* configure.ac: Added "bn" (Bengali) to ALL_LINGUAS.
Index: Pessulus/main.py
===================================================================
RCS file: /cvs/gnome/pessulus/Pessulus/main.py,v
retrieving revision 1.3
diff -u -p -r1.3 main.py
--- Pessulus/main.py 2 Nov 2005 08:29:23 -0000 1.3
+++ Pessulus/main.py 13 Mar 2006 13:56:19 -0000
@@ -29,6 +29,7 @@ def main (args):
import gtk
import gtk.glade
+ import gnome
import maindialog
import lockdownappliergconf
@@ -41,11 +42,13 @@ def main (args):
gettext.install (config.PACKAGE, config.LOCALEDIR)
gtk.glade.bindtextdomain (config.PACKAGE, config.LOCALEDIR)
+ prog = gnome.program_init (config.PACKAGE, config.VERSION)
+
gtk.window_set_default_icon_name ("stock_lock")
applier = lockdownappliergconf.PessulusLockdownApplierGconf ()
- dialog = maindialog.PessulusMainDialog (applier)
+ dialog = maindialog.PessulusMainDialog (applier, gnome_program = prog)
gtk.main ()
Index: Pessulus/maindialog.py
===================================================================
RCS file: /cvs/gnome/pessulus/Pessulus/maindialog.py,v
retrieving revision 1.7
diff -u -p -r1.7 maindialog.py
--- Pessulus/maindialog.py 16 Jan 2006 21:18:49 -0000 1.7
+++ Pessulus/maindialog.py 13 Mar 2006 13:56:19 -0000
@@ -26,6 +26,7 @@ import gettext
import gobject
import gtk
import gtk.glade
+import gnome
from config import *
@@ -68,7 +69,7 @@ lockdownbuttons = (
)
class PessulusMainDialog:
- def __init__ (self, applier, quit_on_close = True):
+ def __init__ (self, applier, quit_on_close = True, gnome_program = None):
globalvar.applier = applier
globalvar.tooltips = gtk.Tooltips ()
@@ -84,7 +85,10 @@ class PessulusMainDialog:
self.__init_disabledapplets ()
self.__init_safeprotocols ()
- self.xml.get_widget ("helpbutton").set_sensitive (False)
+ if gnome_program:
+ self.gnome_program = gnome.program_init (PACKAGE, VERSION)
+ else:
+ self.xml.get_widget ("helpbutton").hide ()
self.window = self.xml.get_widget ("dialogEditor")
self.window.connect ("response", self.__on_dialog_response)
@@ -141,6 +145,10 @@ class PessulusMainDialog:
def __on_dialog_response (self, dialog, response_id):
if dialog == self.window and response_id == gtk.RESPONSE_HELP:
+ gnome.help_display_desktop (self.gnome_program,
+ "system-admin-guide",
+ "system-admin-guide",
+ "lockdown")
return
dialog.hide ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]