[Aptitude-svn-commit] r4210 - in branches/aptitude-0.3/aptitude: .
src
Daniel Burrows
dburrows at costa.debian.org
Sat Sep 24 01:19:36 UTC 2005
Author: dburrows
Date: Sat Sep 24 01:19:32 2005
New Revision: 4210
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/ui.cc
Log:
Display the reference manual in a toplevel widget instead of a popup.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Sat Sep 24 01:19:32 2005
@@ -1,5 +1,10 @@
2005-09-23 Daniel Burrows <dburrows at debian.org>
+ * src/ui.cc:
+
+ Display the user's manual as a top-level widget instead of a
+ dialog box.
+
* src/solution_screen.cc:
Switch back to using the widget itself as the menu target, and
Modified: branches/aptitude-0.3/aptitude/src/ui.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/ui.cc (original)
+++ branches/aptitude-0.3/aptitude/src/ui.cc Sat Sep 24 01:19:32 2005
@@ -782,12 +782,24 @@
encoding="UTF-8";
}
- vs_widget_ref w=vs_dialog_fileview(buf, NULL,
- arg(sigc::ptr_fun(pager_search)),
- arg(sigc::ptr_fun(pager_repeat_search)),
- encoding);
- w->show_all();
- popup_widget(w);
+ vs_table_ref t = vs_table::create();
+ vs_scrollbar_ref s = vs_scrollbar::create(vs_scrollbar::VERTICAL);
+ vs_file_pager_ref p = vs_file_pager::create(buf, encoding);
+
+ p->line_changed.connect(sigc::mem_fun(s.unsafe_get_ref(), &vs_scrollbar::set_slider));
+ s->scrollbar_interaction.connect(sigc::mem_fun(p.unsafe_get_ref(), &vs_pager::scroll_page));
+ p->scroll_top(); // Force a scrollbar update.
+
+ t->add_widget_opts(p, 0, 0, 1, 1,
+ vs_table::EXPAND | vs_table::FILL | vs_table::SHRINK,
+ vs_table::EXPAND | vs_table::FILL);
+ t->add_widget_opts(s, 0, 1, 1, 1,
+ vs_table::EXPAND, vs_table::EXPAND | vs_table::FILL);
+
+ s->show();
+ p->show();
+
+ add_main_widget(t, _("User's Manual"), _("The full user's manual of aptitude"), _("Manual"));
}
static void do_help_faq()
More information about the Aptitude-svn-commit
mailing list