Difference between revisions of "Refactoring projects"

From Inkscape Wiki
Jump to navigation Jump to search
(SPWidget gone in e77e650354daef5ced80adddf6d5a334bb6216d3)
(11 intermediate revisions by 3 users not shown)
Line 14: Line 14:
* Move sp-item-update-cns.h function into SPItem.
* Move sp-item-update-cns.h function into SPItem.
* Move sp-item-rm-unsatisfied-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 config.h code (or document why it is needed). DOCUMENT/Autogenerated
* Remove macros.h (or document why it is needed).
* <strike>Remove macros.h (or document why it is needed). DELETE</strike>
* Remove dependence on Glib::object in ResourceManager().
* <strike>Remove dependence on Glib::object in ResourceManager().</strike>
* Simplify ResourceManager... it does only one thing: fix broken links.
* implify ResourceManager... it does only one thing: fix broken links.  
* In SPObject one can write:
* In SPObject one can write:
     getRepr()->setAttribute("x", "y");
     getRepr()->setAttribute("x", "y");
Line 23: Line 23:
     setKeyValue( sp_attribute_lookup("x"), "y");
     setKeyValue( sp_attribute_lookup("x"), "y");
These are redundant and neither is really convenient. SPObject perhaps should have it's own setAttribute() function.
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(?).
* 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.


= Medium Projects =
= Medium Projects =


* Remove god-awful SPWidget (only used for selection).
* <strike>Remove god-awful SPWidget (only used for selection).</strike>
* Move most files in 'src' to subdirectories, add ''README'' for each directory with description of contents.
* 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! (Maybe combine with C++ify toolbars -- probably removed need for ''data''.)
* 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.
* 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]].


= Large Projects =
= Large Projects =


* C++ify toolbars.
* C++ify toolbars. (Alex)
* Convert verbs to Gio::Action's(?).
* 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.
* 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.
* Remove livarot, moving any needed functionality into lib2geom or other files.


= Super Large Projects =
= Super Large Projects =


* Convert all GtkActions's and Gtk::Action's to Gio::Action's.
* Convert verbs to Gio::Action's.
* Convert GUI to XML files.
* Convert GUI to XML files. (Long term.)
* Invert 'y' coordinate system to match SVG.
* <strike>Invert 'y' coordinate system to match SVG. (Look at previous patch... link?)</strike>

Revision as of 01:47, 24 May 2019


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().
  • implify 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.

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. (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.

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?)