summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 04a60e5)
raw | patch | inline | side by side (parent: 04a60e5)
author | joncruz <joncruz@users.sourceforge.net> | |
Sun, 25 Mar 2007 07:50:33 +0000 (07:50 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sun, 25 Mar 2007 07:50:33 +0000 (07:50 +0000) |
src/widgets/toolbox.cpp | patch | blob | history |
index 8ea27df93753dd19998e2a99a957babcc56a147f..d8903b404a8a069336d96055c110df74c192d5f6 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -1088,13 +1088,14 @@ static void star_tb_event_attr_changed(Inkscape::XML::Node *repr, gchar const *n
adj = GTK_ADJUSTMENT( gtk_object_get_data(GTK_OBJECT(tbl), "rounded") );
gtk_adjustment_set_value(adj, sp_repr_get_double_attribute(repr, "inkscape:rounded", 0.0));
} else if (!strcmp(name, "inkscape:flatsided")) {
- GtkToggleAction* flat_action = GTK_TOGGLE_ACTION( g_object_get_data( G_OBJECT(tbl), "flat_action" ) );
GtkAction* prop_action = GTK_ACTION( g_object_get_data(G_OBJECT(tbl), "prop_action") );
char const *flatsides = repr->attribute("inkscape:flatsided");
if (flatsides && !strcmp(flatsides,"false" )) {
- gtk_toggle_action_set_active( flat_action, FALSE );
+ GtkToggleAction* flat2_action = GTK_TOGGLE_ACTION( g_object_get_data( G_OBJECT(tbl), "flat2_action" ) );
+ gtk_toggle_action_set_active( flat2_action, TRUE );
gtk_action_set_sensitive( prop_action, TRUE );
} else {
+ GtkToggleAction* flat_action = GTK_TOGGLE_ACTION( g_object_get_data( G_OBJECT(tbl), "flat_action" ) );
gtk_toggle_action_set_active( flat_action, TRUE );
gtk_action_set_sensitive( prop_action, FALSE );
}
gdouble rounded = 0;
GtkToggleAction* flat_action = GTK_TOGGLE_ACTION( g_object_get_data( G_OBJECT(dataKludge), "flat_action" ) );
- gtk_toggle_action_set_active( flat_action, flat );
+ GtkToggleAction* flat2_action = GTK_TOGGLE_ACTION( g_object_get_data( G_OBJECT(dataKludge), "flat2_action" ) );
+ gtk_toggle_action_set_active( flat ? flat_action : flat2_action, TRUE );
GtkAction* sb2 = GTK_ACTION( g_object_get_data(G_OBJECT(dataKludge), "prop_action") );
gtk_action_set_sensitive( sb2, !flat );
g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(sp_stb_sides_flat_state_changed), holder);
gtk_object_set_data( GTK_OBJECT(holder), "flat_action", act );
+ gtk_object_set_data( GTK_OBJECT(holder), "flat2_action", act2 );
}
/* Magnitude */