gl_debug (DEBUG_MERGE, "START");
- if ( (record != NULL) ) {
+ if ( (record != NULL) && (key != NULL) ) {
for (p = record->field_list; p != NULL; p = p->next) {
field = (glMergeField *) p->data;
color_node->color);
}
- if (!color_node->field_flag) {
+ if (!color_node->field_flag || !merge_flag) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(editor->priv->bc_color_radio), TRUE);
gtk_widget_set_sensitive (editor->priv->bc_color_combo, TRUE);
gtk_widget_set_sensitive (editor->priv->data_key_radio, merge_flag);
- if (!text_node->field_flag) {
+ if (!text_node->field_flag || !merge_flag) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(editor->priv->data_literal_radio), TRUE);
}
- if (!color_node->field_flag) {
+ if (!color_node->field_flag || !merge_flag) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(editor->priv->fill_color_radio), TRUE);
gtk_widget_set_sensitive (editor->priv->fill_color_combo, TRUE);
gtk_widget_set_sensitive (editor->priv->img_key_radio, merge_flag);
- if (!text_node->field_flag) {
+ if (!text_node->field_flag || !merge_flag) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(editor->priv->img_file_radio), TRUE);
}
- if (!color_node->field_flag) {
+ if (!color_node->field_flag || !merge_flag) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(editor->priv->line_color_radio), TRUE);
gtk_widget_set_sensitive (editor->priv->line_color_combo, TRUE);
}
- if (!color_node->field_flag) {
+ if (!color_node->field_flag || !merge_flag) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(editor->priv->shadow_color_radio), TRUE);
gtk_widget_set_sensitive (editor->priv->shadow_color_combo, TRUE);
text_color_node->color);
}
- if (!text_color_node->field_flag) {
+ if (!text_color_node->field_flag || !merge_flag) {
gl_debug (DEBUG_EDITOR, "color field false");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(editor->priv->text_color_radio), TRUE);
merge = gl_merge_new (string);
g_free (string);
- string = lgl_xml_get_prop_string (node, "src", NULL);
- gl_merge_set_src (merge, string);
- g_free (string);
+ if (merge)
+ {
+ string = lgl_xml_get_prop_string (node, "src", NULL);
+ gl_merge_set_src (merge, string);
+ g_free (string);
- gl_label_set_merge (label, merge);
+ gl_label_set_merge (label, merge);
- g_object_unref (G_OBJECT(merge));
+ g_object_unref (G_OBJECT(merge));
+ }
gl_debug (DEBUG_XML, "END");
}