[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog gui/gtk.cpp gui/gui.cpp gui/gui.h
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog gui/gtk.cpp gui/gui.cpp gui/gui.h |
Date: |
Wed, 22 Aug 2007 21:38:22 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/08/22 21:38:22
Modified files:
. : ChangeLog
gui : gtk.cpp gui.cpp gui.h
Log message:
* gui/gui.{cpp,h}: Use kasper's tree class for getMovieInfo
(InfoTable is now an InfoTree)
* gui/gtk.cpp (menuitem_movieinfo_callback): fix to use
an InfoTree - just a leaf-iteration.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4072&r2=1.4073
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.104&r2=1.105
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.93&r2=1.94
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.h?cvsroot=gnash&r1=1.59&r2=1.60
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4072
retrieving revision 1.4073
diff -u -b -r1.4072 -r1.4073
--- ChangeLog 22 Aug 2007 21:04:51 -0000 1.4072
+++ ChangeLog 22 Aug 2007 21:38:21 -0000 1.4073
@@ -1,5 +1,12 @@
2007-08-23 Sandro Santilli <address@hidden>
+ * gui/gui.{cpp,h}: Use kasper's tree class for getMovieInfo
+ (InfoTable is now an InfoTree)
+ * gui/gtk.cpp (menuitem_movieinfo_callback): fix to use
+ an InfoTree - just a leaf-iteration.
+
+2007-08-23 Sandro Santilli <address@hidden>
+
* libbase/tree.hh: include generic tree class by
Kasper Peeters <address@hidden>
Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- gui/gtk.cpp 21 Aug 2007 23:38:35 -0000 1.104
+++ gui/gtk.cpp 22 Aug 2007 21:38:22 -0000 1.105
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: gtk.cpp,v 1.104 2007/08/21 23:38:35 strk Exp $ */
+/* $Id: gtk.cpp,v 1.105 2007/08/22 21:38:22 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -979,7 +979,7 @@
GtkWidget *table1 = gtk_table_new(4, 2, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), table1, FALSE, FALSE, 0);
- std::auto_ptr<InfoTable> infoptr = gui->getMovieInfo();
+ std::auto_ptr<InfoTree> infoptr = gui->getMovieInfo();
if ( ! infoptr.get() )
{
label = gtk_label_new (_("VM not initialized yet"));
@@ -988,12 +988,11 @@
return;
}
- InfoTable& info = *infoptr;
+ InfoTree& info = *infoptr;
-#if 1
size_t size = info.size();
- for (InfoTable::reverse_iterator i=info.rbegin(), e=info.rend(); i!=e; ++i)
+ for (InfoTree::leaf_iterator i=info.begin_leaf(), e=info.end_leaf(); i!=e;
++i)
{
StringPair& p = *i;
guint up = size;
@@ -1035,22 +1034,6 @@
gtk_widget_show_all (window1);
-#else
- GtkWidget* box = gtk_vbox_new (FALSE, 2);
- gtk_widget_show (box);
- gtk_container_add (GTK_CONTAINER (window1), box);
-
- for (InfoTable::reverse_iterator i=info.rbegin(), e=info.rend(); i!=e; ++i)
- {
- StringPair& p = *i;
-
- string text = p.first + string(" = ") + p.second;
- label = gtk_label_new (text.c_str());
- gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (box), label, TRUE, FALSE, 3);
- }
-#endif
-
}
Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -b -r1.93 -r1.94
--- gui/gui.cpp 21 Aug 2007 15:05:02 -0000 1.93
+++ gui/gui.cpp 22 Aug 2007 21:38:22 -0000 1.94
@@ -582,17 +582,17 @@
setInvalidatedRegion(bounds);
}
-std::auto_ptr<Gui::InfoTable>
+std::auto_ptr<Gui::InfoTree>
Gui::getMovieInfo() const
{
- std::auto_ptr<InfoTable> ret;
+ std::auto_ptr<InfoTree> ret;
if ( ! VM::isInitialized() )
{
return ret;
}
- ret.reset(new InfoTable());
+ ret.reset(new InfoTree());
VM& vm = VM::get();
@@ -600,7 +600,7 @@
int vmSWFVersion = vm.getSWFVersion();
char buf[16];
snprintf(buf, 16, "SWF%d", vmSWFVersion); buf[15] = '\0';
- ret->push_back(StringPair("VM", buf));
+ ret->insert(ret->begin(), StringPair("VM", buf));
// Print info about levels (only level0 for now, then will be extended)
movie_root& stage = vm.getRoot();
@@ -608,8 +608,8 @@
movie_definition* def0 = level0->get_movie_definition();
assert(def0);
snprintf(buf, 16, "SWF%d", def0->get_version()); buf[15] = '\0';
- ret->push_back(StringPair("_level0 SWFVersion", string(buf)));
- ret->push_back(StringPair("_level0 URL", def0->get_url()));
+ ret->insert(ret->begin(), StringPair("_level0 SWFVersion", string(buf)));
+ ret->insert(ret->begin(), StringPair("_level0 URL", def0->get_url()));
return ret;
}
Index: gui/gui.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.h,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- gui/gui.h 18 Aug 2007 13:08:15 -0000 1.59
+++ gui/gui.h 22 Aug 2007 21:38:22 -0000 1.60
@@ -29,6 +29,7 @@
#include "rect.h" // for composition
#include "snappingrange.h" // for InvalidatedRanges
#include "gnash.h" // for gnash::key::code type
+#include "tree.hh" // for tree
#include <string>
@@ -247,13 +248,13 @@
// TODO: use a tree-like structure (tree.hh?)
typedef std::pair<std::string,std::string> StringPair;
- typedef std::vector<StringPair> InfoTable;
+ typedef tree<StringPair> InfoTree;
/// \brief
- /// Return a table containing informations about the movie
+ /// Return a tree containing informations about the movie
/// currently being played (or NULL, if the VM isn't initialized yet)
///
- std::auto_ptr<InfoTable> getMovieInfo() const;
+ std::auto_ptr<InfoTree> getMovieInfo() const;
protected:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog gui/gtk.cpp gui/gui.cpp gui/gui.h,
Sandro Santilli <=