index 4aac04a3c4371c8ade28406c6e78b75102d34cb1..5befb11d03c774ddaf16e2885324b212fce1fba2 100644 (file)
@@ -393,7 +393,7 @@ sp_gvs_defs_modified (SPObject *defs, guint flags, SPGradientVectorSelector *gvs
#include "../widgets/sp-color-preview.h"
#include "../widgets/widget-sizes.h"
#include "../xml/node-event-vector.h"
-#include "../svg/svg.h"
+#include "../svg/svg-color.h"
#define PAD 4
if (SP_OBJECT (ochild) == SP_OBJECT(new_stop)) {
gtk_option_menu_set_history (GTK_OPTION_MENU (mnu), i);
break;
- }
+ }
i++;
}
}
gtk_menu_append (GTK_MENU (m), i);
gtk_widget_set_sensitive (mnu, FALSE);
} else {
-
+
for (; sl != NULL; sl = sl->next){
SPStop *stop;
GtkWidget *i;
SPStop *next = NULL;
next = sp_next_stop(stop);
- if (next != NULL ) {
+ if (next != NULL ) {
adj->upper = next->offset;
} else {
isEndStop = true;
SPStop *stop = (SPStop *) g_object_get_data (G_OBJECT(gtk_menu_get_active (GTK_MENU(gtk_option_menu_get_menu (mnu)))), "stop");
- if (stop == NULL)
+ if (stop == NULL)
return;
Inkscape::XML::Node *new_stop_repr = NULL;
}
SPStop *newstop = (SPStop *) SP_OBJECT_DOCUMENT(gradient)->getObjectByRepr(new_stop_repr);
-
+
newstop->offset = (stop->offset + next->offset) * 0.5 ;
guint32 const c1 = sp_stop_get_rgba32(stop);
w = prefs_get_int_attribute (prefs_path, "w", 0);
h = prefs_get_int_attribute (prefs_path, "h", 0);
}
- if (x != 0 || y != 0)
+
+ if (x<0) x=0;
+ if (y<0) y=0;
+
+ if (x != 0 || y != 0)
gtk_window_move ((GtkWindow *) dlg, x, y);
else
gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER);
gtk_container_add (GTK_CONTAINER (dlg), wid);
} else {
// FIXME: temp fix for 0.38
- // Simply load_gradient into the editor does not work for multi-stop gradients,
- // as the stop list and other widgets are in a wrong state and crash readily.
+ // Simply load_gradient into the editor does not work for multi-stop gradients,
+ // as the stop list and other widgets are in a wrong state and crash readily.
// Instead we just delete the window (by sending the delete signal)
// and call sp_gradient_vector_editor_new again, so it creates the window anew.
@@ -951,7 +955,7 @@ sp_gradient_vector_widget_load_gradient (GtkWidget *widget, SPGradient *gradient
SPStop *stop = SP_STOP(g_object_get_data (G_OBJECT(gtk_menu_get_active (GTK_MENU(gtk_option_menu_get_menu (mnu)))), "stop"));
guint32 const c = sp_stop_get_rgba32(stop);
- /// get the color selector
+ /// get the color selector
SPColorSelector *csel = SP_COLOR_SELECTOR(g_object_get_data (G_OBJECT (widget), "cselector"));
// set alpha
csel->base->setAlpha(SP_RGBA32_A_F (c));
gtk_window_get_position ((GtkWindow *) dlg, &x, &y);
gtk_window_get_size ((GtkWindow *) dlg, &w, &h);
+ if (x<0) x=0;
+ if (y<0) y=0;
+
prefs_set_int_attribute (prefs_path, "x", x);
prefs_set_int_attribute (prefs_path, "y", y);
prefs_set_int_attribute (prefs_path, "w", w);