summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/aboutbox.cpp5
-rw-r--r--src/ui/dialog/calligraphic-profile-rename.cpp9
-rw-r--r--src/ui/dialog/dialog.cpp1
-rw-r--r--src/ui/dialog/dock-behavior.cpp3
-rw-r--r--src/ui/dialog/document-properties.cpp9
-rw-r--r--src/ui/dialog/export.cpp15
-rw-r--r--src/ui/dialog/export.h2
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.cpp13
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp5
-rw-r--r--src/ui/dialog/floating-behavior.cpp1
-rw-r--r--src/ui/dialog/grid-arrange-tab.cpp321
-rw-r--r--src/ui/dialog/guides.cpp8
-rw-r--r--src/ui/dialog/icon-preview.cpp1
-rw-r--r--src/ui/dialog/knot-properties.cpp12
-rw-r--r--src/ui/dialog/knot-properties.h11
-rw-r--r--src/ui/dialog/layer-properties.cpp9
-rw-r--r--src/ui/dialog/livepatheffect-add.cpp6
-rw-r--r--src/ui/dialog/livepatheffect-editor.cpp1
-rw-r--r--src/ui/dialog/lpe-fillet-chamfer-properties.cpp11
-rw-r--r--src/ui/dialog/lpe-powerstroke-properties.cpp7
-rw-r--r--src/ui/dialog/objects.cpp1
-rw-r--r--src/ui/dialog/ocaldialogs.cpp10
-rw-r--r--src/ui/dialog/panel-dialog.h6
-rw-r--r--src/ui/dialog/pixelartdialog.cpp5
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp10
-rw-r--r--src/ui/dialog/text-edit.cpp5
-rw-r--r--src/ui/dialog/text-edit.h1
-rw-r--r--src/ui/dialog/tracedialog.cpp5
-rw-r--r--src/ui/dialog/transformation.cpp5
-rw-r--r--src/ui/dialog/undo-history.cpp10
-rw-r--r--src/ui/dialog/xml-tree.cpp1
-rw-r--r--src/ui/interface.cpp6
-rw-r--r--src/ui/widget/dock-item.cpp8
-rw-r--r--src/ui/widget/font-button.cpp3
-rw-r--r--src/ui/widget/font-button.h1
-rw-r--r--src/ui/widget/frame.cpp30
-rw-r--r--src/ui/widget/frame.h3
-rw-r--r--src/ui/widget/panel.cpp20
-rw-r--r--src/ui/widget/panel.h5
-rw-r--r--src/ui/widget/preferences-widget.cpp6
40 files changed, 274 insertions, 317 deletions
diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp
index 552500fe8..8f0545e96 100644
--- a/src/ui/dialog/aboutbox.cpp
+++ b/src/ui/dialog/aboutbox.cpp
@@ -27,7 +27,6 @@
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/aspectframe.h>
#include <gtkmm/textview.h>
-#include <gtkmm/stock.h>
#include "path-prefix.h"
#include "document.h"
@@ -39,8 +38,6 @@
#include "inkscape-version.h"
-
-
namespace Inkscape {
namespace UI {
namespace Dialog {
@@ -102,7 +99,7 @@ AboutBox::AboutBox() : Gtk::Dialog(_("About Inkscape")) {
tabs->show_all();
- add_button(Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE);
+ add_button(_("_Close"), Gtk::RESPONSE_CLOSE);
set_default_response(Gtk::RESPONSE_CLOSE);
Gtk::Label *label=new Gtk::Label();
diff --git a/src/ui/dialog/calligraphic-profile-rename.cpp b/src/ui/dialog/calligraphic-profile-rename.cpp
index 50dae0fd8..36570e769 100644
--- a/src/ui/dialog/calligraphic-profile-rename.cpp
+++ b/src/ui/dialog/calligraphic-profile-rename.cpp
@@ -15,7 +15,6 @@
#include "calligraphic-profile-rename.h"
#include <glibmm/i18n.h>
-#include <gtkmm/stock.h>
#include <gtkmm/grid.h>
#include "desktop.h"
@@ -46,17 +45,17 @@ CalligraphicProfileRename::CalligraphicProfileRename() :
mainVBox->pack_start(*_layout_table, false, false, 4);
// Buttons
- _close_button.set_use_stock(true);
- _close_button.set_label(Gtk::Stock::CANCEL.id);
+ _close_button.set_use_underline();
+ _close_button.set_label(_("_Cancel"));
_close_button.set_can_default();
_delete_button.set_use_underline(true);
- _delete_button.set_label(_("Delete"));
+ _delete_button.set_label(_("_Delete"));
_delete_button.set_can_default();
_delete_button.set_visible(false);
_apply_button.set_use_underline(true);
- _apply_button.set_label(_("Save"));
+ _apply_button.set_label(_("_Save"));
_apply_button.set_can_default();
_close_button.signal_clicked()
diff --git a/src/ui/dialog/dialog.cpp b/src/ui/dialog/dialog.cpp
index d0b618c65..27a6e55d9 100644
--- a/src/ui/dialog/dialog.cpp
+++ b/src/ui/dialog/dialog.cpp
@@ -19,7 +19,6 @@
#include "dialog-manager.h"
#include <gtkmm/dialog.h>
-#include <gtkmm/stock.h>
#include <gdk/gdkkeysyms.h>
#include "inkscape.h"
diff --git a/src/ui/dialog/dock-behavior.cpp b/src/ui/dialog/dock-behavior.cpp
index ec630c08f..02955b9a8 100644
--- a/src/ui/dialog/dock-behavior.cpp
+++ b/src/ui/dialog/dock-behavior.cpp
@@ -25,9 +25,6 @@
#include "dialog.h"
#include "ui/dialog-events.h"
-#include <gtkmm/invisible.h>
-#include <gtkmm/stock.h>
-
namespace Inkscape {
namespace UI {
namespace Dialog {
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 <gtkmm/stock.h>
-#include <gtkmm/imagemenuitem.h>
-
#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<void> 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<v
void DocumentProperties::external_create_popup_menu(Gtk::Widget& parent, sigc::slot<void> 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<void> 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();
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 98ecf6db7..9bebde00f 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -26,7 +26,6 @@
#include <gtkmm/entry.h>
#include <gtkmm/grid.h>
#include <gtkmm/spinbutton.h>
-#include <gtkmm/stock.h>
#ifdef WITH_GNOME_VFS
# include <libgnomevfs/gnome-vfs-init.h> // gnome_vfs_initialized
@@ -142,7 +141,7 @@ Export::Export (void) :
units_label(_("Units:")),
filename_box(false, 5),
browse_label(_("_Export As..."), 1),
- browse_image(Gtk::StockID(Gtk::Stock::INDEX), Gtk::ICON_SIZE_BUTTON),
+ browse_image(),
batch_box(false, 5),
batch_export(_("B_atch export all selected objects"), _("Export each selected object into its own PNG file, using export hints if any (caution, overwrites without asking!)")),
interlacing(_("Use interlacing"),_("Enables ADAM7 interlacing for PNG output. This results in slightly heavier images, but big images will look better sooner when loading the file")),
@@ -156,8 +155,6 @@ Export::Export (void) :
hide_export(_("Hide a_ll except selected"), _("In the exported image, hide all objects except those that are selected")),
closeWhenDone(_("Close when complete"), _("Once the export completes, close this dialog")),
button_box(false, 3),
- export_label(_("_Export"), 1),
- export_image(Gtk::StockID(Gtk::Stock::APPLY), Gtk::ICON_SIZE_BUTTON),
_prog(),
prog_dlg(NULL),
interrupted(false),
@@ -290,6 +287,7 @@ Export::Export (void) :
filename_box.pack_start (filename_entry, true, true, 0);
Gtk::HBox* browser_im_label = new Gtk::HBox(false, 3);
+ browse_image.set_from_icon_name("folder", Gtk::ICON_SIZE_BUTTON);
browser_im_label->pack_start(browse_image);
browser_im_label->pack_start(browse_label);
browse_button.add(*browser_im_label);
@@ -318,11 +316,8 @@ Export::Export (void) :
/* Export Button row */
button_box.set_border_width(3);
- Gtk::HBox* export_image_label = new Gtk::HBox(false, 3);
- export_image_label->pack_start(export_image);
- export_image_label->pack_start(export_label);
-
- export_button.add(*export_image_label);
+ export_button.set_label(_("_Export"));
+ export_button.set_use_underline();
export_button.set_tooltip_text (_("Export the bitmap file with these settings"));
button_box.pack_start(closeWhenDone, true, true, 0 );
@@ -906,7 +901,7 @@ Gtk::Dialog * Export::create_progress_dialog (Glib::ustring progress_text) {
auto CA = dlg->get_content_area();
CA->pack_start(*prg, FALSE, FALSE, 4);
- Gtk::Button* btn = dlg->add_button (Gtk::Stock::CANCEL,Gtk::RESPONSE_CANCEL );
+ Gtk::Button* btn = dlg->add_button (_("_Cancel"),Gtk::RESPONSE_CANCEL );
btn->signal_clicked().connect( sigc::mem_fun(*this, &Export::onProgressCancel) );
dlg->signal_delete_event().connect( sigc::mem_fun(*this, &Export::onProgressDelete) );
diff --git a/src/ui/dialog/export.h b/src/ui/dialog/export.h
index 112f42312..f64d92341 100644
--- a/src/ui/dialog/export.h
+++ b/src/ui/dialog/export.h
@@ -331,8 +331,6 @@ private:
/* Export Button widgets */
Gtk::HBox button_box;
Gtk::Button export_button;
- Gtk::Label export_label;
- Gtk::Image export_image;
Gtk::ProgressBar _prog;
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp
index e8c1bf723..f5450ac9a 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.cpp
+++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp
@@ -35,7 +35,6 @@
#endif
#include <gtkmm/expander.h>
-#include <gtkmm/stock.h>
#include <glibmm/convert.h>
#include <glibmm/fileutils.h>
@@ -735,8 +734,8 @@ FileOpenDialogImplGtk::FileOpenDialogImplGtk(Gtk::Window &parentWindow, const Gl
//###### Add the file types menu
createFilterMenu();
- add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
- set_default(*add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_OK));
+ add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
+ set_default(*add_button(_("_Open"), Gtk::RESPONSE_OK));
//###### Allow easy access to our examples folder
if (Inkscape::IO::file_test(INKSCAPE_EXAMPLESDIR, G_FILE_TEST_EXISTS) &&
@@ -1050,8 +1049,8 @@ FileSaveDialogImplGtk::FileSaveDialogImplGtk(Gtk::Window &parentWindow, const Gl
// if (extension == NULL)
// checkbox.set_sensitive(FALSE);
- add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
- set_default(*add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK));
+ add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
+ set_default(*add_button(_("_Save"), Gtk::RESPONSE_OK));
show_all_children();
}
@@ -1597,8 +1596,8 @@ FileExportDialogImpl::FileExportDialogImpl(Gtk::Window &parentWindow, const Glib
// if (extension == NULL)
// checkbox.set_sensitive(FALSE);
- add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
- set_default(*add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK));
+ add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
+ set_default(*add_button(_("_Save"), Gtk::RESPONSE_OK));
show_all_children();
}
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index f657e1b76..80dc08ccf 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -64,7 +64,6 @@
#include "selection-chemistry.h"
#include <gtkmm/colorbutton.h>
-#include <gtkmm/stock.h>
#include <gdkmm/general.h>
#include <gtkmm/checkbutton.h>
@@ -1305,7 +1304,7 @@ static Glib::RefPtr<Gtk::Menu> create_popup_menu(Gtk::Widget& parent, sigc::slot
mi->show();
menu->append(*mi);
- mi = Gtk::manage(new Gtk::ImageMenuItem(Gtk::Stock::REMOVE));
+ mi = Gtk::manage(new Gtk::MenuItem(_("_Remove"), true));
menu->append(*mi);
mi->signal_activate().connect(rem);
mi->show();
@@ -1319,7 +1318,7 @@ FilterEffectsDialog::FilterModifier::FilterModifier(FilterEffectsDialog& d)
: _desktop(NULL),
_deskTrack(),
_dialog(d),
- _add(Gtk::Stock::NEW),
+ _add(_("_New"), true),
_observer(new Inkscape::XML::SignalObserver)
{
Gtk::ScrolledWindow* sw = Gtk::manage(new Gtk::ScrolledWindow);
diff --git a/src/ui/dialog/floating-behavior.cpp b/src/ui/dialog/floating-behavior.cpp
index fa8e11dfd..9abad3e7b 100644
--- a/src/ui/dialog/floating-behavior.cpp
+++ b/src/ui/dialog/floating-behavior.cpp
@@ -15,7 +15,6 @@
#endif
#include <gtkmm/dialog.h>
-#include <gtkmm/stock.h>
#include <glibmm/main.h>
#include "floating-behavior.h"
diff --git a/src/ui/dialog/grid-arrange-tab.cpp b/src/ui/dialog/grid-arrange-tab.cpp
index 5872393ae..9ec8d3148 100644
--- a/src/ui/dialog/grid-arrange-tab.cpp
+++ b/src/ui/dialog/grid-arrange-tab.cpp
@@ -1,25 +1,24 @@
-/*
- * A simple dialog for creating grid type arrangements of selected objects
- *
- * Authors:
- * Bob Jamison ( based off trace dialog)
- * John Cliff
- * Other dudes from The Inkscape Organization
- * Abhishek Sharma
- * Declara Denis
- *
- * Copyright (C) 2004 Bob Jamison
- * Copyright (C) 2004 John Cliff
- *
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-//#define DEBUG_GRID_ARRANGE 1
+ /*
+ * A simple dialog for creating grid type arrangements of selected objects
+ *
+ * Authors:
+ * Bob Jamison ( based off trace dialog)
+ * John Cliff
+ * Other dudes from The Inkscape Organization
+ * Abhishek Sharma
+ * Declara Denis
+ *
+ * Copyright (C) 2004 Bob Jamison
+ * Copyright (C) 2004 John Cliff
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+ //#define DEBUG_GRID_ARRANGE 1
#include "ui/dialog/grid-arrange-tab.h"
#include <glibmm/i18n.h>
#include <gtkmm/grid.h>
-#include <gtkmm/stock.h>
#include <2geom/transforms.h>
@@ -31,193 +30,193 @@
#include "document-undo.h"
#include "widgets/icon.h"
#include "desktop.h"
-//#include "sp-item-transform.h" FIXME
+ //#include "sp-item-transform.h" FIXME
#include "ui/dialog/tile.h" // for Inkscape::UI::Dialog::ArrangeDialog
-/*
- * Sort items by their x co-ordinates, taking account of y (keeps rows intact)
- *
- * <0 *elem1 goes before *elem2
- * 0 *elem1 == *elem2
- * >0 *elem1 goes after *elem2
- */
-static bool sp_compare_x_position(SPItem *first, SPItem *second)
-{
- using Geom::X;
- using Geom::Y;
+ /*
+ * Sort items by their x co-ordinates, taking account of y (keeps rows intact)
+ *
+ * <0 *elem1 goes before *elem2
+ * 0 *elem1 == *elem2
+ * >0 *elem1 goes after *elem2
+ */
+ static bool sp_compare_x_position(SPItem *first, SPItem *second)
+ {
+ using Geom::X;
+ using Geom::Y;
- Geom::OptRect a = first->documentVisualBounds();
- Geom::OptRect b = second->documentVisualBounds();
+ Geom::OptRect a = first->documentVisualBounds();
+ Geom::OptRect b = second->documentVisualBounds();
- if ( !a || !b ) {
- // FIXME?
- return false;
- }
+ if ( !a || !b ) {
+ // FIXME?
+ return false;
+ }
- double const a_height = a->dimensions()[Y];
- double const b_height = b->dimensions()[Y];
+ double const a_height = a->dimensions()[Y];
+ double const b_height = b->dimensions()[Y];
- bool a_in_b_vert = false;
- if ((a->min()[Y] < b->min()[Y] + 0.1) && (a->min()[Y] > b->min()[Y] - b_height)) {
- a_in_b_vert = true;
- } else if ((b->min()[Y] < a->min()[Y] + 0.1) && (b->min()[Y] > a->min()[Y] - a_height)) {
- a_in_b_vert = true;
- } else if (b->min()[Y] == a->min()[Y]) {
- a_in_b_vert = true;
- } else {
- a_in_b_vert = false;
- }
+ bool a_in_b_vert = false;
+ if ((a->min()[Y] < b->min()[Y] + 0.1) && (a->min()[Y] > b->min()[Y] - b_height)) {
+ a_in_b_vert = true;
+ } else if ((b->min()[Y] < a->min()[Y] + 0.1) && (b->min()[Y] > a->min()[Y] - a_height)) {
+ a_in_b_vert = true;
+ } else if (b->min()[Y] == a->min()[Y]) {
+ a_in_b_vert = true;
+ } else {
+ a_in_b_vert = false;
+ }
- if (!a_in_b_vert) { // a and b are not in the same row
- return (a->min()[Y] < b->min()[Y]);
+ if (!a_in_b_vert) { // a and b are not in the same row
+ return (a->min()[Y] < b->min()[Y]);
+ }
+ return (a->min()[X] < b->min()[X]);
}
- return (a->min()[X] < b->min()[X]);
-}
-/*
- * Sort items by their y co-ordinates.
- */
-static bool sp_compare_y_position(SPItem *first, SPItem *second)
-{
- Geom::OptRect a = first->documentVisualBounds();
- Geom::OptRect b = second->documentVisualBounds();
+ /*
+ * Sort items by their y co-ordinates.
+ */
+ static bool sp_compare_y_position(SPItem *first, SPItem *second)
+ {
+ Geom::OptRect a = first->documentVisualBounds();
+ Geom::OptRect b = second->documentVisualBounds();
- if ( !a || !b ) {
- // FIXME?
- return false;
- }
+ if ( !a || !b ) {
+ // FIXME?
+ return false;
+ }
+
+ if (a->min()[Geom::Y] > b->min()[Geom::Y]) {
+ return false;
+ }
+ if (a->min()[Geom::Y] < b->min()[Geom::Y]) {
+ return true;
+ }
- if (a->min()[Geom::Y] > b->min()[Geom::Y]) {
return false;
}
- if (a->min()[Geom::Y] < b->min()[Geom::Y]) {
- return true;
- }
-
- return false;
-}
-namespace Inkscape {
-namespace UI {
-namespace Dialog {
+ namespace Inkscape {
+ namespace UI {
+ namespace Dialog {
-//#########################################################################
-//## E V E N T S
-//#########################################################################
-
-/*
- *
- * This arranges the selection in a grid pattern.
- *
- */
+ //#########################################################################
+ //## E V E N T S
+ //#########################################################################
-void GridArrangeTab::arrange()
-{
+ /*
+ *
+ * This arranges the selection in a grid pattern.
+ *
+ */
- int cnt,row_cnt,col_cnt,a,row,col;
- double grid_left,grid_top,col_width,row_height,paddingx,paddingy,width, height, new_x, new_y;
- double total_col_width,total_row_height;
- col_width = 0;
- row_height = 0;
- total_col_width=0;
- total_row_height=0;
+ void GridArrangeTab::arrange()
+ {
- // check for correct numbers in the row- and col-spinners
- on_col_spinbutton_changed();
- on_row_spinbutton_changed();
+ int cnt,row_cnt,col_cnt,a,row,col;
+ double grid_left,grid_top,col_width,row_height,paddingx,paddingy,width, height, new_x, new_y;
+ double total_col_width,total_row_height;
+ col_width = 0;
+ row_height = 0;
+ total_col_width=0;
+ total_row_height=0;
- // set padding to manual values
- paddingx = XPadding.getValue("px");
- paddingy = YPadding.getValue("px");
+ // check for correct numbers in the row- and col-spinners
+ on_col_spinbutton_changed();
+ on_row_spinbutton_changed();
- std::vector<double> row_heights;
- std::vector<double> col_widths;
- std::vector<double> row_ys;
- std::vector<double> col_xs;
+ // set padding to manual values
+ paddingx = XPadding.getValue("px");
+ paddingy = YPadding.getValue("px");
- int NoOfCols = NoOfColsSpinner.get_value_as_int();
- int NoOfRows = NoOfRowsSpinner.get_value_as_int();
+ std::vector<double> row_heights;
+ std::vector<double> col_widths;
+ std::vector<double> row_ys;
+ std::vector<double> col_xs;
- width = 0;
- for (a=0;a<NoOfCols; a++){
- col_widths.push_back(width);
- }
+ int NoOfCols = NoOfColsSpinner.get_value_as_int();
+ int NoOfRows = NoOfRowsSpinner.get_value_as_int();
- height = 0;
- for (a=0;a<NoOfRows; a++){
- row_heights.push_back(height);
- }
- grid_left = 99999;
- grid_top = 99999;
+ width = 0;
+ for (a=0;a<NoOfCols; a++){
+ col_widths.push_back(width);
+ }
- SPDesktop *desktop = Parent->getDesktop();
- desktop->getDocument()->ensureUpToDate();
+ height = 0;
+ for (a=0;a<NoOfRows; a++){
+ row_heights.push_back(height);
+ }
+ grid_left = 99999;
+ grid_top = 99999;
- Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> items;
- if (selection) {
- items.insert(items.end(), selection->items().begin(), selection->items().end());
- }
+ SPDesktop *desktop = Parent->getDesktop();
+ desktop->getDocument()->ensureUpToDate();
- for(std::vector<SPItem*>::const_iterator i = items.begin();i!=items.end(); ++i){
- SPItem *item = *i;
- Geom::OptRect b = item->documentVisualBounds();
- if (!b) {
- continue;
+ Inkscape::Selection *selection = desktop->getSelection();
+ std::vector<SPItem*> items;
+ if (selection) {
+ items.insert(items.end(), selection->items().begin(), selection->items().end());
}
- width = b->dimensions()[Geom::X];
- height = b->dimensions()[Geom::Y];
+ for(std::vector<SPItem*>::const_iterator i = items.begin();i!=items.end(); ++i){
+ SPItem *item = *i;
+ Geom::OptRect b = item->documentVisualBounds();
+ if (!b) {
+ continue;
+ }
+
+ width = b->dimensions()[Geom::X];
+ height = b->dimensions()[Geom::Y];
- if (b->min()[Geom::X] < grid_left) {
- grid_left = b->min()[Geom::X];
- }
- if (b->min()[Geom::Y] < grid_top) {
- grid_top = b->min()[Geom::Y];
- }
- if (width > col_width) {
- col_width = width;
- }
- if (height > row_height) {
- row_height = height;
+ if (b->min()[Geom::X] < grid_left) {
+ grid_left = b->min()[Geom::X];
+ }
+ if (b->min()[Geom::Y] < grid_top) {
+ grid_top = b->min()[Geom::Y];
+ }
+ if (width > col_width) {
+ col_width = width;
+ }
+ if (height > row_height) {
+ row_height = height;
+ }
}
- }
- // require the sorting done before we can calculate row heights etc.
+ // require the sorting done before we can calculate row heights etc.
- g_return_if_fail(selection);
- std::vector<SPItem*> sorted(selection->items().begin(), selection->items().end());
- sort(sorted.begin(),sorted.end(),sp_compare_y_position);
- sort(sorted.begin(),sorted.end(),sp_compare_x_position);
+ g_return_if_fail(selection);
+ std::vector<SPItem*> sorted(selection->items().begin(), selection->items().end());
+ sort(sorted.begin(),sorted.end(),sp_compare_y_position);
+ sort(sorted.begin(),sorted.end(),sp_compare_x_position);
- // Calculate individual Row and Column sizes if necessary
+ // Calculate individual Row and Column sizes if necessary
- cnt=0;
- const std::vector<SPItem*> sizes(sorted);
- for (std::vector<SPItem*>::const_iterator i = sizes.begin();i!=sizes.end(); ++i) {
- SPItem *item = *i;
- Geom::OptRect b = item->documentVisualBounds();
- if (b) {
- width = b->dimensions()[Geom::X];
- height = b->dimensions()[Geom::Y];
- if (width > col_widths[(cnt % NoOfCols)]) {
- col_widths[(cnt % NoOfCols)] = width;
+ cnt=0;
+ const std::vector<SPItem*> sizes(sorted);
+ for (std::vector<SPItem*>::const_iterator i = sizes.begin();i!=sizes.end(); ++i) {
+ SPItem *item = *i;
+ Geom::OptRect b = item->documentVisualBounds();
+ if (b) {
+ width = b->dimensions()[Geom::X];
+ height = b->dimensions()[Geom::Y];
+ if (width > col_widths[(cnt % NoOfCols)]) {
+ col_widths[(cnt % NoOfCols)] = width;
+ }
+ if (height > row_heights[(cnt / NoOfCols)]) {
+ row_heights[(cnt / NoOfCols)] = height;
+ }
}
- if (height > row_heights[(cnt / NoOfCols)]) {
- row_heights[(cnt / NoOfCols)] = height;
- }
- }
- cnt++;
- }
+ cnt++;
+ }
- /// Make sure the top and left of the grid dont move by compensating for align values.
+ /// Make sure the top and left of the grid dont move by compensating for align values.
if (RowHeightButton.get_active()){
grid_top = grid_top - (((row_height - row_heights[0]) / 2)*(VertAlign));
}
diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp
index 8d6ca4143..9c8b14953 100644
--- a/src/ui/dialog/guides.cpp
+++ b/src/ui/dialog/guides.cpp
@@ -32,8 +32,6 @@
#include "message-context.h"
#include "verbs.h"
-#include <gtkmm/stock.h>
-
namespace Inkscape {
namespace UI {
namespace Dialogs {
@@ -158,9 +156,9 @@ void GuidelinePropertiesDialog::_response(gint response)
void GuidelinePropertiesDialog::_setup() {
set_title(_("Guideline"));
- add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
- add_button(Gtk::Stock::DELETE, -12);
- add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
+ add_button(_("_OK"), Gtk::RESPONSE_OK);
+ add_button(_("_Delete"), -12);
+ add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
auto mainVBox = get_content_area();
_layout_table.set_row_spacing(4);
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index a4fcc9947..19050fb1d 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -27,7 +27,6 @@
#include <gtkmm/alignment.h>
#include <gtkmm/checkbutton.h>
#include <gtkmm/frame.h>
-#include <gtkmm/stock.h>
#include "ui/widget/frame.h"
#include "desktop.h"
diff --git a/src/ui/dialog/knot-properties.cpp b/src/ui/dialog/knot-properties.cpp
index 133ed6f4c..954fe2a66 100644
--- a/src/ui/dialog/knot-properties.cpp
+++ b/src/ui/dialog/knot-properties.cpp
@@ -14,11 +14,14 @@
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
+
#include "ui/dialog/knot-properties.h"
+
#include <boost/lexical_cast.hpp>
#include <glibmm/i18n.h>
+#include <glibmm/main.h>
#include "inkscape.h"
#include "util/units.h"
#include "desktop.h"
@@ -35,7 +38,10 @@ namespace UI {
namespace Dialogs {
KnotPropertiesDialog::KnotPropertiesDialog()
-: _desktop(NULL), _knotpoint(NULL), _position_visible(false)
+ : _desktop(NULL),
+ _knotpoint(NULL),
+ _position_visible(false),
+ _close_button(_("_Close"), true)
{
Gtk::Box *mainVBox = get_vbox();
@@ -68,8 +74,6 @@ KnotPropertiesDialog::KnotPropertiesDialog()
mainVBox->pack_start(_layout_table, true, true, 4);
// Buttons
- _close_button.set_use_stock(true);
- _close_button.set_label(Gtk::Stock::CANCEL.id);
_close_button.set_can_default();
_apply_button.set_use_underline(true);
diff --git a/src/ui/dialog/knot-properties.h b/src/ui/dialog/knot-properties.h
index fd87df03d..f6157168f 100644
--- a/src/ui/dialog/knot-properties.h
+++ b/src/ui/dialog/knot-properties.h
@@ -12,11 +12,10 @@
#ifndef INKSCAPE_DIALOG_KNOT_PROPERTIES_H
#define INKSCAPE_DIALOG_KNOT_PROPERTIES_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gtkmm.h>
+#include <gtkmm/dialog.h>
+#include <gtkmm/label.h>
+#include <gtkmm/spinbutton.h>
+#include <gtkmm/table.h>
#include <2geom/point.h>
#include "knot.h"
#include "ui/tools/measure-tool.h"
@@ -40,7 +39,7 @@ class KnotPropertiesDialog : public Gtk::Dialog {
protected:
SPDesktop *_desktop;
- SPKnot *_knotpoint;
+ SPKnot *_knotpoint;
Gtk::Label _knot_x_label;
Gtk::SpinButton _knot_x_entry;
diff --git a/src/ui/dialog/layer-properties.cpp b/src/ui/dialog/layer-properties.cpp
index f28f8336a..c8c42ef90 100644
--- a/src/ui/dialog/layer-properties.cpp
+++ b/src/ui/dialog/layer-properties.cpp
@@ -14,7 +14,6 @@
*/
#include "layer-properties.h"
-#include <gtkmm/stock.h>
#include <glibmm/i18n.h>
#include <glibmm/main.h>
@@ -36,7 +35,11 @@ namespace UI {
namespace Dialogs {
LayerPropertiesDialog::LayerPropertiesDialog()
-: _strategy(NULL), _desktop(NULL), _layer(NULL), _position_visible(false)
+ : _strategy(NULL),
+ _desktop(NULL),
+ _layer(NULL),
+ _position_visible(false),
+ _close_button(_("_Cancel"), true)
{
auto mainVBox = get_content_area();
_layout_table.set_row_spacing(4);
@@ -59,8 +62,6 @@ LayerPropertiesDialog::LayerPropertiesDialog()
mainVBox->pack_start(_layout_table, true, true, 4);
// Buttons
- _close_button.set_use_stock(true);
- _close_button.set_label(Gtk::Stock::CANCEL.id);
_close_button.set_can_default();
_apply_button.set_use_underline(true);
diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp
index 917e48ac6..cada915c9 100644
--- a/src/ui/dialog/livepatheffect-add.cpp
+++ b/src/ui/dialog/livepatheffect-add.cpp
@@ -14,7 +14,6 @@
#include "livepatheffect-add.h"
#include <glibmm/i18n.h>
-#include <gtkmm/stock.h>
#include "desktop.h"
@@ -23,8 +22,8 @@ namespace UI {
namespace Dialog {
LivePathEffectAdd::LivePathEffectAdd() :
- add_button(Gtk::Stock::ADD),
- close_button(Gtk::Stock::CANCEL),
+ add_button(_("_Add"), true),
+ close_button(_("_Cancel"), true),
converter(Inkscape::LivePathEffect::LPETypeConverter),
applied(false)
{
@@ -68,7 +67,6 @@ LivePathEffectAdd::LivePathEffectAdd() :
/**
* Buttons
*/
- close_button.set_use_stock(true);
//close_button.set_can_default();
add_button.set_use_underline(true);
add_button.set_can_default();
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp
index 8910005aa..e5becdb5c 100644
--- a/src/ui/dialog/livepatheffect-editor.cpp
+++ b/src/ui/dialog/livepatheffect-editor.cpp
@@ -17,7 +17,6 @@
#endif
#include "livepatheffect-editor.h"
-#include <gtkmm/stock.h>
#include "desktop.h"
diff --git a/src/ui/dialog/lpe-fillet-chamfer-properties.cpp b/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
index d33ee758d..d6ecae5a9 100644
--- a/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
+++ b/src/ui/dialog/lpe-fillet-chamfer-properties.cpp
@@ -27,7 +27,10 @@ namespace UI {
namespace Dialogs {
FilletChamferPropertiesDialog::FilletChamferPropertiesDialog()
- : _desktop(NULL), _knotpoint(NULL), _position_visible(false)
+ : _desktop(NULL),
+ _knotpoint(NULL),
+ _position_visible(false),
+ _close_button(_("_Cancel"), true)
{
Gtk::Box *mainVBox = get_vbox();
mainVBox->set_homogeneous(false);
@@ -76,8 +79,6 @@ FilletChamferPropertiesDialog::FilletChamferPropertiesDialog()
mainVBox->pack_start(_fillet_chamfer_type_inverse_chamfer, true, true, 4);
// Buttons
- _close_button.set_use_stock(true);
- _close_button.set_label(Gtk::Stock::CANCEL.id);
_close_button.set_can_default();
_apply_button.set_use_underline(true);
@@ -264,6 +265,4 @@ void FilletChamferPropertiesDialog::_set_desktop(SPDesktop *desktop)
fill-column:99
End:
*/
-// vim:
-// filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99
-// :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99
diff --git a/src/ui/dialog/lpe-powerstroke-properties.cpp b/src/ui/dialog/lpe-powerstroke-properties.cpp
index d5b3bb30d..ca10721db 100644
--- a/src/ui/dialog/lpe-powerstroke-properties.cpp
+++ b/src/ui/dialog/lpe-powerstroke-properties.cpp
@@ -33,7 +33,10 @@ namespace UI {
namespace Dialogs {
PowerstrokePropertiesDialog::PowerstrokePropertiesDialog()
-: _desktop(NULL), _knotpoint(NULL), _position_visible(false)
+ : _desktop(NULL),
+ _knotpoint(NULL),
+ _position_visible(false),
+ _close_button(_("_Cancel"), true)
{
Gtk::Box *mainVBox = get_vbox();
@@ -66,8 +69,6 @@ PowerstrokePropertiesDialog::PowerstrokePropertiesDialog()
mainVBox->pack_start(_layout_table, true, true, 4);
// Buttons
- _close_button.set_use_stock(true);
- _close_button.set_label(Gtk::Stock::CANCEL.id);
_close_button.set_can_default();
_apply_button.set_use_underline(true);
diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp
index 446af4ccb..c7c696cdc 100644
--- a/src/ui/dialog/objects.cpp
+++ b/src/ui/dialog/objects.cpp
@@ -15,7 +15,6 @@
#include "objects.h"
#include <gtkmm/icontheme.h>
-#include <gtkmm/stock.h>
#include <gtkmm/imagemenuitem.h>
#include <gtkmm/separatormenuitem.h>
#include <glibmm/main.h>
diff --git a/src/ui/dialog/ocaldialogs.cpp b/src/ui/dialog/ocaldialogs.cpp
index 878b68d55..72a2814ed 100644
--- a/src/ui/dialog/ocaldialogs.cpp
+++ b/src/ui/dialog/ocaldialogs.cpp
@@ -27,7 +27,6 @@
#include <gtkmm/notebook.h>
#include <gtkmm/spinner.h>
-#include <gtkmm/stock.h>
#include <gdkmm/general.h>
#include <libxml/tree.h>
@@ -463,7 +462,8 @@ bool PreviewWidget::_on_draw(const Cairo::RefPtr<Cairo::Context>& cr)
StatusWidget::StatusWidget() : Gtk::HBox(false, 6)
{
- image = new Gtk::Image(Gtk::Stock::DIALOG_ERROR, Gtk::ICON_SIZE_MENU);
+ image = new Gtk::Image();
+ image->set_from_icon_name("dialog-error", Gtk::ICON_SIZE_MENU);
spinner = new Gtk::Spinner();
label = new Gtk::Label();
@@ -488,7 +488,7 @@ void StatusWidget::set_info(Glib::ustring text)
spinner->hide();
image->show();
label->show();
- image->set(Gtk::Stock::DIALOG_INFO, Gtk::ICON_SIZE_MENU);
+ image->set_from_icon_name("dialog-information", Gtk::ICON_SIZE_MENU);
label->set_text(text);
}
@@ -497,7 +497,7 @@ void StatusWidget::set_error(Glib::ustring text)
spinner->hide();
image->show();
label->show();
- image->set(Gtk::Stock::DIALOG_ERROR, Gtk::ICON_SIZE_MENU);
+ image->set_from_icon_name("dialog-error", Gtk::ICON_SIZE_MENU);
label->set_text(text);
}
@@ -1086,7 +1086,7 @@ ImportDialog::ImportDialog(Gtk::Window& parent_window, FileDialogType file_types
Gtk::ScrolledWindow* scrolledwindow_preview = new Gtk::ScrolledWindow();
preview_files = new PreviewWidget();
/// Add the buttons in the bottom of the dialog
- button_cancel = new Gtk::Button(Gtk::Stock::CANCEL);
+ button_cancel = new Gtk::Button(_("_Cancel"), true);
button_close = new Gtk::Button(_("Close"));
button_import = new Gtk::Button(_("Import"));
list_results = new SearchResultList(RESULTS_COLUMN_LENGTH);
diff --git a/src/ui/dialog/panel-dialog.h b/src/ui/dialog/panel-dialog.h
index 39110f47a..5919fcaeb 100644
--- a/src/ui/dialog/panel-dialog.h
+++ b/src/ui/dialog/panel-dialog.h
@@ -15,8 +15,8 @@
# include <config.h>
#endif
+#include <glibmm/i18n.h>
#include <gtkmm/dialog.h>
-#include <gtkmm/stock.h>
#include "verbs.h"
#include "dialog.h"
@@ -165,7 +165,7 @@ PanelDialog<B>::PanelDialog(Widget::Panel &panel, char const *prefs_path, int co
panel.addResponseButton(apply_label, Gtk::RESPONSE_APPLY);
panel.setDefaultResponse(Gtk::RESPONSE_APPLY);
}
- panel.addResponseButton(Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE);
+ panel.addResponseButton(_("_Close"), Gtk::RESPONSE_CLOSE);
}
show_all_children();
@@ -214,7 +214,7 @@ PanelDialog<Behavior::FloatingBehavior>::PanelDialog(UI::Widget::Panel &panel, c
panel.addResponseButton(apply_label, Gtk::RESPONSE_APPLY);
panel.setDefaultResponse(Gtk::RESPONSE_APPLY);
}
- panel.addResponseButton(Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE);
+ panel.addResponseButton(_("_Close"), Gtk::RESPONSE_CLOSE);
}
show_all_children();
diff --git a/src/ui/dialog/pixelartdialog.cpp b/src/ui/dialog/pixelartdialog.cpp
index b838b0842..3e6617cfe 100644
--- a/src/ui/dialog/pixelartdialog.cpp
+++ b/src/ui/dialog/pixelartdialog.cpp
@@ -28,7 +28,6 @@
#include "pixelartdialog.h"
#include <gtkmm/radiobutton.h>
-#include <gtkmm/stock.h>
#include <gtkmm/messagedialog.h>
#include <glibmm/i18n.h>
@@ -291,12 +290,12 @@ PixelArtDialogImpl::PixelArtDialogImpl() :
mainResetButton ->set_tooltip_text(_("Reset all settings to defaults"));
//## The OK button
- mainCancelButton = addResponseButton(Gtk::Stock::STOP, GTK_RESPONSE_CANCEL);
+ mainCancelButton = addResponseButton(_("_Stop"), GTK_RESPONSE_CANCEL);
if (mainCancelButton) {
mainCancelButton->set_tooltip_text(_("Abort a trace in progress"));
mainCancelButton->set_sensitive(false);
}
- mainOkButton = addResponseButton(Gtk::Stock::OK, GTK_RESPONSE_OK);
+ mainOkButton = addResponseButton(_("_OK"), GTK_RESPONSE_OK);
mainOkButton->set_tooltip_text(_("Execute the trace"));
contents->pack_start(buttonsHBox);
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index e55a32bd5..791677807 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -20,7 +20,6 @@
#include "document-undo.h"
#include <gtkmm/notebook.h>
#include <gtkmm/scale.h>
-#include <gtkmm/stock.h>
#include <gtkmm/imagemenuitem.h>
#include <message-stack.h>
#include "selection.h"
@@ -299,7 +298,7 @@ void SvgFontsDialog::fonts_list_button_release(GdkEventButton* event)
void SvgFontsDialog::create_glyphs_popup_menu(Gtk::Widget& parent, sigc::slot<void> rem)
{
- Gtk::MenuItem* mi = Gtk::manage(new Gtk::ImageMenuItem(Gtk::Stock::REMOVE));
+ auto mi = Gtk::manage(new Gtk::MenuItem(_("_Remove"), true));
_GlyphsContextMenu.append(*mi);
mi->signal_activate().connect(rem);
mi->show();
@@ -308,7 +307,7 @@ void SvgFontsDialog::create_glyphs_popup_menu(Gtk::Widget& parent, sigc::slot<vo
void SvgFontsDialog::create_kerning_pairs_popup_menu(Gtk::Widget& parent, sigc::slot<void> rem)
{
- Gtk::MenuItem* mi = Gtk::manage(new Gtk::ImageMenuItem(Gtk::Stock::REMOVE));
+ auto mi = Gtk::manage(new Gtk::MenuItem(_("_Remove"), true));
_KerningPairsContextMenu.append(*mi);
mi->signal_activate().connect(rem);
mi->show();
@@ -317,7 +316,7 @@ void SvgFontsDialog::create_kerning_pairs_popup_menu(Gtk::Widget& parent, sigc::
void SvgFontsDialog::create_fonts_popup_menu(Gtk::Widget& parent, sigc::slot<void> rem)
{
- Gtk::MenuItem* mi = Gtk::manage(new Gtk::ImageMenuItem(Gtk::Stock::REMOVE));
+ auto mi = Gtk::manage(new Gtk::MenuItem(_("_Remove"), true));
_FontsContextMenu.append(*mi);
mi->signal_activate().connect(rem);
mi->show();
@@ -986,7 +985,8 @@ void SvgFontsDialog::add_font(){
}
SvgFontsDialog::SvgFontsDialog()
- : UI::Widget::Panel("", "/dialogs/svgfonts", SP_VERB_DIALOG_SVG_FONTS), _add(Gtk::Stock::NEW)
+ : UI::Widget::Panel("", "/dialogs/svgfonts", SP_VERB_DIALOG_SVG_FONTS),
+ _add(_("_New"), true)
{
kerning_slider = Gtk::manage(new Gtk::Scale(Gtk::ORIENTATION_HORIZONTAL));
_add.signal_clicked().connect(sigc::mem_fun(*this, &SvgFontsDialog::add_font));
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp
index a38085c85..94f307828 100644
--- a/src/ui/dialog/text-edit.cpp
+++ b/src/ui/dialog/text-edit.cpp
@@ -29,7 +29,6 @@ extern "C" {
}
#endif
-#include <gtkmm/stock.h>
#include <libnrtype/font-lister.h>
#include "helper/window.h"
@@ -64,8 +63,8 @@ TextEdit::TextEdit()
text_label(_("_Text"), true),
vari_label(_("_Variants"), true),
setasdefault_button(_("Set as _default")),
- close_button(Gtk::Stock::CLOSE),
- apply_button(Gtk::Stock::APPLY),
+ close_button(_("_Close"), true),
+ apply_button(_("_Apply"), true),
desktop(NULL),
deskTrack(),
selectChangedConn(),
diff --git a/src/ui/dialog/text-edit.h b/src/ui/dialog/text-edit.h
index e974874d2..1fc0099fb 100644
--- a/src/ui/dialog/text-edit.h
+++ b/src/ui/dialog/text-edit.h
@@ -22,6 +22,7 @@
# include <config.h>
#endif
+#include <gtkmm/alignment.h>
#include <gtkmm/box.h>
#include <gtkmm/notebook.h>
#include <gtkmm/button.h>
diff --git a/src/ui/dialog/tracedialog.cpp b/src/ui/dialog/tracedialog.cpp
index 1c0cb5708..a1d4d88b8 100644
--- a/src/ui/dialog/tracedialog.cpp
+++ b/src/ui/dialog/tracedialog.cpp
@@ -21,7 +21,6 @@
#include <gtkmm/radiobutton.h>
#include "ui/widget/spinbutton.h"
#include "ui/widget/frame.h"
-#include <gtkmm/stock.h>
#include <glibmm/i18n.h>
@@ -813,12 +812,12 @@ TraceDialogImpl::TraceDialogImpl() :
mainResetButton ->set_tooltip_text(_("Reset all settings to defaults"));
//## The OK button
- mainCancelButton = addResponseButton(Gtk::Stock::STOP, GTK_RESPONSE_CANCEL);
+ mainCancelButton = addResponseButton(_("_Stop"), GTK_RESPONSE_CANCEL);
if (mainCancelButton) {
mainCancelButton->set_tooltip_text(_("Abort a trace in progress"));
mainCancelButton->set_sensitive(false);
}
- mainOkButton = addResponseButton(Gtk::Stock::OK, GTK_RESPONSE_OK);
+ mainOkButton = addResponseButton(_("_OK"), GTK_RESPONSE_OK);
mainOkButton->set_tooltip_text(_("Execute the trace"));
show_all_children();
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp
index 5ec47b0dc..d209a450c 100644
--- a/src/ui/dialog/transformation.cpp
+++ b/src/ui/dialog/transformation.cpp
@@ -16,7 +16,6 @@
#endif
#include <gtkmm/dialog.h>
-#include <gtkmm/stock.h>
#include <2geom/transforms.h>
#include "document.h"
@@ -134,14 +133,14 @@ Transformation::Transformation()
updateSelection(PAGE_MOVE, _getSelection());
- resetButton = addResponseButton(Gtk::Stock::CLEAR, 0);
+ resetButton = addResponseButton(_("_Clear"), 0);
if (resetButton) {
resetButton->set_tooltip_text(_("Reset the values on the current tab to defaults"));
resetButton->set_sensitive(true);
resetButton->signal_clicked().connect(sigc::mem_fun(*this, &Transformation::onClear));
}
- applyButton = addResponseButton(Gtk::Stock::APPLY, Gtk::RESPONSE_APPLY);
+ applyButton = addResponseButton(_("_Apply"), Gtk::RESPONSE_APPLY);
if (applyButton) {
applyButton->set_tooltip_text(_("Apply transformation to selection"));
applyButton->set_sensitive(false);
diff --git a/src/ui/dialog/undo-history.cpp b/src/ui/dialog/undo-history.cpp
index 53aa7e6ff..bf5bdc76d 100644
--- a/src/ui/dialog/undo-history.cpp
+++ b/src/ui/dialog/undo-history.cpp
@@ -24,7 +24,7 @@
#include "util/signal-blocker.h"
#include "desktop.h"
-#include <gtkmm/invisible.h>
+#include <gtkmm/icontheme.h>
namespace Inkscape {
namespace UI {
@@ -43,8 +43,8 @@ void CellRendererSPIcon::render_vfunc(const Cairo::RefPtr<Cairo::Context>& cr,
// if the icon isn't cached, render it to a pixbuf
if ( !_icon_cache[_property_event_type] ) {
- Glib::ustring image = Inkscape::Verb::get(_property_event_type)->get_image();
- Gtk::Widget* icon = sp_icon_get_icon(image, Inkscape::ICON_SIZE_MENU);
+ Glib::ustring image_name = Inkscape::Verb::get(_property_event_type)->get_image();
+ Gtk::Widget* icon = sp_icon_get_icon(image_name, Inkscape::ICON_SIZE_MENU);
if (icon) {
@@ -54,8 +54,8 @@ void CellRendererSPIcon::render_vfunc(const Cairo::RefPtr<Cairo::Context>& cr,
sp_icon_fetch_pixbuf(sp_icon);
_property_icon = Glib::wrap(sp_icon->pb, true);
} else if ( GTK_IS_IMAGE(icon->gobj()) ) {
- _property_icon = Gtk::Invisible().render_icon_pixbuf(Gtk::StockID(image),
- Gtk::ICON_SIZE_MENU);
+ auto icon_theme = Gtk::IconTheme::get_default();
+ _property_icon = icon_theme->load_icon(image_name, 16);
} else {
delete icon;
return;
diff --git a/src/ui/dialog/xml-tree.cpp b/src/ui/dialog/xml-tree.cpp
index d05c52531..fa35b092a 100644
--- a/src/ui/dialog/xml-tree.cpp
+++ b/src/ui/dialog/xml-tree.cpp
@@ -19,7 +19,6 @@
#include "xml-tree.h"
#include "widgets/icon.h"
#include <glibmm/i18n.h>
-#include <gtkmm/stock.h>
#include "desktop.h"
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index e0c767509..d50c56b76 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -73,8 +73,6 @@
#include "message-stack.h"
#include "ui/dialog/layer-properties.h"
-#include "widgets/image-menu-item.h"
-
using Inkscape::DocumentUndo;
/* Drag and Drop */
@@ -405,7 +403,7 @@ sp_ui_menuitem_add_icon( GtkWidget *item, gchar *icon_name )
icon = sp_icon_new( Inkscape::ICON_SIZE_MENU, icon_name );
gtk_widget_show(icon);
- image_menu_item_set_image((ImageMenuItem *) item, icon);
+ gtk_image_menu_item_set_image((GtkImageMenuItem *) item, icon);
} // end of sp_ui_menu_add_icon
void
@@ -459,7 +457,7 @@ static GtkWidget *sp_ui_menu_append_item_from_verb(GtkMenu *menu, Inkscape::Verb
if (radio) {
item = gtk_radio_menu_item_new_with_mnemonic(group, action->name);
} else {
- item = image_menu_item_new_with_mnemonic(action->name);
+ item = gtk_image_menu_item_new_with_mnemonic(action->name);
}
gtk_label_set_markup_with_mnemonic( GTK_LABEL(gtk_bin_get_child(GTK_BIN (item))), action->name);
diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp
index 2860df12e..d124854ae 100644
--- a/src/ui/widget/dock-item.cpp
+++ b/src/ui/widget/dock-item.cpp
@@ -15,7 +15,6 @@
#include "widgets/icon.h"
#include <gtkmm/icontheme.h>
-#include <gtkmm/stockitem.h>
#include <glibmm/exceptionhandler.h>
namespace Inkscape {
@@ -47,18 +46,11 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l
if (!iconTheme->has_icon(icon_name)) {
Inkscape::queueIconPrerender( INKSCAPE_ICON(icon_name.data()), Inkscape::ICON_SIZE_MENU );
}
- // Icon might be in the icon theme, or might be a stock item. Check the proper source:
if ( iconTheme->has_icon(icon_name) ) {
int width = 0;
int height = 0;
Gtk::IconSize::lookup(Gtk::ICON_SIZE_MENU, width, height);
_icon_pixbuf = iconTheme->load_icon(icon_name, width);
- } else {
- Gtk::StockItem item;
- Gtk::StockID stockId(icon_name);
- if ( Gtk::StockItem::lookup(stockId, item) ) {
- _icon_pixbuf = _dock.getWidget().render_icon_pixbuf( stockId, Gtk::ICON_SIZE_MENU );
- }
}
}
diff --git a/src/ui/widget/font-button.cpp b/src/ui/widget/font-button.cpp
index a472ac6a4..ed57c803a 100644
--- a/src/ui/widget/font-button.cpp
+++ b/src/ui/widget/font-button.cpp
@@ -8,8 +8,11 @@
#endif
#include "font-button.h"
+
#include <glibmm/i18n.h>
+#include <gtkmm/fontbutton.h>
+
namespace Inkscape {
namespace UI {
namespace Widget {
diff --git a/src/ui/widget/font-button.h b/src/ui/widget/font-button.h
index 1f1ad2d01..98c3db440 100644
--- a/src/ui/widget/font-button.h
+++ b/src/ui/widget/font-button.h
@@ -8,7 +8,6 @@
#ifndef INKSCAPE_UI_WIDGET_FONT_BUTTON_H
#define INKSCAPE_UI_WIDGET_FONT_BUTTON_H
-#include <gtkmm.h>
#include "labelled.h"
namespace Inkscape {
diff --git a/src/ui/widget/frame.cpp b/src/ui/widget/frame.cpp
index 65d10dcc4..6593d9c7c 100644
--- a/src/ui/widget/frame.cpp
+++ b/src/ui/widget/frame.cpp
@@ -21,26 +21,20 @@ namespace UI {
namespace Widget {
Frame::Frame(Glib::ustring const &label_text /*= ""*/, gboolean label_bold /*= TRUE*/ )
- : _label(label_text, 1.0, 0.5, TRUE),
- _alignment()
+ : _label(label_text, 1.0, 0.5, TRUE)
{
set_shadow_type(Gtk::SHADOW_NONE);
- //Put an indented GtkAlignment inside the frame.
- //Further children should be children of this GtkAlignment:
- Gtk::Frame::add(_alignment);
- set_padding(4, 0, 8, 0);
-
set_label_widget(_label);
set_label(label_text, label_bold);
-
- show_all_children();
}
void
Frame::add(Widget& widget)
{
- _alignment.add(widget);
+ Gtk::Frame::add(widget);
+ set_padding(4, 0, 8, 0);
+ show_all_children();
}
void
@@ -56,7 +50,21 @@ Frame::set_label(const Glib::ustring &label_text, gboolean label_bold /*= TRUE*/
void
Frame::set_padding (guint padding_top, guint padding_bottom, guint padding_left, guint padding_right)
{
- _alignment.set_padding(padding_top, padding_bottom, padding_left, padding_right);
+ auto child = get_child();
+
+ if(child)
+ {
+ child->set_margin_top(padding_top);
+ child->set_margin_bottom(padding_bottom);
+
+#if GTK_CHECK_VERSION(3,12,0)
+ child->set_margin_start(padding_left);
+ child->set_margin_end(padding_right);
+#else
+ child->set_margin_left(padding_left);
+ child->set_margin_right(padding_right);
+#endif
+ }
}
Gtk::Label const *
diff --git a/src/ui/widget/frame.h b/src/ui/widget/frame.h
index a04666651..24dd716e6 100644
--- a/src/ui/widget/frame.h
+++ b/src/ui/widget/frame.h
@@ -10,7 +10,6 @@
#ifndef INKSCAPE_UI_WIDGET_FRAME_H
#define INKSCAPE_UI_WIDGET_FRAME_H
-#include <gtkmm/alignment.h>
#include <gtkmm/frame.h>
#include <gtkmm/label.h>
@@ -55,8 +54,6 @@ public:
protected:
Gtk::Label _label;
- Gtk::Alignment _alignment;
-
};
} // namespace Widget
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index 6e6e6c527..dff92594b 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -17,7 +17,6 @@
#include <gtkmm/dialog.h> // for Gtk::RESPONSE_*
#include <gtkmm/menu.h>
-#include <gtkmm/stock.h>
#include <gtkmm/checkmenuitem.h>
#include <gtkmm/radiomenuitem.h>
#include <gtkmm/separatormenuitem.h>
@@ -66,7 +65,7 @@ Panel::Panel(Glib::ustring const &label, gchar const *prefs_path,
_label(label),
_apply_label(apply_label),
_verb_num(verb_num),
- _temp_arrow(Gtk::ARROW_LEFT, Gtk::SHADOW_ETCHED_OUT),
+ _temp_arrow(),
_menu(0),
_action_area(0),
_fillable(0)
@@ -269,11 +268,9 @@ void Panel::_init()
_top_bar.pack_end(_menu_popper, false, false);
gint width = 0;
gint height = 0;
-
- if ( gtk_icon_size_lookup( Inkscape::getRegisteredIconSize(Inkscape::ICON_SIZE_DECORATION), &width, &height ) ) {
- _temp_arrow.set_size_request(width, height);
- }
-
+ gtk_image_set_from_icon_name(_temp_arrow.gobj(),
+ "pan-start-symbolic",
+ Inkscape::getRegisteredIconSize(Inkscape::ICON_SIZE_SMALL_TOOLBAR));
_menu_popper.add(_temp_arrow);
_menu_popper.signal_button_press_event().connect_notify(sigc::mem_fun(*this, &Panel::_popper));
}
@@ -578,14 +575,7 @@ void Panel::_apply()
Gtk::Button *Panel::addResponseButton(const Glib::ustring &button_text, int response_id, bool pack_start)
{
- Gtk::Button *button = new Gtk::Button(button_text);
- _addResponseButton(button, response_id, pack_start);
- return button;
-}
-
-Gtk::Button *Panel::addResponseButton(const Gtk::StockID &stock_id, int response_id, bool pack_start)
-{
- Gtk::Button *button = new Gtk::Button(stock_id);
+ Gtk::Button *button = new Gtk::Button(button_text, true);
_addResponseButton(button, response_id, pack_start);
return button;
}
diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h
index 370779586..9cbf39de9 100644
--- a/src/ui/widget/panel.h
+++ b/src/ui/widget/panel.h
@@ -18,9 +18,9 @@
#endif
#include <gtkmm/box.h>
-#include <gtkmm/arrow.h>
#include <gtkmm/button.h>
#include <gtkmm/eventbox.h>
+#include <gtkmm/image.h>
#include <gtkmm/label.h>
#include "enums.h"
#include <vector>
@@ -101,7 +101,6 @@ public:
/* Methods providing a Gtk::Dialog like interface for adding buttons that emit Gtk::RESPONSE
* signals on click. */
Gtk::Button* addResponseButton (const Glib::ustring &button_text, int response_id, bool pack_start=false);
- Gtk::Button* addResponseButton (const Gtk::StockID &stock_id, int response_id, bool pack_start=false);
void setDefaultResponse(int response_id);
void setResponseSensitive(int response_id, bool setting);
@@ -157,7 +156,7 @@ private:
Gtk::VBox _right_bar;
Gtk::VBox _contents;
Gtk::Label _tab_title;
- Gtk::Arrow _temp_arrow;
+ Gtk::Image _temp_arrow;
Gtk::EventBox _menu_popper;
Gtk::Button _close_button;
Gtk::Menu *_menu;
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp
index 1205cd012..b2cebcaa6 100644
--- a/src/ui/widget/preferences-widget.cpp
+++ b/src/ui/widget/preferences-widget.cpp
@@ -18,7 +18,6 @@
#include <gtkmm/frame.h>
#include <gtkmm/alignment.h>
#include <gtkmm/scale.h>
-#include <gtkmm/stock.h>
#include <gtkmm/table.h>
#include "preferences.h"
@@ -708,8 +707,9 @@ void PrefEntryFileButtonHBox::init(Glib::ustring const &prefs_path,
relatedButton = new Gtk::Button();
Gtk::HBox* pixlabel = new Gtk::HBox(false, 3);
- Gtk::Image *im = new Gtk::Image(Gtk::StockID(Gtk::Stock::INDEX),
- Gtk::ICON_SIZE_BUTTON);
+ Gtk::Image *im = new Gtk::Image();
+ im->set_from_icon_name("applications-graphics",
+ Gtk::ICON_SIZE_BUTTON);
pixlabel->pack_start(*im);
Gtk::Label *l = new Gtk::Label();
l->set_markup_with_mnemonic(_("_Browse..."));