summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2008-04-21 21:08:14 +0000
committerRay Strode <halfline@src.gnome.org>2008-04-21 21:08:14 +0000
commit862dd9d095441d280a4495466fb45fb106db92da (patch)
tree59a4268d313ebfdb908790039e0d78c8592ac6eb /gui
parent126ba7d455a30f28451987db70565da3d1dab8ce (diff)
downloadgdm-862dd9d095441d280a4495466fb45fb106db92da.tar.gz
Don't unconditionally show separator when showing all other inactive items
2008-04-21 Ray Strode <rstrode@redhat.com> * gui/simple-greeter/gdm-chooser-widget.c (set_inactive_items_visible): Don't unconditionally show separator when showing all other inactive items svn path=/trunk/; revision=6166
Diffstat (limited to 'gui')
-rw-r--r--gui/simple-greeter/gdm-chooser-widget.c60
1 files changed, 31 insertions, 29 deletions
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
index c28d4b38..b0f02607 100644
--- a/gui/simple-greeter/gdm-chooser-widget.c
+++ b/gui/simple-greeter/gdm-chooser-widget.c
@@ -415,6 +415,35 @@ on_shrink_animation_step (GdmScrollableWidget *scrollable_widget,
}
static void
+update_separator_visibility (GdmChooserWidget *widget)
+{
+ GtkTreePath *separator_path;
+ GtkTreeIter iter;
+ gboolean is_visible;
+
+ separator_path = gtk_tree_row_reference_get_path (widget->priv->separator_row);
+
+ if (separator_path == NULL) {
+ return;
+ }
+
+ gtk_tree_model_get_iter (GTK_TREE_MODEL (widget->priv->list_store),
+ &iter, separator_path);
+
+ if (widget->priv->number_of_normal_rows > 0 &&
+ widget->priv->number_of_separated_rows > 0) {
+ is_visible = TRUE;
+ } else {
+ is_visible = FALSE;
+ }
+
+ gtk_list_store_set (widget->priv->list_store,
+ &iter,
+ CHOOSER_ITEM_IS_VISIBLE_COLUMN, is_visible,
+ -1);
+}
+
+static void
set_inactive_items_visible (GdmChooserWidget *widget,
gboolean should_show)
{
@@ -463,6 +492,8 @@ set_inactive_items_visible (GdmChooserWidget *widget,
} while (gtk_tree_model_iter_next (model, &iter));
g_free (active_item_id);
+
+ update_separator_visibility (widget);
}
static void
@@ -1383,35 +1414,6 @@ update_column_visibility (GdmChooserWidget *widget)
}
static void
-update_separator_visibility (GdmChooserWidget *widget)
-{
- GtkTreePath *separator_path;
- GtkTreeIter iter;
- gboolean is_visible;
-
- separator_path = gtk_tree_row_reference_get_path (widget->priv->separator_row);
-
- if (separator_path == NULL) {
- return;
- }
-
- gtk_tree_model_get_iter (GTK_TREE_MODEL (widget->priv->list_store),
- &iter, separator_path);
-
- if (widget->priv->number_of_normal_rows > 0 &&
- widget->priv->number_of_separated_rows > 0) {
- is_visible = TRUE;
- } else {
- is_visible = FALSE;
- }
-
- gtk_list_store_set (widget->priv->list_store,
- &iter,
- CHOOSER_ITEM_IS_VISIBLE_COLUMN, is_visible,
- -1);
-}
-
-static void
clear_canceled_visibility_update (GdmChooserWidget *widget)
{
widget->priv->update_idle_id = 0;