Difference between revisions of "Refactoring projects"

From Inkscape Wiki
Jump to navigation Jump to search
Line 37: Line 37:
* Convert verbs to Gio::Action's(?).
* Convert verbs to Gio::Action's(?).
* Add a one or two line description of what each file contains at the top of the file if it is missing.
* Add a one or two line description of what each file contains at the top of the file if it is missing.
* Remove livarot, moving any needed functionality into lib2geom or other files.


= Super Large Projects =
= Super Large Projects =

Revision as of 10:58, 5 March 2018


A List of Refactoring Projects

See Development Project Ideas and Funded Project Ideas for more possible projects.

See Refactoring plan for guidelines on how to refactor.

Little Projects

  • Derive SPStar from SPShape (not SPPolygon), update 'object/README'.
  • Move sp-item-transform.h functions into SPItem.
  • Move sp-item-update-cns.h function into SPItem.
  • Move sp-item-rm-unsatisfied-cns.h function into SPItem.
  • Remove config.h code (or document why it is needed).
  • Remove macros.h (or document why it is needed).
  • Remove dependence on Glib::object in ResourceManager().
  • Simplify ResourceManager... it does only one thing: fix broken links.
  • In SPObject one can write:
   getRepr()->setAttribute("x", "y");

or

   setKeyValue( sp_attribute_lookup("x"), "y");

These are redundant and neither is really convenient. SPObject perhaps should have it's own setAttribute() function.

  • Rename helper-fns.h with a better discriptive name and move to util(?).

Medium Projects

  • Remove god-awful SPWidget (only used for selection).
  • Move most files in 'src' to subdirectories, add README for each directory with description of contents.
  • In toolbars, use dataKludge or data or tbl or holder ... but not all four! (Maybe combine with C++ify toolbars -- probably removed need for data.)
  • Remove InkAction class. Normal GTK button actions should be able to handle SVG icons... no need for derived class.

Large Projects

  • C++ify toolbars.
  • Convert verbs to Gio::Action's(?).
  • Add a one or two line description of what each file contains at the top of the file if it is missing.
  • Remove livarot, moving any needed functionality into lib2geom or other files.

Super Large Projects

  • Convert all GtkActions's and Gtk::Action's to Gio::Action's.
  • Convert GUI to XML files.
  • Invert 'y' coordinate system to match SVG.