Difference between revisions of "Refactoring projects"

From Inkscape Wiki
Jump to navigation Jump to search
Line 29: Line 29:
= Medium Projects =
= Medium Projects =


* <strike>Remove god-awful SPWidget (only used for selection).</strike>
* <strike>Remove god-awful SPWidget (only used for selection).</strike> Yeah!!!
* Move most files in 'src' to subdirectories, add ''README'' for each directory with description of contents. (Tav)
* Move most files in 'src' to subdirectories, add ''README'' for each directory with description of contents. (Tav)
* In toolbars, use ''dataKludge'' or ''data'' or ''tbl'' or ''holder'' ... but not all four! (Side benefit of C++ify toolbars.) (Alex)  
* In toolbars, use ''dataKludge'' or ''data'' or ''tbl'' or ''holder'' ... but not all four! (Side benefit of C++ify toolbars.) (Alex)  
Line 36: Line 36:
* Sort out URL/file handling. See [[URIs and Filenames]].
* Sort out URL/file handling. See [[URIs and Filenames]].
* Find all the ways we output error/status messages to users (this does not include developer focused error messages that use std::cerr). Pick one and use it everywhere. The goal should be to be able to build Inkscape without a GUI but if the GUI is used, the user will see the messages on the desktop.
* Find all the ways we output error/status messages to users (this does not include developer focused error messages that use std::cerr). Pick one and use it everywhere. The goal should be to be able to build Inkscape without a GUI but if the GUI is used, the user will see the messages on the desktop.
* Look at Inkscape::URIReference and derived classes to see if they can't be simplified/templated/etc.


= Large Projects =
= Large Projects =

Revision as of 08:49, 6 March 2020


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). DOCUMENT/Autogenerated
  • Remove macros.h (or document why it is needed). DELETE
  • 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(?). MOVE/RENAME
  • Remove dependence on object-set.h in files in src/livarot directory.
  • Evaluate all the functions in io/sys.h/.cpp. See if we can't use standard glib functions.

Medium Projects

  • Remove god-awful SPWidget (only used for selection). Yeah!!!
  • Move most files in 'src' to subdirectories, add README for each directory with description of contents. (Tav)
  • In toolbars, use dataKludge or data or tbl or holder ... but not all four! (Side benefit of C++ify toolbars.) (Alex)
  • Remove InkAction class. Normal GTK button actions should be able to handle SVG icons... no need for derived class. (Alex)
  • Make data members private in SPI::Base and derived class. Add set() function. Default to SP_STYLE_UNSET in constructor, setting to SP_STYLE_SRC_PROP in set(). (Tav)
  • Sort out URL/file handling. See URIs and Filenames.
  • Find all the ways we output error/status messages to users (this does not include developer focused error messages that use std::cerr). Pick one and use it everywhere. The goal should be to be able to build Inkscape without a GUI but if the GUI is used, the user will see the messages on the desktop.
  • Look at Inkscape::URIReference and derived classes to see if they can't be simplified/templated/etc.

Large Projects

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

Super Large Projects

  • Convert verbs to Gio::Action's.
  • Convert GUI to XML files. (Long term.)
  • Invert 'y' coordinate system to match SVG. (Look at previous patch... link?)