dia r4315 - in trunk: . lib plug-ins/python
- From: hans svn gnome org
- To: svn-commits-list gnome org
- Subject: dia r4315 - in trunk: . lib plug-ins/python
- Date: Sun, 8 Mar 2009 21:32:16 +0000 (UTC)
Author: hans
Date: Sun Mar 8 21:32:16 2009
New Revision: 4315
URL: http://svn.gnome.org/viewvc/dia?rev=4315&view=rev
Log:
2009-03-08 Hans Breuer <hans breuer org>
* plug-ins/python/codegen.py : PascalRenderer by Johann Glaser and
some adjustments to (Cxx/Py/Java)Renderer to almost get on par
* lib/filter.c(filter_guess_*_filter) : make the no-guess flag work
as intended, i.e. when there is just one filter per extension it's
no guess
Modified:
trunk/ChangeLog
trunk/lib/filter.c
trunk/plug-ins/python/codegen.py
Modified: trunk/lib/filter.c
==============================================================================
--- trunk/lib/filter.c (original)
+++ trunk/lib/filter.c Sun Mar 8 21:32:16 2009
@@ -148,13 +148,14 @@
gint i;
for (i = 0; ef->extensions[i] != NULL; i++) {
- if (ef->hints & FILTER_DONT_GUESS) {
- dont_guess = ef;
- ++no_guess;
- continue;
- }
- if (!g_ascii_strcasecmp(ef->extensions[i], ext))
+ if (!g_ascii_strcasecmp(ef->extensions[i], ext)) {
+ if (ef->hints & FILTER_DONT_GUESS) {
+ dont_guess = ef;
+ ++no_guess;
+ continue;
+ }
return ef;
+ }
}
}
return (no_guess == 1) ? dont_guess : NULL;
@@ -257,13 +258,14 @@
gint i;
for (i = 0; ifilter->extensions[i] != NULL; i++) {
- if (ifilter->hints & FILTER_DONT_GUESS) {
- dont_guess = ifilter;
- ++no_guess;
- continue;
- }
- if (!g_ascii_strcasecmp(ifilter->extensions[i], ext))
+ if (!g_ascii_strcasecmp(ifilter->extensions[i], ext)) {
+ if (ifilter->hints & FILTER_DONT_GUESS) {
+ dont_guess = ifilter;
+ ++no_guess;
+ continue;
+ }
return ifilter;
+ }
}
}
return (no_guess == 1) ? dont_guess : NULL;
Modified: trunk/plug-ins/python/codegen.py
==============================================================================
--- trunk/plug-ins/python/codegen.py (original)
+++ trunk/plug-ins/python/codegen.py Sun Mar 8 21:32:16 2009
@@ -107,6 +107,10 @@
self.klasses[chi_name].AddParrent(par_name)
else: self.klasses[chi_name].AddTemplate(par_name)
+ def end_render(self) :
+ # without this we would accumulate info from every pass
+ self.attributes = []
+ self.operations = []
class PyRenderer(ObjRenderer) :
def __init__(self) :
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]