From 0b5e66d26f571cadd9ca8329fb4ff1ac6baf4989 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 1 Oct 2011 05:07:53 +0000 Subject: Support scrolling in HTML view. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3517 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/PatchWindow.cpp | 14 +++++++------- src/gui/PatchWindow.hpp | 6 +++--- src/gui/ingen_gui.ui | 7 ++++--- 3 files changed, 14 insertions(+), 13 deletions(-) (limited to 'src/gui') diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp index d0de48a4..6e40e257 100644 --- a/src/gui/PatchWindow.cpp +++ b/src/gui/PatchWindow.cpp @@ -106,7 +106,7 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, xml->get_widget("patch_view_patch_tree_window_menuitem", _menu_view_patch_tree_window); xml->get_widget("patch_help_about_menuitem", _menu_help_about); xml->get_widget("patch_documentation_paned", _doc_paned); - xml->get_widget("patch_documentation_viewport", _doc_viewport); + xml->get_widget("patch_documentation_scrolledwindow", _doc_scrolledwindow); xml->get_widget("patch_documentation_textview", _doc_textview); _menu_view_control_window->property_sensitive() = false; @@ -315,13 +315,13 @@ PatchWindow::show_documentation(const std::string& doc, bool html) #ifdef HAVE_WEBKIT WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new()); webkit_web_view_load_html_string(view, doc.c_str(), ""); - _doc_viewport->add(*Gtk::manage(Glib::wrap(GTK_WIDGET(view)))); - _doc_viewport->show_all(); + _doc_scrolledwindow->add(*Gtk::manage(Glib::wrap(GTK_WIDGET(view)))); + _doc_scrolledwindow->show_all(); #else Gtk::TextView* view = Gtk::manage(new Gtk::TextView()); view->get_buffer()->set_text(doc); - _doc_viewport->add(*view); - _doc_viewport->show_all(); + _doc_scrolledwindow->add(*view); + _doc_scrolledwindow->show_all(); #endif if (!_has_shown_documentation) { int width, height; @@ -334,8 +334,8 @@ PatchWindow::show_documentation(const std::string& doc, bool html) void PatchWindow::hide_documentation() { - _doc_viewport->remove(); - _doc_viewport->hide(); + _doc_scrolledwindow->remove(); + _doc_scrolledwindow->hide(); } void diff --git a/src/gui/PatchWindow.hpp b/src/gui/PatchWindow.hpp index 41dd91f8..2223df70 100644 --- a/src/gui/PatchWindow.hpp +++ b/src/gui/PatchWindow.hpp @@ -154,9 +154,9 @@ private: BreadCrumbs* _breadcrumbs; Gtk::Statusbar* _status_bar; - Gtk::HPaned* _doc_paned; - Gtk::Viewport* _doc_viewport; - Gtk::TextView* _doc_textview; + Gtk::HPaned* _doc_paned; + Gtk::ScrolledWindow* _doc_scrolledwindow; + Gtk::TextView* _doc_textview; sigc::connection _entered_connection; sigc::connection _left_connection; diff --git a/src/gui/ingen_gui.ui b/src/gui/ingen_gui.ui index ca2d10e3..212497f8 100644 --- a/src/gui/ingen_gui.ui +++ b/src/gui/ingen_gui.ui @@ -2187,9 +2187,10 @@ Contributors: - + True - False + True + in True @@ -2201,7 +2202,7 @@ Contributors: - False + True True -- cgit v1.2.1