Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kconfig: gconf: use configure-event handler to adjust pane separator

The size-request event handler is currently used to adjust the position
of the horizontal separator in the right pane.

However, the size-request signal is not available in GTK 3. Use the
configure-event signal instead.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

+7 -18
+7 -18
scripts/kconfig/gconf.c
··· 606 606 gtk_main_quit(); 607 607 } 608 608 609 - static void on_window1_size_request(GtkWidget *widget, 610 - GtkRequisition *requisition, 611 - gpointer user_data) 609 + static gboolean on_window1_configure(GtkWidget *self, 610 + GdkEventConfigure *event, 611 + gpointer user_data) 612 612 { 613 - static gint old_h; 614 - gint w, h; 615 - 616 - if (widget->window == NULL) 617 - gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h); 618 - else 619 - gdk_window_get_size(widget->window, &w, &h); 620 - 621 - if (h == old_h) 622 - return; 623 - old_h = h; 624 - 625 - gtk_paned_set_position(GTK_PANED(vpaned), 2 * h / 3); 613 + gtk_paned_set_position(GTK_PANED(vpaned), 2 * event->height / 3); 614 + return FALSE; 626 615 } 627 616 628 617 static gboolean on_window1_delete_event(GtkWidget *widget, GdkEvent *event, ··· 1012 1023 main_wnd = glade_xml_get_widget(xml, "window1"); 1013 1024 g_signal_connect(main_wnd, "destroy", 1014 1025 G_CALLBACK(on_window1_destroy), NULL); 1015 - g_signal_connect(main_wnd, "size_request", 1016 - G_CALLBACK(on_window1_size_request), NULL); 1026 + g_signal_connect(main_wnd, "configure-event", 1027 + G_CALLBACK(on_window1_configure), NULL); 1017 1028 g_signal_connect(main_wnd, "delete_event", 1018 1029 G_CALLBACK(on_window1_delete_event), NULL); 1019 1030