summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2014-12-31 14:36:09 +0000
committer~suv <suv-sf@users.sourceforge.net>2014-12-31 14:36:09 +0000
commit02cb649c0ceebd254dde302eeba71406fb25a24c (patch)
tree4ccb52d7f06a7160adb2aaf1428d3a5a2acef9a5 /src/libnrtype
parentpackaging/macosx: update local python ports (MacPorts drops support for Pytho... (diff)
parentFix for bug #758718 (Color Picker/Dropper: Color selection area not lined up ... (diff)
downloadinkscape-02cb649c0ceebd254dde302eeba71406fb25a24c.tar.gz
inkscape-02cb649c0ceebd254dde302eeba71406fb25a24c.zip
update to trunk (r13829)
(bzr r13798.1.2)
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/Layout-TNG-Input.cpp2
-rw-r--r--src/libnrtype/font-lister.cpp19
2 files changed, 10 insertions, 11 deletions
diff --git a/src/libnrtype/Layout-TNG-Input.cpp b/src/libnrtype/Layout-TNG-Input.cpp
index fa1e8c11b..cd9179c5f 100644
--- a/src/libnrtype/Layout-TNG-Input.cpp
+++ b/src/libnrtype/Layout-TNG-Input.cpp
@@ -325,7 +325,7 @@ PangoFontDescription *Layout::InputStreamTextSource::styleGetFontDescription() c
Layout::InputStreamTextSource::~InputStreamTextSource()
{
- sp_style_unref(style);
+ sp_style_unref(style);
}
}//namespace Text
diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp
index fad06cd00..a6ab3b239 100644
--- a/src/libnrtype/font-lister.cpp
+++ b/src/libnrtype/font-lister.cpp
@@ -385,27 +385,27 @@ std::pair<Glib::ustring, Glib::ustring> FontLister::selection_update()
#endif
// Get fontspec from a selection, preferences, or thin air.
Glib::ustring fontspec;
- SPStyle *query = sp_style_new(SP_ACTIVE_DOCUMENT);
+ SPStyle query(SP_ACTIVE_DOCUMENT);
// Directly from stored font specification.
int result =
- sp_desktop_query_style(SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONT_SPECIFICATION);
+ sp_desktop_query_style(SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_FONT_SPECIFICATION);
//std::cout << " Attempting selected style" << std::endl;
- if (result != QUERY_STYLE_NOTHING && query->font_specification.set) {
- fontspec = query->font_specification.value;
+ if (result != QUERY_STYLE_NOTHING && query.font_specification.set) {
+ fontspec = query.font_specification.value;
//std::cout << " fontspec from query :" << fontspec << ":" << std::endl;
}
// From style
if (fontspec.empty()) {
//std::cout << " Attempting desktop style" << std::endl;
- int rfamily = sp_desktop_query_style(SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTFAMILY);
- int rstyle = sp_desktop_query_style(SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTSTYLE);
+ int rfamily = sp_desktop_query_style(SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_FONTFAMILY);
+ int rstyle = sp_desktop_query_style(SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_FONTSTYLE);
// Must have text in selection
if (rfamily != QUERY_STYLE_NOTHING && rstyle != QUERY_STYLE_NOTHING) {
- fontspec = fontspec_from_style(query);
+ fontspec = fontspec_from_style(&query);
}
//std::cout << " fontspec from style :" << fontspec << ":" << std::endl;
}
@@ -413,11 +413,10 @@ std::pair<Glib::ustring, Glib::ustring> FontLister::selection_update()
// From preferences
if (fontspec.empty()) {
//std::cout << " Attempting preferences" << std::endl;
- sp_style_read_from_prefs(query, "/tools/text");
- fontspec = fontspec_from_style(query);
+ query.readFromPrefs("/tools/text");
+ fontspec = fontspec_from_style(&query);
//std::cout << " fontspec from prefs :" << fontspec << ":" << std::endl;
}
- sp_style_unref(query);
// From thin air
if (fontspec.empty()) {