<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,32 +11,6 @@
       &lt;widget class=&quot;GtkVBox&quot; id=&quot;main_vbox&quot;&gt;
         &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
         &lt;child&gt;
-          &lt;widget class=&quot;GtkHPaned&quot; id=&quot;hpaned1&quot;&gt;
-            &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
-            &lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
-            &lt;property name=&quot;border_width&quot;&gt;2&lt;/property&gt;
-            &lt;property name=&quot;position&quot;&gt;200&lt;/property&gt;
-            &lt;child&gt;
-              &lt;widget class=&quot;GtkVBox&quot; id=&quot;control_vbox&quot;&gt;
-                &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
-                &lt;child&gt;
-                  &lt;placeholder/&gt;
-                &lt;/child&gt;
-              &lt;/widget&gt;
-              &lt;packing&gt;
-                &lt;property name=&quot;resize&quot;&gt;False&lt;/property&gt;
-                &lt;property name=&quot;shrink&quot;&gt;False&lt;/property&gt;
-              &lt;/packing&gt;
-            &lt;/child&gt;
-            &lt;child&gt;
-              &lt;placeholder/&gt;
-            &lt;/child&gt;
-          &lt;/widget&gt;
-          &lt;packing&gt;
-            &lt;property name=&quot;position&quot;&gt;2&lt;/property&gt;
-          &lt;/packing&gt;
-        &lt;/child&gt;
-        &lt;child&gt;
           &lt;widget class=&quot;GtkStatusbar&quot; id=&quot;statusbar&quot;&gt;
             &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
           &lt;/widget&gt;</diff>
      <filename>data/chmsee.glade</filename>
    </modified>
    <modified>
      <diff>@@ -48,6 +48,7 @@
 #include &quot;booktree.h&quot;
 #include &quot;ui_bookmarks.h&quot;
 #include &quot;ui_index.h&quot;
+#include &quot;ui_chmfile.h&quot;
 #include &quot;setup.h&quot;
 #include &quot;link.h&quot;
 #include &quot;utils/utils.h&quot;
