summaryrefslogtreecommitdiff
path: root/gui/simple-greeter
diff options
context:
space:
mode:
authorWilliam Jon McCann <mccann@jhu.edu>2007-10-26 19:08:19 +0000
committerWilliam Jon McCann <mccann@src.gnome.org>2007-10-26 19:08:19 +0000
commit8197eda937852835a9d10f878aee49ffd672cff1 (patch)
tree5491ce9ed1c8a4099c3b95256510d5dea250c23f /gui/simple-greeter
parent3e3737c9950a6abff0dec8a6733cc0d8283ba68a (diff)
downloadgdm-8197eda937852835a9d10f878aee49ffd672cff1.tar.gz
Get rid of notebook. Put auth prompt box in main page. Make visible on
2007-10-26 William Jon McCann <mccann@jhu.edu> * gui/simple-greeter/gdm-greeter-login-window.c: (switch_mode), (do_cancel), (reset_dialog), (on_user_activated), (load_theme), (gdm_greeter_login_window_init): * gui/simple-greeter/gdm-greeter-login-window.glade: Get rid of notebook. Put auth prompt box in main page. Make visible on demand and hope to animate at some point. Also a few spacing tweaks. svn path=/trunk/; revision=5419
Diffstat (limited to 'gui/simple-greeter')
-rw-r--r--gui/simple-greeter/gdm-greeter-login-window.c28
-rw-r--r--gui/simple-greeter/gdm-greeter-login-window.glade144
2 files changed, 59 insertions, 113 deletions
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index 2622e4ba..2b8a6f35 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -55,8 +55,8 @@
#define GDM_GREETER_LOGIN_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_GREETER_LOGIN_WINDOW, GdmGreeterLoginWindowPrivate))
enum {
- PAGE_USERLIST = 0,
- PAGE_AUTH
+ MODE_SELECTION = 0,
+ MODE_AUTHENTICATION
};
struct GdmGreeterLoginWindowPrivate
@@ -172,31 +172,31 @@ show_widget (GdmGreeterLoginWindow *login_window,
}
static void
-switch_page (GdmGreeterLoginWindow *login_window,
+switch_mode (GdmGreeterLoginWindow *login_window,
int number)
{
- GtkWidget *notebook;
+ /* switch mode */
- /* switch page */
- notebook = glade_xml_get_widget (login_window->priv->xml, "notebook");
- gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), number);
+ /* FIXME: do animation */
switch (number) {
- case PAGE_USERLIST:
+ case MODE_SELECTION:
show_widget (login_window, "log-in-button", FALSE);
show_widget (login_window, "cancel-button", FALSE);
show_widget (login_window, "shutdown-button", TRUE);
show_widget (login_window, "restart-button", TRUE);
show_widget (login_window, "suspend-button", TRUE);
show_widget (login_window, "disconnect-button", ! login_window->priv->display_is_local);
+ show_widget (login_window, "auth-input-box", FALSE);
break;
- case PAGE_AUTH:
+ case MODE_AUTHENTICATION:
show_widget (login_window, "log-in-button", TRUE);
show_widget (login_window, "cancel-button", TRUE);
show_widget (login_window, "shutdown-button", FALSE);
show_widget (login_window, "restart-button", FALSE);
show_widget (login_window, "suspend-button", FALSE);
show_widget (login_window, "disconnect-button", FALSE);
+ show_widget (login_window, "auth-input-box", TRUE);
break;
default:
g_assert_not_reached ();
@@ -207,7 +207,7 @@ switch_page (GdmGreeterLoginWindow *login_window,
static void
do_cancel (GdmGreeterLoginWindow *login_window)
{
- switch_page (login_window, PAGE_USERLIST);
+ switch_mode (login_window, MODE_SELECTION);
set_busy (login_window);
set_sensitive (login_window, FALSE);
@@ -233,7 +233,7 @@ reset_dialog (GdmGreeterLoginWindow *login_window)
set_message (login_window, "");
- switch_page (login_window, PAGE_USERLIST);
+ switch_mode (login_window, MODE_SELECTION);
set_sensitive (login_window, TRUE);
set_ready (login_window);
@@ -416,7 +416,7 @@ on_user_activated (GdmUserChooserWidget *user_chooser,
g_signal_emit (login_window, signals[BEGIN_VERIFICATION], 0, user_name);
- switch_page (login_window, PAGE_AUTH);
+ switch_mode (login_window, MODE_AUTHENTICATION);
}
static void
@@ -710,7 +710,7 @@ load_theme (GdmGreeterLoginWindow *login_window)
box = glade_xml_get_widget (login_window->priv->xml, "computer-info-event-box");
g_signal_connect (box, "button-press-event", G_CALLBACK (on_computer_info_label_button_press), login_window);
- switch_page (login_window, PAGE_USERLIST);
+ switch_mode (login_window, MODE_SELECTION);
}
static void
@@ -876,7 +876,7 @@ gdm_greeter_login_window_init (GdmGreeterLoginWindow *login_window)
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (login_window), TRUE);
gtk_window_set_skip_pager_hint (GTK_WINDOW (login_window), TRUE);
gtk_window_stick (GTK_WINDOW (login_window));
- gtk_container_set_border_width (GTK_CONTAINER (login_window), 12);
+ gtk_container_set_border_width (GTK_CONTAINER (login_window), 20);
}
static void
diff --git a/gui/simple-greeter/gdm-greeter-login-window.glade b/gui/simple-greeter/gdm-greeter-login-window.glade
index 32941123..62f2f88d 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.glade
+++ b/gui/simple-greeter/gdm-greeter-login-window.glade
@@ -12,7 +12,7 @@
<widget class="GtkVBox" id="window-box">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="spacing">6</property>
+ <property name="spacing">10</property>
<child>
<widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
@@ -170,136 +170,82 @@
</packing>
</child>
<child>
- <widget class="GtkNotebook" id="notebook">
+ <widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
- <property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_border">0</property>
- <property name="tab_hborder">0</property>
- <property name="tab_vborder">0</property>
+ <property name="top_padding">10</property>
+ <property name="bottom_padding">10</property>
+ <property name="left_padding">10</property>
+ <property name="right_padding">10</property>
<child>
- <widget class="GtkVBox" id="userlist-box">
+ <widget class="GtkVBox" id="selection-box">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">10</property>
<child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">page 1</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- <property name="tab_expand">False</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <child>
- <widget class="GtkVBox" id="vbox3">
+ <widget class="GtkVBox" id="userlist-box">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="spacing">10</property>
<child>
<placeholder/>
</child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="auth-input-box">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">6</property>
<child>
- <widget class="GtkHBox" id="auth-input-box">
+ <widget class="GtkLabel" id="auth-prompt-label">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="auth-prompt-label">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">Prompt:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkEntry" id="auth-prompt-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="activates_default">True</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
+ <property name="label" translatable="yes">Prompt:</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="auth-message-label">
+ <widget class="GtkEntry" id="auth-prompt-entry">
<property name="visible">True</property>
+ <property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="activates_default">True</property>
</widget>
<packing>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
- <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="auth-message-box">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkLabel" id="auth-message-label">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
</widget>
- <packing>
- <property name="position">1</property>
- <property name="tab_expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">page 2</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- <property name="position">1</property>
- <property name="tab_expand">False</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">page 3</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- <property name="position">2</property>
- <property name="tab_expand">False</property>
- <property name="tab_fill">False</property>
- </packing>
</child>
</widget>
<packing>