summaryrefslogtreecommitdiff
path: root/libslab/shell-window.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-29 16:44:32 +0100
committerStefano Karapetsas <[email protected]>2014-01-29 16:44:32 +0100
commitaeb3d9ad24b09b102b317faff9a95ff292b130a9 (patch)
treec0b61e1dde0b4becb653918c78f05d9dc22dc8b0 /libslab/shell-window.c
parente397afd8492a527b7798bf644c1d886a9db5a7a1 (diff)
downloadmate-control-center-aeb3d9ad24b09b102b317faff9a95ff292b130a9.tar.bz2
mate-control-center-aeb3d9ad24b09b102b317faff9a95ff292b130a9.tar.xz
Fix some build errors with GTK3
Shell is still a bit unusable with GTK3
Diffstat (limited to 'libslab/shell-window.c')
-rw-r--r--libslab/shell-window.c14
1 files changed, 9 insertions, 5 deletions
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 = &GTK_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 =