rpms/gchempaint/F-7 21964.patch,NONE,1.1 gchempaint.spec,1.13,1.14
Julian Sikorski (belegdol)
fedora-extras-commits at redhat.com
Tue Jan 8 08:55:39 UTC 2008
Author: belegdol
Update of /cvs/extras/rpms/gchempaint/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14504
Modified Files:
gchempaint.spec
Added Files:
21964.patch
Log Message:
* Tue Jan 8 2008 Julian Sikorski <belegdol[at]gmail[dot]com> - 0.8.5-2
- Fixed Savannah bug #21964 - atoms and bonds are not correctly updated
21964.patch:
--- NEW FILE 21964.patch ---
Index: lib/atom.cc
===================================================================
RCS file: /cvsroot/gchempaint/gchempaint/lib/atom.cc,v
retrieving revision 1.37.2.8
diff -p -u -5 -r1.37.2.8 atom.cc
--- lib/atom.cc 19 Dec 2007 17:25:53 -0000 1.37.2.8
+++ lib/atom.cc 6 Jan 2008 15:40:50 -0000
@@ -321,10 +321,12 @@ void gcpAtom::Add (GtkWidget* w)
if (!w)
return;
if (m_Changed > 0)
m_Changed--;
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
+ if (pData->Items[this] != NULL)
+ return;
gcpView* pView = pData->View;
gcpTheme *pTheme = pView->GetDoc ()->GetTheme ();
if (m_Layout == NULL) {
PangoContext* pc = pView->GetPangoContext();
m_Layout = pango_layout_new (pc);
@@ -585,11 +587,11 @@ void gcpAtom::Add (GtkWidget* w)
void gcpAtom::Update(GtkWidget* w)
{
if (!w) return;
gcpWidgetData* pData = (gcpWidgetData*)g_object_get_data(G_OBJECT(w), "data");
- if (pData->Items[this] != NULL)
+ if (pData->Items[this] == NULL)
return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
double x, y, xc = 0., yc;
GetCoords(&x, &y);
x *= pTheme->GetZoomFactor ();
Index: lib/bond.cc
===================================================================
RCS file: /cvsroot/gchempaint/gchempaint/lib/bond.cc,v
retrieving revision 1.23.2.5
diff -p -u -5 -r1.23.2.5 bond.cc
--- lib/bond.cc 19 Dec 2007 17:25:53 -0000 1.23.2.5
+++ lib/bond.cc 6 Jan 2008 14:49:59 -0000
@@ -411,10 +411,12 @@ void gcpBond::SetSelected(GtkWidget* w,
void gcpBond::Add(GtkWidget* w)
{
if (!w) return;
gcpWidgetData* pData = (gcpWidgetData*)g_object_get_data(G_OBJECT(w), "data");
+ if (pData->Items[this] != NULL)
+ return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
Atom *pAtom0, *pAtom1;
if (!(pAtom0 = GetAtom(0))) return;
if (!(pAtom1 = GetAtom(1))) return;
unsigned char order = GetOrder();
@@ -712,11 +714,11 @@ GnomeCanvasPathDef *gcpBond::BuildCrossi
void gcpBond::Update(GtkWidget* w)
{
if (!w || !m_order)
return;
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data(G_OBJECT(w), "data");
- if (pData->Items[this] != NULL)
+ if (pData->Items[this] == NULL)
return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
bool result = false;
if (m_Crossing.size () > 0) {
map<gcpBond*, gcpBondCrossing>::iterator i, iend = m_Crossing.end ();
Index: lib/electron.cc
===================================================================
RCS file: /cvsroot/gchempaint/gchempaint/lib/electron.cc,v
retrieving revision 1.8.2.5
diff -p -u -5 -r1.8.2.5 electron.cc
--- lib/electron.cc 19 Dec 2007 17:25:53 -0000 1.8.2.5
+++ lib/electron.cc 6 Jan 2008 15:40:50 -0000
@@ -113,10 +113,12 @@ void gcpElectron::SetPosition (unsigned
}
void gcpElectron::Add(GtkWidget* w)
{
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
+ if (pData->Items[this] != NULL)
+ return;
gcpTheme* pTheme = pData->View->GetDoc ()->GetTheme ();
GnomeCanvasGroup* group = GNOME_CANVAS_GROUP(gnome_canvas_item_new(pData->Group, gnome_canvas_group_ext_get_type(), NULL));
GnomeCanvasItem* item;
const char *color = (m_pAtom)? ((pData->IsSelected(m_pAtom))? SelectColor: Color): "white";
double x, y, angle = m_Angle / 180. * M_PI;
@@ -182,11 +184,11 @@ void gcpElectron::Add(GtkWidget* w)
void gcpElectron::Update (GtkWidget* w)
{
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
gcpTheme* pTheme = pData->View->GetDoc ()->GetTheme ();
- if (pData->Items[this] != NULL)
+ if (pData->Items[this] == NULL)
return;
GnomeCanvasGroup *group = pData->Items[this];
double x, y, angle = m_Angle / 180. * M_PI;
if (m_Dist != 0.){
m_pAtom->GetCoords (&x, &y);
Index: lib/fragment.cc
===================================================================
RCS file: /cvsroot/gchempaint/gchempaint/lib/fragment.cc,v
retrieving revision 1.41.2.4
diff -p -u -5 -r1.41.2.4 fragment.cc
--- lib/fragment.cc 19 Dec 2007 17:25:53 -0000 1.41.2.4
+++ lib/fragment.cc 6 Jan 2008 15:40:51 -0000
@@ -176,10 +176,12 @@ bool gcpFragment::OnChanged (bool save)
}
void gcpFragment::Add (GtkWidget* w)
{
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
+ if (pData->Items[this] != NULL)
+ return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
gcpView* pView = pData->View;
if (m_ascent <= 0) {
PangoContext* pc = pData->View->GetPangoContext ();
m_Layout = pango_layout_new (pc);
@@ -356,11 +358,11 @@ void gcpFragment::SetSelected (GtkWidget
}
void gcpFragment::Update (GtkWidget* w)
{
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
- if (pData->Items[this] != NULL)
+ if (pData->Items[this] == NULL)
return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
GnomeCanvasGroup *group = pData->Items[this];
g_object_set (G_OBJECT (g_object_get_data (G_OBJECT (group), "fragment")),
"x", m_x * pTheme->GetZoomFactor () - m_lbearing,
Index: lib/mesomery-arrow.cc
===================================================================
RCS file: /cvsroot/gchempaint/gchempaint/lib/mesomery-arrow.cc,v
retrieving revision 1.12.2.1
diff -p -u -5 -r1.12.2.1 mesomery-arrow.cc
--- lib/mesomery-arrow.cc 19 Dec 2007 17:25:53 -0000 1.12.2.1
+++ lib/mesomery-arrow.cc 6 Jan 2008 15:40:51 -0000
@@ -112,10 +112,12 @@ bool gcpMesomeryArrow::Load (xmlNodePtr
}
void gcpMesomeryArrow::Add (GtkWidget* w)
{
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
+ if (pData->Items[this] != NULL)
+ return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
GnomeCanvasPoints *points = gnome_canvas_points_new (2);
GnomeCanvasGroup* group = GNOME_CANVAS_GROUP(gnome_canvas_item_new (pData->Group, gnome_canvas_group_ext_get_type (), NULL));
GnomeCanvasItem* item;
points->coords[0] = m_x * pTheme->GetZoomFactor ();
@@ -144,11 +146,11 @@ void gcpMesomeryArrow::Add (GtkWidget* w
}
void gcpMesomeryArrow::Update (GtkWidget* w)
{
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
- if (pData->Items[this] != NULL)
+ if (pData->Items[this] == NULL)
return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
GnomeCanvasGroup* group = pData->Items[this];
GnomeCanvasPoints *points = gnome_canvas_points_new( 2);
points->coords[0] = m_x * pTheme->GetZoomFactor ();
Index: lib/reaction-arrow.cc
===================================================================
RCS file: /cvsroot/gchempaint/gchempaint/lib/reaction-arrow.cc,v
retrieving revision 1.14.2.3
diff -p -u -5 -r1.14.2.3 reaction-arrow.cc
--- lib/reaction-arrow.cc 19 Dec 2007 17:25:54 -0000 1.14.2.3
+++ lib/reaction-arrow.cc 6 Jan 2008 15:40:51 -0000
@@ -134,10 +134,12 @@ bool gcpReactionArrow::Load (xmlNodePtr
}
void gcpReactionArrow::Add (GtkWidget* w)
{
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
+ if (pData->Items[this] != NULL)
+ return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
GnomeCanvasPoints *points = gnome_canvas_points_new (2);
GnomeCanvasGroup* group = GNOME_CANVAS_GROUP(gnome_canvas_item_new (pData->Group, gnome_canvas_group_ext_get_type (), NULL));
GnomeCanvasItem* item;
switch(m_Type) {
@@ -256,12 +258,10 @@ void gcpReactionArrow::Add (GtkWidget* w
}
void gcpReactionArrow::Update (GtkWidget* w)
{
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
- if (pData->Items[this] != NULL)
- return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
GnomeCanvasGroup* group = pData->Items[this];
if (!group) {
Add (w);
m_TypeChanged = false;
Index: lib/reaction-operator.cc
===================================================================
RCS file: /cvsroot/gchempaint/gchempaint/lib/reaction-operator.cc,v
retrieving revision 1.7.2.3
diff -p -u -5 -r1.7.2.3 reaction-operator.cc
--- lib/reaction-operator.cc 19 Dec 2007 17:25:54 -0000 1.7.2.3
+++ lib/reaction-operator.cc 6 Jan 2008 15:40:51 -0000
@@ -46,10 +46,12 @@ gcpReactionOperator::~gcpReactionOperato
void gcpReactionOperator::Add (GtkWidget* w)
{
if (!w)
return;
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
+ if (pData->Items[this] != NULL)
+ return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
double x, y;
GetCoords (&x, &y);
x *= pTheme->GetZoomFactor ();
y *= pTheme->GetZoomFactor ();
@@ -98,11 +100,11 @@ void gcpReactionOperator::Add (GtkWidget
void gcpReactionOperator::Update (GtkWidget* w)
{
if (!w)
return;
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
- if (pData->Items[this] != NULL)
+ if (pData->Items[this] == NULL)
return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
double x, y;
GetCoords (&x, &y);
x *= pTheme->GetZoomFactor ();
Index: lib/text.cc
===================================================================
RCS file: /cvsroot/gchempaint/gchempaint/lib/text.cc,v
retrieving revision 1.29.2.3
diff -p -u -5 -r1.29.2.3 text.cc
--- lib/text.cc 19 Dec 2007 17:25:54 -0000 1.29.2.3
+++ lib/text.cc 6 Jan 2008 15:40:51 -0000
@@ -595,10 +595,12 @@ bool gcpText::LoadNode (xmlNodePtr node,
}
void gcpText::Add (GtkWidget* w)
{
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
+ if (pData->Items[this] != NULL)
+ return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
if (m_ascent <= 0) {
PangoContext* pc = pData->View->GetPangoContext ();
m_Layout = pango_layout_new (pc);
PangoAttrList *l = pango_attr_list_new ();
@@ -696,11 +698,11 @@ bool gcpText::OnChanged (bool save)
}
void gcpText::Update(GtkWidget* w)
{
gcpWidgetData* pData = (gcpWidgetData*)g_object_get_data(G_OBJECT(w), "data");
- if (pData->Items[this] != NULL)
+ if (pData->Items[this] == NULL)
return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
GnomeCanvasGroup* group = pData->Items[this];
g_object_set(G_OBJECT(g_object_get_data(G_OBJECT(group), "text")),
"x", m_x * pTheme->GetZoomFactor (),
Index: plugins/arrows/retrosynthesisarrow.cc
===================================================================
RCS file: /cvsroot/gchempaint/gchempaint/plugins/arrows/retrosynthesisarrow.cc,v
retrieving revision 1.12.2.2
diff -p -u -5 -r1.12.2.2 retrosynthesisarrow.cc
--- plugins/arrows/retrosynthesisarrow.cc 19 Dec 2007 17:25:54 -0000 1.12.2.2
+++ plugins/arrows/retrosynthesisarrow.cc 6 Jan 2008 15:40:51 -0000
@@ -114,10 +114,12 @@ bool gcpRetrosynthesisArrow::Load(xmlNod
}
void gcpRetrosynthesisArrow::Add (GtkWidget* w)
{
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
+ if (pData->Items[this] != NULL)
+ return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
double x0, y0, x1, y1, dx, dy, dAngle;
x0 = m_x * pTheme->GetZoomFactor ();
y0 = m_y * pTheme->GetZoomFactor ();
x1 = (m_x + m_width) * pTheme->GetZoomFactor ();
@@ -161,11 +163,11 @@ void gcpRetrosynthesisArrow::Add (GtkWid
}
void gcpRetrosynthesisArrow::Update (GtkWidget* w)
{
gcpWidgetData* pData = (gcpWidgetData*) g_object_get_data (G_OBJECT (w), "data");
- if (pData->Items[this] != NULL)
+ if (pData->Items[this] == NULL)
return;
gcpTheme *pTheme = pData->View->GetDoc ()->GetTheme ();
GnomeCanvasGroup* group = pData->Items[this];
double x0, y0, x1, y1, dx, dy, dAngle;
x0 = m_x * pTheme->GetZoomFactor ();
Index: gchempaint.spec
===================================================================
RCS file: /cvs/extras/rpms/gchempaint/F-7/gchempaint.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- gchempaint.spec 21 Dec 2007 18:10:49 -0000 1.13
+++ gchempaint.spec 8 Jan 2008 08:55:03 -0000 1.14
@@ -1,6 +1,6 @@
Name: gchempaint
Version: 0.8.5
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A 2D chemical formulae drawing tool
Group: Applications/Engineering
@@ -8,6 +8,7 @@
# Everything is GPLv2+, except libgcpcanvas, which is LGPLv2+
URL: http://www.nongnu.org/gchempaint/
Source0: http://download.savannah.nongnu.org/releases/gchempaint/%{name}-%{version}.tar.bz2
+Patch0: 21964.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils
@@ -38,6 +39,7 @@
%prep
%setup -q
+%patch0 -p1 -b .21964
%build
%configure --disable-update-databases \
@@ -131,6 +133,9 @@
%changelog
+* Tue Jan 8 2008 Julian Sikorski <belegdol[at]gmail[dot]com> - 0.8.5-2
+- Fixed Savannah bug #21964 - atoms and bonds are not correctly updated
+
* Fri Dec 21 2007 Julian Sikorski <belegdol[at]gmail[dot]com> - 0.8.5-1
- Updated to 0.8.5
- Cleaned up the spec
More information about the fedora-extras-commits
mailing list