diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2016-09-23 16:59:52 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2016-09-23 18:30:10 +0530 |
commit | 4151c09d9a03731c3ffbb1314ead26dbd8edae85 (patch) | |
tree | b935aa67f35fd2cd95dda83946f812783e8e76c1 /libreofficekit | |
parent | 451c7de9d750f8a2f1348b1eae1bcd8ee042563d (diff) |
gtktiledviewer: Wrap dialogs in a GtkScrolledWindow
Change-Id: I33be18779ea680f7a9c20814ca3c3d94d206900b
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx index 385203d0dc42..27c8e43872dd 100644 --- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx @@ -487,7 +487,9 @@ static void documentRedline(GtkWidget* pButton, gpointer /*pItem*/) "Jump", GTK_RESPONSE_APPLY, nullptr); + gtk_window_set_default_size(GTK_WINDOW(pDialog), 800, 600); GtkWidget* pContentArea = gtk_dialog_get_content_area(GTK_DIALOG (pDialog)); + GtkWidget* pScrolledWindow = gtk_scrolled_window_new(nullptr, nullptr); // Build the table. GtkTreeStore* pTreeStore = gtk_tree_store_new(6, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); @@ -515,7 +517,8 @@ static void documentRedline(GtkWidget* pButton, gpointer /*pItem*/) nullptr); gtk_tree_view_append_column(GTK_TREE_VIEW(pTreeView), pColumn); } - gtk_box_pack_start(GTK_BOX(pContentArea), pTreeView, TRUE, TRUE, 2); + gtk_container_add(GTK_CONTAINER(pScrolledWindow), pTreeView); + gtk_box_pack_start(GTK_BOX(pContentArea), pScrolledWindow, TRUE, TRUE, 2); // Show the dialog. gtk_widget_show_all(pDialog); @@ -589,7 +592,9 @@ static void documentRepair(GtkWidget* pButton, gpointer /*pItem*/) "Jump to state", GTK_RESPONSE_OK, nullptr); + gtk_window_set_default_size(GTK_WINDOW(pDialog), 800, 600); GtkWidget* pContentArea = gtk_dialog_get_content_area(GTK_DIALOG (pDialog)); + GtkWidget* pScrolledWindow = gtk_scrolled_window_new(nullptr, nullptr); // Build the table. GtkTreeStore* pTreeStore = gtk_tree_store_new(5, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); @@ -620,7 +625,8 @@ static void documentRepair(GtkWidget* pButton, gpointer /*pItem*/) nullptr); gtk_tree_view_append_column(GTK_TREE_VIEW(pTreeView), pColumn); } - gtk_box_pack_start(GTK_BOX(pContentArea), pTreeView, TRUE, TRUE, 2); + gtk_container_add(GTK_CONTAINER(pScrolledWindow), pTreeView); + gtk_box_pack_start(GTK_BOX(pContentArea), pScrolledWindow, TRUE, TRUE, 2); // Show the dialog. gtk_widget_show_all(pDialog); |