[26418] in Source-Commits
/svn/athena r25556 - trunk/debathena/config/lightdm-config/debian
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Sun Jun 3 17:19:12 2012
Date: Sun, 3 Jun 2012 17:19:11 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201206032119.q53LJBDT027445@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jdreed
Date: 2012-06-03 17:19:10 -0400 (Sun, 03 Jun 2012)
New Revision: 25556
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 kiosk browsing
Modified: trunk/debathena/config/lightdm-config/debian/changelog
===================================================================
--- trunk/debathena/config/lightdm-config/debian/changelog 2012-06-03 20:00:22 UTC (rev 25555)
+++ trunk/debathena/config/lightdm-config/debian/changelog 2012-06-03 21:19:10 UTC (rev 25556)
@@ -1,3 +1,9 @@
+debathena-lightdm-config (1.2) unstable; urgency=low
+
+ * Support kiosk browsing
+
+ -- Jonathan D Reed <jdreed@mit.edu> Sun, 03 Jun 2012 17:14:33 -0400
+
debathena-lightdm-config (1.1) unstable; urgency=low
* Scale the background, since most displays are not 2560x1600
Modified: trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter
===================================================================
--- trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter 2012-06-03 20:00:22 UTC (rev 25555)
+++ trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter 2012-06-03 21:19:10 UTC (rev 25556)
@@ -31,6 +31,7 @@
"/usr/share/debathena-lightdm-config/debathena6.png",
"/usr/share/debathena-lightdm-config/debathena7.png",
"/usr/share/debathena-lightdm-config/debathena8.png"]
+KIOSK_LAUNCH_CMD="/usr/lib/debathena-kiosk/lightdm-launch-kiosk"
class DebathenaGreeter:
animation_loop_frames = 300
@@ -62,6 +63,7 @@
"kpEvent": self.cbKeyPress,
"power_cb": self.showPowerDialog,
"access_cb": self.showAccessDialog,
+ "browse_cb": self.spawnBrowser,
}
# Save the screen size for various window operations
@@ -134,6 +136,9 @@
rw.set_cursor(Gdk.Cursor(Gdk.CursorType.LEFT_PTR))
self.noLoginMonitor = Gio.File.new_for_path(NOLOGIN_FILE).monitor_file(Gio.FileMonitorFlags.NONE, None)
self.noLoginMonitor.connect("changed", self._file_changed)
+
+ if not os.path.exists(KIOSK_LAUNCH_CMD):
+ self.builder.get_object("btnBrowse").hide()
# Setup the login window for first login
self.resetLoginWindow()
@@ -354,6 +359,9 @@
self.message_label.set_text("")
self.message_label.hide()
+ def spawnBrowser(self, event):
+ subprocess.call(KIOSK_LAUNCH_CMD)
+
def errDialog(self, errText):
dlg = Gtk.MessageDialog(self.winLogin,
Gtk.DialogFlags.DESTROY_WITH_PARENT,
Modified: trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ui
===================================================================
--- trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ui 2012-06-03 20:00:22 UTC (rev 25555)
+++ trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ui 2012-06-03 21:19:10 UTC (rev 25556)
@@ -11,6 +11,11 @@
<property name="can_focus">False</property>
<property name="icon_name">preferences-desktop-accessibility</property>
</object>
+ <object class="GtkImage" id="imgBrowse">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">web-browser</property>
+ </object>
<object class="GtkDialog" id="powerDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -529,6 +534,24 @@
</packing>
</child>
<child>
+ <object class="GtkButton" id="btnBrowse">
+ <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="image">imgBrowse</property>
+ <property name="relief">none</property>
+ <property name="image_position">top</property>
+ <signal name="clicked" handler="browse_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkButton" id="btnAccess">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -543,7 +566,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -561,7 +584,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
</object>