@@ -63,16 +64,8 @@ enum {
 struct _ChmSeePrivate {
   GtkWidget* menubar;
   GtkWidget* toolbar;
-    GtkWidget       *control_notebook;
-    GtkWidget       *html_notebook;
-
-    GtkWidget       *booktree;
-    GtkWidget       *bookmark_tree;
-
-    GtkWidget* uiIndex; /* the gtktreeview */
-    GtkWidget* indexPage; /* the index tab under control_notebook */
-
-    GtkWidget       *statusbar;
+  GtkWidget* ui_chmfile;
+  GtkWidget       *statusbar;
 
 
     GtkActionGroup* action_group;
@@ -113,20 +106,12 @@ static void chmsee_save_config(ChmSee *self);
 static void chmsee_set_fullscreen(ChmSee* self, gboolean fullscreen);
 static void chmsee_set_context_menu_link(ChmSee* self, const gchar* link);
 
-static void chmsee_refresh_index(ChmSee* self);
-static GtkWidget* chmsee_new_index_page(ChmSee* self);
-static void chmsee_on_ui_index_link_selected(ChmSee* self, Link* link);
-
 static gboolean delete_cb(GtkWidget *, GdkEvent *, ChmSee *);
 static void destroy_cb(GtkWidget *, ChmSee *);
 static gboolean on_configure_event(GtkWidget *, GdkEventConfigure *, ChmSee *);
 
 static void open_response_cb(GtkWidget *, gint, ChmSee *);
 static void about_response_cb(GtkDialog *, gint, gpointer);
-static void booktree_link_selected_cb(GObject *, Link *, ChmSee *);
-static void bookmarks_link_selected_cb(GObject *, Link *, ChmSee *);
-static void control_switch_page_cb(GtkNotebook *, GtkNotebookPage *, guint , ChmSee *);
-static void html_switch_page_cb(GtkNotebook *, GtkNotebookPage *, guint , ChmSee *);
 static void html_location_changed_cb(ChmseeIhtml *, const gchar *, ChmSee *);
 static gboolean html_open_uri_cb(ChmseeIhtml *, const gchar *, ChmSee *);
 static void html_title_changed_cb(ChmseeIhtml *, const gchar *, ChmSee *);
@@ -167,7 +152,6 @@ static void chmsee_open_uri(ChmSee *chmsee, const gchar *uri);
 static void chmsee_open_file(ChmSee *self, const gchar *filename);
 static GtkWidget *get_widget(ChmSee *, gchar *);
 static void populate_window(ChmSee *);
-static void close_current_book(ChmSee *);
 static void new_tab(ChmSee *, const gchar *);
 static ChmseeIhtml *get_active_html(ChmSee *);
 static void check_history(ChmSee *, ChmseeIhtml *);
@@ -326,9 +310,7 @@ chmsee_init(ChmSee* self)
 	selfp-&gt;last_dir = g_strdup(g_get_home_dir());
 	selfp-&gt;context_menu_link = NULL;
 
-	selfp-&gt;uiIndex = NULL;
 	selfp-&gt;book = NULL;
-	selfp-&gt;html_notebook = NULL;
 	selfp-&gt;pos_x = -100;
 	selfp-&gt;pos_y = -100;
 	selfp-&gt;width = 0;
@@ -461,9 +443,9 @@ destroy_cb(GtkWidget *widget, ChmSee *chmsee)
 static gboolean
 on_configure_event(GtkWidget *widget, GdkEventConfigure *event, ChmSee *self)
 {
-        if (selfp-&gt;html_notebook != NULL
-            &amp;&amp; (event-&gt;width != selfp-&gt;width || event-&gt;height != selfp-&gt;height))
+        if (event-&gt;width != selfp-&gt;width || event-&gt;height != selfp-&gt;height) {
                 reload_current_page(self);
+        }
 
         if(!selfp-&gt;fullscreen) {
           selfp-&gt;width = event-&gt;width;
@@ -492,81 +474,6 @@ open_response_cb(GtkWidget *widget, gint response_id, ChmSee *chmsee)
 }
 
 static void
-booktree_link_selected_cb(GObject *ignored, Link *link, ChmSee *self)
-{
-        ChmseeIhtml* html;
-
-        g_debug(&quot;booktree link selected: %s&quot;, link-&gt;uri);
-        if (!g_ascii_strcasecmp(CHMSEE_NO_LINK, link-&gt;uri))
-                return;
-
-        html = get_active_html(self);
-
-        g_signal_handlers_block_by_func(html, html_open_uri_cb, self);
-
-        chmsee_ihtml_open_uri(html, g_build_filename(
-                        chmsee_ichmfile_get_dir(selfp-&gt;book), link-&gt;uri, NULL));
-
-        g_signal_handlers_unblock_by_func(html, html_open_uri_cb, self);
-
-        check_history(self, html);
-}
-
-static void
-bookmarks_link_selected_cb(GObject *ignored, Link *link, ChmSee *chmsee)
-{
-  chmsee_ihtml_open_uri(get_active_html(chmsee), link-&gt;uri);
-  check_history(chmsee, get_active_html(chmsee));
-}
-
-static void
-control_switch_page_cb(GtkNotebook *notebook, GtkNotebookPage *page, guint new_page_num, ChmSee *chmsee)
-{
-        g_debug(&quot;switch page : current page = %d&quot;, gtk_notebook_get_current_page(notebook));
-}
-
-static void
-html_switch_page_cb(GtkNotebook *notebook, GtkNotebookPage *page, guint new_page_num, ChmSee *self)
-{
-  GtkWidget *new_page;
-
-  new_page = gtk_notebook_get_nth_page(notebook, new_page_num);
-
-  if (new_page) {
-    ChmseeIhtml* new_html;
-    const gchar* title;
-    const gchar* location;
-
-    new_html = g_object_get_data(G_OBJECT (new_page), &quot;html&quot;);
-
-    update_tab_title(self, new_html);
-
-    title = chmsee_ihtml_get_title(new_html);
-    location = chmsee_ihtml_get_location(new_html);
-
-    if (location != NULL &amp;&amp; strlen(location)) {
-      if (strlen(title)) {
-        ui_bookmarks_set_current_link(UIBOOKMARKS (selfp-&gt;bookmark_tree), title, location);
-      } else {
-        const gchar *book_title;
-
-        book_title = booktree_get_selected_book_title(BOOKTREE (selfp-&gt;booktree));
-        ui_bookmarks_set_current_link(UIBOOKMARKS (selfp-&gt;bookmark_tree), book_title, location);
-      }
-
-      /* Sync the book tree. */
-      if (selfp-&gt;has_toc)
-        booktree_select_uri(BOOKTREE (selfp-&gt;booktree), location);
-    }
-
-    check_history(self, new_html);
-  } else {
-    gtk_window_set_title(GTK_WINDOW (self), &quot;ChmSee&quot;);
-    check_history(self, NULL);
-  }
-}
-
-static void
 html_location_changed_cb(ChmseeIhtml *html, const gchar *location, ChmSee *chmsee)
 {
         g_debug(&quot;html location changed cb: %s&quot;, location);
@@ -575,6 +482,7 @@ html_location_changed_cb(ChmseeIhtml *html, const gchar *location, ChmSee *chmse
                 check_history(chmsee, html);
 }
 
+#if 0
 static gboolean
 html_open_uri_cb(ChmseeIhtml* html, const gchar *uri, ChmSee *self)
 {
@@ -610,29 +518,7 @@ html_open_uri_cb(ChmseeIhtml* html, const gchar *uri, ChmSee *self)
 
   return FALSE;
 }
-
-static void
-html_title_changed_cb(ChmseeIhtml *html, const gchar *title, ChmSee *self)
-{
-        const gchar *location;
-
-        g_debug(&quot;html title changed cb %s&quot;, title);
-
-        update_tab_title(self, get_active_html(self));
-
-        location = chmsee_ihtml_get_location(html);
-
-        if (location != NULL &amp;&amp; strlen(location)) {
-                if (strlen(title))
-                        ui_bookmarks_set_current_link(UIBOOKMARKS (selfp-&gt;bookmark_tree), title, location);
-                else {
-                        const gchar *book_title;
-
-                        book_title = booktree_get_selected_book_title(BOOKTREE (selfp-&gt;booktree));
-                        ui_bookmarks_set_current_link(UIBOOKMARKS (selfp-&gt;bookmark_tree), book_title, location);
-                }
-        }
-}
+#endif
 
 /* Popup html context menu */
 static void
@@ -658,14 +544,6 @@ html_context_link_cb(ChmseeIhtml *html, const gchar *link, ChmSee* self)
 }
 
 static void
-html_open_new_tab_cb(ChmseeIhtml *html, const gchar *location, ChmSee *chmsee)
-{
-        g_debug(&quot;html open new tab callback: %s&quot;, location);
-
-        new_tab(chmsee, location);
-}
-
-static void
 html_link_message_cb(ChmseeIhtml *html, const gchar *url, ChmSee *chmsee)
 {
         update_status_bar(chmsee, url);
@@ -709,53 +587,9 @@ on_open(GtkWidget *widget, ChmSee *self)
 }
 
 static void
-on_close_tab(GtkWidget *widget, ChmSee *self)
-{
-        gint num_pages, number, i;
-        GtkWidget *tab_label, *page;
-
-        number = -1;
-        num_pages = gtk_notebook_get_n_pages(GTK_NOTEBOOK (selfp-&gt;html_notebook));
-
-        if (num_pages == 1) {
-                chmsee_quit(self);
-
-                return;
-        }
-
-        for (i = 0; i &lt; num_pages; i++) {
-                GList *children, *l;
-
-                g_debug(&quot;page %d&quot;, i);
-                page = gtk_notebook_get_nth_page(GTK_NOTEBOOK (selfp-&gt;html_notebook), i);
-
-                tab_label = gtk_notebook_get_tab_label(GTK_NOTEBOOK (selfp-&gt;html_notebook), page);
-                g_message(&quot;tab_label&quot;);
-                children = gtk_container_get_children(GTK_CONTAINER (tab_label));
-
-                for (l = children; l; l = l-&gt;next) {
-                        if (widget == l-&gt;data) {
-                                g_debug(&quot;found tab on page %d&quot;, i);
-                                number = i;
-                                break;
-                        }
-                }
-
-                if (number &gt;= 0) {
-                        gtk_notebook_remove_page(GTK_NOTEBOOK (selfp-&gt;html_notebook), number);
-
-                        break;
-                }
-        }
-}
-
-static void
 on_copy(GtkWidget *widget, ChmSee *self)
 {
-        g_message(&quot;On Copy&quot;);
-
-        g_return_if_fail(GTK_IS_NOTEBOOK (selfp-&gt;html_notebook));
-
+        g_debug(&quot;On Copy&quot;);
         chmsee_ihtml_copy_selection(get_active_html(self));
 }
 
@@ -778,14 +612,10 @@ on_copy_page_location(GtkWidget* widget, ChmSee* chmsee) {
 static void
 on_select_all(GtkWidget *widget, ChmSee *self)
 {
-        ChmseeIhtml *html;
-
-        g_message(&quot;On Select All&quot;);
-
-        g_return_if_fail(GTK_IS_NOTEBOOK (selfp-&gt;html_notebook));
-
-        html = get_active_html(self);
-        chmsee_ihtml_select_all(html);
+	ChmseeIhtml *html;
+	g_message(&quot;On Select All&quot;);
+	html = get_active_html(self);
+	chmsee_ihtml_select_all(html);
 }
 
 static void
@@ -810,7 +640,8 @@ static void
 on_home(GtkWidget *widget, ChmSee *self)
 {
   if (chmsee_ichmfile_get_home(selfp-&gt;book) != NULL) {
-    open_homepage(self);
+    /* TODO:
+     *  open_homepage(self); */
   }
 }
 
@@ -872,8 +703,6 @@ on_open_new_tab(GtkWidget *widget, ChmSee *self)
 
         g_message(&quot;Open new tab&quot;);
 
-        g_return_if_fail(GTK_IS_NOTEBOOK (selfp-&gt;html_notebook));
-
         html = get_active_html(self);
         location = chmsee_ihtml_get_location(html);
 
@@ -883,22 +712,6 @@ on_open_new_tab(GtkWidget *widget, ChmSee *self)
 }
 
 static void
-on_close_current_tab(GtkWidget *widget, ChmSee *self)
-{
-        g_return_if_fail(GTK_IS_NOTEBOOK (selfp-&gt;html_notebook));
-
-        if (gtk_notebook_get_n_pages(GTK_NOTEBOOK (selfp-&gt;html_notebook)) == 1)
-                return chmsee_quit(self);
-
-        gint page_num;
-
-        page_num = gtk_notebook_get_current_page(GTK_NOTEBOOK (selfp-&gt;html_notebook));
-
-        if (page_num &gt;= 0)
-                gtk_notebook_remove_page(GTK_NOTEBOOK (selfp-&gt;html_notebook), page_num);
-}
-
-static void
 on_context_new_tab(GtkWidget *widget, ChmSee *self)
 {
 	g_debug(&quot;On context open new tab: %s&quot;, selfp-&gt;context_menu_link);
@@ -927,10 +740,6 @@ on_context_copy_link(GtkWidget *widget, ChmSee *self)
 static void
 chmsee_quit(ChmSee *self)
 {
-  if (selfp-&gt;book) {
-    close_current_book(self);
-  }
-
   chmsee_save_config(self);
 
   if(get_active_html(self)) {
@@ -1013,21 +822,21 @@ populate_window(ChmSee *self)
         gtk_container_add(GTK_CONTAINER(toolbar), gtk_ui_manager_get_widget(ui_manager, &quot;/toolbar&quot;));
         gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0);
 
+        GtkWidget* ui_chmfile = chmsee_ui_chmfile_new();
+        selfp-&gt;ui_chmfile = ui_chmfile;
+        gtk_box_pack_start(GTK_BOX(vbox), ui_chmfile, TRUE, TRUE, 0);
+        gtk_container_set_focus_child(GTK_CONTAINER(vbox), ui_chmfile);
+
         gtk_tool_button_set_icon_widget(
         		GTK_TOOL_BUTTON(gtk_ui_manager_get_widget(ui_manager, &quot;/toolbar/sidepane&quot;)),
         		gtk_image_new_from_file(get_resource_path(&quot;show-pane.png&quot;)));
 
-        gtk_box_pack_start (GTK_BOX (vbox), main_vbox, TRUE, TRUE, 0);
+        gtk_box_pack_start (GTK_BOX (vbox), main_vbox, FALSE, FALSE, 0);
         gtk_widget_show_all(vbox);
 
         accel_group = g_object_new(GTK_TYPE_ACCEL_GROUP, NULL);
         gtk_window_add_accel_group(GTK_WINDOW (self), accel_group);
 
-        GtkWidget *control_vbox;
-
-        control_vbox = get_widget(self, &quot;control_vbox&quot;);
-        gtk_widget_hide(control_vbox);
-
         /* status bar */
         selfp-&gt;statusbar = glade_xml_get_widget(glade, &quot;statusbar&quot;);
         selfp-&gt;scid_default = gtk_statusbar_get_context_id(GTK_STATUSBAR (selfp-&gt;statusbar),
@@ -1038,112 +847,16 @@ populate_window(ChmSee *self)
 void
 chmsee_set_model(ChmSee* self, ChmseeIchmfile *book)
 {
-	GNode *link_tree;
-	GList *bookmarks_list;
-
-	GtkWidget *booktree_sw;
-	GtkWidget *control_vbox;
-
 	g_debug(&quot;display book&quot;);
 	selfp-&gt;state = CHMSEE_STATE_LOADING;
 
 	/* Close currently opened book */
-	if (selfp-&gt;book)
-		close_current_book(self);
-
-	selfp-&gt;book = book;
-
-	control_vbox = get_widget(self, &quot;control_vbox&quot;);
-
-	/* Book contents TreeView widget */
-	selfp-&gt;control_notebook = gtk_notebook_new();
-
-	gtk_box_pack_start(GTK_BOX (control_vbox),
-			GTK_WIDGET (selfp-&gt;control_notebook),
-			TRUE,
-			TRUE,
-			2);
-	g_signal_connect(G_OBJECT (selfp-&gt;control_notebook),
-			&quot;switch-page&quot;,
-			G_CALLBACK (control_switch_page_cb),
-			self);
-
-	/* TOC */
-	if (chmsee_ichmfile_get_link_tree(selfp-&gt;book) != NULL) {
-		link_tree = chmsee_ichmfile_get_link_tree(selfp-&gt;book);
-
-		booktree_sw = gtk_scrolled_window_new(NULL, NULL);
-		gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (booktree_sw),
-				GTK_POLICY_NEVER,
-				GTK_POLICY_AUTOMATIC);
-		gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW (booktree_sw),
-				GTK_SHADOW_IN);
-		gtk_container_set_border_width(GTK_CONTAINER (booktree_sw), 2);
-
-		selfp-&gt;booktree = GTK_WIDGET(g_object_ref_sink(booktree_new(link_tree)));
-		g_signal_connect_swapped(selfp-&gt;booktree,
-				&quot;scroll-event&quot;,
-				G_CALLBACK(on_scroll_event),
-				self);
-
-		gtk_container_add(GTK_CONTAINER (booktree_sw), selfp-&gt;booktree);
-		gtk_notebook_append_page(GTK_NOTEBOOK (selfp-&gt;control_notebook),
-				booktree_sw,
-				gtk_label_new(_(&quot;Topics&quot;)));
-
-		g_signal_connect(G_OBJECT (selfp-&gt;booktree),
-				&quot;link-selected&quot;,
-				G_CALLBACK (booktree_link_selected_cb),
-				self);
-
-		g_debug(&quot;chmsee has toc&quot;);
-		selfp-&gt;has_toc = TRUE;
+	if (selfp-&gt;book) {
+		g_object_unref(selfp-&gt;book);
 	}
 
-	/* Index */
-	gtk_notebook_append_page(GTK_NOTEBOOK (selfp-&gt;control_notebook),
-			chmsee_new_index_page(self),
-			gtk_label_new(_(&quot;Index&quot;)));
-	chmsee_refresh_index(self);
-
-	/* Bookmarks */
-	bookmarks_list = chmsee_ichmfile_get_bookmarks_list(selfp-&gt;book);
-	selfp-&gt;bookmark_tree = GTK_WIDGET (ui_bookmarks_new(bookmarks_list));
-
-	gtk_notebook_append_page(GTK_NOTEBOOK (selfp-&gt;control_notebook),
-			selfp-&gt;bookmark_tree,
-			gtk_label_new (_(&quot;Bookmarks&quot;)));
-
-	g_signal_connect(G_OBJECT (selfp-&gt;bookmark_tree),
-			&quot;link-selected&quot;,
-			G_CALLBACK (bookmarks_link_selected_cb),
-			self);
-
-	GtkWidget *hpaned;
-
-	hpaned = get_widget(self, &quot;hpaned1&quot;);
-
-	/* HTML tabs notebook */
-	selfp-&gt;html_notebook = gtk_notebook_new();
-	gtk_paned_add2 (GTK_PANED (hpaned), selfp-&gt;html_notebook);
-
-	g_signal_connect(G_OBJECT (selfp-&gt;html_notebook),
-			&quot;switch-page&quot;,
-			G_CALLBACK (html_switch_page_cb),
-			self);
-
-	gtk_widget_show_all(hpaned);
-	new_tab(self, NULL);
-
-	gtk_notebook_set_current_page(GTK_NOTEBOOK (selfp-&gt;control_notebook),
-			g_list_length(bookmarks_list) &amp;&amp; selfp-&gt;has_toc ? 1 : 0);
-
-    gtk_action_set_sensitive(gtk_action_group_get_action(selfp-&gt;action_group, &quot;SidePane&quot;), TRUE);
-    gtk_action_set_sensitive(gtk_action_group_get_action(selfp-&gt;action_group, &quot;ZoomIn&quot;), TRUE);
-    gtk_action_set_sensitive(gtk_action_group_get_action(selfp-&gt;action_group, &quot;ZoomReset&quot;), TRUE);
-    gtk_action_set_sensitive(gtk_action_group_get_action(selfp-&gt;action_group, &quot;ZoomOut&quot;), TRUE);
-	g_object_set(gtk_action_group_get_action(selfp-&gt;action_group, &quot;SidePane&quot;), &quot;active&quot;, TRUE, NULL);
-
+	selfp-&gt;book = g_object_ref(book);
+	chmsee_ui_chmfile_set_model(CHMSEE_UI_CHMFILE(selfp-&gt;ui_chmfile), book);
 
 	/* Window title */
 	gchar *window_title;
@@ -1159,165 +872,13 @@ chmsee_set_model(ChmSee* self, ChmseeIchmfile *book)
 	gtk_window_set_title(GTK_WINDOW (self), window_title);
 	g_free(window_title);
 
-	chmsee_ihtml_set_variable_font(get_active_html(self),
-			chmsee_ichmfile_get_variable_font(selfp-&gt;book));
-	chmsee_ihtml_set_fixed_font(get_active_html(self),
-			chmsee_ichmfile_get_fixed_font(selfp-&gt;book));
-
-	if (chmsee_ichmfile_get_home(selfp-&gt;book)) {
-		open_homepage(self);
-
-	    gtk_action_set_sensitive(gtk_action_group_get_action(selfp-&gt;action_group, &quot;NewTab&quot;), TRUE);
-	    gtk_action_set_sensitive(gtk_action_group_get_action(selfp-&gt;action_group, &quot;CloseTab&quot;), TRUE);
-	    gtk_action_set_sensitive(gtk_action_group_get_action(selfp-&gt;action_group, &quot;Home&quot;), TRUE);
-	}
 	selfp-&gt;state = CHMSEE_STATE_NORMAL;
 
     selfp-&gt;last_dir = g_strdup_printf(&quot;%s&quot;, g_path_get_dirname(
     		chmsee_ichmfile_get_filename(book)));
 }
 
-static void
-close_current_book(ChmSee *self)
-{
-  gchar* bookmark_fname = g_build_filename(chmsee_ichmfile_get_dir(selfp-&gt;book), CHMSEE_BOOKMARK_FILE, NULL);
-  bookmarks_save(ui_bookmarks_get_list(UIBOOKMARKS (selfp-&gt;bookmark_tree)), bookmark_fname);
-  g_free(bookmark_fname);
-  g_object_unref(selfp-&gt;book);
-  gtk_widget_destroy(GTK_WIDGET (selfp-&gt;control_notebook));
-  gtk_widget_destroy(GTK_WIDGET (selfp-&gt;html_notebook));
-
-  selfp-&gt;book = NULL;
-  selfp-&gt;control_notebook = NULL;
-  selfp-&gt;html_notebook = NULL;
-  selfp-&gt;state = CHMSEE_STATE_INIT;
-}
-
-static GtkWidget*
-new_tab_content(ChmSee *chmsee, const gchar *str)
-{
-        GtkWidget *widget;
-        GtkWidget *label;
-        GtkWidget *close_button, *close_image;
-
-        widget = gtk_hbox_new(FALSE, 3);
-
-        label = gtk_label_new(str);
-        gtk_label_set_ellipsize(GTK_LABEL (label), PANGO_ELLIPSIZE_END);
-        gtk_label_set_single_line_mode(GTK_LABEL (label), TRUE);
-        gtk_misc_set_alignment(GTK_MISC (label), 0.0, 0.5);
-        gtk_misc_set_padding(GTK_MISC (label), 0, 0);
-	gtk_box_pack_start(GTK_BOX (widget), label, TRUE, TRUE, 0);
-        g_object_set_data(G_OBJECT (widget), &quot;label&quot;, label);
-
-        close_button = gtk_button_new();
-	gtk_button_set_relief(GTK_BUTTON(close_button), GTK_RELIEF_NONE);
-	close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
-	gtk_widget_show(close_image);
-	gtk_container_add(GTK_CONTAINER (close_button), close_image);
-	g_signal_connect(G_OBJECT (close_button),
-                         &quot;clicked&quot;,
-	                 G_CALLBACK (on_close_tab),
-                         chmsee);
-
-        gtk_box_pack_start(GTK_BOX (widget), close_button, FALSE, FALSE, 0);
-
-	gtk_widget_show_all(widget);
-
-        return widget;
-}
-
-static void
-new_tab(ChmSee *self, const gchar *location)
-{
-        ChmseeIhtml  *html;
-        GtkWidget    *frame;
-        GtkWidget    *view;
-        GtkWidget    *tab_content;
-        gint          num;
-
-        g_debug(&quot;new_tab : %s&quot;, location);
-
-        /* Ignore external link */
-        if (location != NULL &amp;&amp; !g_str_has_prefix(location, &quot;file://&quot;))
-                return;
-
-        html = chmsee_html_new();
-        g_signal_connect_swapped(chmsee_ihtml_get_widget(html),
-        		&quot;dom-mouse-click&quot;,
-        		G_CALLBACK(on_scroll_event),
-        		self);
-
-        view = chmsee_ihtml_get_widget(html);
-        gtk_widget_show(view);
-
-        frame = gtk_frame_new(NULL);
-        gtk_widget_show(frame);
-
-        gtk_frame_set_shadow_type(GTK_FRAME (frame), GTK_SHADOW_IN);
-        gtk_container_set_border_width(GTK_CONTAINER (frame), 2);
-        gtk_container_add(GTK_CONTAINER (frame), view);
-
-        g_object_set_data(G_OBJECT (frame), &quot;html&quot;, html);
-
-        /* Custom label widget, with a close button */
-        tab_content = new_tab_content(self, _(&quot;No Title&quot;));
-
-        g_signal_connect(G_OBJECT (html),
-                         &quot;title-changed&quot;,
-                         G_CALLBACK (html_title_changed_cb),
-                         self);
-        g_signal_connect(G_OBJECT (html),
-                         &quot;open-uri&quot;,
-                         G_CALLBACK (html_open_uri_cb),
-                         self);
-        g_signal_connect(G_OBJECT (html),
-                         &quot;location-changed&quot;,
-                         G_CALLBACK (html_location_changed_cb),
-                         self);
-        g_signal_connect(G_OBJECT (html),
-                         &quot;context-normal&quot;,
-                         G_CALLBACK (html_context_normal_cb),
-                         self);
-        g_signal_connect(G_OBJECT (html),
-                         &quot;context-link&quot;,
-                         G_CALLBACK (html_context_link_cb),
-                         self);
-        g_signal_connect(G_OBJECT (html),
-                         &quot;open-new-tab&quot;,
-                         G_CALLBACK (html_open_new_tab_cb),
-                         self);
-        g_signal_connect(G_OBJECT (html),
-                         &quot;link-message&quot;,
-                         G_CALLBACK (html_link_message_cb),
-                         self);
-        g_signal_connect_swapped(chmsee_ihtml_get_widget(html),
-        		&quot;scroll-event&quot;,
-        		G_CALLBACK(on_scroll_event),
-        		self);
-
-        num = gtk_notebook_append_page(GTK_NOTEBOOK (selfp-&gt;html_notebook),
-                                       frame, tab_content);
-
-        gtk_notebook_set_tab_label_packing(GTK_NOTEBOOK (selfp-&gt;html_notebook),
-                                           frame,
-                                           TRUE, TRUE,
-                                           GTK_PACK_START);
-
-        gtk_widget_realize(view);
-
-        if (location != NULL) {
-                chmsee_ihtml_open_uri(html, location);
-
-                if (selfp-&gt;has_toc)
-                        booktree_select_uri(BOOKTREE (selfp-&gt;booktree), location);
-        } else {
-                chmsee_ihtml_clear(html);
-        }
-
-        gtk_notebook_set_current_page(GTK_NOTEBOOK (selfp-&gt;html_notebook), num);
-}
-
+#if 0
 static void
 open_homepage(ChmSee *self)
 {
@@ -1339,6 +900,7 @@ open_homepage(ChmSee *self)
 
         check_history(self, html);
 }
+#endif
 
 static void
 reload_current_page(ChmSee *self)
@@ -1348,8 +910,6 @@ reload_current_page(ChmSee *self)
 
         g_message(&quot;Reload current page&quot;);
 
-        g_return_if_fail(GTK_IS_NOTEBOOK (selfp-&gt;html_notebook));
-
         html = get_active_html(self);
         location = chmsee_ihtml_get_location(html);
 
@@ -1361,20 +921,7 @@ reload_current_page(ChmSee *self)
 static ChmseeIhtml *
 get_active_html(ChmSee *self)
 {
-        GtkWidget *frame;
-        gint page_num;
-
-        if(!selfp-&gt;html_notebook) {
-          return NULL;
-        }
-        page_num = gtk_notebook_get_current_page(GTK_NOTEBOOK (selfp-&gt;html_notebook));
-
-        if (page_num == -1)
-                return NULL;
-
-        frame = gtk_notebook_get_nth_page(GTK_NOTEBOOK (selfp-&gt;html_notebook), page_num);
-
-        return g_object_get_data(G_OBJECT (frame), &quot;html&quot;);
+	return chmsee_ui_chmfile_get_active_html(CHMSEE_UI_CHMFILE(selfp-&gt;ui_chmfile));
 }
 
 static void
@@ -1391,65 +938,6 @@ check_history(ChmSee *self, ChmseeIhtml *html)
 }
 
 static void
-update_tab_title(ChmSee *self, ChmseeIhtml *html)
-{
-  const gchar* html_title;
-  const gchar* tab_title;
-  const gchar* book_title;
-
-        html_title = chmsee_ihtml_get_title(html);
-
-        if (selfp-&gt;has_toc)
-                book_title = booktree_get_selected_book_title(BOOKTREE (selfp-&gt;booktree));
-        else
-                book_title = &quot;&quot;;
-
-        if (book_title &amp;&amp; book_title[0] != '\0' &amp;&amp;
-            html_title &amp;&amp; html_title[0] != '\0' &amp;&amp;
-            ncase_compare_utf8_string(book_title, html_title))
-                tab_title = g_strdup_printf(&quot;%s : %s&quot;, book_title, html_title);
-        else if (book_title &amp;&amp; book_title[0] != '\0')
-                tab_title = g_strdup(book_title);
-        else if (html_title &amp;&amp; html_title[0] != '\0')
-                tab_title = g_strdup(html_title);
-        else
-                tab_title = g_strdup(&quot;&quot;);
-
-        tab_set_title(self, html, tab_title);
-}
-
-static void
-tab_set_title(ChmSee *self, ChmseeIhtml *html, const gchar *title)
-{
-        GtkWidget *view;
-        GtkWidget *page;
-        GtkWidget *widget, *label;
-        gint num_pages, i;
-
-        view = chmsee_ihtml_get_widget(html);
-
-        if (title == NULL || title[0] == '\0')
-                title = _(&quot;No Title&quot;);
-
-        num_pages = gtk_notebook_get_n_pages(GTK_NOTEBOOK (selfp-&gt;html_notebook));
-
-        for (i = 0; i &lt; num_pages; i++) {
-                page = gtk_notebook_get_nth_page(GTK_NOTEBOOK (selfp-&gt;html_notebook), i);
-
-                if (gtk_bin_get_child(GTK_BIN (page)) == view) {
-                        widget = gtk_notebook_get_tab_label(GTK_NOTEBOOK (selfp-&gt;html_notebook), page);
-
-                        label = g_object_get_data(G_OBJECT (widget), &quot;label&quot;);
-
-                        if (label != NULL)
-                                gtk_label_set_text(GTK_LABEL (label), title);
-
-                        break;
-                }
-        }
-}
-
-static void
 update_status_bar(ChmSee *self, const gchar *message)
 {
         gchar *status;
@@ -1550,7 +1038,7 @@ void chmsee_open_uri(ChmSee *chmsee, const gchar *uri) {
 
 int chmsee_get_hpaned_position(ChmSee* self) {
 	gint position;
-	g_object_get(G_OBJECT(get_widget(self, &quot;hpaned1&quot;)),
+	g_object_get(G_OBJECT(selfp-&gt;ui_chmfile),
 			&quot;position&quot;, &amp;position,
 			NULL
 			);
@@ -1621,7 +1109,7 @@ void hide_sidepane(ChmSee* self) {
 
 void on_map(ChmSee* self) {
 	if(selfp-&gt;hpaned_position &gt;= 0) {
-	g_object_set(G_OBJECT(get_widget(self, &quot;hpaned1&quot;)),
+	g_object_set(G_OBJECT(selfp-&gt;ui_chmfile),
 			&quot;position&quot;, selfp-&gt;hpaned_position,
 			NULL
 			);
@@ -1836,59 +1324,10 @@ void chmsee_set_fullscreen(ChmSee* self, gboolean fullscreen) {
   }
 }
 
-void chmsee_refresh_index(ChmSee* self) {
-	ChmIndex* chmIndex = NULL;
-	if(selfp-&gt;book) {
-		chmIndex = chmsee_ichmfile_get_index(selfp-&gt;book);
-	}
-	chmsee_ui_index_set_model(CHMSEE_UI_INDEX(selfp-&gt;uiIndex), chmIndex);
-	if(chmIndex != NULL) {
-		g_debug(&quot;chmIndex != NULL&quot;);
-		gtk_widget_show(selfp-&gt;indexPage);
-	} else {
-		g_debug(&quot;chmIndex == NULL&quot;);
-		gtk_widget_hide(selfp-&gt;indexPage);
-	}
-}
-
-static GtkWidget* chmsee_new_index_page(ChmSee* self) {
-	GtkWidget* booktree_sw = gtk_scrolled_window_new(NULL, NULL);
-	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (booktree_sw),
-			GTK_POLICY_NEVER,
-			GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW (booktree_sw),
-			GTK_SHADOW_IN);
-	gtk_container_set_border_width(GTK_CONTAINER (booktree_sw), 2);
-
-	GtkWidget* uiIndex = chmsee_ui_index_new(NULL);
-	gtk_container_add(GTK_CONTAINER (booktree_sw), uiIndex);
-	g_signal_connect_swapped(uiIndex,
-			&quot;link-selected&quot;,
-			G_CALLBACK (chmsee_on_ui_index_link_selected),
-			self);
-
-	selfp-&gt;indexPage = booktree_sw;
-	selfp-&gt;uiIndex = uiIndex;
-	return GTK_WIDGET(booktree_sw);
-}
-
-void chmsee_on_ui_index_link_selected(ChmSee* self, Link* link) {
-	booktree_link_selected_cb(NULL, link, self);
-}
-
 
 gboolean chmsee_jump_index_by_name(ChmSee* self, const gchar* name) {
 	g_return_val_if_fail(IS_CHMSEE(self), FALSE);
-
-	gboolean res = chmsee_ui_index_select_link_by_name(
-			CHMSEE_UI_INDEX(self-&gt;priv-&gt;uiIndex),
-			name);
-
-	if(res) {
-		/* TODO: hard-code page num 1 */
-		gtk_notebook_set_current_page(GTK_NOTEBOOK(self-&gt;priv-&gt;control_notebook), 1);
-	}
-	return res;
+	return chmsee_ui_chmfile_jump_index_by_name(CHMSEE_UI_CHMFILE(selfp-&gt;ui_chmfile), name);
 }
 
 static void chmsee_set_context_menu_link(ChmSee* self, const gchar* link) {
@@ -1904,3 +1343,10 @@ static void on_keyboard_escape(GtkWidget* widget, ChmSee* self) {
 	}
 }
 
+static void new_tab(ChmSee * self, const gchar * location) {
+	chmsee_ui_chmfile_new_tab(CHMSEE_UI_CHMFILE(selfp-&gt;ui_chmfile), location);
+}
+
+static void on_close_current_tab(GtkWidget* widget, ChmSee* self) {
+	chmsee_ui_chmfile_close_current_tab(CHMSEE_UI_CHMFILE(selfp-&gt;ui_chmfile));
+}</diff>
      <filename>src/chmsee.c</filename>
    </modified>
    <modified>
      <diff>@@ -143,8 +143,6 @@ static void on_sidepane_toggled(GtkWidget*, ChmseeUiChmfile* self);
 
 static void chmsee_ui_chmfile_populate_window(ChmseeUiChmfile *);
 static void chmsee_ui_chmfile_close_current_book(ChmseeUiChmfile *);
-static void new_tab(ChmseeUiChmfile *, const gchar *);
-static ChmseeIhtml *get_active_html(ChmseeUiChmfile *);
 static void check_history(ChmseeUiChmfile *, ChmseeIhtml *);
 static void update_tab_title(ChmseeUiChmfile *, ChmseeIhtml *);
 static void tab_set_title(ChmseeUiChmfile *, ChmseeIhtml *, const gchar *);
@@ -287,7 +285,7 @@ booktree_link_selected_cb(GObject *ignored, Link *link, ChmseeUiChmfile *self)
         if (!g_ascii_strcasecmp(CHMSEE_NO_LINK, link-&gt;uri))
                 return;
 
-        html = get_active_html(self);
+        html = chmsee_ui_chmfile_get_active_html(self);
 
         g_signal_handlers_block_by_func(html, html_open_uri_cb, self);
 
@@ -302,8 +300,8 @@ booktree_link_selected_cb(GObject *ignored, Link *link, ChmseeUiChmfile *self)
 static void
 bookmarks_link_selected_cb(GObject *ignored, Link *link, ChmseeUiChmfile *chmsee)
 {
-  chmsee_ihtml_open_uri(get_active_html(chmsee), link-&gt;uri);
-  check_history(chmsee, get_active_html(chmsee));
+  chmsee_ihtml_open_uri(chmsee_ui_chmfile_get_active_html(chmsee), link-&gt;uri);
+  check_history(chmsee, chmsee_ui_chmfile_get_active_html(chmsee));
 }
 
 static void
@@ -358,7 +356,7 @@ html_location_changed_cb(ChmseeIhtml *html, const gchar *location, ChmseeUiChmfi
 {
         g_debug(&quot;html location changed cb: %s&quot;, location);
 
-        if (html == get_active_html(chmsee))
+        if (html == chmsee_ui_chmfile_get_active_html(chmsee))
                 check_history(chmsee, html);
 }
 
@@ -393,7 +391,7 @@ html_open_uri_cb(ChmseeIhtml* html, const gchar *uri, ChmseeUiChmfile *self)
     }
   }
 
-  if ((html == get_active_html(self)) &amp;&amp; selfp-&gt;has_toc)
+  if ((html == chmsee_ui_chmfile_get_active_html(self)) &amp;&amp; selfp-&gt;has_toc)
     booktree_select_uri(BOOKTREE (selfp-&gt;ui_topic), uri);
 
   return FALSE;
@@ -406,7 +404,7 @@ html_title_changed_cb(ChmseeIhtml *html, const gchar *title, ChmseeUiChmfile *se
 
         g_debug(&quot;html title changed cb %s&quot;, title);
 
-        update_tab_title(self, get_active_html(self));
+        update_tab_title(self, chmsee_ui_chmfile_get_active_html(self));
 
         location = chmsee_ihtml_get_location(html);
 
@@ -449,7 +447,7 @@ html_open_new_tab_cb(ChmseeIhtml *html, const gchar *location, ChmseeUiChmfile *
 {
         g_debug(&quot;html open new tab callback: %s&quot;, location);
 
-        new_tab(chmsee, location);
+        chmsee_ui_chmfile_new_tab(chmsee, location);
 }
 
 static void
@@ -504,12 +502,12 @@ on_copy(GtkWidget *widget, ChmseeUiChmfile *self)
 
         g_return_if_fail(GTK_IS_NOTEBOOK (selfp-&gt;html_notebook));
 
-        chmsee_ihtml_copy_selection(get_active_html(self));
+        chmsee_ihtml_copy_selection(chmsee_ui_chmfile_get_active_html(self));
 }
 
 static void
 on_copy_page_location(GtkWidget* widget, ChmseeUiChmfile* chmsee) {
-  ChmseeIhtml* html = get_active_html(chmsee);
+  ChmseeIhtml* html = chmsee_ui_chmfile_get_active_html(chmsee);
   const gchar* location = chmsee_ihtml_get_location(html);
   if(!location) return;
 
@@ -532,20 +530,20 @@ on_select_all(GtkWidget *widget, ChmseeUiChmfile *self)
 
         g_return_if_fail(GTK_IS_NOTEBOOK (selfp-&gt;html_notebook));
 
-        html = get_active_html(self);
+        html = chmsee_ui_chmfile_get_active_html(self);
         chmsee_ihtml_select_all(html);
 }
 
 static void
 on_back(GtkWidget *widget, ChmseeUiChmfile *chmsee)
 {
-  chmsee_ihtml_go_back(get_active_html(chmsee));
+  chmsee_ihtml_go_back(chmsee_ui_chmfile_get_active_html(chmsee));
 }
 
 static void
 on_forward(GtkWidget *widget, ChmseeUiChmfile *chmsee)
 {
-  chmsee_ihtml_go_forward(get_active_html(chmsee));
+  chmsee_ihtml_go_forward(chmsee_ui_chmfile_get_active_html(chmsee));
 }
 
 static void
@@ -559,7 +557,7 @@ on_home(GtkWidget *widget, ChmseeUiChmfile *self)
 static void
 on_zoom_in(GtkWidget *widget, ChmseeUiChmfile *self)
 {
-	ChmseeIhtml* html = get_active_html(self);
+	ChmseeIhtml* html = chmsee_ui_chmfile_get_active_html(self);
 	if(html != NULL) {
 		chmsee_ihtml_increase_size(html);
 	}
@@ -568,13 +566,13 @@ on_zoom_in(GtkWidget *widget, ChmseeUiChmfile *self)
 static void
 on_zoom_reset(GtkWidget *widget, ChmseeUiChmfile *chmsee)
 {
-  chmsee_ihtml_reset_size(get_active_html(chmsee));
+  chmsee_ihtml_reset_size(chmsee_ui_chmfile_get_active_html(chmsee));
 }
 
 static void
 on_zoom_out(GtkWidget *widget, ChmseeUiChmfile *self)
 {
-	ChmseeIhtml* html = get_active_html(self);
+	ChmseeIhtml* html = chmsee_ui_chmfile_get_active_html(self);
 	if(html != NULL) {
 		chmsee_ihtml_decrease_size(html);
 	}
@@ -590,17 +588,21 @@ on_open_new_tab(GtkWidget *widget, ChmseeUiChmfile *self)
 
         g_return_if_fail(GTK_IS_NOTEBOOK (selfp-&gt;html_notebook));
 
-        html = get_active_html(self);
+        html = chmsee_ui_chmfile_get_active_html(self);
         location = chmsee_ihtml_get_location(html);
 
         if (location != NULL) {
-          new_tab(self, location);
+          chmsee_ui_chmfile_new_tab(self, location);
         }
 }
 
 static void
 on_close_current_tab(GtkWidget *widget, ChmseeUiChmfile *self)
 {
+	chmsee_ui_chmfile_close_current_tab(self);
+}
+
+void chmsee_ui_chmfile_close_current_tab(ChmseeUiChmfile* self) {
         g_return_if_fail(GTK_IS_NOTEBOOK (selfp-&gt;html_notebook));
 
         if (gtk_notebook_get_n_pages(GTK_NOTEBOOK (selfp-&gt;html_notebook)) == 1) {
@@ -621,7 +623,7 @@ on_context_new_tab(GtkWidget *widget, ChmseeUiChmfile *self)
 	g_debug(&quot;On context open new tab: %s&quot;, selfp-&gt;context_menu_link);
 
 	if (selfp-&gt;context_menu_link != NULL) {
-		new_tab(self, selfp-&gt;context_menu_link);
+		chmsee_ui_chmfile_new_tab(self, selfp-&gt;context_menu_link);
 	}
 }
 
@@ -717,7 +719,7 @@ chmsee_ui_chmfile_populate_window(ChmseeUiChmfile *self)
 	selfp-&gt;ui_topic = booktree;
 	selfp-&gt;topic_page = topic_page;
 
-	new_tab(self, NULL);
+	chmsee_ui_chmfile_new_tab(self, NULL);
 
     GtkActionGroup* action_group = gtk_action_group_new (&quot;UiChmfileActions&quot;);
     selfp-&gt;action_group = action_group;
@@ -731,7 +733,8 @@ chmsee_ui_chmfile_populate_window(ChmseeUiChmfile *self)
     gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
 
     GtkAccelGroup* accel_group = gtk_ui_manager_get_accel_group (ui_manager);
-    gtk_window_add_accel_group (GTK_WINDOW (self), accel_group);
+    /* TODO: how to install shortcut for this widget */
+    /*  gtk_window_add_accel_group (GTK_WINDOW (self), accel_group); */
 
     GError* error = NULL;
     if (!gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, &amp;error))
@@ -782,9 +785,9 @@ chmsee_ui_chmfile_set_model(ChmseeUiChmfile* self, ChmseeIchmfile *book)
 	gtk_notebook_set_current_page(GTK_NOTEBOOK (selfp-&gt;control_notebook),
 			g_list_length(bookmarks_list) &amp;&amp; selfp-&gt;has_toc ? 1 : 0);
 
-	chmsee_ihtml_set_variable_font(get_active_html(self),
+	chmsee_ihtml_set_variable_font(chmsee_ui_chmfile_get_active_html(self),
 			chmsee_ichmfile_get_variable_font(selfp-&gt;model));
-	chmsee_ihtml_set_fixed_font(get_active_html(self),
+	chmsee_ihtml_set_fixed_font(chmsee_ui_chmfile_get_active_html(self),
 			chmsee_ichmfile_get_fixed_font(selfp-&gt;model));
 
 	if (chmsee_ichmfile_get_home(selfp-&gt;model)) {
@@ -843,8 +846,8 @@ new_tab_content(ChmseeUiChmfile *chmsee, const gchar *str)
         return widget;
 }
 
-static void
-new_tab(ChmseeUiChmfile *self, const gchar *location)
+void
+chmsee_ui_chmfile_new_tab(ChmseeUiChmfile *self, const gchar *location)
 {
         ChmseeIhtml  *html;
         GtkWidget    *frame;
@@ -927,7 +930,7 @@ open_homepage(ChmseeUiChmfile *self)
 {
         ChmseeIhtml *html;
 
-        html = get_active_html(self);
+        html = chmsee_ui_chmfile_get_active_html(self);
 
         /* g_signal_handlers_block_by_func(html, html_open_uri_cb, self); */
 
@@ -954,7 +957,7 @@ reload_current_page(ChmseeUiChmfile *self)
 
         g_return_if_fail(GTK_IS_NOTEBOOK (selfp-&gt;html_notebook));
 
-        html = get_active_html(self);
+        html = chmsee_ui_chmfile_get_active_html(self);
         location = chmsee_ihtml_get_location(html);
 
         if (location != NULL) {
@@ -962,8 +965,8 @@ reload_current_page(ChmseeUiChmfile *self)
         }
 }
 
-static ChmseeIhtml *
-get_active_html(ChmseeUiChmfile *self)
+ChmseeIhtml *
+chmsee_ui_chmfile_get_active_html(ChmseeUiChmfile *self)
 {
         GtkWidget *frame;
         gint page_num;</diff>
      <filename>src/ui_chmfile.c</filename>
    </modified>
    <modified>
      <diff>@@ -36,6 +36,7 @@
 #include &lt;gtk/gtk.h&gt;
 
 #include &quot;models/ichmfile.h&quot;
+#include &quot;ihtml.h&quot;
 
 G_BEGIN_DECLS
 
@@ -63,6 +64,10 @@ struct _ChmseeUiChmfileClass {
 GType chmsee_ui_chmfile_get_type(void);
 GtkWidget* chmsee_ui_chmfile_new(void);
 void chmsee_ui_chmfile_set_model(ChmseeUiChmfile* self, ChmseeIchmfile* model);
+ChmseeIhtml* chmsee_ui_chmfile_get_active_html(ChmseeUiChmfile* self);
+gboolean chmsee_ui_chmfile_jump_index_by_name(ChmseeUiChmfile* self, const gchar* name);
+void chmsee_ui_chmfile_new_tab(ChmseeUiChmfile *self, const gchar *location);
+void chmsee_ui_chmfile_close_current_tab(ChmseeUiChmfile* self);
 
 G_END_DECLS
 </diff>
      <filename>src/ui_chmfile.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ba35888b4ec6aa4bf8e8908e3a722e4cfda89516</id>
    </parent>
  </parents>
  <author>
    <name>LI Daobing</name>
    <email>lidaobing@gmail.com</email>
  </author>
  <url>http://github.com/lidaobing/chmsee/commit/3ef2d022199e5e50024208e9861dbde294d9da6b</url>
  <id>3ef2d022199e5e50024208e9861dbde294d9da6b</id>
  <committed-date>2009-08-14T04:57:45-07:00</committed-date>
  <authored-date>2009-08-03T09:08:40-07:00</authored-date>
  <message>update chmsee</message>
  <tree>cf4a0341ce63a1537ce8e95f176adf8a14a2fc4d</tree>
  <committer>
    <name>LI Daobing</name>
    <email>lidaobing@gmail.com</email>
  </committer>
</commit>
