[26574] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r25632 - trunk/debathena/config/lightdm-config/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Tue Jul 10 11:05:50 2012

Date: Tue, 10 Jul 2012 11:05:48 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201207101505.q6AF5mUU006414@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2012-07-10 11:05:48 -0400 (Tue, 10 Jul 2012)
New Revision: 25632

Modified:
   trunk/debathena/config/lightdm-config/debian/changelog
   trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter
   trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ui
Log:
In lightdm-config:
  * Support basic accessibility options (read: a High Contrast Theme)
  * For aesthetic reasons (since the windows have no borders), hide the
    login window when displaying a dialog box


Modified: trunk/debathena/config/lightdm-config/debian/changelog
===================================================================
--- trunk/debathena/config/lightdm-config/debian/changelog	2012-07-10 03:35:14 UTC (rev 25631)
+++ trunk/debathena/config/lightdm-config/debian/changelog	2012-07-10 15:05:48 UTC (rev 25632)
@@ -2,8 +2,11 @@
 
   * Be clearer about what a DBus error probably means when initiating a
     restart/shutdown from lightdm
+  * Support basic accessibility options (read: a High Contrast Theme)
+  * For aesthetic reasons (since the windows have no borders), hide the
+    login window when displaying a dialog box
 
- -- Jonathan Reed <jdreed@mit.edu>  Sun, 08 Jul 2012 14:03:47 -0400
+ -- Jonathan Reed <jdreed@mit.edu>  Tue, 10 Jul 2012 11:04:27 -0400
 
 debathena-lightdm-config (1.3) unstable; urgency=low
 

Modified: trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter
===================================================================
--- trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter	2012-07-10 03:35:14 UTC (rev 25631)
+++ trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter	2012-07-10 15:05:48 UTC (rev 25632)
@@ -133,6 +133,8 @@
         self.builder.get_object("rbHibernate").set_sensitive(LightDM.get_can_hibernate() and self.metapackage != "debathena-cluster")
         self.builder.get_object("rbSuspend").set_sensitive(LightDM.get_can_suspend() and self.metapackage != "debathena-cluster")
         
+        self.accessDlg = self.builder.get_object("accessibilityDialog")
+
         self.loginNotebook = self.builder.get_object("notebook1")
 
         # Scaling factor for smaller displays
@@ -148,8 +150,9 @@
         self.builder.connect_signals(handlers)
         # GNOME 3 turns off button images by default.  Turn it on
         # for the "Panel" window
-        s = Gtk.Settings.get_default()
-        s.set_property('gtk-button-images', True)
+        self.gtkSettings = Gtk.Settings.get_default()
+        self.gtkSettings.set_property('gtk-button-images', True)
+        self.origTheme = self.gtkSettings.get_property('gtk-theme-name')
         # Set a cursor for the root window, otherwise there isn't one
         rw = Gdk.get_default_root_window()
         rw.set_cursor(Gdk.Cursor(Gdk.CursorType.LEFT_PTR))
@@ -196,6 +199,7 @@
         winBranding.show_all()
 
     def showPowerDialog(self, widget):
+        self.winLogin.hide()
         if self.powerDlg.run() == Gtk.ResponseType.OK:
             # Just do the action.  The relevant buttons should be
             # greyed out for things we can't do.  LightDM will
@@ -212,10 +216,19 @@
             except GLib.GError, e:
                 self.errDialog("An error occurred while trying to perform a power-related operation.  The most common cause of this is trying to shutdown, reboot, or suspend the machine when someone else is logged in remotely or on one of the virtual terminals.  The full error text appears below:\n\n" + str(e))
         self.powerDlg.hide()
+        self.winLogin.show()
 
     def showAccessDialog(self, widget):
-        pass
+        self.winLogin.hide()
+        if self.accessDlg.run() == Gtk.ResponseType.OK:
+            if self.builder.get_object("cbHighContrast").get_active():
+                self.gtkSettings.set_property('gtk-theme-name', 'HighContrastInverse')
+            else:
+                self.gtkSettings.set_property('gtk-theme-name', self.origTheme)
+        self.accessDlg.hide()
+        self.winLogin.show()
 
+
     def _file_changed(self, monitor, file1, file2, evt_type):
         if evt_type == Gio.FileMonitorEvent.CREATED:
             self.loginNotebook.set_current_page(1)

Modified: trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ui
===================================================================
--- trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ui	2012-07-10 03:35:14 UTC (rev 25631)
+++ trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ui	2012-07-10 15:05:48 UTC (rev 25632)
@@ -1,10 +1,134 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkImage" id="imgPower">
-    <property name="visible">True</property>
+  <object class="GtkDialog" id="accessibilityDialog">
     <property name="can_focus">False</property>
-    <property name="stock">gtk-quit</property>
+    <property name="border_width">5</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox2">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area2">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button3">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button1">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="GtkBox" id="box5">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">3</property>
+                <property name="margin_right">3</property>
+                <property name="margin_top">3</property>
+                <property name="margin_bottom">3</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">3</property>
+                <child>
+                  <object class="GtkCheckButton" id="cbHighContrast">
+                    <property name="label" translatable="yes">High Contrast Theme</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="cbPickboard">
+                    <property name="label" translatable="yes">On-Screen Keyboard</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="sensitive">False</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes"> &lt;b&gt;Accessibility Options&lt;/b&gt; </property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-6">button3</action-widget>
+      <action-widget response="-5">button1</action-widget>
+    </action-widgets>
   </object>
   <object class="GtkImage" id="imgAccess">
     <property name="visible">True</property>
@@ -16,6 +140,11 @@
     <property name="can_focus">False</property>
     <property name="icon_name">web-browser</property>
   </object>
+  <object class="GtkImage" id="imgPower">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-quit</property>
+  </object>
   <object class="GtkDialog" id="powerDialog">
     <property name="can_focus">False</property>
     <property name="border_width">5</property>


home help back first fref pref prev next nref lref last post