From 2120067e60eabe8918f78f007f7f585ef477abe9 Mon Sep 17 00:00:00 2001 From: John Smith Date: Wed, 18 Apr 2012 14:30:50 +0900 Subject: Fix for 169888 : Patch for HIG style frames for PDF import dialogs (bzr r11263) --- src/extension/internal/pdf-input-cairo.cpp | 38 +++++------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) (limited to 'src/extension/internal/pdf-input-cairo.cpp') diff --git a/src/extension/internal/pdf-input-cairo.cpp b/src/extension/internal/pdf-input-cairo.cpp index 36ef66713..b1cf13db1 100644 --- a/src/extension/internal/pdf-input-cairo.cpp +++ b/src/extension/internal/pdf-input-cairo.cpp @@ -32,6 +32,8 @@ #include #include "ui/widget/spinbutton.h" +#include "ui/widget/frame.h" + #include namespace Inkscape { @@ -99,9 +101,7 @@ PdfImportCairoDialog::PdfImportCairoDialog(PopplerDocument *doc) hbox3 = Gtk::manage(new class Gtk::HBox(false, 4)); vbox2 = Gtk::manage(new class Gtk::VBox(false, 4)); - alignment3 = Gtk::manage(new class Gtk::Alignment(0.5, 0.5, 1, 1)); - _labelPageSettings = Gtk::manage(new class Gtk::Label(_("Page settings"))); - _pageSettingsFrame = Gtk::manage(new class Gtk::Frame()); + _pageSettingsFrame = Gtk::manage(new class Inkscape::UI::Widget::Frame(_("Page settings"))); _labelPrecision = Gtk::manage(new class Gtk::Label(_("Precision of approximating gradient meshes:"))); _labelPrecisionWarning = Gtk::manage(new class Gtk::Label(_("Note: setting the precision too high may result in a large SVG file and slow performance."))); @@ -125,9 +125,7 @@ PdfImportCairoDialog::PdfImportCairoDialog(PopplerDocument *doc) hbox5 = Gtk::manage(new class Gtk::HBox(false, 4)); _embedImagesCheck = Gtk::manage(new class Gtk::CheckButton(_("Embed images"))); vbox3 = Gtk::manage(new class Gtk::VBox(false, 4)); - alignment4 = Gtk::manage(new class Gtk::Alignment(0.5, 0.5, 1, 1)); - _labelImportSettings = Gtk::manage(new class Gtk::Label(_("Import settings"))); - _importSettingsFrame = Gtk::manage(new class Gtk::Frame()); + _importSettingsFrame = Gtk::manage(new class Inkscape::UI::Widget::Frame(_("Import settings"))); vbox1 = Gtk::manage(new class Gtk::VBox(false, 4)); _previewArea = Gtk::manage(new class Gtk::DrawingArea()); hbox1 = Gtk::manage(new class Gtk::HBox(false, 4)); @@ -167,18 +165,8 @@ PdfImportCairoDialog::PdfImportCairoDialog(PopplerDocument *doc) hbox3->pack_start(*_cropTypeCombo, Gtk::PACK_SHRINK, 0); vbox2->pack_start(*hbox2); vbox2->pack_start(*hbox3); - alignment3->add(*vbox2); - _labelPageSettings->set_alignment(0.5,0.5); - _labelPageSettings->set_padding(4,0); - _labelPageSettings->set_justify(Gtk::JUSTIFY_LEFT); - _labelPageSettings->set_line_wrap(false); - _labelPageSettings->set_use_markup(true); - _labelPageSettings->set_selectable(false); + _pageSettingsFrame->add(*vbox2); _pageSettingsFrame->set_border_width(4); - _pageSettingsFrame->set_shadow_type(Gtk::SHADOW_ETCHED_IN); - _pageSettingsFrame->set_label_align(0,0.5); - _pageSettingsFrame->add(*alignment3); - _pageSettingsFrame->set_label_widget(*_labelPageSettings); _labelPrecision->set_alignment(0,0.5); _labelPrecision->set_padding(4,0); _labelPrecision->set_justify(Gtk::JUSTIFY_LEFT); @@ -228,18 +216,8 @@ PdfImportCairoDialog::PdfImportCairoDialog(PopplerDocument *doc) vbox3->pack_start(*hbox5, Gtk::PACK_SHRINK, 4); vbox3->pack_start(*_localFontsCheck, Gtk::PACK_SHRINK, 0); vbox3->pack_start(*_embedImagesCheck, Gtk::PACK_SHRINK, 0); - alignment4->add(*vbox3); - _labelImportSettings->set_alignment(0.5,0.5); - _labelImportSettings->set_padding(4,0); - _labelImportSettings->set_justify(Gtk::JUSTIFY_LEFT); - _labelImportSettings->set_line_wrap(false); - _labelImportSettings->set_use_markup(true); - _labelImportSettings->set_selectable(false); + _importSettingsFrame->add(*vbox3); _importSettingsFrame->set_border_width(4); - _importSettingsFrame->set_shadow_type(Gtk::SHADOW_ETCHED_IN); - _importSettingsFrame->set_label_align(0,0.5); - _importSettingsFrame->add(*alignment4); - _importSettingsFrame->set_label_widget(*_labelImportSettings); vbox1->pack_start(*_pageSettingsFrame, Gtk::PACK_EXPAND_PADDING, 0); vbox1->pack_start(*_importSettingsFrame, Gtk::PACK_EXPAND_PADDING, 0); hbox1->pack_start(*vbox1); @@ -266,8 +244,6 @@ PdfImportCairoDialog::PdfImportCairoDialog(PopplerDocument *doc) _cropTypeCombo->show(); hbox3->show(); vbox2->show(); - alignment3->show(); - _labelPageSettings->show(); _pageSettingsFrame->show(); _labelPrecision->show(); _labelPrecisionWarning->show(); @@ -280,8 +256,6 @@ PdfImportCairoDialog::PdfImportCairoDialog(PopplerDocument *doc) _localFontsCheck->show(); _embedImagesCheck->show(); vbox3->show(); - alignment4->show(); - _labelImportSettings->show(); _importSettingsFrame->show(); vbox1->show(); _previewArea->show(); -- cgit v1.2.3 From 36e3c5550b49949729f2f23ab1796afdc53d6487 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Wed, 18 Apr 2012 00:02:24 -0700 Subject: Warning cleanup (bzr r11265) --- src/extension/internal/pdf-input-cairo.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/extension/internal/pdf-input-cairo.cpp') diff --git a/src/extension/internal/pdf-input-cairo.cpp b/src/extension/internal/pdf-input-cairo.cpp index b1cf13db1..0a89c6661 100644 --- a/src/extension/internal/pdf-input-cairo.cpp +++ b/src/extension/internal/pdf-input-cairo.cpp @@ -631,9 +631,7 @@ static cairo_status_t void PdfInputCairo::init(void) { - Inkscape::Extension::Extension * ext; - - ext = Inkscape::Extension::build_from_mem( + Inkscape::Extension::build_from_mem( "\n" "PDF Input\n" "org.inkscape.input.cairo-pdf\n" -- cgit v1.2.3