From 732618cd7d6159ee47cc0dd8b86cf07790e3e724 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sun, 17 Mar 2013 13:29:02 +0100 Subject: Working with widjets (bzr r11950.1.56) --- src/ui/dialog/dialog-manager.cpp | 7 +++++++ src/ui/dialog/document-properties.cpp | 2 ++ src/ui/dialog/export.cpp | 26 +++++--------------------- src/ui/dialog/export.h | 19 ++++++++++++------- src/ui/dialog/fill-and-stroke.cpp | 15 --------------- src/ui/dialog/find.cpp | 4 ---- src/ui/dialog/find.h | 6 +----- src/ui/dialog/glyphs.h | 2 +- src/ui/dialog/icon-preview.cpp | 4 ---- src/ui/dialog/input.cpp | 2 -- src/ui/dialog/layer-properties.h | 6 +++--- src/ui/dialog/object-properties.cpp | 6 ------ src/ui/dialog/object-properties.h | 10 ---------- src/ui/dialog/svg-fonts-dialog.cpp | 4 ++++ src/ui/dialog/svg-fonts-dialog.h | 4 ++-- src/ui/dialog/text-edit.cpp | 1 - src/ui/dialog/text-edit.h | 2 +- src/ui/dialog/tracedialog.cpp | 1 - src/ui/dialog/xml-tree.h | 2 +- src/ui/tool/control-point.cpp | 2 +- src/ui/tool/node-tool.h | 3 +++ src/ui/tool/path-manipulator.h | 2 +- src/ui/widget/entry.cpp | 2 -- src/ui/widget/entry.h | 6 +++--- src/ui/widget/frame.h | 8 +++++--- src/ui/widget/registered-widget.h | 2 +- src/ui/widget/selected-style.h | 2 +- src/ui/widget/style-swatch.h | 2 +- 28 files changed, 55 insertions(+), 97 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp index 993f48d8f..faba47769 100644 --- a/src/ui/dialog/dialog-manager.cpp +++ b/src/ui/dialog/dialog-manager.cpp @@ -53,7 +53,10 @@ #include "ui/dialog/export.h" #include "ui/dialog/xml-tree.h" #include "ui/dialog/clonetiler.h" + +#ifdef ENABLE_SVG_FONTS #include "ui/dialog/svg-fonts-dialog.h" +#endif // ENABLE_SVG_FONTS namespace Inkscape { namespace UI { @@ -115,7 +118,9 @@ DialogManager::DialogManager() { registerFactory("ObjectProperties", &create); // registerFactory("PrintColorsPreviewDialog", &create); registerFactory("Script", &create); +#ifdef ENABLE_SVG_FONTS registerFactory("SvgFontsDialog", &create); +#endif registerFactory("Swatches", &create); registerFactory("Symbols", &create); registerFactory("TileDialog", &create); @@ -149,7 +154,9 @@ DialogManager::DialogManager() { registerFactory("ObjectProperties", &create); // registerFactory("PrintColorsPreviewDialog", &create); registerFactory("Script", &create); +#ifdef ENABLE_SVG_FONTS registerFactory("SvgFontsDialog", &create); +#endif registerFactory("Swatches", &create); registerFactory("Symbols", &create); registerFactory("TileDialog", &create); diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index d335fb303..045b34814 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -792,6 +792,8 @@ void DocumentProperties::build_scripting() _page_external_scripts->table().attach(_external_remove_btn, 2, 3, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, 0, 0); #endif + row++; + //# Set up the External Scripts box _ExternalScriptsListStore = Gtk::ListStore::create(_ExternalScriptsListColumns); _ExternalScriptsList.set_model(_ExternalScriptsListStore); diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index 086e52a6c..603786742 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -22,21 +22,14 @@ #include #include -#include +#include +#include +#include #include #include -#include -#include -#include #include -#if WITH_GTKMM_3_0 -# include -#else -# include -#endif -#include -#include - +#include +#include #ifdef WITH_GNOME_VFS # include // gnome_vfs_initialized #endif @@ -133,15 +126,6 @@ namespace Inkscape { namespace UI { namespace Dialog { -/** A list of strings that is used both in the preferences, and in the - data fields to describe the various values of \c selection_type. */ -static const char * selection_names[SELECTION_NUMBER_OF] = { - "page", "drawing", "selection", "custom"}; - -/** The names on the buttons for the various selection types. */ -static const char * selection_labels[SELECTION_NUMBER_OF] = { - N_("_Page"), N_("_Drawing"), N_("_Selection"), N_("_Custom")}; - Export::Export (void) : UI::Widget::Panel ("", "/dialogs/export/", SP_VERB_DIALOG_EXPORT), current_key(SELECTION_PAGE), diff --git a/src/ui/dialog/export.h b/src/ui/dialog/export.h index b10c98fd2..5dca9cfa5 100644 --- a/src/ui/dialog/export.h +++ b/src/ui/dialog/export.h @@ -14,12 +14,10 @@ #include #include - -#include #include #include -#include #include +#include #include "desktop.h" #include "ui/dialog/desktop-tracker.h" @@ -27,14 +25,11 @@ #include "ui/widget/button.h" #include "ui/widget/entry.h" -namespace Gtk { -class Dialog; -} - namespace Inkscape { namespace UI { namespace Dialog { + /** What type of button is being pressed */ enum selection_type { SELECTION_PAGE = 0, /**< Export the whole page */ @@ -44,6 +39,16 @@ enum selection_type { SELECTION_NUMBER_OF /**< A counter for the number of these guys */ }; +/** A list of strings that is used both in the preferences, and in the + data fields to describe the various values of \c selection_type. */ +static const char * selection_names[SELECTION_NUMBER_OF] = { + "page", "drawing", "selection", "custom"}; + +/** The names on the buttons for the various selection types. */ +static const char * selection_labels[SELECTION_NUMBER_OF] = { + N_("_Page"), N_("_Drawing"), N_("_Selection"), N_("_Custom")}; + + /** * A dialog widget to export to various image formats such as bitmap and png. * diff --git a/src/ui/dialog/fill-and-stroke.cpp b/src/ui/dialog/fill-and-stroke.cpp index 19b873d54..8de2da18b 100644 --- a/src/ui/dialog/fill-and-stroke.cpp +++ b/src/ui/dialog/fill-and-stroke.cpp @@ -132,24 +132,14 @@ void FillAndStroke::_layoutPageFill() { fillWdgt = manage(sp_fill_style_widget_new()); - -#if WITH_GTKMM_3_0 _page_fill->table().attach(*fillWdgt, 0, 0, 1, 1); -#else - _page_fill->table().attach(*fillWdgt, 0, 1, 0, 1); -#endif } void FillAndStroke::_layoutPageStrokePaint() { strokeWdgt = manage(sp_stroke_style_paint_widget_new()); - -#if WITH_GTKMM_3_0 _page_stroke_paint->table().attach(*strokeWdgt, 0, 0, 1, 1); -#else - _page_stroke_paint->table().attach(*strokeWdgt, 0, 1, 0, 1); -#endif } void @@ -158,12 +148,7 @@ FillAndStroke::_layoutPageStrokeStyle() //Gtk::Widget *strokeStyleWdgt = manage(Glib::wrap(sp_stroke_style_line_widget_new())); //Gtk::Widget *strokeStyleWdgt = static_cast(sp_stroke_style_line_widget_new()); strokeStyleWdgt = sp_stroke_style_line_widget_new(); - -#if WITH_GTKMM_3_0 _page_stroke_style->table().attach(*strokeStyleWdgt, 0, 0, 1, 1); -#else - _page_stroke_style->table().attach(*strokeStyleWdgt, 0, 1, 0, 1); -#endif } void diff --git a/src/ui/dialog/find.cpp b/src/ui/dialog/find.cpp index def7b5bdb..d3ce99b00 100644 --- a/src/ui/dialog/find.cpp +++ b/src/ui/dialog/find.cpp @@ -15,10 +15,7 @@ #endif #include "find.h" - -#include #include - #include "verbs.h" #include "message-stack.h" @@ -59,7 +56,6 @@ #include "xml/attribute-record.h" #include -#include namespace Inkscape { namespace UI { diff --git a/src/ui/dialog/find.h b/src/ui/dialog/find.h index 14d54b8d4..77a6c9d02 100644 --- a/src/ui/dialog/find.h +++ b/src/ui/dialog/find.h @@ -21,11 +21,7 @@ #include "ui/widget/entry.h" #include "ui/widget/frame.h" #include - -#include -#include -#include -#include +#include #include "desktop.h" #include "ui/dialog/desktop-tracker.h" diff --git a/src/ui/dialog/glyphs.h b/src/ui/dialog/glyphs.h index 3d0571244..6571af0a4 100644 --- a/src/ui/dialog/glyphs.h +++ b/src/ui/dialog/glyphs.h @@ -20,7 +20,7 @@ class Label; class ListStore; } -struct SPFontSelector; +class SPFontSelector; class font_instance; diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp index 801ab2922..de213ca85 100644 --- a/src/ui/dialog/icon-preview.cpp +++ b/src/ui/dialog/icon-preview.cpp @@ -20,11 +20,7 @@ #include #include #include - #include -#include -#include - #include #include #include diff --git a/src/ui/dialog/input.cpp b/src/ui/dialog/input.cpp index 82e65435d..9c9f7faa3 100644 --- a/src/ui/dialog/input.cpp +++ b/src/ui/dialog/input.cpp @@ -17,9 +17,7 @@ #include #include - #include -#include #include #include #include diff --git a/src/ui/dialog/layer-properties.h b/src/ui/dialog/layer-properties.h index 0e2f8ed94..9de303f89 100644 --- a/src/ui/dialog/layer-properties.h +++ b/src/ui/dialog/layer-properties.h @@ -80,9 +80,9 @@ protected: void perform(LayerPropertiesDialog &dialog); }; - friend struct Rename; - friend struct Create; - friend struct Move; + friend class Rename; + friend class Create; + friend class Move; Strategy *_strategy; SPDesktop *_desktop; diff --git a/src/ui/dialog/object-properties.cpp b/src/ui/dialog/object-properties.cpp index 8a2b0299a..114204961 100644 --- a/src/ui/dialog/object-properties.cpp +++ b/src/ui/dialog/object-properties.cpp @@ -38,12 +38,6 @@ #include "sp-item.h" #include -#if WITH_GTKMM_3_0 -# include -#else -# include -#endif - namespace Inkscape { namespace UI { diff --git a/src/ui/dialog/object-properties.h b/src/ui/dialog/object-properties.h index 624a18246..b49293ea1 100644 --- a/src/ui/dialog/object-properties.h +++ b/src/ui/dialog/object-properties.h @@ -35,8 +35,6 @@ #include "ui/widget/panel.h" #include "ui/widget/frame.h" - -#include #include #include #include @@ -48,14 +46,6 @@ class SPAttributeTable; class SPDesktop; class SPItem; -namespace Gtk { -#if WITH_GTKMM_3_0 -class Grid; -#else -class Table; -#endif -} - namespace Inkscape { namespace UI { namespace Dialog { diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp index bce63093d..0da39dd73 100644 --- a/src/ui/dialog/svg-fonts-dialog.cpp +++ b/src/ui/dialog/svg-fonts-dialog.cpp @@ -15,6 +15,8 @@ # include #endif +#ifdef ENABLE_SVG_FONTS + #include "svg-fonts-dialog.h" #include "document-private.h" #include "document-undo.h" @@ -943,6 +945,8 @@ SvgFontsDialog::~SvgFontsDialog(){} } // namespace UI } // namespace Inkscape +#endif //#ifdef ENABLE_SVG_FONTS + /* Local Variables: mode:c++ diff --git a/src/ui/dialog/svg-fonts-dialog.h b/src/ui/dialog/svg-fonts-dialog.h index 01f70654a..9be984820 100644 --- a/src/ui/dialog/svg-fonts-dialog.h +++ b/src/ui/dialog/svg-fonts-dialog.h @@ -34,8 +34,8 @@ class HScale; #endif } -struct SPGlyph; -struct SPGlyphKerning; +class SPGlyph; +class SPGlyphKerning; class SvgFont; class SvgFontDrawingArea : Gtk::DrawingArea{ diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index 67c6578f9..a71227861 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -57,7 +57,6 @@ extern "C" { #include "widgets/icon.h" #include "widgets/font-selector.h" #include -#include #include "unit-constants.h" diff --git a/src/ui/dialog/text-edit.h b/src/ui/dialog/text-edit.h index f27fdfc87..3fdeea05d 100644 --- a/src/ui/dialog/text-edit.h +++ b/src/ui/dialog/text-edit.h @@ -30,7 +30,7 @@ #include "ui/dialog/desktop-tracker.h" class SPItem; -struct SPFontSelector; +class SPFontSelector; class font_instance; class SPCSSAttr; diff --git a/src/ui/dialog/tracedialog.cpp b/src/ui/dialog/tracedialog.cpp index bd467555e..1ad827a56 100644 --- a/src/ui/dialog/tracedialog.cpp +++ b/src/ui/dialog/tracedialog.cpp @@ -20,7 +20,6 @@ #include #include "ui/widget/spinbutton.h" #include "ui/widget/frame.h" -#include #include #include //for GTK_RESPONSE* types diff --git a/src/ui/dialog/xml-tree.h b/src/ui/dialog/xml-tree.h index 58ef3aef8..0a6e3a786 100644 --- a/src/ui/dialog/xml-tree.h +++ b/src/ui/dialog/xml-tree.h @@ -29,7 +29,7 @@ #include "message.h" class SPDesktop; -class SPObject; +struct SPObject; struct SPXMLViewAttrList; struct SPXMLViewContent; struct SPXMLViewTree; diff --git a/src/ui/tool/control-point.cpp b/src/ui/tool/control-point.cpp index 069dcc67b..8c4924f26 100644 --- a/src/ui/tool/control-point.cpp +++ b/src/ui/tool/control-point.cpp @@ -7,8 +7,8 @@ */ #include -#include #include +#include #include <2geom/point.h> #include "desktop.h" #include "desktop-handles.h" diff --git a/src/ui/tool/node-tool.h b/src/ui/tool/node-tool.h index bc5267bb2..49b1496d4 100644 --- a/src/ui/tool/node-tool.h +++ b/src/ui/tool/node-tool.h @@ -25,6 +25,9 @@ #define INK_IS_NODE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INK_TYPE_NODE_TOOL)) #define INK_IS_NODE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INK_TYPE_NODE_TOOL)) +class InkNodeTool; +class InkNodeToolClass; + namespace Inkscape { namespace Display { diff --git a/src/ui/tool/path-manipulator.h b/src/ui/tool/path-manipulator.h index 8bc097ed6..a235a3b05 100644 --- a/src/ui/tool/path-manipulator.h +++ b/src/ui/tool/path-manipulator.h @@ -22,7 +22,7 @@ struct SPCanvasItem; class SPCurve; -class SPPath; +struct SPPath; namespace Inkscape { namespace XML { class Node; } diff --git a/src/ui/widget/entry.cpp b/src/ui/widget/entry.cpp index 64d28119a..173e014d9 100644 --- a/src/ui/widget/entry.cpp +++ b/src/ui/widget/entry.cpp @@ -13,8 +13,6 @@ #include "entry.h" -#include - namespace Inkscape { namespace UI { namespace Widget { diff --git a/src/ui/widget/entry.h b/src/ui/widget/entry.h index de5cceadd..53b848fc9 100644 --- a/src/ui/widget/entry.h +++ b/src/ui/widget/entry.h @@ -11,10 +11,10 @@ #define INKSCAPE_UI_WIDGET_ENTRY__H #include "labelled.h" +#include -namespace Gtk { -class Entry; -} +#include +#include namespace Inkscape { namespace UI { diff --git a/src/ui/widget/frame.h b/src/ui/widget/frame.h index a04666651..cf736d8a1 100644 --- a/src/ui/widget/frame.h +++ b/src/ui/widget/frame.h @@ -10,9 +10,11 @@ #ifndef INKSCAPE_UI_WIDGET_FRAME_H #define INKSCAPE_UI_WIDGET_FRAME_H -#include -#include -#include +#include + +namespace Gtk { +class Frame; +} namespace Inkscape { namespace UI { diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h index fa35b815e..2a7843a51 100644 --- a/src/ui/widget/registered-widget.h +++ b/src/ui/widget/registered-widget.h @@ -32,7 +32,7 @@ #include -struct SPUnit; +class SPUnit; class SPDocument; namespace Gtk { diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h index 9b78cb17f..6d5222429 100644 --- a/src/ui/widget/selected-style.h +++ b/src/ui/widget/selected-style.h @@ -40,7 +40,7 @@ #include "helper/units.h" class SPDesktop; -struct SPUnit; +class SPUnit; namespace Inkscape { namespace UI { diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h index d7bab3732..2b9c32b2e 100644 --- a/src/ui/widget/style-swatch.h +++ b/src/ui/widget/style-swatch.h @@ -26,7 +26,7 @@ #include "button.h" #include "preferences.h" -struct SPUnit; +class SPUnit; struct SPStyle; class SPCSSAttr; -- cgit v1.2.3