From 9e210a6d1333c3366681547e3e81593ef69ff73e Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 14 Jul 2016 12:56:49 +0200 Subject: Last part of new SPObject children list (bzr r14954.1.20) --- src/ui/dialog/document-properties.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/ui/dialog/document-properties.cpp') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 589973162..df37eb005 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -1315,12 +1315,7 @@ void DocumentProperties::changeEmbeddedScript(){ for (std::vector::const_iterator it = current.begin(); it != current.end(); ++it) { SPObject* obj = *it; if (id == obj->getId()){ - - int count=0; - for ( SPObject *child = obj->children ; child; child = child->next ) - { - count++; - } + int count = (int) obj->_children.size(); if (count>1) g_warning("TODO: Found a script element with multiple (%d) child nodes! We must implement support for that!", count); @@ -1364,8 +1359,11 @@ void DocumentProperties::editEmbeddedScript(){ //XML Tree being used directly here while it shouldn't be. Inkscape::XML::Node *repr = obj->getRepr(); if (repr){ - SPObject *child; - while (NULL != (child = obj->firstChild())) child->deleteObject(); + auto tmp = obj->_children | boost::adaptors::transformed([](SPObject& o) { return &o; }); + std::vector vec(tmp.begin(), tmp.end()); + for (auto &child: vec) { + child->deleteObject(); + } obj->appendChildRepr(xml_doc->createTextNode(_EmbeddedContent.get_buffer()->get_text().c_str())); //TODO repr->set_content(_EmbeddedContent.get_buffer()->get_text()); -- cgit v1.2.3 From 24d3f50003ca3cec6a03a7f5267cc4fe5588c69f Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 14 Jul 2016 13:17:21 +0200 Subject: Renamed children list in SPObject (bzr r14954.1.21) --- src/ui/dialog/document-properties.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/dialog/document-properties.cpp') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index df37eb005..6f5f14d80 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -1315,7 +1315,7 @@ void DocumentProperties::changeEmbeddedScript(){ for (std::vector::const_iterator it = current.begin(); it != current.end(); ++it) { SPObject* obj = *it; if (id == obj->getId()){ - int count = (int) obj->_children.size(); + int count = (int) obj->children.size(); if (count>1) g_warning("TODO: Found a script element with multiple (%d) child nodes! We must implement support for that!", count); @@ -1359,7 +1359,7 @@ void DocumentProperties::editEmbeddedScript(){ //XML Tree being used directly here while it shouldn't be. Inkscape::XML::Node *repr = obj->getRepr(); if (repr){ - auto tmp = obj->_children | boost::adaptors::transformed([](SPObject& o) { return &o; }); + auto tmp = obj->children | boost::adaptors::transformed([](SPObject& o) { return &o; }); std::vector vec(tmp.begin(), tmp.end()); for (auto &child: vec) { child->deleteObject(); -- cgit v1.2.3 From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/ui/dialog/document-properties.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/ui/dialog/document-properties.cpp') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 589973162..b2c6c6d9f 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -25,27 +25,17 @@ #include "ui/widget/notebook-page.h" #include "document-properties.h" #include "display/canvas-grid.h" -#include "document.h" -#include "desktop.h" -#include "inkscape.h" #include "io/sys.h" -#include "preferences.h" #include "ui/shape-editor.h" -#include "sp-namedview.h" #include "sp-root.h" #include "sp-script.h" #include "style.h" -#include "svg/stringstream.h" #include "ui/tools-switch.h" -#include "ui/widget/color-picker.h" -#include "ui/widget/scalar-unit.h" #include "ui/dialog/filedialog.h" #include "verbs.h" #include "widgets/icon.h" #include "xml/node-event-vector.h" -#include "xml/repr.h" -#include // std::min #include "rdf.h" #include "ui/widget/entity-entry.h" @@ -54,11 +44,8 @@ #include "color-profile.h" #endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) -#include #include -#include -#include <2geom/transforms.h> #include "ui/icon-names.h" using std::pair; -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/ui/dialog/document-properties.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/ui/dialog/document-properties.cpp') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index b2c6c6d9f..589973162 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -25,17 +25,27 @@ #include "ui/widget/notebook-page.h" #include "document-properties.h" #include "display/canvas-grid.h" +#include "document.h" +#include "desktop.h" +#include "inkscape.h" #include "io/sys.h" +#include "preferences.h" #include "ui/shape-editor.h" +#include "sp-namedview.h" #include "sp-root.h" #include "sp-script.h" #include "style.h" +#include "svg/stringstream.h" #include "ui/tools-switch.h" +#include "ui/widget/color-picker.h" +#include "ui/widget/scalar-unit.h" #include "ui/dialog/filedialog.h" #include "verbs.h" #include "widgets/icon.h" #include "xml/node-event-vector.h" +#include "xml/repr.h" +#include // std::min #include "rdf.h" #include "ui/widget/entity-entry.h" @@ -44,8 +54,11 @@ #include "color-profile.h" #endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) +#include #include +#include +#include <2geom/transforms.h> #include "ui/icon-names.h" using std::pair; -- cgit v1.2.3 From dcd91f59f597ab4af07cee5929ce0e2e1f9104d5 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Thu, 28 Jul 2016 16:16:18 +0100 Subject: Drop remaining GTKMM 2 fallback support (bzr r15023.2.7) --- src/ui/dialog/document-properties.cpp | 129 +--------------------------------- 1 file changed, 1 insertion(+), 128 deletions(-) (limited to 'src/ui/dialog/document-properties.cpp') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 589973162..33f134c11 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -223,25 +223,16 @@ DocumentProperties::~DocumentProperties() * widget in columns 2-3; (non-0, 0) means label in columns 1-3; and * (non-0, non-0) means two widgets in columns 2 and 3. */ -#if WITH_GTKMM_3_0 inline void attach_all(Gtk::Grid &table, Gtk::Widget *const arr[], unsigned const n, int start = 0, int docum_prop_flag = 0) -#else -inline void attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned const n, int start = 0, int docum_prop_flag = 0) -#endif { for (unsigned i = 0, r = start; i < n; i += 2) { if (arr[i] && arr[i+1]) { -#if WITH_GTKMM_3_0 arr[i]->set_hexpand(); arr[i+1]->set_hexpand(); arr[i]->set_valign(Gtk::ALIGN_CENTER); arr[i+1]->set_valign(Gtk::ALIGN_CENTER); table.attach(*arr[i], 1, r, 1, 1); table.attach(*arr[i+1], 2, r, 1, 1); -#else - table.attach(*arr[i], 1, 2, r, r+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0); - table.attach(*arr[i+1], 2, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0); -#endif } else { if (arr[i+1]) { Gtk::AttachOptions yoptions = (Gtk::AttachOptions)0; @@ -252,7 +243,6 @@ inline void attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned con if (docum_prop_flag) { // this sets the padding for subordinate widgets on the "Page" page if( i==(n-8) || i==(n-10) ) { -#if WITH_GTKMM_3_0 arr[i+1]->set_hexpand(); arr[i+1]->set_margin_left(20); arr[i+1]->set_margin_right(20); @@ -263,11 +253,7 @@ inline void attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned con arr[i+1]->set_valign(Gtk::ALIGN_CENTER); table.attach(*arr[i+1], 1, r, 2, 1); -#else - table.attach(*arr[i+1], 1, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, yoptions, 20,0); -#endif } else { -#if WITH_GTKMM_3_0 arr[i+1]->set_hexpand(); if (yoptions & Gtk::EXPAND) @@ -276,12 +262,8 @@ inline void attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned con arr[i+1]->set_valign(Gtk::ALIGN_CENTER); table.attach(*arr[i+1], 1, r, 2, 1); -#else - table.attach(*arr[i+1], 1, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, yoptions, 0,0); -#endif } } else { -#if WITH_GTKMM_3_0 arr[i+1]->set_hexpand(); if (yoptions & Gtk::EXPAND) @@ -290,32 +272,21 @@ inline void attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned con arr[i+1]->set_valign(Gtk::ALIGN_CENTER); table.attach(*arr[i+1], 1, r, 2, 1); -#else - table.attach(*arr[i+1], 1, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, yoptions, 0,0); -#endif } } else if (arr[i]) { Gtk::Label& label = reinterpret_cast(*arr[i]); label.set_alignment (0.0); -#if WITH_GTKMM_3_0 label.set_hexpand(); label.set_valign(Gtk::ALIGN_CENTER); table.attach(label, 0, r, 3, 1); -#else - table.attach (label, 0, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0); -#endif } else { Gtk::HBox *space = Gtk::manage (new Gtk::HBox); space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y); -#if WITH_GTKMM_3_0 space->set_halign(Gtk::ALIGN_CENTER); space->set_valign(Gtk::ALIGN_CENTER); table.attach(*space, 0, r, 1, 1); -#else - table.attach (*space, 0, 1, r, r+1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0,0,0); -#endif } } ++r; @@ -685,52 +656,35 @@ void DocumentProperties::build_cms() label_link->set_alignment(0.0); -#if WITH_GTKMM_3_0 label_link->set_hexpand(); label_link->set_valign(Gtk::ALIGN_CENTER); _page_cms->table().attach(*label_link, 0, row, 3, 1); -#else - _page_cms->table().attach(*label_link, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif row++; -#if WITH_GTKMM_3_0 _LinkedProfilesListScroller.set_hexpand(); _LinkedProfilesListScroller.set_valign(Gtk::ALIGN_CENTER); _page_cms->table().attach(_LinkedProfilesListScroller, 0, row, 3, 1); -#else - _page_cms->table().attach(_LinkedProfilesListScroller, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif row++; Gtk::HBox* spacer = Gtk::manage(new Gtk::HBox()); spacer->set_size_request(SPACE_SIZE_X, SPACE_SIZE_Y); -#if WITH_GTKMM_3_0 spacer->set_hexpand(); spacer->set_valign(Gtk::ALIGN_CENTER); _page_cms->table().attach(*spacer, 0, row, 3, 1); -#else - _page_cms->table().attach(*spacer, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif row++; label_avail->set_alignment(0.0); -#if WITH_GTKMM_3_0 label_avail->set_hexpand(); label_avail->set_valign(Gtk::ALIGN_CENTER); _page_cms->table().attach(*label_avail, 0, row, 3, 1); -#else - _page_cms->table().attach(*label_avail, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif row++; -#if WITH_GTKMM_3_0 _AvailableProfilesList.set_hexpand(); _AvailableProfilesList.set_valign(Gtk::ALIGN_CENTER); _page_cms->table().attach(_AvailableProfilesList, 0, row, 1, 1); @@ -744,11 +698,6 @@ void DocumentProperties::build_cms() _unlink_btn.set_halign(Gtk::ALIGN_CENTER); _unlink_btn.set_valign(Gtk::ALIGN_CENTER); _page_cms->table().attach(_unlink_btn, 2, row, 1, 1); -#else - _page_cms->table().attach(_AvailableProfilesList, 0, 1, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); - _page_cms->table().attach(_link_btn, 1, 2, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, 2, 0); - _page_cms->table().attach(_unlink_btn, 2, 3, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, 0, 0); -#endif // Set up the Avialable Profiles combo box _AvailableProfilesListStore = Gtk::ListStore::create(_AvailableProfilesListColumns); @@ -815,41 +764,27 @@ void DocumentProperties::build_scripting() gint row = 0; label_external->set_alignment(0.0); - -#if WITH_GTKMM_3_0 label_external->set_hexpand(); label_external->set_valign(Gtk::ALIGN_CENTER); _page_external_scripts->table().attach(*label_external, 0, row, 3, 1); -#else - _page_external_scripts->table().attach(*label_external, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif row++; -#if WITH_GTKMM_3_0 _ExternalScriptsListScroller.set_hexpand(); _ExternalScriptsListScroller.set_valign(Gtk::ALIGN_CENTER); _page_external_scripts->table().attach(_ExternalScriptsListScroller, 0, row, 3, 1); -#else - _page_external_scripts->table().attach(_ExternalScriptsListScroller, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif row++; Gtk::HBox* spacer_external = Gtk::manage(new Gtk::HBox()); spacer_external->set_size_request(SPACE_SIZE_X, SPACE_SIZE_Y); -#if WITH_GTKMM_3_0 spacer_external->set_hexpand(); spacer_external->set_valign(Gtk::ALIGN_CENTER); _page_external_scripts->table().attach(*spacer_external, 0, row, 3, 1); -#else - _page_external_scripts->table().attach(*spacer_external, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif row++; -#if WITH_GTKMM_3_0 _script_entry.set_hexpand(); _script_entry.set_valign(Gtk::ALIGN_CENTER); _page_external_scripts->table().attach(_script_entry, 0, row, 1, 1); @@ -863,11 +798,6 @@ void DocumentProperties::build_scripting() _external_remove_btn.set_halign(Gtk::ALIGN_CENTER); _external_remove_btn.set_valign(Gtk::ALIGN_CENTER); _page_external_scripts->table().attach(_external_remove_btn, 2, row, 1, 1); -#else - _page_external_scripts->table().attach(_script_entry, 0, 1, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); - _page_external_scripts->table().attach(_external_add_btn, 1, 2, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, 2, 0); - _page_external_scripts->table().attach(_external_remove_btn, 2, 3, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, 0, 0); -#endif //# Set up the External Scripts box _ExternalScriptsListStore = Gtk::ListStore::create(_ExternalScriptsListColumns); @@ -888,12 +818,6 @@ void DocumentProperties::build_scripting() _embed_remove_btn.set_tooltip_text(_("Remove")); docprops_style_button(_embed_remove_btn, INKSCAPE_ICON("list-remove")); -#if !WITH_GTKMM_3_0 - // TODO: This has been removed from Gtkmm 3.0. Check that - // everything still looks OK! - _embed_button_box.set_child_min_width( 16 ); - _embed_button_box.set_spacing( 4 ); -#endif _embed_button_box.set_layout (Gtk::BUTTONBOX_START); _embed_button_box.add(_embed_new_btn); _embed_button_box.add(_embed_remove_btn); @@ -902,47 +826,29 @@ void DocumentProperties::build_scripting() row = 0; label_embedded->set_alignment(0.0); - -#if WITH_GTKMM_3_0 label_embedded->set_hexpand(); label_embedded->set_valign(Gtk::ALIGN_CENTER); _page_embedded_scripts->table().attach(*label_embedded, 0, row, 3, 1); -#else - _page_embedded_scripts->table().attach(*label_embedded, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif row++; -#if WITH_GTKMM_3_0 _EmbeddedScriptsListScroller.set_hexpand(); _EmbeddedScriptsListScroller.set_valign(Gtk::ALIGN_CENTER); _page_embedded_scripts->table().attach(_EmbeddedScriptsListScroller, 0, row, 3, 1); -#else - _page_embedded_scripts->table().attach(_EmbeddedScriptsListScroller, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif row++; -#if WITH_GTKMM_3_0 _embed_button_box.set_hexpand(); _embed_button_box.set_valign(Gtk::ALIGN_CENTER); _page_embedded_scripts->table().attach(_embed_button_box, 0, row, 1, 1); -#else - _page_embedded_scripts->table().attach(_embed_button_box, 0, 1, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif row++; Gtk::HBox* spacer_embedded = Gtk::manage(new Gtk::HBox()); spacer_embedded->set_size_request(SPACE_SIZE_X, SPACE_SIZE_Y); - -#if WITH_GTKMM_3_0 spacer_embedded->set_hexpand(); spacer_embedded->set_valign(Gtk::ALIGN_CENTER); _page_embedded_scripts->table().attach(*spacer_embedded, 0, row, 3, 1); -#else - _page_embedded_scripts->table().attach(*spacer_embedded, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif row++; @@ -958,24 +864,15 @@ void DocumentProperties::build_scripting() label_embedded_content->set_markup (_("Content:")); label_embedded_content->set_alignment(0.0); - -#if WITH_GTKMM_3_0 label_embedded_content->set_hexpand(); label_embedded_content->set_valign(Gtk::ALIGN_CENTER); _page_embedded_scripts->table().attach(*label_embedded_content, 0, row, 3, 1); -#else - _page_embedded_scripts->table().attach(*label_embedded_content, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif row++; -#if WITH_GTKMM_3_0 _EmbeddedContentScroller.set_hexpand(); _EmbeddedContentScroller.set_valign(Gtk::ALIGN_CENTER); _page_embedded_scripts->table().attach(_EmbeddedContentScroller, 0, row, 3, 1); -#else - _page_embedded_scripts->table().attach(_EmbeddedContentScroller, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0); -#endif _EmbeddedContentScroller.add(_EmbeddedContent); _EmbeddedContentScroller.set_shadow_type(Gtk::SHADOW_IN); @@ -1037,12 +934,8 @@ void DocumentProperties::build_metadata() label->set_markup (_("Dublin Core Entities")); label->set_alignment (0.0); -#if WITH_GTKMM_3_0 label->set_valign(Gtk::ALIGN_CENTER); _page_metadata1->table().attach (*label, 0,0,3,1); -#else - _page_metadata1->table().attach (*label, 0,3,0,1, Gtk::FILL, (Gtk::AttachOptions)0,0,0); -#endif /* add generic metadata entry areas */ struct rdf_work_entity_t * entity; @@ -1053,8 +946,6 @@ void DocumentProperties::build_metadata() _rdflist.push_back (w); Gtk::HBox *space = Gtk::manage (new Gtk::HBox); space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y); - -#if WITH_GTKMM_3_0 space->set_valign(Gtk::ALIGN_CENTER); _page_metadata1->table().attach(*space, 0, row, 1, 1); @@ -1064,11 +955,6 @@ void DocumentProperties::build_metadata() w->_packable->set_hexpand(); w->_packable->set_valign(Gtk::ALIGN_CENTER); _page_metadata1->table().attach(*w->_packable, 2, row, 1, 1); -#else - _page_metadata1->table().attach (*space, 0,1, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0); - _page_metadata1->table().attach (w->_label, 1,2, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0); - _page_metadata1->table().attach (*w->_packable, 2,3, row, row+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0); -#endif } } @@ -1077,11 +963,7 @@ void DocumentProperties::build_metadata() Gtk::Button *button_load = Gtk::manage (new Gtk::Button(_("Use _default"),1)); button_load->set_tooltip_text(_("Use the previously saved default metadata here")); -#if WITH_GTKMM_3_0 - Gtk::ButtonBox *box_buttons = Gtk::manage (new Gtk::ButtonBox); -#else - Gtk::HButtonBox *box_buttons = Gtk::manage (new Gtk::HButtonBox); -#endif + auto box_buttons = Gtk::manage (new Gtk::ButtonBox); box_buttons->set_layout(Gtk::BUTTONBOX_END); box_buttons->set_spacing(4); @@ -1099,12 +981,8 @@ void DocumentProperties::build_metadata() llabel->set_markup (_("License")); llabel->set_alignment (0.0); -#if WITH_GTKMM_3_0 llabel->set_valign(Gtk::ALIGN_CENTER); _page_metadata2->table().attach(*llabel, 0, row, 3, 1); -#else - _page_metadata2->table().attach (*llabel, 0,3, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0); -#endif /* add license selector pull-down and URI */ ++row; @@ -1112,17 +990,12 @@ void DocumentProperties::build_metadata() Gtk::HBox *space = Gtk::manage (new Gtk::HBox); space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y); -#if WITH_GTKMM_3_0 space->set_valign(Gtk::ALIGN_CENTER); _page_metadata2->table().attach(*space, 0, row, 1, 1); _licensor.set_hexpand(); _licensor.set_valign(Gtk::ALIGN_CENTER); _page_metadata2->table().attach(_licensor, 1, row, 3, 1); -#else - _page_metadata2->table().attach (*space, 0,1, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0); - _page_metadata2->table().attach (_licensor, 1,3, row, row+1, Gtk::EXPAND|Gtk::FILL, (Gtk::AttachOptions)0,0,0); -#endif } void DocumentProperties::addExternalScript(){ -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/ui/dialog/document-properties.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/ui/dialog/document-properties.cpp') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 589973162..5b7887b35 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -25,27 +25,17 @@ #include "ui/widget/notebook-page.h" #include "document-properties.h" #include "display/canvas-grid.h" -#include "document.h" -#include "desktop.h" -#include "inkscape.h" #include "io/sys.h" -#include "preferences.h" #include "ui/shape-editor.h" -#include "sp-namedview.h" #include "sp-root.h" #include "sp-script.h" #include "style.h" -#include "svg/stringstream.h" #include "ui/tools-switch.h" -#include "ui/widget/color-picker.h" -#include "ui/widget/scalar-unit.h" #include "ui/dialog/filedialog.h" #include "verbs.h" #include "widgets/icon.h" #include "xml/node-event-vector.h" -#include "xml/repr.h" -#include // std::min #include "rdf.h" #include "ui/widget/entity-entry.h" @@ -54,11 +44,9 @@ #include "color-profile.h" #endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) -#include #include -#include +#include -#include <2geom/transforms.h> #include "ui/icon-names.h" using std::pair; -- cgit v1.2.3 From 9144e83f27ca6ad76ec6d72a8426ebd76c63a6a5 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Tue, 27 Dec 2016 01:27:19 +0000 Subject: Rm some deprecated Gtk::Stock usage (bzr r15366) --- src/ui/dialog/document-properties.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/ui/dialog/document-properties.cpp') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 053549b73..8593223c1 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -44,9 +44,6 @@ #include "color-profile.h" #endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) -#include -#include - #include "ui/icon-names.h" using std::pair; @@ -558,7 +555,7 @@ void DocumentProperties::linked_profiles_list_button_release(GdkEventButton* eve void DocumentProperties::cms_create_popup_menu(Gtk::Widget& parent, sigc::slot rem) { - Gtk::MenuItem* mi = Gtk::manage(new Gtk::ImageMenuItem(Gtk::Stock::REMOVE)); + Gtk::MenuItem* mi = Gtk::manage(new Gtk::MenuItem(_("_Remove"), true)); _EmbProfContextMenu.append(*mi); mi->signal_activate().connect(rem); mi->show(); @@ -568,7 +565,7 @@ void DocumentProperties::cms_create_popup_menu(Gtk::Widget& parent, sigc::slot rem) { - Gtk::MenuItem* mi = Gtk::manage(new Gtk::ImageMenuItem(Gtk::Stock::REMOVE)); + Gtk::MenuItem* mi = Gtk::manage(new Gtk::MenuItem(_("_Remove"), true)); _ExternalScriptsContextMenu.append(*mi); mi->signal_activate().connect(rem); mi->show(); @@ -577,7 +574,7 @@ void DocumentProperties::external_create_popup_menu(Gtk::Widget& parent, sigc::s void DocumentProperties::embedded_create_popup_menu(Gtk::Widget& parent, sigc::slot rem) { - Gtk::MenuItem* mi = Gtk::manage(new Gtk::ImageMenuItem(Gtk::Stock::REMOVE)); + Gtk::MenuItem* mi = Gtk::manage(new Gtk::MenuItem(_("_Remove"), true)); _EmbeddedScriptsContextMenu.append(*mi); mi->signal_activate().connect(rem); mi->show(); -- cgit v1.2.3