diff options
| author | root <root@jtx.marker.es> | 2013-03-17 04:32:48 +0000 |
|---|---|---|
| committer | root <root@jtx.marker.es> | 2013-03-17 04:32:48 +0000 |
| commit | 40e796d977e44a3b31c063af3ca841fb1daa81c6 (patch) | |
| tree | 18b117e449d25b286872fa90cc760d7ba4e80c78 /src/ui | |
| parent | widget working not compile (diff) | |
| parent | cppcheck (diff) | |
| download | inkscape-40e796d977e44a3b31c063af3ca841fb1daa81c6.tar.gz inkscape-40e796d977e44a3b31c063af3ca841fb1daa81c6.zip | |
Working in widgets
(bzr r11950.1.55)
Diffstat (limited to 'src/ui')
28 files changed, 97 insertions, 55 deletions
diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp index faba47769..993f48d8f 100644 --- a/src/ui/dialog/dialog-manager.cpp +++ b/src/ui/dialog/dialog-manager.cpp @@ -53,10 +53,7 @@ #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 { @@ -118,9 +115,7 @@ 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>); @@ -154,9 +149,7 @@ 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 045b34814..d335fb303 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -792,8 +792,6 @@ 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 603786742..086e52a6c 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -22,14 +22,21 @@ #include <gtkmm/box.h> #include <gtkmm/buttonbox.h> -#include <gtkmm/label.h> -#include <gtkmm/widget.h> -#include <gtkmm/togglebutton.h> +#include <gtkmm/dialog.h> #include <gtkmm/entry.h> #include <gtkmm/image.h> -#include <gtkmm/stockid.h> +#include <gtkmm/label.h> +#include <gtkmm/spinbutton.h> #include <gtkmm/stock.h> -#include <gtkmm/table.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> + #ifdef WITH_GNOME_VFS # include <libgnomevfs/gnome-vfs-init.h> // gnome_vfs_initialized #endif @@ -126,6 +133,15 @@ 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 5dca9cfa5..b10c98fd2 100644 --- a/src/ui/dialog/export.h +++ b/src/ui/dialog/export.h @@ -14,10 +14,12 @@ #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" @@ -25,11 +27,14 @@ #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 */ @@ -39,16 +44,6 @@ 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 8de2da18b..19b873d54 100644 --- a/src/ui/dialog/fill-and-stroke.cpp +++ b/src/ui/dialog/fill-and-stroke.cpp @@ -132,14 +132,24 @@ 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 @@ -148,7 +158,12 @@ 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 d3ce99b00..def7b5bdb 100644 --- a/src/ui/dialog/find.cpp +++ b/src/ui/dialog/find.cpp @@ -15,7 +15,10 @@ #endif #include "find.h" + +#include <gtkmm/entry.h> #include <gtkmm/widget.h> + #include "verbs.h" #include "message-stack.h" @@ -56,6 +59,7 @@ #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 77a6c9d02..14d54b8d4 100644 --- a/src/ui/dialog/find.h +++ b/src/ui/dialog/find.h @@ -21,7 +21,11 @@ #include "ui/widget/entry.h" #include "ui/widget/frame.h" #include <glib.h> -#include <gtkmm.h> + +#include <gtkmm/box.h> +#include <gtkmm/buttonbox.h> +#include <gtkmm/expander.h> +#include <gtkmm/label.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 6571af0a4..3d0571244 100644 --- a/src/ui/dialog/glyphs.h +++ b/src/ui/dialog/glyphs.h @@ -20,7 +20,7 @@ class Label; class ListStore; } -class SPFontSelector; +struct SPFontSelector; class font_instance; diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp index de213ca85..801ab2922 100644 --- a/src/ui/dialog/icon-preview.cpp +++ b/src/ui/dialog/icon-preview.cpp @@ -20,7 +20,11 @@ #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 9c9f7faa3..82e65435d 100644 --- a/src/ui/dialog/input.cpp +++ b/src/ui/dialog/input.cpp @@ -17,7 +17,9 @@ #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 9de303f89..0e2f8ed94 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 class Rename; - friend class Create; - friend class Move; + friend struct Rename; + friend struct Create; + friend struct Move; Strategy *_strategy; SPDesktop *_desktop; diff --git a/src/ui/dialog/object-properties.cpp b/src/ui/dialog/object-properties.cpp index 114204961..8a2b0299a 100644 --- a/src/ui/dialog/object-properties.cpp +++ b/src/ui/dialog/object-properties.cpp @@ -38,6 +38,12 @@ #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 b49293ea1..624a18246 100644 --- a/src/ui/dialog/object-properties.h +++ b/src/ui/dialog/object-properties.h @@ -35,6 +35,8 @@ #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> @@ -46,6 +48,14 @@ 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 0da39dd73..bce63093d 100644 --- a/src/ui/dialog/svg-fonts-dialog.cpp +++ b/src/ui/dialog/svg-fonts-dialog.cpp @@ -15,8 +15,6 @@ # include <config.h> #endif -#ifdef ENABLE_SVG_FONTS - #include "svg-fonts-dialog.h" #include "document-private.h" #include "document-undo.h" @@ -945,8 +943,6 @@ 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 9be984820..01f70654a 100644 --- a/src/ui/dialog/svg-fonts-dialog.h +++ b/src/ui/dialog/svg-fonts-dialog.h @@ -34,8 +34,8 @@ class HScale; #endif } -class SPGlyph; -class SPGlyphKerning; +struct SPGlyph; +struct SPGlyphKerning; class SvgFont; class SvgFontDrawingArea : Gtk::DrawingArea{ diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index a71227861..67c6578f9 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -57,6 +57,7 @@ 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 3fdeea05d..f27fdfc87 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; -class SPFontSelector; +struct SPFontSelector; class font_instance; class SPCSSAttr; diff --git a/src/ui/dialog/tracedialog.cpp b/src/ui/dialog/tracedialog.cpp index 1ad827a56..bd467555e 100644 --- a/src/ui/dialog/tracedialog.cpp +++ b/src/ui/dialog/tracedialog.cpp @@ -20,6 +20,7 @@ #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 0a6e3a786..58ef3aef8 100644 --- a/src/ui/dialog/xml-tree.h +++ b/src/ui/dialog/xml-tree.h @@ -29,7 +29,7 @@ #include "message.h" class SPDesktop; -struct SPObject; +class SPObject; struct SPXMLViewAttrList; struct SPXMLViewContent; struct SPXMLViewTree; diff --git a/src/ui/tool/control-point.cpp b/src/ui/tool/control-point.cpp index 8c4924f26..069dcc67b 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 49b1496d4..bc5267bb2 100644 --- a/src/ui/tool/node-tool.h +++ b/src/ui/tool/node-tool.h @@ -25,9 +25,6 @@ #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 a235a3b05..8bc097ed6 100644 --- a/src/ui/tool/path-manipulator.h +++ b/src/ui/tool/path-manipulator.h @@ -22,7 +22,7 @@ struct SPCanvasItem; class SPCurve; -struct SPPath; +class SPPath; namespace Inkscape { namespace XML { class Node; } diff --git a/src/ui/widget/entry.cpp b/src/ui/widget/entry.cpp index 173e014d9..64d28119a 100644 --- a/src/ui/widget/entry.cpp +++ b/src/ui/widget/entry.cpp @@ -13,6 +13,8 @@ #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 53b848fc9..de5cceadd 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> -#include <gtkmm/entry.h> -#include <gtkmm/comboboxtext.h> +namespace Gtk { +class Entry; +} namespace Inkscape { namespace UI { diff --git a/src/ui/widget/frame.h b/src/ui/widget/frame.h index cf736d8a1..a04666651 100644 --- a/src/ui/widget/frame.h +++ b/src/ui/widget/frame.h @@ -10,11 +10,9 @@ #ifndef INKSCAPE_UI_WIDGET_FRAME_H #define INKSCAPE_UI_WIDGET_FRAME_H -#include <gtkmm.h> - -namespace Gtk { -class Frame; -} +#include <gtkmm/alignment.h> +#include <gtkmm/frame.h> +#include <gtkmm/label.h> namespace Inkscape { namespace UI { diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h index 2a7843a51..fa35b815e 100644 --- a/src/ui/widget/registered-widget.h +++ b/src/ui/widget/registered-widget.h @@ -32,7 +32,7 @@ #include <gtkmm/checkbutton.h> -class SPUnit; +struct SPUnit; class SPDocument; namespace Gtk { diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h index 6d5222429..9b78cb17f 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; -class SPUnit; +struct SPUnit; namespace Inkscape { namespace UI { diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h index 2b9c32b2e..d7bab3732 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" -class SPUnit; +struct SPUnit; struct SPStyle; class SPCSSAttr; |
