summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/selected-style.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2012-01-03 08:58:04 +0000
committerJon A. Cruz <jon@joncruz.org>2012-01-03 08:58:04 +0000
commit7a6239683da762264133d85d7c79aa06fcc7d725 (patch)
tree71deb81dfdf5699c171ee2d00f819ddd4700b1f5 /src/ui/widget/selected-style.cpp
parentMore deprecated GtkTooltips (diff)
downloadinkscape-7a6239683da762264133d85d7c79aa06fcc7d725.tar.gz
inkscape-7a6239683da762264133d85d7c79aa06fcc7d725.zip
Fixed null-pointer ctor crashes.
(bzr r10828)
Diffstat (limited to 'src/ui/widget/selected-style.cpp')
-rw-r--r--src/ui/widget/selected-style.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 35d92db7b..afbb52e05 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -70,6 +70,16 @@ ss_subselection_changed( gpointer /*dragger*/, gpointer data )
ss_selection_changed (NULL, data);
}
+namespace {
+
+void clearTooltip( Gtk::Widget &widget )
+{
+ widget.set_tooltip_text("");
+ widget.set_has_tooltip(false);
+}
+
+} // namespace
+
namespace Inkscape {
namespace UI {
namespace Widget {
@@ -904,8 +914,8 @@ SelectedStyle::update()
place->remove();
flag_place->remove();
- place->set_tooltip_text(0);
- flag_place->set_tooltip_text(0);
+ clearTooltip(*place);
+ clearTooltip(*flag_place);
_mode[i] = SS_NA;
_paintserver_id[i].clear();
@@ -1012,8 +1022,8 @@ SelectedStyle::update()
}
// Now query opacity
- _opacity_place.set_tooltip_text(0);
- _opacity_sb.set_tooltip_text(0);
+ clearTooltip(_opacity_place);
+ clearTooltip(_opacity_sb);
int result = sp_desktop_query_style (_desktop, query, QUERY_STYLE_PROPERTY_MASTEROPACITY);