diff options
| author | root <root@jtx.marker.es> | 2013-03-16 20:28:39 +0000 |
|---|---|---|
| committer | root <root@jtx.marker.es> | 2013-03-16 20:28:39 +0000 |
| commit | dc88806b0778f65a3f16071c9782d607cc735dda (patch) | |
| tree | ac560318c8a3bb2ac244edba6511082bb06cac34 /src/widgets | |
| parent | Updating original path (diff) | |
| parent | Fix another tonne of forward declaration tags (diff) | |
| download | inkscape-dc88806b0778f65a3f16071c9782d607cc735dda.tar.gz inkscape-dc88806b0778f65a3f16071c9782d607cc735dda.zip | |
widget working not compile
(bzr r11950.1.54)
Diffstat (limited to 'src/widgets')
26 files changed, 79 insertions, 32 deletions
diff --git a/src/widgets/arc-toolbar.h b/src/widgets/arc-toolbar.h index 69d7b8a17..dba2fcd5a 100644 --- a/src/widgets/arc-toolbar.h +++ b/src/widgets/arc-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_arc_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/box3d-toolbar.h b/src/widgets/box3d-toolbar.h index 50535b8de..d80934b01 100644 --- a/src/widgets/box3d-toolbar.h +++ b/src/widgets/box3d-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void box3d_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/calligraphy-toolbar.h b/src/widgets/calligraphy-toolbar.h index 5b2e3c5d4..9650e03b1 100644 --- a/src/widgets/calligraphy-toolbar.h +++ b/src/widgets/calligraphy-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); void update_presets_list(GObject *tbl); diff --git a/src/widgets/connector-toolbar.h b/src/widgets/connector-toolbar.h index 6e69cf047..2ab26e56c 100644 --- a/src/widgets/connector-toolbar.h +++ b/src/widgets/connector-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_connector_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/desktop-widget.h b/src/widgets/desktop-widget.h index 0ffedd112..9188838b3 100644 --- a/src/widgets/desktop-widget.h +++ b/src/widgets/desktop-widget.h @@ -25,7 +25,7 @@ typedef struct _EgeColorProfTracker EgeColorProfTracker; struct SPCanvas; class SPDesktop; -class SPDesktopWidget; +struct SPDesktopWidget; class SPObject; diff --git a/src/widgets/dropper-toolbar.h b/src/widgets/dropper-toolbar.h index eee50ae5c..aa2116daf 100644 --- a/src/widgets/dropper-toolbar.h +++ b/src/widgets/dropper-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_dropper_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/erasor-toolbar.h b/src/widgets/erasor-toolbar.h index f00ceebe4..b1bb3a3fa 100644 --- a/src/widgets/erasor-toolbar.h +++ b/src/widgets/erasor-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_eraser_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/gradient-toolbar.h b/src/widgets/gradient-toolbar.h index 980a41a83..74cfb2886 100644 --- a/src/widgets/gradient-toolbar.h +++ b/src/widgets/gradient-toolbar.h @@ -13,7 +13,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_gradient_toolbox_prep(SPDesktop * /*desktop*/, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/lpe-toolbar.h b/src/widgets/lpe-toolbar.h index 837ef4c1e..1796f8027 100644 --- a/src/widgets/lpe-toolbar.h +++ b/src/widgets/lpe-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_lpetool_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/measure-toolbar.h b/src/widgets/measure-toolbar.h index 7ec6cd6c3..4b90ccb9f 100644 --- a/src/widgets/measure-toolbar.h +++ b/src/widgets/measure-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_measure_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/mesh-toolbar.h b/src/widgets/mesh-toolbar.h index 277525804..f84cff59b 100644 --- a/src/widgets/mesh-toolbar.h +++ b/src/widgets/mesh-toolbar.h @@ -15,7 +15,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_mesh_toolbox_prep( SPDesktop * /*desktop*/, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/node-toolbar.h b/src/widgets/node-toolbar.h index ac57a0f80..dcccf1712 100644 --- a/src/widgets/node-toolbar.h +++ b/src/widgets/node-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_node_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/paint-selector.h b/src/widgets/paint-selector.h index d6ad3f50c..d3b3f4116 100644 --- a/src/widgets/paint-selector.h +++ b/src/widgets/paint-selector.h @@ -23,7 +23,7 @@ class SPGradient; class SPDesktop; class SPPattern; -class SPStyle; +struct SPStyle; #define SP_TYPE_PAINT_SELECTOR (sp_paint_selector_get_type ()) #define SP_PAINT_SELECTOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_PAINT_SELECTOR, SPPaintSelector)) diff --git a/src/widgets/paintbucket-toolbar.h b/src/widgets/paintbucket-toolbar.h index f49861e1f..fe25c7fe2 100644 --- a/src/widgets/paintbucket-toolbar.h +++ b/src/widgets/paintbucket-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_paintbucket_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/pencil-toolbar.h b/src/widgets/pencil-toolbar.h index 89269d668..14f1e8930 100644 --- a/src/widgets/pencil-toolbar.h +++ b/src/widgets/pencil-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_pencil_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); void sp_pen_toolbox_prep(SPDesktop * /*desktop*/, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/rect-toolbar.h b/src/widgets/rect-toolbar.h index 2f22d7e27..e123c095b 100644 --- a/src/widgets/rect-toolbar.h +++ b/src/widgets/rect-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_rect_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/sp-attribute-widget.cpp b/src/widgets/sp-attribute-widget.cpp index a1702a864..1f0fcd94e 100644 --- a/src/widgets/sp-attribute-widget.cpp +++ b/src/widgets/sp-attribute-widget.cpp @@ -12,9 +12,18 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include "sp-attribute-widget.h" + #include <glibmm/i18n.h> #include <gtkmm/entry.h> #include <gtkmm/label.h> + +#if WITH_GTKMM_3_0 +# include <gtkmm/grid.h> +#else +# include <gtkmm/table.h> +#endif + #include <sigc++/functors/ptr_fun.h> #include <sigc++/adaptors/bind.h> @@ -24,7 +33,6 @@ #include "document.h" #include "document-undo.h" #include "verbs.h" -#include "sp-attribute-widget.h" using Inkscape::DocumentUndo; @@ -150,11 +158,14 @@ void SPAttributeTable::set_object(SPObject *object, release_connection = object->connectRelease (sigc::bind<1>(sigc::ptr_fun(&sp_attribute_table_object_release), this)); // Create table - table = new Gtk::Table (attributes.size(), 2, false); +#if WITH_GTKMM_3_0 + table = new Gtk::Grid(); +#else + table = new Gtk::Table(attributes.size(), 2, false); +#endif + if (!(parent == NULL)) - { - gtk_container_add (GTK_CONTAINER (parent),(GtkWidget*)table->gobj()); - } + gtk_container_add(GTK_CONTAINER(parent), (GtkWidget*)table->gobj()); // Fill rows _attributes = attributes; @@ -162,18 +173,41 @@ void SPAttributeTable::set_object(SPObject *object, Gtk::Label *ll = new Gtk::Label (_(labels[i].c_str())); ll->show(); ll->set_alignment (1.0, 0.5); + +#if WITH_GTKMM_3_0 + ll->set_vexpand(); + ll->set_margin_left(XPAD); + ll->set_margin_right(XPAD); + ll->set_margin_top(XPAD); + ll->set_margin_bottom(XPAD); + table->attach(*ll, 0, i, 1, 1); +#else table->attach (*ll, 0, 1, i, i + 1, Gtk::FILL, (Gtk::EXPAND | Gtk::FILL), XPAD, YPAD ); +#endif + Gtk::Entry *ee = new Gtk::Entry(); ee->show(); const gchar *val = object->getRepr()->attribute(attributes[i].c_str()); ee->set_text (val ? val : (const gchar *) ""); + +#if WITH_GTKMM_3_0 + ee->set_hexpand(); + ee->set_vexpand(); + ee->set_margin_left(XPAD); + ee->set_margin_right(XPAD); + ee->set_margin_top(XPAD); + ee->set_margin_bottom(XPAD); + table->attach(*ee, 1, i, 1, 1); +#else table->attach (*ee, 1, 2, i, i + 1, (Gtk::EXPAND | Gtk::FILL), (Gtk::EXPAND | Gtk::FILL), XPAD, YPAD ); +#endif + _entries.push_back(ee); g_signal_connect ( ee->gobj(), "changed", G_CALLBACK (sp_attribute_table_entry_changed), diff --git a/src/widgets/sp-attribute-widget.h b/src/widgets/sp-attribute-widget.h index fb8a74632..d9b972201 100644 --- a/src/widgets/sp-attribute-widget.h +++ b/src/widgets/sp-attribute-widget.h @@ -15,13 +15,22 @@ #ifndef SEEN_DIALOGS_SP_ATTRIBUTE_WIDGET_H #define SEEN_DIALOGS_SP_ATTRIBUTE_WIDGET_H -#include <gtkmm/table.h> +#if HAVE_CONFIG_H +# include "config.h" +#endif + #include <gtkmm/widget.h> #include <stddef.h> #include <sigc++/connection.h> namespace Gtk { class Entry; + +#if WITH_GTKMM_3_0 +class Grid; +#else +class Table; +#endif } namespace Inkscape { @@ -126,12 +135,16 @@ public: bool blocked; private: - /** + /** * Container widget for the dynamically created child widgets (labels and entry boxes). */ +#if WITH_GTKMM_3_0 + Gtk::Grid *table; +#else Gtk::Table *table; +#endif - /** + /** * List of attributes. * * _attributes stores the attribute names of the selected object that diff --git a/src/widgets/sp-widget.h b/src/widgets/sp-widget.h index d2177f486..3a23a92c5 100644 --- a/src/widgets/sp-widget.h +++ b/src/widgets/sp-widget.h @@ -27,7 +27,7 @@ namespace Inkscape { -class Application; +struct Application; class Selection; class SPWidgetImpl; diff --git a/src/widgets/spiral-toolbar.h b/src/widgets/spiral-toolbar.h index 3e4d7b46f..194b54bce 100644 --- a/src/widgets/spiral-toolbar.h +++ b/src/widgets/spiral-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_spiral_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/spray-toolbar.h b/src/widgets/spray-toolbar.h index 8ac0ec9af..170b6bb8e 100644 --- a/src/widgets/spray-toolbar.h +++ b/src/widgets/spray-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_spray_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/star-toolbar.h b/src/widgets/star-toolbar.h index 793f73f8b..6f91d5570 100644 --- a/src/widgets/star-toolbar.h +++ b/src/widgets/star-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_star_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/text-toolbar.h b/src/widgets/text-toolbar.h index 34109c022..68158d201 100644 --- a/src/widgets/text-toolbar.h +++ b/src/widgets/text-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/toolbox.h b/src/widgets/toolbox.h index d520d393d..9c839a8fe 100644 --- a/src/widgets/toolbox.h +++ b/src/widgets/toolbox.h @@ -23,7 +23,7 @@ #define TOOLBAR_SLIDER_HINT "full" class SPDesktop; -class SPEventContext; +struct SPEventContext; namespace Inkscape { namespace UI { diff --git a/src/widgets/tweak-toolbar.h b/src/widgets/tweak-toolbar.h index 64608de70..6f840f2c1 100644 --- a/src/widgets/tweak-toolbar.h +++ b/src/widgets/tweak-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_tweak_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); diff --git a/src/widgets/zoom-toolbar.h b/src/widgets/zoom-toolbar.h index 9f1af4e5e..b8d6a42af 100644 --- a/src/widgets/zoom-toolbar.h +++ b/src/widgets/zoom-toolbar.h @@ -28,7 +28,7 @@ */ #include <gtk/gtk.h> -struct SPDesktop; +class SPDesktop; void sp_zoom_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder); |
