[Aptitude-svn-commit] r3730 - in branches/aptitude-0.3/aptitude: .
src
Daniel Burrows
dburrows at costa.debian.org
Mon Aug 8 16:53:03 UTC 2005
Author: dburrows
Date: Mon Aug 8 16:53:00 2005
New Revision: 3730
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/ui.h
Log:
Fix the ui.h interface routines for ref_ptrs.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Mon Aug 8 16:53:00 2005
@@ -1,5 +1,9 @@
2005-08-08 Daniel Burrows <dburrows at debian.org>
+ * src/ui.h:
+
+ Use ref_ptrs in interface routines.
+
* src/vscreen/vs_editline.h:
Add missing "const" qualifier to a constructor reference
Modified: branches/aptitude-0.3/aptitude/src/ui.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/ui.h (original)
+++ branches/aptitude-0.3/aptitude/src/ui.h Mon Aug 8 16:53:00 2005
@@ -27,6 +27,10 @@
class pkg_hier;
class vs_progress;
class vscreen_widget;
+template<class T> class ref_ptr;
+
+typedef ref_ptr<vscreen_widget> vs_widget_ref;
+typedef ref_ptr<vs_progress> vs_progress_ref;
/******************************************************************************
* Global signals:
@@ -122,7 +126,7 @@
// Displays a "popup" widget. If the second argument is false, show_all
// will not be called on the widget.
-void popup_widget(vscreen_widget *w, bool do_show_all=true);
+void popup_widget(const vs_widget_ref &w, bool do_show_all=true);
// Displays a widget on the "main" program level, inserting the given string
// into the menu listing available "main" screens to reference it.
@@ -137,18 +141,20 @@
* \param menudesc the description of the generated menu item
* \param tablabel the label of the corresponding tab
*/
-void add_main_widget(vscreen_widget *w, const std::string &menuref,
+void add_main_widget(const vs_widget_ref &w,
+ const std::string &menuref,
const std::string &menudesc,
const std::string &tablabel);
-void insert_main_widget(vscreen_widget *w, const std::string &menuref,
+void insert_main_widget(const vs_widget_ref &w,
+ const std::string &menuref,
const std::string &menudesc,
const std::string &tablabel);
/** Returns the currently active main widget. */
-vscreen_widget *active_main_widget();
+vs_widget_ref active_main_widget();
// Generates a progress bar.
-vs_progress *gen_progress_bar();
+vs_progress_ref gen_progress_bar();
// Generates an appropriate box to wrap text.
fragment *wrapbox(fragment *contents);
@@ -266,14 +272,14 @@
// These generate particular screens of the UI:
// Info screen
-vscreen_widget *make_info_screen(const pkgCache::PkgIterator &pkg,
- const pkgCache::VerIterator &ver);
+vs_widget_ref make_info_screen(const pkgCache::PkgIterator &pkg,
+ const pkgCache::VerIterator &ver);
// Dependency screen
-vscreen_widget *make_dep_screen(const pkgCache::PkgIterator &pkg,
- const pkgCache::VerIterator &ver,
- bool reverse=false);
+vs_widget_ref make_dep_screen(const pkgCache::PkgIterator &pkg,
+ const pkgCache::VerIterator &ver,
+ bool reverse=false);
// List of versions
-vscreen_widget *make_ver_screen(const pkgCache::PkgIterator &pkg);
+vs_widget_ref make_ver_screen(const pkgCache::PkgIterator &pkg);
// Various defaults:
extern const char *default_pkgstatusdisplay;
More information about the Aptitude-svn-commit
mailing list