From aeb3d9ad24b09b102b317faff9a95ff292b130a9 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Wed, 29 Jan 2014 16:44:32 +0100 Subject: Fix some build errors with GTK3 Shell is still a bit unusable with GTK3 --- libslab/shell-window.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'libslab/shell-window.c') diff --git a/libslab/shell-window.c b/libslab/shell-window.c index a5a5a3e5..b22b5c51 100644 --- a/libslab/shell-window.c +++ b/libslab/shell-window.c @@ -69,9 +69,13 @@ shell_window_new (AppShellData * app_data) g_signal_connect (G_OBJECT (window), "expose-event", G_CALLBACK (shell_window_paint_window), #endif NULL); +#if GTK_CHECK_VERSION (3, 0, 0) + /* FIXME */ +#else window->resize_handler_id = g_signal_connect (G_OBJECT (window), "size-request", G_CALLBACK (shell_window_handle_size_request), app_data); +#endif return GTK_WIDGET (window); } @@ -96,12 +100,12 @@ shell_window_handle_size_request (GtkWidget * widget, GtkRequisition * requisiti AppShellData * app_data) { gint height; - GtkRequisition *child_requisiton; + GtkRequisition child_requisiton; #if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_get_preferred_size (GTK_WIDGET (APP_RESIZER (app_data->category_layout)->child), child_requisiton, NULL); + gtk_widget_get_preferred_size (GTK_WIDGET (APP_RESIZER (app_data->category_layout)->child), &child_requisiton, NULL); #else - child_requisiton = >K_WIDGET (APP_RESIZER (app_data->category_layout)->child)->requisition; + child_requisiton = GTK_WIDGET (APP_RESIZER (app_data->category_layout)->child)->requisition; #endif /* @@ -113,12 +117,12 @@ shell_window_handle_size_request (GtkWidget * widget, GtkRequisition * requisiti printf("right side width:%d\n", GTK_WIDGET(APP_RESIZER(app_data->category_layout)->child)->requisition.width); */ - requisition->width += child_requisiton->width; + requisition->width += child_requisiton.width; /* use the left side as a minimum height, if the right side is taller, use it up to SIZING_HEIGHT_PERCENT of the screen height */ - height = child_requisiton->height + 10; + height = child_requisiton.height + 10; if (height > requisition->height) { requisition->height = -- cgit v1.2.1