summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorTomasz Boczkowski <penginsbacon@gmail.com>2015-05-09 11:38:22 +0000
committerTomasz Boczkowski <penginsbacon@gmail.com>2015-05-09 11:38:22 +0000
commitdb85d12f8c106586a0b11f60bf32cdb8ca75d8f2 (patch)
treeae5cbc2ad4fdbb93dbc1d7fc8b92ee2e2012e853 /src/widgets
parentrenamed SPPattern methods to match coding style (diff)
parentfix crash introduces by recent rev when clipping (diff)
downloadinkscape-db85d12f8c106586a0b11f60bf32cdb8ca75d8f2.tar.gz
inkscape-db85d12f8c106586a0b11f60bf32cdb8ca75d8f2.zip
merged trunk
(bzr r14059.1.21)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/desktop-widget.cpp4
-rw-r--r--src/widgets/ege-adjustment-action.cpp2
-rw-r--r--src/widgets/gradient-vector.cpp1
-rw-r--r--src/widgets/paint-selector.cpp13
4 files changed, 18 insertions, 2 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index fd3756220..e19f56e48 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -1433,8 +1433,10 @@ sp_desktop_widget_maximize(SPDesktopWidget *dtw)
if (!dtw->desktop->is_iconified() && !dtw->desktop->is_fullscreen())
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- gint w, h, x, y;
+ gint w = -1;
+ gint h, x, y;
dtw->getWindowGeometry(x, y, w, h);
+ g_assert(w != -1);
prefs->setInt("/desktop/geometry/width", w);
prefs->setInt("/desktop/geometry/height", h);
prefs->setInt("/desktop/geometry/x", x);
diff --git a/src/widgets/ege-adjustment-action.cpp b/src/widgets/ege-adjustment-action.cpp
index d89a6e3f1..a91149f4c 100644
--- a/src/widgets/ege-adjustment-action.cpp
+++ b/src/widgets/ege-adjustment-action.cpp
@@ -742,7 +742,7 @@ static GtkWidget* create_popup_number_menu( EgeAdjustmentAction* act )
if ( act->private_data->descriptions ) {
gdouble value = ((EgeAdjustmentDescr*)act->private_data->descriptions->data)->value;
- addOns = flush_explicit_items( addOns, G_CALLBACK(process_menu_action), BUMP_CUSTOM, menu, act, &single, &group, value );
+ flush_explicit_items( addOns, G_CALLBACK(process_menu_action), BUMP_CUSTOM, menu, act, &single, &group, value );
}
return menu;
diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp
index 31bd01719..259d4c9af 100644
--- a/src/widgets/gradient-vector.cpp
+++ b/src/widgets/gradient-vector.cpp
@@ -552,6 +552,7 @@ static void verify_grad(SPGradient *gradient)
child->setAttribute("style", os.str().c_str());
gradient->getRepr()->addChild(child, NULL);
Inkscape::GC::release(child);
+ return;
}
if (i < 2) {
sp_repr_set_css_double(stop->getRepr(), "offset", 0.0);
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp
index e2483343f..3b191b2f3 100644
--- a/src/widgets/paint-selector.cpp
+++ b/src/widgets/paint-selector.cpp
@@ -34,6 +34,7 @@
#include "sp-linear-gradient.h"
#include "sp-radial-gradient.h"
#include "sp-mesh.h"
+#include "sp-stop.h"
/* fixme: Move it from dialogs to here */
#include "gradient-selector.h"
#include <inkscape.h>
@@ -665,6 +666,18 @@ static void sp_paint_selector_set_mode_color(SPPaintSelector *psel, SPPaintSelec
{
using Inkscape::UI::Widget::ColorNotebook;
+ if ((psel->mode == SPPaintSelector::MODE_SWATCH)
+ || (psel->mode == SPPaintSelector::MODE_GRADIENT_LINEAR)
+ || (psel->mode == SPPaintSelector::MODE_GRADIENT_RADIAL) ) {
+ SPGradientSelector *gsel = getGradientFromData(psel);
+ if (gsel) {
+ SPGradient *gradient = gsel->getVector();
+ SPColor color = gradient->getFirstStop()->specified_color;
+ float alpha = gradient->getFirstStop()->opacity;
+ psel->selected_color->setColorAlpha(color, alpha);
+ }
+ }
+
sp_paint_selector_set_style_buttons(psel, psel->solid);
gtk_widget_set_sensitive(psel->style, TRUE);