[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Pkg-xfce-devel] Bug#643292: Bug#643292: Bug#643292: lightdm: empty shutdown menu



 affects lightdm
 done

On ven., 2011-09-30 at 00:45 +0400, Dmitry Kurochkin wrote:
> > Please investigate, I didn't see any related issue here, so it looks
> > like something on your part. So if you manage to reproduce, feel
> free to
> > add more info, but for now there's not much we can do.
> > 
> 
> Not sure what you mean by "there's not much we can do".

You're the one reporting the bug, we never experienced it, so we can
speculate but in the end it helps if you're able to tell us the exact
situation.
> 
> I confirm that the power menu is empty if there is no PolicyKit
> installed (policykit-1 package).

Ok, good to know.

>   Moreover, it is empty in both GTK and
> QT greeter which is no surprise since they use the same dbus calls to
> determine which power functions are available.  I think policykit-1
> should be added to Recommends for lightdm-gtk-greeter and
> lightdm-qt-greeter (but not to lightdm package itself).

Yeah, I guess so.
> 
> Looking at the source code, GTK greeter disables menu items in main()
> from greeters/gtk/lightdm-gtk-greeter.c:
> 
>     if (!lightdm_get_can_suspend ())
>         gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder,
> "suspend_menuitem")));
>     if (!lightdm_get_can_hibernate ())
>         gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder,
> "hibernate_menuitem")));
>     if (!lightdm_get_can_restart ())
>         gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder,
> "restart_menuitem")));
>     if (!lightdm_get_can_shutdown ())
>         gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder,
> "shutdown_menuitem")));
> 
> As for the QT greeter, the checks are done in Panel constructor from
> greeters/qt/panel.cpp:
> 
>     QAction *shutDownAction = new
> QAction(QIcon::fromTheme("system-shutdown"), "Shutdown", this);
>     connect(shutDownAction, SIGNAL(triggered()), this,
> SLOT(shutdown()));
>     shutDownAction->setEnabled(QLightDM::canShutdown());
>     powerMenu->addAction(shutDownAction);
>     ... and so on ...
> 
> This should be the right places to hide the shutdown menu icon for GTK
> and QT greeter if no actions are available.

Yup, fair enough.
> 
> Could you please forward this info upstream?

I'll try another attempt to use the launchpad mail interface :)

Regards,
-- 
Yves-Alexis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-xfce-devel/attachments/20110929/46a8d0ca/attachment.pgp>



Reply to: