[maemo-commits] [maemo-commits] r9018 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . libhildondesktop
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Jan 10 13:39:19 EET 2007
- Previous message: [maemo-commits] r9017 - projects/haf/tags/osso-gnomevfs-extra
- Next message: [maemo-commits] r9019 - projects/haf/trunk/osso-application-installer/src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: jobi Date: 2007-01-10 13:39:18 +0200 (Wed, 10 Jan 2007) New Revision: 9018 Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-home-applet.c Log: 2007-01-10 Johan Bilien <johan.bilien at nokia.com> * libhildondesktop/hildon-home-applet.c: Fixed allocation in layout and normal mode Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog =================================================================== --- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog 2007-01-10 09:30:36 UTC (rev 9017) +++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog 2007-01-10 11:39:18 UTC (rev 9018) @@ -1,3 +1,8 @@ +2007-01-10 Johan Bilien <johan.bilien at nokia.com> + + * libhildondesktop/hildon-home-applet.c: Fixed allocation in layout + and normal mode + 2007-01-09 Moises Martinez <moises.martinez at nokia.com> * libhildonwm/hd-wm-watched-window.c: Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-home-applet.c =================================================================== --- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-home-applet.c 2007-01-10 09:30:36 UTC (rev 9017) +++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-home-applet.c 2007-01-10 11:39:18 UTC (rev 9018) @@ -1,7 +1,7 @@ /* - * This file is part of maemo-af-desktop + * This file is part of hildon-desktop * - * Copyright (C) 2005, 2006 Nokia Corporation. + * Copyright (C) 2005, 2006, 2007 Nokia Corporation. * * Contact: Karoliina Salminen <karoliina.t.salminen at nokia.com> * Author: Johan Bilien <johan.bilien at nokia.com> @@ -27,7 +27,6 @@ #include "hildon-home-area.h" #include "hildon-desktop-marshalers.h" -#include <string.h> /* strcmp */ #include <gtk/gtkfixed.h> #include <gtk/gtkicontheme.h> #include <hildon-widgets/hildon-defines.h> @@ -305,7 +304,7 @@ NULL, NULL, g_cclosure_user_marshal_POINTER__POINTER, - GTK_TYPE_WIDGET, + G_TYPE_POINTER, 1, GTK_TYPE_WIDGET); @@ -593,8 +592,11 @@ hildon_home_applet_unrealize (GtkWidget *widget) { HildonHomeAppletPriv *priv; + + g_return_if_fail (GTK_IS_WIDGET (widget) && GTK_WIDGET_REALIZED (widget)); priv = HILDON_HOME_APPLET_GET_PRIVATE (widget); + if (GDK_IS_WINDOW (priv->event_window)) { @@ -603,6 +605,10 @@ priv->event_window = NULL; } + else + g_object_unref (widget->window); + + if (GTK_WIDGET_CLASS (parent_class)->unrealize) GTK_WIDGET_CLASS (parent_class)->unrealize (widget); @@ -645,14 +651,14 @@ static gboolean -hildon_home_applet_expose (GtkWidget * w, GdkEventExpose * event) +hildon_home_applet_expose (GtkWidget *w, GdkEventExpose *event) { HildonHomeAppletPriv *priv; priv = HILDON_HOME_APPLET_GET_PRIVATE (w); if (GTK_WIDGET_CLASS (parent_class)->expose_event) - GTK_WIDGET_CLASS (parent_class)->expose_event(w, event); + GTK_WIDGET_CLASS (parent_class)->expose_event (w, event); if (w->parent && priv->layout_mode) { @@ -716,47 +722,49 @@ HildonHomeAppletPriv *priv; priv = HILDON_HOME_APPLET_GET_PRIVATE (HILDON_HOME_APPLET(widget)); + widget->allocation = *allocation; + if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_NO_WINDOW (widget)) { - widget->allocation = *allocation; - if (GTK_WIDGET_REALIZED (widget)) - { - if (GDK_IS_WINDOW (priv->resize_handle_window)) - gdk_window_move (priv->resize_handle_window, - allocation->width - - APPLET_RESIZE_HANDLE_WIDTH, - allocation->height - - APPLET_RESIZE_HANDLE_HEIGHT); + if (GDK_IS_WINDOW (priv->resize_handle_window)) + gdk_window_move (priv->resize_handle_window, + allocation->width + - APPLET_RESIZE_HANDLE_WIDTH, + allocation->height + - APPLET_RESIZE_HANDLE_HEIGHT); - if (GDK_IS_WINDOW (widget->window)) - gdk_window_move_resize (widget->window, - allocation->x, - allocation->y, - allocation->width, - allocation->height); + if (GDK_IS_WINDOW (widget->window)) + gdk_window_move_resize (widget->window, + allocation->x, + allocation->y, + allocation->width, + allocation->height); - if (GDK_IS_WINDOW (priv->event_window)) - gdk_window_move_resize (priv->event_window, - 0, - 0, - allocation->width, - allocation->height); - } + if (GDK_IS_WINDOW (priv->event_window)) + gdk_window_move_resize (priv->event_window, + 0, + 0, + allocation->width, + allocation->height); - if (GTK_BIN (widget)->child) + } + + if (GTK_BIN (widget)->child) + { + GtkAllocation child_allocation = {0}; + + child_allocation.width = allocation->width; + child_allocation.height = allocation->height; + + if (GTK_WIDGET_NO_WINDOW (widget)) { - GtkAllocation child_allocation = {0}; - - child_allocation.width = allocation->width; - child_allocation.height = allocation->height; + child_allocation.x = allocation->x; + child_allocation.y = allocation->y; + } - gtk_widget_size_allocate (GTK_BIN (widget)->child, &child_allocation); - } + gtk_widget_size_allocate (GTK_BIN (widget)->child, &child_allocation); } - - else if (GTK_WIDGET_CLASS (parent_class)->size_allocate) - GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation); } static void @@ -1341,7 +1349,7 @@ { HildonHomeAppletPriv *priv; GtkWindow *window; - GtkWidget *item; + GtkWidget *item = NULL; g_return_val_if_fail (applet, NULL); priv = HILDON_HOME_APPLET_GET_PRIVATE (applet);
- Previous message: [maemo-commits] r9017 - projects/haf/tags/osso-gnomevfs-extra
- Next message: [maemo-commits] r9019 - projects/haf/trunk/osso-application-installer/src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]