[26378] in Source-Commits

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

Re: /svn/athena r25539 -

daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Thu May 31 19:38:05 2012

Date: Thu, 31 May 2012 19:38:01 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201205310304.q4V344G6001629@drugstore.mit.edu>
Message-ID: <alpine.GSO.1.10.1205311935330.18441@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII

On Wed, 30 May 2012, Jonathan D Reed wrote:

> Author: jdreed
> Date: 2012-05-30 23:04:04 -0400 (Wed, 30 May 2012)
> New Revision: 25539
>
> 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:
>  * Scale the background, since most displays are not 2560x1600
>  * Bump the scaling factor on the owl, the previous values were when we
>    were in an additional window and could obscure the greeter
>  * Disallow logins when we're taking an update

Does changing the current "page" really keep the user from doing 
anything/switching to page 0?
I would worry a little bit about missed notifications, but we can probably 
run with this and see if it breaks.
Otherwise, looks okay; ACK.

-Ben

>
>
> Modified: trunk/debathena/config/lightdm-config/debian/changelog
> ===================================================================
> --- trunk/debathena/config/lightdm-config/debian/changelog	2012-05-30 21:44:13 UTC (rev 25538)
> +++ trunk/debathena/config/lightdm-config/debian/changelog	2012-05-31 03:04:04 UTC (rev 25539)
> @@ -1,3 +1,12 @@
> +debathena-lightdm-config (1.1) unstable; urgency=low
> +
> +  * Scale the background, since most displays are not 2560x1600
> +  * Bump the scaling factor on the owl, the previous values were when we
> +    were in an additional window and could obscure the greeter
> +  * Disallow logins when we're taking an update
> +
> + -- Jonathan Reed <jdreed@mit.edu>  Wed, 30 May 2012 19:25:59 -0400
> +
> debathena-lightdm-config (1.0) unstable; urgency=low
>
>   * Initial release.
>
> Modified: trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter
> ===================================================================
> --- trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter	2012-05-30 21:44:13 UTC (rev 25538)
> +++ trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter	2012-05-31 03:04:04 UTC (rev 25539)
> @@ -3,6 +3,7 @@
>
> from gi.repository import GObject
> from gi.repository import GLib
> +from gi.repository import Gio
> from gi.repository import Gtk
> from gi.repository import Gdk
> from gi.repository import GdkPixbuf
> @@ -18,6 +19,7 @@
>
> # TODO: ConfigParser
> MIN_UID=1
> +NOLOGIN_FILE="/var/run/athena-nologin"
> UI_FILE="/usr/share/debathena-lightdm-config/debathena-lightdm-greeter.ui"
> BG_IMG_FILE="/usr/share/debathena-lightdm-config/background.jpg"
> DEBATHENA_LOGO_FILES=["/usr/share/debathena-lightdm-config/debathena.png",
> @@ -110,8 +112,10 @@
>         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.loginNotebook = self.builder.get_object("notebook1")
> +
>         # Scaling factor for smaller displays
> -        logoScale = 0.40 if self.screenSize[1] <= 768 else 0.60
> +        logoScale = 0.75 if self.screenSize[1] <= 768 else 1.0
>         self.animate = self.setup_owl(logoScale)
>
>         self.winLogin.set_position(Gtk.WindowPosition.CENTER)
> @@ -128,6 +132,8 @@
>         # 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))
> +        self.noLoginMonitor = Gio.File.new_for_path(NOLOGIN_FILE).monitor_file(Gio.FileMonitorFlags.NONE, None)
> +        self.noLoginMonitor.connect("changed", self._file_changed)
>         # Setup the login window for first login
>         self.resetLoginWindow()
>
> @@ -135,7 +141,9 @@
>         # The background image
>         self.winBg = self.builder.get_object("winBg")
>         self.imgBg = self.builder.get_object("imgBg")
> -        self.imgBg.set_from_file(BG_IMG_FILE)
> +        bg_pixbuf = GdkPixbuf.Pixbuf.new_from_file(BG_IMG_FILE)
> +        bg_scaled = bg_pixbuf.scale_simple(self.screenSize[0], self.screenSize[1], GdkPixbuf.InterpType.BILINEAR)
> +        self.imgBg.set_from_pixbuf(bg_scaled)
>         self.winBg.show_all()
>
>     def initPanelWindow(self):
> @@ -184,6 +192,13 @@
>     def showAccessDialog(self, widget):
>         pass
>
> +    def _file_changed(self, monitor, file1, file2, evt_type):
> +        if evt_type == Gio.FileMonitorEvent.CREATED:
> +            self.loginNotebook.set_current_page(1)
> +            self.builder.get_object("lblUpdTime").set_text("Update started at %s" % (time.strftime("%Y-%m-%d %H:%M")))
> +        if evt_type == Gio.FileMonitorEvent.DELETED:
> +            self.loginNotebook.set_current_page(0)
> +
>     # Update the time in the "panel"
>     def updateTime(self):
>         timeFmt="%a, %b %e %Y %l:%M" + ":%S" if self.timePedantry else ""
>
> Modified: trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ui
> ===================================================================
> --- trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ui	2012-05-30 21:44:13 UTC (rev 25538)
> +++ trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ui	2012-05-31 03:04:04 UTC (rev 25539)
> @@ -447,6 +447,50 @@
>             </child>
>           </object>
>         </child>
> +        <child>
> +          <object class="GtkBox" id="box11">
> +            <property name="visible">True</property>
> +            <property name="can_focus">False</property>
> +            <property name="border_width">12</property>
> +            <property name="orientation">vertical</property>
> +            <property name="spacing">6</property>
> +            <child>
> +              <object class="GtkLabel" id="label12">
> +                <property name="visible">True</property>
> +                <property name="can_focus">False</property>
> +                <property name="label" translatable="yes">Software updates are being applied.
> +
> +This workstation is unavailable.
> +
> +Please use another workstation.</property>
> +                <property name="justify">center</property>
> +                <attributes>
> +                  <attribute name="font-desc" value="Sans Bold 16"/>
> +                </attributes>
> +              </object>
> +              <packing>
> +                <property name="expand">True</property>
> +                <property name="fill">True</property>
> +                <property name="position">0</property>
> +              </packing>
> +            </child>
> +            <child>
> +              <object class="GtkLabel" id="lblUpdTime">
> +                <property name="visible">True</property>
> +                <property name="can_focus">False</property>
> +                <property name="label" translatable="yes">&lt;update start time&gt;</property>
> +              </object>
> +              <packing>
> +                <property name="expand">False</property>
> +                <property name="fill">True</property>
> +                <property name="position">1</property>
> +              </packing>
> +            </child>
> +          </object>
> +          <packing>
> +            <property name="position">1</property>
> +          </packing>
> +        </child>
>         <child type="tab">
>           <placeholder/>
>         </child>
>
>

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