[Aptitude-svn-commit] r3584 - in branches/aptitude-0.3/aptitude: . src/vscreen
Daniel Burrows
dburrows@costa.debian.org
Sun Jul 3 17:32:39 UTC 2005
Author: dburrows
Date: Sun Jul 3 17:32:35 2005
New Revision: 3584
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/vscreen/vs_util.cc
branches/aptitude-0.3/aptitude/src/vscreen/vs_util.h
Log:
Allow the encoding of a file being loaded in a popup window to be specified.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Sun Jul 3 17:32:35 2005
@@ -1,5 +1,10 @@
2005-07-03 Daniel Burrows <dburrows@debian.org>
+ * src/vscreen/vs_util.cc, src/vscreen/vs_util.h:
+
+ Allow the user to specify the encoding of the file to be loaded
+ in a vs_dialog_fileview.
+
* src/aptitude.h:
Whoops, need to #include <string.h> for strchr.
Modified: branches/aptitude-0.3/aptitude/src/vscreen/vs_util.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vs_util.cc (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vs_util.cc Sun Jul 3 17:32:35 2005
@@ -242,9 +242,10 @@
vscreen_widget *vs_dialog_fileview(string fn,
slot0arg okslot,
slotarg<sigc::slot1<void, vs_pager *> > searchslot,
- const style &st)
+ const style &st,
+ const char *encoding=NULL)
{
- vs_file_pager *p=new vs_file_pager(fn);
+ vs_file_pager *p=new vs_file_pager(fn, encoding);
vs_scrollbar *scrollbar=new vs_scrollbar(vs_scrollbar::VERTICAL, 0, 0);
vs_table *t=new vs_table;
@@ -269,10 +270,12 @@
vscreen_widget *vs_dialog_fileview(string fn,
slot0arg okslot,
- slotarg<sigc::slot1<void, vs_pager *> > searchslot)
+ slotarg<sigc::slot1<void, vs_pager *> > searchslot,
+ const char *encoding=NULL)
{
return vs_dialog_fileview(fn, okslot, searchslot,
- style_attrs_flip(A_REVERSE));
+ style_attrs_flip(A_REVERSE),
+ encoding);
}
static void do_dialog_string(wstring s,
Modified: branches/aptitude-0.3/aptitude/src/vscreen/vs_util.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vs_util.h (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vs_util.h Sun Jul 3 17:32:35 2005
@@ -112,11 +112,13 @@
// The "searchslot" is called when a search is being conducted.
vscreen_widget *vs_dialog_fileview(std::string fn,
slot0arg okslot=NULL,
- slotarg<sigc::slot1<void, vs_pager *> > searchslot=NULL);
+ slotarg<sigc::slot1<void, vs_pager *> > searchslot=NULL,
+ const char *encoding=NULL);
vscreen_widget *vs_dialog_fileview(std::string fn,
slot0arg okslot,
slotarg<sigc::slot1<void, vs_pager *> > searchslot,
- const style &st);
+ const style &st,
+ const char *encoding=NULL);
vscreen_widget *vs_dialog_string(fragment *msg,
std::wstring deflt,
More information about the Aptitude-svn-commit
mailing list