From: Richard Kettlewell Date: Sat, 19 Apr 2008 20:41:43 +0000 (+0100) Subject: properly scroll user list X-Git-Tag: 4.0~115^2~7 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/ed46435088b7ef9996c5fd386f558bd06d4099ae?hp=b7831daf8a949090e7ae1c44e21b71d83d77a2c6 properly scroll user list --- diff --git a/disobedience/misc.c b/disobedience/misc.c index aaff4ae..ce58ab4 100644 --- a/disobedience/misc.c +++ b/disobedience/misc.c @@ -51,7 +51,8 @@ GtkWidget *scroll_widget(GtkWidget *child) { gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroller), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - if(GTK_IS_LAYOUT(child)) { + if(GTK_IS_LAYOUT(child) + || GTK_IS_TREE_VIEW(child)) { /* Child widget has native scroll support */ gtk_container_add(GTK_CONTAINER(scroller), child); /* Fix up the step increments if they are 0 (seems like an odd default?) */ diff --git a/disobedience/users.c b/disobedience/users.c index 9031887..f4a0fbe 100644 --- a/disobedience/users.c +++ b/disobedience/users.c @@ -642,7 +642,7 @@ void manage_users(void) { /* Buttons live below the list */ vbox = gtk_vbox_new(FALSE, 2); - gtk_box_pack_start(GTK_BOX(vbox), tree, TRUE/*expand*/, TRUE/*fill*/, 0); + gtk_box_pack_start(GTK_BOX(vbox), scroll_widget(tree), TRUE/*expand*/, TRUE/*fill*/, 0); gtk_box_pack_start(GTK_BOX(vbox), buttons, FALSE/*expand*/, FALSE, 0); /* Create an empty user details table, and put an apply button below it */