diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2019-01-22 19:13:45 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2019-01-22 19:13:45 +0000 |
| commit | 6053b3fd123bfd7d1e910b2e19c60b1c58e2e6a8 (patch) | |
| tree | aadd2d927bb4738853f2be3110eaa512355ad1a2 /src | |
| parent | Get rid of unused empty toolbox creation (diff) | |
| parent | Fix some typos and syntax errors (diff) | |
| download | inkscape-6053b3fd123bfd7d1e910b2e19c60b1c58e2e6a8.tar.gz inkscape-6053b3fd123bfd7d1e910b2e19c60b1c58e2e6a8.zip | |
Merge branch 'master' of gitlab.com:inkscape/inkscape
Diffstat (limited to 'src')
| -rw-r--r-- | src/3rdparty/libcroco/cr-input.c | 6 | ||||
| -rw-r--r-- | src/3rdparty/libcroco/cr-prop-list.c | 2 | ||||
| -rw-r--r-- | src/3rdparty/libcroco/cr-sel-eng.c | 2 | ||||
| -rw-r--r-- | src/3rdparty/libcroco/cr-statement.c | 12 | ||||
| -rw-r--r-- | src/3rdparty/libcroco/cr-style.c | 2 | ||||
| -rw-r--r-- | src/3rdparty/libcroco/cr-tknzr.c | 2 | ||||
| -rw-r--r-- | src/extension/system.cpp | 2 | ||||
| -rw-r--r-- | src/inkscape-window.cpp | 14 | ||||
| -rw-r--r-- | src/inkscape-window.h | 3 | ||||
| -rw-r--r-- | src/live_effects/lpe-measure-segments.cpp | 2 | ||||
| -rw-r--r-- | src/ui/draw-anchor.h | 2 | ||||
| -rw-r--r-- | src/verbs.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/desktop-widget.cpp | 41 | ||||
| -rw-r--r-- | src/widgets/desktop-widget.h | 14 |
14 files changed, 31 insertions, 75 deletions
diff --git a/src/3rdparty/libcroco/cr-input.c b/src/3rdparty/libcroco/cr-input.c index 732068aff..49000b1f5 100644 --- a/src/3rdparty/libcroco/cr-input.c +++ b/src/3rdparty/libcroco/cr-input.c @@ -231,8 +231,8 @@ cr_input_new_from_uri (const gchar * a_file_uri, enum CREncoding a_enc) /*we reached eof */ loop = FALSE; } else { - /*a pb occured !! */ - cr_utils_trace_debug ("an io error occured"); + /*a pb occurred !! */ + cr_utils_trace_debug ("an io error occurred"); status = CR_ERROR; goto cleanup; } @@ -874,7 +874,7 @@ cr_input_peek_byte2 (CRInput const * a_this, gulong a_offset, gboolean * a_eof) *Gets the memory address of the byte located at a given offset *in the input stream. * - *Returns the address, otherwise NULL if an error occured. + *Returns the address, otherwise NULL if an error occurred. */ guchar * cr_input_get_byte_addr (CRInput * a_this, gulong a_offset) diff --git a/src/3rdparty/libcroco/cr-prop-list.c b/src/3rdparty/libcroco/cr-prop-list.c index dc575d6ff..5a61133f1 100644 --- a/src/3rdparty/libcroco/cr-prop-list.c +++ b/src/3rdparty/libcroco/cr-prop-list.c @@ -71,7 +71,7 @@ cr_prop_list_allocate (void) *Appends a property list to the current one. * *Returns the resulting prop list, or NULL if an error - *occured + *occurred */ CRPropList * cr_prop_list_append (CRPropList * a_this, CRPropList * a_to_append) diff --git a/src/3rdparty/libcroco/cr-sel-eng.c b/src/3rdparty/libcroco/cr-sel-eng.c index 9e35ad93f..0c1de39b6 100644 --- a/src/3rdparty/libcroco/cr-sel-eng.c +++ b/src/3rdparty/libcroco/cr-sel-eng.c @@ -1446,7 +1446,7 @@ sel_matches_node_real (CRSelEng * a_this, CRSimpleSel * a_sel, *case, *a_len is set to the actual number of ruleset found. *@return CR_BAD_PARAM_ERROR in case any of the given parameter are *bad (e.g null pointer). - *@return CR_ERROR if any other error occured. + *@return CR_ERROR if any other error occurred. */ static enum CRStatus cr_sel_eng_get_matched_rulesets_real (CRSelEng * a_this, diff --git a/src/3rdparty/libcroco/cr-statement.c b/src/3rdparty/libcroco/cr-statement.c index e31123aec..d064cd824 100644 --- a/src/3rdparty/libcroco/cr-statement.c +++ b/src/3rdparty/libcroco/cr-statement.c @@ -1210,14 +1210,14 @@ cr_statement_at_media_rule_parse_from_buf (const guchar * a_buf, parser = cr_parser_new_from_buf ((guchar*)a_buf, strlen ((const char *) a_buf), a_enc, FALSE); if (!parser) { - cr_utils_trace_info ("Instanciation of the parser failed"); + cr_utils_trace_info ("Instantiation of the parser failed"); goto cleanup; } sac_handler = cr_doc_handler_new (); if (!sac_handler) { cr_utils_trace_info - ("Instanciation of the sac handler failed"); + ("Instantiation of the sac handler failed"); goto cleanup; } @@ -1396,7 +1396,7 @@ cr_statement_at_import_rule_parse_from_buf (const guchar * a_buf, parser = cr_parser_new_from_buf ((guchar*)a_buf, strlen ((const char *) a_buf), a_encoding, FALSE); if (!parser) { - cr_utils_trace_info ("Instanciation of parser failed."); + cr_utils_trace_info ("Instantiation of parser failed."); goto cleanup; } @@ -1523,14 +1523,14 @@ cr_statement_at_page_rule_parse_from_buf (const guchar * a_buf, parser = cr_parser_new_from_buf ((guchar*)a_buf, strlen ((const char *) a_buf), a_encoding, FALSE); if (!parser) { - cr_utils_trace_info ("Instanciation of the parser failed."); + cr_utils_trace_info ("Instantiation of the parser failed."); goto cleanup; } sac_handler = cr_doc_handler_new (); if (!sac_handler) { cr_utils_trace_info - ("Instanciation of the sac handler failed."); + ("Instantiation of the sac handler failed."); goto cleanup; } @@ -1639,7 +1639,7 @@ cr_statement_at_charset_rule_parse_from_buf (const guchar * a_buf, parser = cr_parser_new_from_buf ((guchar*)a_buf, strlen ((const char *) a_buf), a_encoding, FALSE); if (!parser) { - cr_utils_trace_info ("Instanciation of the parser failed."); + cr_utils_trace_info ("Instantiation of the parser failed."); goto cleanup; } diff --git a/src/3rdparty/libcroco/cr-style.c b/src/3rdparty/libcroco/cr-style.c index 2b865c248..ebc669c43 100644 --- a/src/3rdparty/libcroco/cr-style.c +++ b/src/3rdparty/libcroco/cr-style.c @@ -1528,7 +1528,7 @@ set_prop_font_size_from_value (CRStyle * a_style, CRTerm * a_value) a_style->font_size.sv.type = INHERITED_FONT_SIZE; } else { - cr_utils_trace_info ("Unknow value of font-size") ; + cr_utils_trace_info ("Unknown value of font-size") ; status = init_style_font_size_field (a_style); return CR_UNKNOWN_PROP_VAL_ERROR; } diff --git a/src/3rdparty/libcroco/cr-tknzr.c b/src/3rdparty/libcroco/cr-tknzr.c index 83f6ab3c0..10c81765b 100644 --- a/src/3rdparty/libcroco/cr-tknzr.c +++ b/src/3rdparty/libcroco/cr-tknzr.c @@ -524,7 +524,7 @@ cr_tknzr_parse_comment (CRTknzr * a_this, *Error code can be either CR_PARSING_ERROR if the string *parsed just doesn't *respect the production or another error if a - *lower level error occured. + *lower level error occurred. */ static enum CRStatus cr_tknzr_parse_unicode_escape (CRTknzr * a_this, diff --git a/src/extension/system.cpp b/src/extension/system.cpp index ea486ed80..412e5dcd4 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -278,7 +278,7 @@ save(Extension *key, SPDocument *doc, gchar const *filename, bool setextension, } // test if the file exists and is writable - // the test only checks the file attributes and might pass where ACL does not allow to write + // the test only checks the file attributes and might pass where ACL does not allow writes if (Inkscape::IO::file_test(filename, G_FILE_TEST_EXISTS) && !Inkscape::IO::file_is_writable(filename)) { g_free(fileName); throw Output::file_read_only(); diff --git a/src/inkscape-window.cpp b/src/inkscape-window.cpp index 0c38b33ec..70192b711 100644 --- a/src/inkscape-window.cpp +++ b/src/inkscape-window.cpp @@ -23,6 +23,7 @@ #include "object/sp-namedview.h" // TODO Remove need for this! #include "ui/drag-and-drop.h" // Move to canvas? +#include "ui/interface.h" // main menu #include "ui/monitor.h" // get_monitor_geometry_at_point() #include "ui/drag-and-drop.h" @@ -53,24 +54,29 @@ InkscapeWindow::InkscapeWindow(SPDocument* document) // =============== Build interface =============== // Main box - _mainbox = Gtk::manage(new Gtk::Box); + _mainbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); _mainbox->set_name("DesktopMainBox"); _mainbox->show(); add(*_mainbox); - // Menu bar - // Desktop widget (=> MultiPaned) _desktop_widget = sp_desktop_widget_new(_document); _desktop_widget->window = this; - gtk_container_add(GTK_CONTAINER(_mainbox->gobj()), GTK_WIDGET(_desktop_widget)); gtk_widget_show(GTK_WIDGET(_desktop_widget)); _desktop = _desktop_widget->desktop; + // Menu bar (must come after desktop widget creation as we need _desktop) + _menubar = Glib::wrap(GTK_MENU_BAR(sp_ui_main_menubar(_desktop))); + _menubar->set_name("MenuBar"); + _menubar->show_all(); + // Pallet // Status bar + _mainbox->pack_start(*_menubar, false, false); + gtk_box_pack_start(GTK_BOX(_mainbox->gobj()), GTK_WIDGET(_desktop_widget), true, true, 0); // Can't use Glib::wrap() + // ================== Callbacks ================== signal_key_press_event().connect( sigc::mem_fun(*this, &InkscapeWindow::key_press)); signal_delete_event().connect( sigc::mem_fun(*_desktop, &SPDesktop::onDeleteUI)); diff --git a/src/inkscape-window.h b/src/inkscape-window.h index 8aa19d508..9fee2d991 100644 --- a/src/inkscape-window.h +++ b/src/inkscape-window.h @@ -45,7 +45,8 @@ private: SPDesktop* _desktop; SPDesktopWidget* _desktop_widget; - Gtk::Box* _mainbox; // Remove after we don't need set_desktop_widget() + Gtk::Box* _mainbox; + Gtk::MenuBar* _menubar; // Callbacks bool key_press(GdkEventKey* event); diff --git a/src/live_effects/lpe-measure-segments.cpp b/src/live_effects/lpe-measure-segments.cpp index 8768547e8..1bba6d2e3 100644 --- a/src/live_effects/lpe-measure-segments.cpp +++ b/src/live_effects/lpe-measure-segments.cpp @@ -188,7 +188,7 @@ LPEMeasureSegments::LPEMeasureSegments(LivePathEffectObject *lpeobject) : "That usually don't change much\n\n" "<b><big>Tips</big></b>\n" "<b><i>Style Dialog</i></b> Styling using XML editor to find appropriate classes or ID's\n" - "<b><i>Blacklists</i></b> This allow to hide some segments or projection steps to measure\n" + "<b><i>Blacklists</i></b> This allow hiding some segments or projection steps to measure\n" "<b><i>Multiple Measures</i></b> In the same object, in conjunction of blacklists, " "allow measures with different orientations or a extra projection \n" "<b><i>Set Defaults</i></b> Remember all LPE has it in the bottom")); diff --git a/src/ui/draw-anchor.h b/src/ui/draw-anchor.h index 5542b3bf6..b631a4893 100644 --- a/src/ui/draw-anchor.h +++ b/src/ui/draw-anchor.h @@ -30,7 +30,7 @@ class SPCurve; struct SPCanvasItem; /// The drawing anchor. -/// \todo Make this a regular knot, this will allow to set statusbar tips. +/// \todo Make this a regular knot, this will allow setting statusbar tips. struct SPDrawAnchor { Inkscape::UI::Tools::FreehandBase *dc; SPCurve *curve; diff --git a/src/verbs.cpp b/src/verbs.cpp index 37ec08ee4..e18ea71c7 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -3123,7 +3123,7 @@ Verb *Verb::_base_verbs[] = { new ZoomVerb(SP_VERB_VIEW_TOGGLE_SPLIT, "ViewSplitModeToggle", N_("Toggle _Split View Mode"), N_("Split canvas in 2 to show outline"), nullptr), - new ZoomVerb(SP_VERB_VIEW_TOGGLE_XRAY, "ViewXRayToggle", N_("Toggle _XRay Mode"), N_("XRay arround cursor"), + new ZoomVerb(SP_VERB_VIEW_TOGGLE_XRAY, "ViewXRayToggle", N_("Toggle _XRay Mode"), N_("XRay around cursor"), nullptr), new ZoomVerb(SP_VERB_VIEW_CMS_TOGGLE, "ViewCmsToggle", N_("Color-managed view"), diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index 351b437d6..d74b60be3 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -25,21 +25,6 @@ # include "config.h" // only include where actually required! #endif -#include <gtkmm/cssprovider.h> -#include <gtkmm/menubar.h> -#include <gtkmm/messagedialog.h> -#include <gtkmm/paned.h> -#include <gtkmm/scrollbar.h> -#include <gtkmm/separator.h> -#include <gtkmm/separatormenuitem.h> - -#include <gdkmm/types.h> -#if GTK_CHECK_VERSION(3,20,0) -#include <gdkmm/seat.h> -#else -#include <gdkmm/devicemanager.h> -#endif - #include <2geom/rect.h> #include "attributes.h" @@ -1445,12 +1430,6 @@ void SPDesktopWidget::layoutWidgets() pref_root = "/window/"; } - if (!prefs->getBool(pref_root + "menu/state", true)) { - dtw->_menubar->hide(); - } else { - dtw->_menubar->show_all(); - } - if (!prefs->getBool(pref_root + "commands/state", true)) { gtk_widget_hide (dtw->commands_toolbox); } else { @@ -1657,11 +1636,6 @@ SPDesktopWidget* SPDesktopWidget::createInstance(SPDocument *document) dtw->layer_selector->setDesktop(dtw->desktop); - dtw->_menubar = Glib::wrap(GTK_MENU_BAR(sp_ui_main_menubar (dtw->desktop))); - dtw->_menubar->set_name("MenuBar"); - dtw->_menubar->show_all(); - - dtw->_vbox->pack_start(*dtw->_menubar, false, false); dtw->layoutWidgets(); std::vector<GtkWidget *> toolboxes; @@ -2090,21 +2064,6 @@ SPDesktopWidget::toggle_color_prof_adj() } } -/* Unused -void -sp_spw_toggle_menubar (SPDesktopWidget *dtw, bool is_fullscreen) -{ - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - if (dtw->_menubar->get_visible()) { - dtw->_menubar->hide(); - prefs->setBool(is_fullscreen ? "/fullscreen/menu/state" : "/window/menu/state", false); - } else { - dtw->_menubar->show_all(); - prefs->setBool(is_fullscreen ? "/fullscreen/menu/state" : "/window/menu/state", true); - } -} -*/ - static void set_adjustment (Glib::RefPtr<Gtk::Adjustment> &adj, double l, double u, double ps, double si, double pi) { diff --git a/src/widgets/desktop-widget.h b/src/widgets/desktop-widget.h index e6702ce41..5d1be6398 100644 --- a/src/widgets/desktop-widget.h +++ b/src/widgets/desktop-widget.h @@ -15,7 +15,8 @@ * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ -#include <gtkmm/window.h> +#include <gtkmm.h> + #include "message.h" #include "ui/view/view-widget.h" #include "ui/view/edit-widget-interface.h" @@ -33,16 +34,6 @@ class SPDesktop; struct SPDesktopWidget; class SPObject; -namespace Gtk { - class Box; - class EventBox; - class Grid; - class MenuBar; - class Scrollbar; - class SpinButton; - class ToggleButton; -} - namespace Inkscape { namespace UI { namespace Dialog { @@ -107,7 +98,6 @@ private: Gtk::Box *_hbox; - Gtk::MenuBar *_menubar; Gtk::Box *_statusbar; Inkscape::UI::Dialog::SwatchesPanel *_panels; |
