diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-01-27 21:37:03 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-02-18 21:18:27 +0000 |
| commit | 47c3e89671c6de12fc08977db56ed3de227807a4 (patch) | |
| tree | 5918b5c4c4a6b0ae97198d8e168f1b072b8690ee /src | |
| parent | Add CSS function to check we are in dark theme (diff) | |
| download | inkscape-47c3e89671c6de12fc08977db56ed3de227807a4.tar.gz inkscape-47c3e89671c6de12fc08977db56ed3de227807a4.zip | |
adding symbols
Diffstat (limited to 'src')
| -rw-r--r-- | src/desktop.cpp | 6 | ||||
| -rw-r--r-- | src/live_effects/effect-enum.h | 5 | ||||
| -rw-r--r-- | src/live_effects/effect.cpp | 65 | ||||
| -rw-r--r-- | src/ui/dialog/livepatheffect-add.cpp | 51 | ||||
| -rw-r--r-- | src/ui/dialog/livepatheffect-add.h | 5 |
5 files changed, 15 insertions, 117 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp index 2b1a1a24f..52abef1f3 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -1294,12 +1294,6 @@ SPDesktop::is_iconified() return 0!=(window_state & GDK_WINDOW_STATE_ICONIFIED); } -bool -SPDesktop::is_darktheme() -{ - return getToplevel()->get_style_context()->has_class("dark"); -} - void SPDesktop::iconify() { diff --git a/src/live_effects/effect-enum.h b/src/live_effects/effect-enum.h index 97c3cda9a..2b9b2e25e 100644 --- a/src/live_effects/effect-enum.h +++ b/src/live_effects/effect-enum.h @@ -78,10 +78,6 @@ enum EffectType { INVALID_LPE // This must be last (I made it such that it is not needed anymore I think..., Don't trust on it being last. - johan) }; -<<<<<<< HEAD -extern const Util::EnumData<EffectType> LPETypeData[]; /// defined in effect.cpp -extern const Util::EnumDataConverter<EffectType> LPETypeConverter; /// defined in effect.cpp -======= template <typename E> struct EnumEffectData { E id; @@ -983,7 +979,6 @@ const EnumEffectData<EffectType> LPETypeData[] = { extern const EnumEffectData<EffectType> LPETypeData[]; /// defined in effect.cpp extern const EnumEffectDataConverter<EffectType> LPETypeConverter; /// defined in effect.cpp ->>>>>>> fixing coding style and translation and merge from master } //namespace LivePathEffect } //namespace Inkscape diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index dfad38e3a..1414932ec 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -94,71 +94,6 @@ namespace Inkscape { namespace LivePathEffect { -const Util::EnumData<EffectType> LPETypeData[] = { - // {constant defined in effect-enum.h, N_("name of your effect"), "name of your effect in SVG"} -/* 0.46 */ - {BEND_PATH, N_("Bend"), "bend_path"}, - {GEARS, N_("Gears"), "gears"}, - {PATTERN_ALONG_PATH, N_("Pattern Along Path"), "skeletal"}, // for historic reasons, this effect is called skeletal(strokes) in Inkscape:SVG - {CURVE_STITCH, N_("Stitch Sub-Paths"), "curvestitching"}, -/* 0.47 */ - {VONKOCH, N_("VonKoch"), "vonkoch"}, - {KNOT, N_("Knot"), "knot"}, - {CONSTRUCT_GRID, N_("Construct grid"), "construct_grid"}, - {SPIRO, N_("Spiro spline"), "spiro"}, - {ENVELOPE, N_("Envelope Deformation"), "envelope"}, - {INTERPOLATE, N_("Interpolate Sub-Paths"), "interpolate"}, - {ROUGH_HATCHES, N_("Hatches (rough)"), "rough_hatches"}, - {SKETCH, N_("Sketch"), "sketch"}, - {RULER, N_("Ruler"), "ruler"}, -/* 0.91 */ - {POWERSTROKE, N_("Power stroke"), "powerstroke"}, - {CLONE_ORIGINAL, N_("Clone original"), "clone_original"}, -/* 0.92 */ - {SIMPLIFY, N_("Simplify"), "simplify"}, - {LATTICE2, N_("Lattice Deformation 2"), "lattice2"}, - {PERSPECTIVE_ENVELOPE, N_("Perspective/Envelope"), "perspective-envelope"}, //TODO:Wrong name with "-" - {INTERPOLATE_POINTS, N_("Interpolate points"), "interpolate_points"}, - {TRANSFORM_2PTS, N_("Transform by 2 points"), "transform_2pts"}, - {SHOW_HANDLES, N_("Show handles"), "show_handles"}, - {ROUGHEN, N_("Roughen"), "roughen"}, - {BSPLINE, N_("BSpline"), "bspline"}, - {JOIN_TYPE, N_("Join type"), "join_type"}, - {TAPER_STROKE, N_("Taper stroke"), "taper_stroke"}, - {MIRROR_SYMMETRY, N_("Mirror symmetry"), "mirror_symmetry"}, - {COPY_ROTATE, N_("Rotate copies"), "copy_rotate"}, -/* Ponyscape -> Inkscape 0.92*/ - {ATTACH_PATH, N_("Attach path"), "attach_path"}, - {FILL_BETWEEN_STROKES, N_("Fill between strokes"), "fill_between_strokes"}, - {FILL_BETWEEN_MANY, N_("Fill between many"), "fill_between_many"}, - {ELLIPSE_5PTS, N_("Ellipse by 5 points"), "ellipse_5pts"}, - {BOUNDING_BOX, N_("Bounding Box"), "bounding_box"}, -/* 0.93 */ - {MEASURE_SEGMENTS, N_("Measure Segments"), "measure_segments"}, - {FILLET_CHAMFER, N_("Fillet/Chamfer"), "fillet_chamfer"}, - {BOOL_OP, N_("Boolean operation"), "bool_op"}, - {EMBRODERY_STITCH, N_("Embroidery stitch"), "embrodery_stitch"}, - {POWERCLIP, N_("Power clip"), "powerclip"}, - {POWERMASK, N_("Power mask"), "powermask"}, - {PTS2ELLIPSE, N_("Ellipse from points"), "pts2ellipse"}, - {OFFSET, N_("Offset"), "offset"}, - {DASH_STROKE, N_("Dash Stroke"), "dash_stroke"}, -#ifdef LPE_ENABLE_TEST_EFFECTS - {DOEFFECTSTACK_TEST, N_("doEffect stack test"), "doeffectstacktest"}, - {ANGLE_BISECTOR, N_("Angle bisector"), "angle_bisector"}, - {CIRCLE_WITH_RADIUS, N_("Circle (by center and radius)"), "circle_with_radius"}, - {CIRCLE_3PTS, N_("Circle by 3 points"), "circle_3pts"}, - {DYNASTROKE, N_("Dynamic stroke"), "dynastroke"}, - {EXTRUDE, N_("Extrude"), "extrude"}, - {LATTICE, N_("Lattice Deformation"), "lattice"}, - {LINE_SEGMENT, N_("Line Segment"), "line_segment"}, - {PARALLEL, N_("Parallel"), "parallel"}, - {PATH_LENGTH, N_("Path length"), "path_length"}, - {PERP_BISECTOR, N_("Perpendicular bisector"), "perp_bisector"}, - {RECURSIVE_SKELETON, N_("Recursive skeleton"), "recursive_skeleton"}, - {TANGENT_TO_CURVE, N_("Tangent to curve"), "tangent_to_curve"}, - {TEXT_LABEL, N_("Text label"), "text_label"}, -#endif const EnumEffectDataConverter<EffectType> LPETypeConverter(LPETypeData, sizeof(LPETypeData) / sizeof(*LPETypeData)); diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp index b11ee66b7..886dbb38f 100644 --- a/src/ui/dialog/livepatheffect-add.cpp +++ b/src/ui/dialog/livepatheffect-add.cpp @@ -150,28 +150,22 @@ bool LivePathEffectAdd::on_filter(Gtk::FlowBoxChild *child) return false; } - mainVBox->pack_start(scrolled_window, true, true); - add_action_widget(close_button, Gtk::RESPONSE_CLOSE); - add_action_widget(add_button, Gtk::RESPONSE_APPLY); - - - /** - * Signal handlers - */ - effectlist_treeview.signal_button_press_event().connect_notify( sigc::mem_fun(*this, &LivePathEffectAdd::onButtonEvent) ); - effectlist_treeview.signal_key_press_event().connect_notify(sigc::mem_fun(*this, &LivePathEffectAdd::onKeyEvent)); - close_button.signal_clicked().connect(sigc::mem_fun(*this, &LivePathEffectAdd::onClose)); - add_button.signal_clicked().connect(sigc::mem_fun(*this, &LivePathEffectAdd::onAdd)); - signal_delete_event().connect( sigc::bind_return(sigc::hide(sigc::mem_fun(*this, &LivePathEffectAdd::onClose)), true ) ); - - add_button.grab_default(); - - show_all_children(); +void LivePathEffectAdd::on_search() +{ + _visiblelpe = 0; + _LPESelectorFlowBox->set_filter_func(sigc::mem_fun(*this, &LivePathEffectAdd::on_filter)); + if (_visiblelpe == 0) { + _LPEInfo->set_text(_("Your search do a empty result, please try again")); + _LPEInfo->set_visible(true); + _LPEInfo->get_style_context()->add_class("lpeinfowarn"); + } else { + _LPEInfo->set_visible(false); + _LPEInfo->get_style_context()->remove_class("lpeinfowarn"); + } } void LivePathEffectAdd::onAdd() { - applied = true; onClose(); } @@ -187,27 +181,6 @@ void LivePathEffectAdd::onKeyEvent(GdkEventKey* evt) } } -void LivePathEffectAdd::onButtonEvent(GdkEventButton* evt) -{ - // Double click on tree is same as clicking the add button - if (evt->type == GDK_2BUTTON_PRESS) { - onAdd(); - } -} - -const Util::EnumData<LivePathEffect::EffectType>* -LivePathEffectAdd::getActiveData() -{ - Gtk::TreeModel::iterator iter = instance().effectlist_treeview.get_selection()->get_selected(); - if ( iter ) { - Gtk::TreeModel::Row row = *iter; - return row[instance()._columns.data]; - } - - return nullptr; -} - - void LivePathEffectAdd::show(SPDesktop *desktop) { LivePathEffectAdd &dial = instance(); diff --git a/src/ui/dialog/livepatheffect-add.h b/src/ui/dialog/livepatheffect-add.h index 003c9c127..4127553ac 100644 --- a/src/ui/dialog/livepatheffect-add.h +++ b/src/ui/dialog/livepatheffect-add.h @@ -50,12 +50,13 @@ public: * Close button was clicked */ void onClose(); - + bool on_filter(Gtk::FlowBoxChild *child); + void on_search(); + void on_activate(Gtk::FlowBoxChild *child); /** * Add button was clicked */ void onAdd(); - /** * Tree was clicked */ |
