summaryrefslogtreecommitdiffstats
path: root/src/widgets/toolbox.cpp
diff options
context:
space:
mode:
authorMilosz Derezynski <mderezynski@gmail.com>2006-05-19 06:18:26 +0000
committermderezynski <mderezynski@users.sourceforge.net>2006-05-19 06:18:26 +0000
commite1aa5c25d38a1cc2296fca62f3d6f1bf2ba25e9b (patch)
tree738d7271e6c65e4c056604299c26b1c7e4729fb8 /src/widgets/toolbox.cpp
parent* Implement completion for font selection as well as a warning symbol in case... (diff)
downloadinkscape-e1aa5c25d38a1cc2296fca62f3d6f1bf2ba25e9b.tar.gz
inkscape-e1aa5c25d38a1cc2296fca62f3d6f1bf2ba25e9b.zip
* Query default text attributes if selection query returns nothing
(bzr r891)
Diffstat (limited to 'src/widgets/toolbox.cpp')
-rw-r--r--src/widgets/toolbox.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 593be725d..146853c22 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -2807,7 +2807,16 @@ namespace {
// If querying returned nothing, read the style from the text tool prefs (default style for new texts)
if (result_family == QUERY_STYLE_NOTHING || result_style == QUERY_STYLE_NOTHING || result_numbers == QUERY_STYLE_NOTHING)
{
- return;
+ Inkscape::XML::Node *repr = inkscape_get_repr (INKSCAPE, "tools.text");
+
+ if (repr)
+ {
+ sp_style_read_from_repr (query, repr);
+ }
+ else
+ {
+ return;
+ }
}
if (result_numbers == QUERY_STYLE_MULTIPLE_DIFFERENT)
@@ -2977,7 +2986,6 @@ namespace
gtk_entry_set_completion (GTK_ENTRY(GTK_BIN(cbox)->child), completion);
GtkWidget *image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_SMALL_TOOLBAR);
- gtk_widget_hide (GTK_WIDGET (image));
aux_toolbox_space (tbl, 1);
GtkWidget *box = gtk_event_box_new ();
gtk_container_add (GTK_CONTAINER (box), image);
@@ -2985,6 +2993,7 @@ namespace
g_object_set_data (G_OBJECT (tbl), "warning-image", box);
GtkTooltips *tooltips = gtk_tooltips_new ();
gtk_tooltips_set_tip (tooltips, box, _("This font is currently not installed on your system. Inkscape will use the default font instead."), "");
+ gtk_widget_hide (GTK_WIDGET (box));
//Font Style
cbox = gtk_combo_box_new_text ();