gdm r6457 - in trunk: . gui/simple-greeter
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r6457 - in trunk: . gui/simple-greeter
- Date: Tue, 2 Sep 2008 20:06:22 +0000 (UTC)
Author: mccann
Date: Tue Sep 2 20:06:22 2008
New Revision: 6457
URL: http://svn.gnome.org/viewvc/gdm?rev=6457&view=rev
Log:
2008-09-02 William Jon McCann <jmccann redhat com>
* gui/simple-greeter/gdm-greeter-login-window.c
(gdm_greeter_login_window_request_timed_login):
* gui/simple-greeter/gdm-user-chooser-dialog.c
(gdm_user_chooser_dialog_set_show_user_other),
(gdm_user_chooser_dialog_set_show_user_guest),
(gdm_user_chooser_dialog_set_show_user_auto):
* gui/simple-greeter/gdm-user-chooser-dialog.h:
* gui/simple-greeter/gdm-user-chooser-widget.c
(gdm_user_chooser_widget_set_show_user_other),
(gdm_user_chooser_widget_set_show_user_guest),
(gdm_user_chooser_widget_set_show_user_auto),
(gdm_user_chooser_widget_set_property),
(gdm_user_chooser_widget_get_property), (load_users),
(gdm_user_chooser_widget_class_init):
* gui/simple-greeter/gdm-user-chooser-widget.h:
* gui/simple-greeter/test-user-chooser.c (main):
Make set-show-user* into construct properties.
Modified:
trunk/ChangeLog
trunk/gui/simple-greeter/gdm-greeter-login-window.c
trunk/gui/simple-greeter/gdm-user-chooser-dialog.c
trunk/gui/simple-greeter/gdm-user-chooser-dialog.h
trunk/gui/simple-greeter/gdm-user-chooser-widget.c
trunk/gui/simple-greeter/gdm-user-chooser-widget.h
trunk/gui/simple-greeter/test-user-chooser.c
Modified: trunk/gui/simple-greeter/gdm-greeter-login-window.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-greeter-login-window.c (original)
+++ trunk/gui/simple-greeter/gdm-greeter-login-window.c Tue Sep 2 20:06:22 2008
@@ -837,7 +837,7 @@
if (login_window->priv->dialog_mode != MODE_SELECTION) {
reset_dialog (login_window);
}
- gdm_user_chooser_widget_set_show_auto_user (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), TRUE);
+ gdm_user_chooser_widget_set_show_user_auto (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), TRUE);
if (!timed_login_already_enabled) {
gdm_user_chooser_widget_set_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser),
Modified: trunk/gui/simple-greeter/gdm-user-chooser-dialog.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-user-chooser-dialog.c (original)
+++ trunk/gui/simple-greeter/gdm-user-chooser-dialog.c Tue Sep 2 20:06:22 2008
@@ -63,30 +63,30 @@
}
void
-gdm_user_chooser_dialog_set_show_other_user (GdmUserChooserDialog *dialog,
+gdm_user_chooser_dialog_set_show_user_other (GdmUserChooserDialog *dialog,
gboolean show_user)
{
g_return_if_fail (GDM_IS_USER_CHOOSER_DIALOG (dialog));
- gdm_user_chooser_widget_set_show_other_user (GDM_USER_CHOOSER_WIDGET (dialog->priv->chooser_widget), show_user);
+ gdm_user_chooser_widget_set_show_user_other (GDM_USER_CHOOSER_WIDGET (dialog->priv->chooser_widget), show_user);
}
void
-gdm_user_chooser_dialog_set_show_guest_user (GdmUserChooserDialog *dialog,
+gdm_user_chooser_dialog_set_show_user_guest (GdmUserChooserDialog *dialog,
gboolean show_user)
{
g_return_if_fail (GDM_IS_USER_CHOOSER_DIALOG (dialog));
- gdm_user_chooser_widget_set_show_guest_user (GDM_USER_CHOOSER_WIDGET (dialog->priv->chooser_widget), show_user);
+ gdm_user_chooser_widget_set_show_user_guest (GDM_USER_CHOOSER_WIDGET (dialog->priv->chooser_widget), show_user);
}
void
-gdm_user_chooser_dialog_set_show_auto_user (GdmUserChooserDialog *dialog,
+gdm_user_chooser_dialog_set_show_user_auto (GdmUserChooserDialog *dialog,
gboolean show_user)
{
g_return_if_fail (GDM_IS_USER_CHOOSER_DIALOG (dialog));
- gdm_user_chooser_widget_set_show_auto_user (GDM_USER_CHOOSER_WIDGET (dialog->priv->chooser_widget), show_user);
+ gdm_user_chooser_widget_set_show_user_auto (GDM_USER_CHOOSER_WIDGET (dialog->priv->chooser_widget), show_user);
}
static void
Modified: trunk/gui/simple-greeter/gdm-user-chooser-dialog.h
==============================================================================
--- trunk/gui/simple-greeter/gdm-user-chooser-dialog.h (original)
+++ trunk/gui/simple-greeter/gdm-user-chooser-dialog.h Tue Sep 2 20:06:22 2008
@@ -53,9 +53,9 @@
char * gdm_user_chooser_dialog_get_chosen_user_name (GdmUserChooserDialog *dialog);
void gdm_user_chooser_dialog_set_show_other_user (GdmUserChooserDialog *dialog,
gboolean show);
-void gdm_user_chooser_dialog_set_show_guest_user (GdmUserChooserDialog *dialog,
+void gdm_user_chooser_dialog_set_show_user_guest (GdmUserChooserDialog *dialog,
gboolean show);
-void gdm_user_chooser_dialog_set_show_auto_user (GdmUserChooserDialog *dialog,
+void gdm_user_chooser_dialog_set_show_user_auto (GdmUserChooserDialog *dialog,
gboolean show);
G_END_DECLS
Modified: trunk/gui/simple-greeter/gdm-user-chooser-widget.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-user-chooser-widget.c (original)
+++ trunk/gui/simple-greeter/gdm-user-chooser-widget.c Tue Sep 2 20:06:22 2008
@@ -62,9 +62,9 @@
GdkPixbuf *stock_person_pixbuf;
guint loaded : 1;
- guint show_other_user : 1;
- guint show_guest_user : 1;
- guint show_auto_user : 1;
+ guint show_user_other : 1;
+ guint show_user_guest : 1;
+ guint show_user_auto : 1;
guint show_normal_users : 1;
guint load_idle_id;
@@ -72,6 +72,9 @@
enum {
PROP_0,
+ PROP_SHOW_USER_GUEST,
+ PROP_SHOW_USER_AUTO,
+ PROP_SHOW_USER_OTHER,
};
static void gdm_user_chooser_widget_class_init (GdmUserChooserWidgetClass *klass);
@@ -141,13 +144,13 @@
}
void
-gdm_user_chooser_widget_set_show_other_user (GdmUserChooserWidget *widget,
+gdm_user_chooser_widget_set_show_user_other (GdmUserChooserWidget *widget,
gboolean show_user)
{
g_return_if_fail (GDM_IS_USER_CHOOSER_WIDGET (widget));
- if (widget->priv->show_other_user != show_user) {
- widget->priv->show_other_user = show_user;
+ if (widget->priv->show_user_other != show_user) {
+ widget->priv->show_user_other = show_user;
if (show_user) {
add_user_other (widget);
} else {
@@ -157,13 +160,13 @@
}
void
-gdm_user_chooser_widget_set_show_guest_user (GdmUserChooserWidget *widget,
+gdm_user_chooser_widget_set_show_user_guest (GdmUserChooserWidget *widget,
gboolean show_user)
{
g_return_if_fail (GDM_IS_USER_CHOOSER_WIDGET (widget));
- if (widget->priv->show_guest_user != show_user) {
- widget->priv->show_guest_user = show_user;
+ if (widget->priv->show_user_guest != show_user) {
+ widget->priv->show_user_guest = show_user;
if (show_user) {
add_user_guest (widget);
} else {
@@ -173,13 +176,13 @@
}
void
-gdm_user_chooser_widget_set_show_auto_user (GdmUserChooserWidget *widget,
+gdm_user_chooser_widget_set_show_user_auto (GdmUserChooserWidget *widget,
gboolean show_user)
{
g_return_if_fail (GDM_IS_USER_CHOOSER_WIDGET (widget));
- if (widget->priv->show_auto_user != show_user) {
- widget->priv->show_auto_user = show_user;
+ if (widget->priv->show_user_auto != show_user) {
+ widget->priv->show_user_auto = show_user;
if (show_user) {
add_user_auto (widget);
} else {
@@ -220,7 +223,20 @@
const GValue *value,
GParamSpec *pspec)
{
+ GdmUserChooserWidget *self;
+
+ self = GDM_USER_CHOOSER_WIDGET (object);
+
switch (prop_id) {
+ case PROP_SHOW_USER_AUTO:
+ gdm_user_chooser_widget_set_show_user_auto (self, g_value_get_boolean (value));
+ break;
+ case PROP_SHOW_USER_GUEST:
+ gdm_user_chooser_widget_set_show_user_guest (self, g_value_get_boolean (value));
+ break;
+ case PROP_SHOW_USER_OTHER:
+ gdm_user_chooser_widget_set_show_user_other (self, g_value_get_boolean (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -233,7 +249,20 @@
GValue *value,
GParamSpec *pspec)
{
+ GdmUserChooserWidget *self;
+
+ self = GDM_USER_CHOOSER_WIDGET (object);
+
switch (prop_id) {
+ case PROP_SHOW_USER_AUTO:
+ g_value_set_boolean (value, self->priv->show_user_auto);
+ break;
+ case PROP_SHOW_USER_GUEST:
+ g_value_set_boolean (value, self->priv->show_user_guest);
+ break;
+ case PROP_SHOW_USER_OTHER:
+ g_value_set_boolean (value, self->priv->show_user_other);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -393,11 +422,6 @@
load_users (GdmUserChooserWidget *widget)
{
- /* FIXME: make these construct properties */
- gdm_user_chooser_widget_set_show_guest_user (widget, FALSE);
- gdm_user_chooser_widget_set_show_auto_user (widget, FALSE);
- gdm_user_chooser_widget_set_show_other_user (widget, TRUE);
-
if (widget->priv->show_normal_users) {
widget->priv->manager = gdm_user_manager_ref_default ();
g_signal_connect (widget->priv->manager,
@@ -483,6 +507,29 @@
object_class->dispose = gdm_user_chooser_widget_dispose;
object_class->finalize = gdm_user_chooser_widget_finalize;
+
+ g_object_class_install_property (object_class,
+ PROP_SHOW_USER_AUTO,
+ g_param_spec_boolean ("show-user-auto",
+ "show user auto",
+ "show user auto",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ g_object_class_install_property (object_class,
+ PROP_SHOW_USER_GUEST,
+ g_param_spec_boolean ("show-user-guest",
+ "show user guest",
+ "show user guest",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ g_object_class_install_property (object_class,
+ PROP_SHOW_USER_OTHER,
+ g_param_spec_boolean ("show-user-other",
+ "show user other",
+ "show user other",
+ TRUE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
g_type_class_add_private (klass, sizeof (GdmUserChooserWidgetPrivate));
}
Modified: trunk/gui/simple-greeter/gdm-user-chooser-widget.h
==============================================================================
--- trunk/gui/simple-greeter/gdm-user-chooser-widget.h (original)
+++ trunk/gui/simple-greeter/gdm-user-chooser-widget.h Tue Sep 2 20:06:22 2008
@@ -59,11 +59,11 @@
const char *user_name);
void gdm_user_chooser_widget_set_show_only_chosen (GdmUserChooserWidget *widget,
gboolean show_only);
-void gdm_user_chooser_widget_set_show_other_user (GdmUserChooserWidget *widget,
+void gdm_user_chooser_widget_set_show_user_other (GdmUserChooserWidget *widget,
gboolean show);
-void gdm_user_chooser_widget_set_show_guest_user (GdmUserChooserWidget *widget,
+void gdm_user_chooser_widget_set_show_user_guest (GdmUserChooserWidget *widget,
gboolean show);
-void gdm_user_chooser_widget_set_show_auto_user (GdmUserChooserWidget *widget,
+void gdm_user_chooser_widget_set_show_user_auto (GdmUserChooserWidget *widget,
gboolean show);
G_END_DECLS
Modified: trunk/gui/simple-greeter/test-user-chooser.c
==============================================================================
--- trunk/gui/simple-greeter/test-user-chooser.c (original)
+++ trunk/gui/simple-greeter/test-user-chooser.c Tue Sep 2 20:06:22 2008
@@ -47,8 +47,8 @@
dialog = gdm_user_chooser_dialog_new ();
/*gtk_widget_set_size_request (dialog, 480, 128);*/
- gdm_user_chooser_dialog_set_show_guest_user (GDM_USER_CHOOSER_DIALOG (dialog), TRUE);
- gdm_user_chooser_dialog_set_show_auto_user (GDM_USER_CHOOSER_DIALOG (dialog), TRUE);
+ gdm_user_chooser_dialog_set_show_user_guest (GDM_USER_CHOOSER_DIALOG (dialog), TRUE);
+ gdm_user_chooser_dialog_set_show_user_auto (GDM_USER_CHOOSER_DIALOG (dialog), TRUE);
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
char *name;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]