gdm r6392 - in trunk: . gui/simple-greeter
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r6392 - in trunk: . gui/simple-greeter
- Date: Tue, 19 Aug 2008 18:20:43 +0000 (UTC)
Author: mccann
Date: Tue Aug 19 18:20:43 2008
New Revision: 6392
URL: http://svn.gnome.org/viewvc/gdm?rev=6392&view=rev
Log:
2008-08-19 William Jon McCann <jmccann redhat com>
* gui/simple-greeter/gdm-chooser-widget.c (activate_if_one_item),
(gdm_chooser_widget_set_active_item),
(gdm_chooser_widget_set_activate_on_one_item):
* gui/simple-greeter/gdm-chooser-widget.h:
* gui/simple-greeter/gdm-user-chooser-widget.c (on_users_loaded),
(gdm_user_chooser_widget_constructor):
Rename to gdm_chooser_widget_set_activate_on_one_item to make it
clear that it is basically a property. Set the property before
adding items.
Modified:
trunk/ChangeLog
trunk/gui/simple-greeter/gdm-chooser-widget.c
trunk/gui/simple-greeter/gdm-chooser-widget.h
trunk/gui/simple-greeter/gdm-user-chooser-widget.c
Modified: trunk/gui/simple-greeter/gdm-chooser-widget.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-chooser-widget.c (original)
+++ trunk/gui/simple-greeter/gdm-chooser-widget.c Tue Aug 19 18:20:43 2008
@@ -598,14 +598,18 @@
{
char *id;
+ g_debug ("GdmChooserWidget: attempting to activate single item");
+
if (gdm_chooser_widget_get_number_of_items (widget) != 1) {
+ g_debug ("GdmChooserWidget: unable to activate single item - has %d items", gdm_chooser_widget_get_number_of_items (widget));
return FALSE;
}
- g_debug ("GdmChooserWidget: activating single item");
id = get_first_item (widget);
- gdm_chooser_widget_set_active_item (widget, id);
- g_free (id);
+ if (id != NULL) {
+ gdm_chooser_widget_set_active_item (widget, id);
+ g_free (id);
+ }
return FALSE;
}
@@ -934,6 +938,8 @@
{
g_return_if_fail (GDM_IS_CHOOSER_WIDGET (widget));
+ g_debug ("GdmChooserWidget: setting active item '%s'", id);
+
if (id != NULL) {
activate_from_item_id (widget, id);
} else {
@@ -2298,8 +2304,8 @@
}
void
-gdm_chooser_widget_activate_on_one_item (GdmChooserWidget *widget,
- gboolean should_activate)
+gdm_chooser_widget_set_activate_on_one_item (GdmChooserWidget *widget,
+ gboolean should_activate)
{
widget->priv->activate_on_one_item = should_activate;
Modified: trunk/gui/simple-greeter/gdm-chooser-widget.h
==============================================================================
--- trunk/gui/simple-greeter/gdm-chooser-widget.h (original)
+++ trunk/gui/simple-greeter/gdm-chooser-widget.h Tue Aug 19 18:20:43 2008
@@ -65,71 +65,71 @@
gboolean *is_separate,
gpointer data);
-GType gdm_chooser_widget_get_type (void);
-GtkWidget * gdm_chooser_widget_new (const char *unactive_label,
- const char *active_label);
-
-void gdm_chooser_widget_add_item (GdmChooserWidget *widget,
- const char *id,
- GdkPixbuf *image,
- const char *name,
- const char *comment,
- gulong priority,
- gboolean is_in_use,
- gboolean keep_separate);
-
-void gdm_chooser_widget_update_foreach_item (GdmChooserWidget *widget,
- GdmChooserUpdateForeachFunc cb,
- gpointer data);
-
-void gdm_chooser_widget_update_item (GdmChooserWidget *widget,
- const char *id,
- GdkPixbuf *new_image,
- const char *new_name,
- const char *new_comment,
- gulong priority,
- gboolean new_in_use,
- gboolean new_is_separate);
-
-void gdm_chooser_widget_remove_item (GdmChooserWidget *widget,
- const char *id);
-
-gboolean gdm_chooser_widget_lookup_item (GdmChooserWidget *widget,
- const char *id,
- GdkPixbuf **image,
- char **name,
- char **comment,
- gulong *priority,
- gboolean *is_in_use,
- gboolean *is_separate);
-
-char * gdm_chooser_widget_get_active_item (GdmChooserWidget *widget);
-void gdm_chooser_widget_set_active_item (GdmChooserWidget *widget,
- const char *item);
-
-void gdm_chooser_widget_set_item_in_use (GdmChooserWidget *widget,
- const char *id,
- gboolean is_in_use);
-void gdm_chooser_widget_set_item_priority (GdmChooserWidget *widget,
- const char *id,
- gulong priority);
-void gdm_chooser_widget_set_item_timer (GdmChooserWidget *widget,
- const char *id,
- gulong timeout);
-void gdm_chooser_widget_set_in_use_message (GdmChooserWidget *widget,
- const char *message);
-
-void gdm_chooser_widget_set_separator_position (GdmChooserWidget *widget,
- GdmChooserWidgetPosition position);
-void gdm_chooser_widget_set_hide_inactive_items (GdmChooserWidget *widget,
- gboolean should_hide);
-
-void gdm_chooser_widget_activate_selected_item (GdmChooserWidget *widget);
-
-int gdm_chooser_widget_get_number_of_items (GdmChooserWidget *widget);
-void gdm_chooser_widget_activate_on_one_item (GdmChooserWidget *widget,
- gboolean should_activate);
-void gdm_chooser_widget_propagate_pending_key_events (GdmChooserWidget *widget);
+GType gdm_chooser_widget_get_type (void);
+GtkWidget * gdm_chooser_widget_new (const char *unactive_label,
+ const char *active_label);
+
+void gdm_chooser_widget_add_item (GdmChooserWidget *widget,
+ const char *id,
+ GdkPixbuf *image,
+ const char *name,
+ const char *comment,
+ gulong priority,
+ gboolean is_in_use,
+ gboolean keep_separate);
+
+void gdm_chooser_widget_update_foreach_item (GdmChooserWidget *widget,
+ GdmChooserUpdateForeachFunc cb,
+ gpointer data);
+
+void gdm_chooser_widget_update_item (GdmChooserWidget *widget,
+ const char *id,
+ GdkPixbuf *new_image,
+ const char *new_name,
+ const char *new_comment,
+ gulong priority,
+ gboolean new_in_use,
+ gboolean new_is_separate);
+
+void gdm_chooser_widget_remove_item (GdmChooserWidget *widget,
+ const char *id);
+
+gboolean gdm_chooser_widget_lookup_item (GdmChooserWidget *widget,
+ const char *id,
+ GdkPixbuf **image,
+ char **name,
+ char **comment,
+ gulong *priority,
+ gboolean *is_in_use,
+ gboolean *is_separate);
+
+char * gdm_chooser_widget_get_active_item (GdmChooserWidget *widget);
+void gdm_chooser_widget_set_active_item (GdmChooserWidget *widget,
+ const char *item);
+
+void gdm_chooser_widget_set_item_in_use (GdmChooserWidget *widget,
+ const char *id,
+ gboolean is_in_use);
+void gdm_chooser_widget_set_item_priority (GdmChooserWidget *widget,
+ const char *id,
+ gulong priority);
+void gdm_chooser_widget_set_item_timer (GdmChooserWidget *widget,
+ const char *id,
+ gulong timeout);
+void gdm_chooser_widget_set_in_use_message (GdmChooserWidget *widget,
+ const char *message);
+
+void gdm_chooser_widget_set_separator_position (GdmChooserWidget *widget,
+ GdmChooserWidgetPosition position);
+void gdm_chooser_widget_set_hide_inactive_items (GdmChooserWidget *widget,
+ gboolean should_hide);
+
+void gdm_chooser_widget_activate_selected_item (GdmChooserWidget *widget);
+
+int gdm_chooser_widget_get_number_of_items (GdmChooserWidget *widget);
+void gdm_chooser_widget_set_activate_on_one_item (GdmChooserWidget *widget,
+ gboolean should_activate);
+void gdm_chooser_widget_propagate_pending_key_events (GdmChooserWidget *widget);
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 Aug 19 18:20:43 2008
@@ -383,8 +383,8 @@
}
gtk_widget_grab_focus (GTK_WIDGET (widget));
- gdm_chooser_widget_activate_on_one_item (GDM_CHOOSER_WIDGET (widget),
- TRUE);
+ gdm_chooser_widget_set_activate_on_one_item (GDM_CHOOSER_WIDGET (widget),
+ TRUE);
}
static GObject *
@@ -398,11 +398,6 @@
n_construct_properties,
construct_properties));
- /* 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);
-
widget->priv->show_normal_users = !is_user_list_disabled (widget);
if (widget->priv->show_normal_users) {
@@ -428,10 +423,15 @@
G_CALLBACK (on_user_login_frequency_changed),
widget);
} else {
- gdm_chooser_widget_activate_on_one_item (GDM_CHOOSER_WIDGET (widget),
- TRUE);
+ gdm_chooser_widget_set_activate_on_one_item (GDM_CHOOSER_WIDGET (widget),
+ TRUE);
}
+ /* 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);
+
return G_OBJECT (widget);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]