diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-03-17 12:29:02 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Zenotz <jtx@jtx.marker.es> | 2013-03-17 12:29:02 +0000 |
| commit | 732618cd7d6159ee47cc0dd8b86cf07790e3e724 (patch) | |
| tree | 5e7ce92337d91b24e07f9c5f8992f1bc6478c692 /src/ui | |
| parent | Working in widgets (diff) | |
| download | inkscape-732618cd7d6159ee47cc0dd8b86cf07790e3e724.tar.gz inkscape-732618cd7d6159ee47cc0dd8b86cf07790e3e724.zip | |
Working with widjets
(bzr r11950.1.56)
Diffstat (limited to 'src/ui')
28 files changed, 55 insertions, 97 deletions
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<ObjectProperties, FloatingBehavior>); // registerFactory("PrintColorsPreviewDialog", &create<PrintColorsPreviewDialog, FloatingBehavior>); registerFactory("Script", &create<ScriptDialog, FloatingBehavior>); +#ifdef ENABLE_SVG_FONTS registerFactory("SvgFontsDialog", &create<SvgFontsDialog, FloatingBehavior>); +#endif registerFactory("Swatches", &create<SwatchesPanel, FloatingBehavior>); registerFactory("Symbols", &create<SymbolsDialog, FloatingBehavior>); registerFactory("TileDialog", &create<TileDialog, FloatingBehavior>); @@ -149,7 +154,9 @@ DialogManager::DialogManager() { registerFactory("ObjectProperties", &create<ObjectProperties, DockBehavior>); // registerFactory("PrintColorsPreviewDialog", &create<PrintColorsPreviewDialog, DockBehavior>); registerFactory("Script", &create<ScriptDialog, DockBehavior>); +#ifdef ENABLE_SVG_FONTS registerFactory("SvgFontsDialog", &create<SvgFontsDialog, DockBehavior>); +#endif registerFactory("Swatches", &create<SwatchesPanel, DockBehavior>); registerFactory("Symbols", &create<SymbolsDialog, DockBehavior>); registerFactory("TileDialog", &create<TileDialog, DockBehavior>); 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 <gtkmm/box.h> #include <gtkmm/buttonbox.h> -#include <gtkmm/dialog.h> +#include <gtkmm/label.h> +#include <gtkmm/widget.h> +#include <gtkmm/togglebutton.h> #include <gtkmm/entry.h> #include <gtkmm/image.h> -#include <gtkmm/label.h> -#include <gtkmm/spinbutton.h> -#include <gtkmm/stock.h> #include <gtkmm/stockid.h> -#if WITH_GTKMM_3_0 -# include <gtkmm/grid.h> -#else -# include <gtkmm/table.h> -#endif -#include <gtkmm/togglebutton.h> -#include <gtkmm/widget.h> - +#include <gtkmm/stock.h> +#include <gtkmm/table.h> #ifdef WITH_GNOME_VFS # include <libgnomevfs/gnome-vfs-init.h> // 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 <gtk/gtk.h> #include <glibmm/i18n.h> - -#include <gtkmm/comboboxtext.h> #include <gtkmm/expander.h> #include <gtkmm/frame.h> -#include <gtkmm/progressbar.h> #include <gtkmm/textview.h> +#include <gtkmm/comboboxtext.h> #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<Gtk::Widget *>(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 <gtkmm/entry.h> #include <gtkmm/widget.h> - #include "verbs.h" #include "message-stack.h" @@ -59,7 +56,6 @@ #include "xml/attribute-record.h" #include <glibmm/i18n.h> -#include <glibmm/regex.h> 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 <glib.h> - -#include <gtkmm/box.h> -#include <gtkmm/buttonbox.h> -#include <gtkmm/expander.h> -#include <gtkmm/label.h> +#include <gtkmm.h> #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 <gtkmm/buttonbox.h> #include <boost/scoped_ptr.hpp> #include <glib.h> - #include <glibmm/i18n.h> -#include <glibmm/main.h> -#include <glibmm/timer.h> - #include <gtkmm/alignment.h> #include <gtkmm/checkbutton.h> #include <gtkmm/frame.h> 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 <glib/gprintf.h> #include <glibmm/i18n.h> - #include <gtkmm/alignment.h> -#include <gtkmm/buttonbox.h> #include <gtkmm/cellrenderercombo.h> #include <gtkmm/checkbutton.h> #include <gtkmm/comboboxtext.h> 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 <glibmm/i18n.h> -#if WITH_GTKMM_3_0 -# include <gtkmm/grid.h> -#else -# include <gtkmm/table.h> -#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 <gtkmm/checkbutton.h> #include <gtkmm/entry.h> #include <gtkmm/expander.h> #include <gtkmm/frame.h> @@ -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 <config.h> #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 <glibmm/i18n.h> -#include <glibmm/markup.h> #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 <gtkmm/frame.h> #include "ui/widget/spinbutton.h" #include "ui/widget/frame.h" -#include <gtkmm/radiobutton.h> #include <gtkmm/stock.h> #include <gtk/gtk.h> //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 <iostream> -#include <gdk/gdkkeysyms.h> #include <gdkmm.h> +#include <gtkmm.h> #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 <gtkmm/entry.h> - 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 <gtkmm.h> -namespace Gtk { -class Entry; -} +#include <gtkmm/entry.h> +#include <gtkmm/comboboxtext.h> 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 <gtkmm/alignment.h> -#include <gtkmm/frame.h> -#include <gtkmm/label.h> +#include <gtkmm.h> + +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 <gtkmm/checkbutton.h> -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; |
