Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 345095 | Differences between
and this patch

Collapse All | Expand All

(-)goffice/gchemutils.cc (-2 / +22 lines)
Lines 82-89 Link Here
82
go_gchemutils_component_edit (GOComponent *component)
82
go_gchemutils_component_edit (GOComponent *component)
83
{
83
{
84
	GOGChemUtilsComponent *gogcu = GO_GCHEMUTILS_COMPONENT (component);
84
	GOGChemUtilsComponent *gogcu = GO_GCHEMUTILS_COMPONENT (component);
85
	if (component->snapshot_type == GO_SNAPSHOT_SVG && strcmp (component->mime_type, "application/x-gchempaint"))
86
		component->snapshot_type == GO_SNAPSHOT_PNG;
87
	if (!gogcu->document) {
85
	if (!gogcu->document) {
88
		component->ascent = 1.;
86
		component->ascent = 1.;
89
		component->descent = 0.;
87
		component->descent = 0.;
Lines 102-107 Link Here
102
}
100
}
103
101
104
static void
102
static void
103
go_gchemutils_component_mime_type_set (GOComponent *component)
104
{
105
	if (!strcmp (component->mime_type, "application/x-gcrystal")) {
106
		component->needs_window = true;
107
#ifdef GO_SNAPSHOT_PNG
108
		component->snapshot_type = GO_SNAPSHOT_PNG;
109
#endif
110
	}
111
}
112
113
static void
114
go_gchemutils_component_set_window (GOComponent *component)
115
{
116
	if (!strcmp (component->mime_type, "application/x-gcrystal")) {
117
	}
118
}
119
120
static void
105
go_gchemutils_component_finalize (GObject *obj)
121
go_gchemutils_component_finalize (GObject *obj)
106
{
122
{
107
	GOGChemUtilsComponent *gogcu = GO_GCHEMUTILS_COMPONENT (obj);
123
	GOGChemUtilsComponent *gogcu = GO_GCHEMUTILS_COMPONENT (obj);
Lines 119-125 Link Here
119
	component->ascent = 1.;
135
	component->ascent = 1.;
120
	component->descent = 0.;
136
	component->descent = 0.;
121
	component->width = 1.;
137
	component->width = 1.;
138
#ifdef GO_SNAPSHOT_PNG
122
	component->snapshot_type = GO_SNAPSHOT_SVG;
139
	component->snapshot_type = GO_SNAPSHOT_SVG;
140
#endif
123
}
141
}
124
142
125
static void
143
static void
Lines 134-139 Link Here
134
	klass->set_data = go_gchemutils_component_set_data;
152
	klass->set_data = go_gchemutils_component_set_data;
135
	klass->render = go_gchemutils_component_render;
153
	klass->render = go_gchemutils_component_render;
136
	klass->edit = go_gchemutils_component_edit;
154
	klass->edit = go_gchemutils_component_edit;
155
	klass->mime_type_set = go_gchemutils_component_mime_type_set;
156
	klass->set_window = go_gchemutils_component_set_window;
137
}
157
}
138
158
139
GSF_DYNAMIC_CLASS (GOGChemUtilsComponent, go_gchemutils_component,
159
GSF_DYNAMIC_CLASS (GOGChemUtilsComponent, go_gchemutils_component,

Return to bug 345095