gdm r6101 - in trunk: . gui/simple-greeter
- From: halfline svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r6101 - in trunk: . gui/simple-greeter
- Date: Fri, 4 Apr 2008 19:40:54 +0100 (BST)
Author: halfline
Date: Fri Apr 4 19:40:54 2008
New Revision: 6101
URL: http://svn.gnome.org/viewvc/gdm?rev=6101&view=rev
Log:
2008-04-04 Ray Strode <rstrode redhat com>
* gui/simple-greeter/gdm-scrollable-widget.c
(on_animation_tick), (on_animation_stop):
Fix functions to be static
(gdm_scrollable_widget_size_request):
include width of child in size request
* gui/simple-greeter/gdm-chooser-widget.c
(struct GdmChooserWidgetPrivate),
(get_height_of_screen), (start_grow_animation),
(gdm_chooser_widget_class_init),
(gdm_chooser_widget_size_allocate):
When growing, always grow to where we were last time
we were grown
Modified:
trunk/ChangeLog
trunk/gui/simple-greeter/gdm-chooser-widget.c
trunk/gui/simple-greeter/gdm-scrollable-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 Fri Apr 4 19:40:54 2008
@@ -94,6 +94,7 @@
GdmChooserWidgetState state;
double active_row_normalized_position;
+ int height_when_grown;
};
enum {
@@ -559,7 +560,7 @@
screen = gtk_widget_get_screen (GTK_WIDGET (widget));
monitor = gdk_screen_get_monitor_at_window (screen,
- GTK_WIDGET (widget)->window);
+ gdk_screen_get_root_window (screen));
gdk_screen_get_monitor_geometry (screen, monitor, &area);
return area.height;
@@ -581,7 +582,7 @@
set_inactive_items_visible (widget, TRUE);
gdm_scrollable_widget_slide_to_height (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget),
- get_height_of_screen (widget),
+ widget->priv->height_when_grown,
NULL, NULL,
(GdmScrollableWidgetSlideDoneFunc)
on_grow_animation_complete, widget);
@@ -908,6 +909,21 @@
}
static void
+gdm_chooser_widget_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation)
+{
+ GdmChooserWidget *chooser_widget;
+
+ GTK_WIDGET_CLASS (gdm_chooser_widget_parent_class)->size_allocate (widget, allocation);
+
+ chooser_widget = GDM_CHOOSER_WIDGET (widget);
+
+ if (chooser_widget->priv->state == GDM_CHOOSER_WIDGET_STATE_GROWN) {
+ chooser_widget->priv->height_when_grown = allocation->height;
+ }
+}
+
+static void
gdm_chooser_widget_class_init (GdmChooserWidgetClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -919,6 +935,7 @@
object_class->dispose = gdm_chooser_widget_dispose;
object_class->finalize = gdm_chooser_widget_finalize;
widget_class->focus_in_event = gdm_chooser_widget_focus_in;
+ widget_class->size_allocate = gdm_chooser_widget_size_allocate;
widget_class->hide = gdm_chooser_widget_hide;
widget_class->show = gdm_chooser_widget_show;
@@ -1382,6 +1399,8 @@
widget->priv = GDM_CHOOSER_WIDGET_GET_PRIVATE (widget);
+ widget->priv->height_when_grown = get_height_of_screen (widget);
+
gtk_alignment_set_padding (GTK_ALIGNMENT (widget), 0, 0, 0, 0);
add_frame (widget);
Modified: trunk/gui/simple-greeter/gdm-scrollable-widget.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-scrollable-widget.c (original)
+++ trunk/gui/simple-greeter/gdm-scrollable-widget.c Fri Apr 4 19:40:54 2008
@@ -109,7 +109,7 @@
g_slice_free (GdmScrollableWidgetAnimation, animation);
}
-void
+static void
on_animation_tick (GdmScrollableWidgetAnimation *animation,
double progress)
{
@@ -159,7 +159,7 @@
gdk_pointer_ungrab (GDK_CURRENT_TIME);
}
-void
+static void
on_animation_stop (GdmScrollableWidgetAnimation *animation)
{
GdmScrollableWidget *widget;
@@ -229,6 +229,7 @@
if (GTK_BIN (widget)->child && GTK_WIDGET_VISIBLE (GTK_BIN (widget)->child)) {
gtk_widget_size_request (GTK_BIN (widget)->child,
&child_requisition);
+ requisition->width += child_requisition.width;
requisition->height += child_requisition.height;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]