diff options
author | David Robillard <d@drobilla.net> | 2011-10-01 05:07:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-10-01 05:07:53 +0000 |
commit | 0b5e66d26f571cadd9ca8329fb4ff1ac6baf4989 (patch) | |
tree | 4ba3ea1d0e4e40e3b9d01a3a2f7768f20a3e220d /src | |
parent | a55d08e0d1af511e5b4e2d9a8c3be1822fff840c (diff) | |
download | ingen-0b5e66d26f571cadd9ca8329fb4ff1ac6baf4989.tar.gz ingen-0b5e66d26f571cadd9ca8329fb4ff1ac6baf4989.tar.bz2 ingen-0b5e66d26f571cadd9ca8329fb4ff1ac6baf4989.zip |
Support scrolling in HTML view.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3517 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/PatchWindow.cpp | 14 | ||||
-rw-r--r-- | src/gui/PatchWindow.hpp | 6 | ||||
-rw-r--r-- | src/gui/ingen_gui.ui | 7 |
3 files changed, 14 insertions, 13 deletions
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: </packing> </child> <child> - <object class="GtkViewport" id="patch_documentation_viewport"> + <object class="GtkScrolledWindow" id="patch_documentation_scrolledwindow"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can_focus">True</property> + <property name="shadow_type">in</property> <child> <object class="GtkTextView" id="patch_documentation_textview"> <property name="visible">True</property> @@ -2201,7 +2202,7 @@ Contributors: </child> </object> <packing> - <property name="resize">False</property> + <property name="resize">True</property> <property name="shrink">True</property> </packing> </child> |