[gdm] Obscure the tree view search entry
- From: Ray Strode <halfline src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gdm] Obscure the tree view search entry
- Date: Wed, 4 Nov 2009 02:49:56 +0000 (UTC)
commit 618a0ad9aa0cfa6b36ee064731733803b1685e0c
Author: Ray Strode <rstrode redhat com>
Date: Tue Nov 3 21:49:14 2009 -0500
Obscure the tree view search entry
It's too easy to show passwords on a projector or whatever
right now.
gui/simple-greeter/gdm-chooser-widget.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
index 4fc9ca8..0f6859a 100644
--- a/gui/simple-greeter/gdm-chooser-widget.c
+++ b/gui/simple-greeter/gdm-chooser-widget.c
@@ -1725,6 +1725,26 @@ search_equal_func (GtkTreeModel *model,
}
static void
+search_position_func (GtkTreeView *tree_view,
+ GtkWidget *search_dialog,
+ gpointer user_data)
+{
+ /* Move it outside the region viewable by
+ * the user.
+ * FIXME: This is pretty inelegant.
+ *
+ * It might be nicer to make a GdmOffscreenBin
+ * widget that we pack into the chooser widget below
+ * the frame but gets redirected offscreen.
+ *
+ * Then we would add a GtkEntry to the bin and set
+ * that entry as the search entry for the tree view
+ * instead of using a search position func.
+ */
+ gtk_window_move (GTK_WINDOW (search_dialog), -24000, -24000);
+}
+
+static void
on_selection_changed (GtkTreeSelection *selection,
GdmChooserWidget *widget)
{
@@ -1779,6 +1799,11 @@ gdm_chooser_widget_init (GdmChooserWidget *widget)
widget,
NULL);
+ gtk_tree_view_set_search_position_func (GTK_TREE_VIEW (widget->priv->items_view),
+ (GtkTreeViewSearchPositionFunc)search_position_func,
+ widget,
+ NULL);
+
/* hack to make single-click activate work
*/
g_signal_connect_after (widget->priv->items_view,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]