diff options
| author | Ted Gould <ted@gould.cx> | 2006-05-02 05:29:03 +0000 |
|---|---|---|
| committer | gouldtj <gouldtj@users.sourceforge.net> | 2006-05-02 05:29:03 +0000 |
| commit | dc81b746cf1305802b07f367a44e518d9036a2d6 (patch) | |
| tree | 079328ba4b24bee0c7dc90b022f5d7b3529c62d7 /src/ui | |
| parent | r11569@tres: ted | 2006-04-29 08:55:02 -0700 (diff) | |
| download | inkscape-dc81b746cf1305802b07f367a44e518d9036a2d6.tar.gz inkscape-dc81b746cf1305802b07f367a44e518d9036a2d6.zip | |
(bzr r690)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/widget/page-sizer.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/style-swatch.cpp | 21 | ||||
| -rw-r--r-- | src/ui/widget/style-swatch.h | 2 |
3 files changed, 7 insertions, 18 deletions
diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index 4fb77bbdd..1f3749bda 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -243,7 +243,7 @@ PageSizer::init (Registry& reg) table->set_row_spacings (4); table->set_col_spacings (4); - Inkscape::UI::Widget::Button* fit_canv = manage(new Inkscape::UI::Widget::Button(_("_Fit page to selection"), + Inkscape::UI::Widget::Button* fit_canv = manage(new Inkscape::UI::Widget::Button(_("Fit page to selection"), _("Resize the page to fit the current selection, or the entire drawing if there is no selection"))); // prevent fit_canv from expanding Gtk::Alignment *fit_canv_cont = manage(new Gtk::Alignment(1.0,0.5,0.0,0.0)); diff --git a/src/ui/widget/style-swatch.cpp b/src/ui/widget/style-swatch.cpp index 204833aa5..492da2833 100644 --- a/src/ui/widget/style-swatch.cpp +++ b/src/ui/widget/style-swatch.cpp @@ -61,12 +61,12 @@ static void style_swatch_tool_attr_changed(Inkscape::XML::Node *repr, gchar cons bool is_interactive, gpointer data) { Inkscape::UI::Widget::StyleSwatch *ss = (Inkscape::UI::Widget::StyleSwatch *) data; - + if (!strcmp (name, "usecurrent")) { // FIXME: watching only for the style attr, no CSS attrs if (!strcmp (new_value, "1")) { - ss->setWatched (inkscape_get_repr(INKSCAPE, "desktop"), inkscape_get_repr(INKSCAPE, ss->_tool_path)); + ss->setWatched (inkscape_get_repr(INKSCAPE, "desktop")); } else { - ss->setWatched (inkscape_get_repr(INKSCAPE, ss->_tool_path), NULL); + ss->setWatched (inkscape_get_repr(INKSCAPE, ss->_tool_path)); } // UGLY HACK: we have to reconnect to the watched tool repr again, retrieving it from the stored // tool_path, because the actual repr keeps shifting with each change, no idea why @@ -161,6 +161,7 @@ StyleSwatch::~StyleSwatch() } if (_watched_tool) { + std::cout << " =============remove\n"; sp_repr_remove_listener_by_data(_watched_tool, this); Inkscape::GC::release(_watched_tool); _watched_tool = NULL; @@ -169,7 +170,7 @@ StyleSwatch::~StyleSwatch() } void -StyleSwatch::setWatched(Inkscape::XML::Node *watched, Inkscape::XML::Node *secondary) +StyleSwatch::setWatched(Inkscape::XML::Node *watched) { if (_watched) { sp_repr_remove_listener_by_data(_watched, this); @@ -182,18 +183,6 @@ StyleSwatch::setWatched(Inkscape::XML::Node *watched, Inkscape::XML::Node *secon Inkscape::GC::anchor(_watched); sp_repr_add_listener(_watched, &style_swatch_repr_events, this); sp_repr_synthesize_events(_watched, &style_swatch_repr_events, this); - - // If desktop's last-set style is empty, a tool uses its own fixed style even if set to use - // last-set (so long as it's empty). To correctly show this, we're passed the second repr, - // that of the tool prefs node, from which we now setStyle if the watched repr's style is - // empty. - if (secondary) { - SPCSSAttr *css = sp_repr_css_attr_inherited(watched, "style"); - if (sp_repr_children((Inkscape::XML::Node *) css) == NULL) { // is css empty? - SPCSSAttr *css_secondary = sp_repr_css_attr_inherited(secondary, "style"); - this->setStyle (css_secondary); - } - } } } diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h index 1f7dd2e37..a21d6202f 100644 --- a/src/ui/widget/style-swatch.h +++ b/src/ui/widget/style-swatch.h @@ -49,7 +49,7 @@ public: void setStyle(SPCSSAttr *attr); SPCSSAttr *getStyle(); - void setWatched (Inkscape::XML::Node *watched, Inkscape::XML::Node *secondary); + void setWatched (Inkscape::XML::Node *watched); void setWatchedTool (const char *path, bool synthesize); char *_tool_path; |
