From a5d6c9a27683820be3d84eea73c2d6f161ce0e8e Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sun, 24 Jul 2016 18:49:11 +0200 Subject: Add Text tag and update widgets code (bzr r15017.1.2) --- src/widgets/font-selector.cpp | 26 +------------------------- src/widgets/font-selector.h | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 27 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index aefcb2e81..eeb80ab28 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -19,9 +19,6 @@ # include "config.h" #endif -#include -#include - #include <2geom/transforms.h> #include @@ -34,29 +31,7 @@ /* SPFontSelector */ -struct SPFontSelector -{ -#if GTK_CHECK_VERSION(3,0,0) - GtkBox hbox; -#else - GtkHBox hbox; -#endif - unsigned int block_emit : 1; - - GtkWidget *family; - GtkWidget *style; - GtkWidget *size; - - GtkWidget *family_treeview; - GtkWidget *style_treeview; - - NRNameList families; - NRStyleList styles; - gfloat fontsize; - bool fontsize_dirty; - Glib::ustring *fontspec; -}; struct SPFontSelectorClass @@ -274,6 +249,7 @@ static void sp_font_selector_dispose(GObject *object) if (fsel->fontspec) { delete fsel->fontspec; + fsel->fontspec = 0; } if (fsel->families.length > 0) { diff --git a/src/widgets/font-selector.h b/src/widgets/font-selector.h index ff5472d2d..2d55a87ab 100644 --- a/src/widgets/font-selector.h +++ b/src/widgets/font-selector.h @@ -15,10 +15,33 @@ * * Released under GNU GPL, read the file 'COPYING' for more information */ - +#include +#include #include -struct SPFontSelector; +struct SPFontSelector +{ +#if GTK_CHECK_VERSION(3,0,0) + GtkBox hbox; +#else + GtkHBox hbox; +#endif + + unsigned int block_emit : 1; + + GtkWidget *family; + GtkWidget *style; + GtkWidget *size; + + GtkWidget *family_treeview; + GtkWidget *style_treeview; + + NRNameList families; + NRStyleList styles; + gfloat fontsize; + bool fontsize_dirty; + Glib::ustring *fontspec; +}; #define SP_TYPE_FONT_SELECTOR (sp_font_selector_get_type ()) #define SP_FONT_SELECTOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_FONT_SELECTOR, SPFontSelector)) -- cgit v1.2.3