static void accept_connection_dialog (GstTool *tool) { GstConnectionDialog *dialog; GtkTreeSelection *selection; GtkTreeIter iter; dialog = GST_NETWORK_TOOL (tool)->dialog; connection_dialog_hide (dialog); if (dialog->changed) { connection_save (dialog); selection = gtk_tree_view_get_selection (GST_NETWORK_TOOL (tool)->interfaces_list); if (gtk_tree_selection_get_selected (selection, NULL, &iter)) { ifaces_model_modify_interface_at_iter (&iter); g_signal_emit_by_name (G_OBJECT (selection), "changed"); } gst_tool_commit_async (tool, OOBS_OBJECT (GST_NETWORK_TOOL (tool)->ifaces_config), _("Changing interface configuration"), on_configuration_changed, tool); } g_object_unref (dialog->iface); if (dialog->standalone) gtk_main_quit (); }
static void flow_save(Flow *flow, ObjectNode obj_node, const char *filename) { connection_save(&flow->connection, obj_node); data_add_text(new_attribute(obj_node, "text"), flow->text) ; data_add_int(new_attribute(obj_node, "type"), flow->type); }
static void flow_save(Flow *flow, ObjectNode obj_node, DiaContext *ctx) { connection_save(&flow->connection, obj_node, ctx); data_add_text(new_attribute(obj_node, "text"), flow->text, ctx) ; data_add_int(new_attribute(obj_node, "type"), flow->type, ctx); }
static void constraint_save(Constraint *constraint, ObjectNode obj_node, const char *filename) { connection_save(&constraint->connection, obj_node); data_add_string(new_attribute(obj_node, "text"), constraint->text); data_add_point(new_attribute(obj_node, "text_pos"), &constraint->text_pos); }
static void message_save(Message *message, ObjectNode obj_node, const char *filename) { connection_save(&message->connection, obj_node); data_add_string(new_attribute(obj_node, "text"), message->text); data_add_point(new_attribute(obj_node, "text_pos"), &message->text_pos); data_add_int(new_attribute(obj_node, "type"), message->type); }
static void implements_save(Implements *implements, ObjectNode obj_node, const char *filename) { connection_save(&implements->connection, obj_node); data_add_real(new_attribute(obj_node, "diameter"), implements->circle_diameter); data_add_string(new_attribute(obj_node, "text"), implements->text); data_add_point(new_attribute(obj_node, "text_pos"), &implements->text_pos); }
static void wanlink_save(WanLink *wanlink, ObjectNode obj_node, const char *filename) { AttributeNode attr; connection_save((Connection *)wanlink, obj_node); attr = new_attribute(obj_node, "width"); data_add_real(attr, wanlink->width); data_add_color( new_attribute(obj_node, "line_color"), &wanlink->line_color); data_add_color( new_attribute(obj_node, "fill_color"), &wanlink->fill_color); }
static void line_save(Line *line, ObjectNode obj_node, DiaContext *ctx) { #ifdef DEBUG dia_object_sanity_check((DiaObject*)line, "Saving line"); #endif connection_save(&line->connection, obj_node, ctx); connpointline_save(line->cpl, obj_node, "numcp", ctx); if (!color_equals(&line->line_color, &color_black)) data_add_color(new_attribute(obj_node, "line_color"), &line->line_color, ctx); if (line->line_width != 0.1) data_add_real(new_attribute(obj_node, PROP_STDNAME_LINE_WIDTH), line->line_width, ctx); if (line->line_style != LINESTYLE_SOLID) data_add_enum(new_attribute(obj_node, "line_style"), line->line_style, ctx); if (line->line_caps != LINECAPS_BUTT) data_add_enum(new_attribute(obj_node, "line_caps"), line->line_caps, ctx); if (line->start_arrow.type != ARROW_NONE) { save_arrow(obj_node, &line->start_arrow, "start_arrow", "start_arrow_length", "start_arrow_width", ctx); } if (line->end_arrow.type != ARROW_NONE) { save_arrow(obj_node, &line->end_arrow, "end_arrow", "end_arrow_length", "end_arrow_width", ctx); } if (line->absolute_start_gap) data_add_real(new_attribute(obj_node, "absolute_start_gap"), line->absolute_start_gap, ctx); if (line->absolute_end_gap) data_add_real(new_attribute(obj_node, "absolute_end_gap"), line->absolute_end_gap, ctx); if (line->line_style != LINESTYLE_SOLID && line->dashlength != DEFAULT_LINESTYLE_DASHLEN) data_add_real(new_attribute(obj_node, "dashlength"), line->dashlength, ctx); }
static void bus_save(Bus *bus, ObjectNode obj_node, const char *filename) { int i; AttributeNode attr; connection_save(&bus->connection, obj_node); data_add_color( new_attribute(obj_node, "line_color"), &bus->line_color); attr = new_attribute(obj_node, "bus_handles"); for (i=0;i<bus->num_handles;i++) { data_add_point(attr, &bus->handles[i]->pos); } }
static void arc_save(Arc *arc, ObjectNode obj_node, const char *filename) { connection_save(&arc->connection, obj_node); if (!color_equals(&arc->arc_color, &color_black)) data_add_color(new_attribute(obj_node, "arc_color"), &arc->arc_color); if (arc->curve_distance != 0.1) data_add_real(new_attribute(obj_node, "curve_distance"), arc->curve_distance); if (arc->line_width != 0.1) data_add_real(new_attribute(obj_node, "line_width"), arc->line_width); if (arc->line_style != LINESTYLE_SOLID) data_add_enum(new_attribute(obj_node, "line_style"), arc->line_style); if (arc->line_style != LINESTYLE_SOLID && arc->dashlength != DEFAULT_LINESTYLE_DASHLEN) data_add_real(new_attribute(obj_node, "dashlength"), arc->dashlength); if (arc->start_arrow.type != ARROW_NONE) { data_add_enum(new_attribute(obj_node, "start_arrow"), arc->start_arrow.type); data_add_real(new_attribute(obj_node, "start_arrow_length"), arc->start_arrow.length); data_add_real(new_attribute(obj_node, "start_arrow_width"), arc->start_arrow.width); } if (arc->end_arrow.type != ARROW_NONE) { data_add_enum(new_attribute(obj_node, "end_arrow"), arc->end_arrow.type); data_add_real(new_attribute(obj_node, "end_arrow_length"), arc->end_arrow.length); data_add_real(new_attribute(obj_node, "end_arrow_width"), arc->end_arrow.width); } }
static void arc_save(Arc *arc, ObjectNode obj_node, DiaContext *ctx) { connection_save(&arc->connection, obj_node, ctx); if (!color_equals(&arc->arc_color, &color_black)) data_add_color(new_attribute(obj_node, "arc_color"), &arc->arc_color, ctx); if (arc->curve_distance != 0.1) data_add_real(new_attribute(obj_node, "curve_distance"), arc->curve_distance, ctx); if (arc->line_width != 0.1) data_add_real(new_attribute(obj_node, PROP_STDNAME_LINE_WIDTH), arc->line_width, ctx); if (arc->line_style != LINESTYLE_SOLID) data_add_enum(new_attribute(obj_node, "line_style"), arc->line_style, ctx); if (arc->line_style != LINESTYLE_SOLID && arc->dashlength != DEFAULT_LINESTYLE_DASHLEN) data_add_real(new_attribute(obj_node, "dashlength"), arc->dashlength, ctx); if (arc->line_caps != LINECAPS_BUTT) data_add_enum(new_attribute(obj_node, "line_caps"), arc->line_caps, ctx); if (arc->start_arrow.type != ARROW_NONE) { save_arrow(obj_node, &arc->start_arrow, "start_arrow", "start_arrow_length", "start_arrow_width", ctx); } if (arc->end_arrow.type != ARROW_NONE) { save_arrow(obj_node, &arc->end_arrow, "end_arrow", "end_arrow_length", "end_arrow_width", ctx); } }