Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code clean and optimize #894

Open
yetist opened this issue Apr 30, 2018 · 3 comments
Open

code clean and optimize #894

yetist opened this issue Apr 30, 2018 · 3 comments

Comments

@yetist
Copy link
Contributor

yetist commented Apr 30, 2018

Maybe we should clean up and optimize the code if have enough time? I found those code should be cleaned up:

  1. #if 0 ...... #endif
  2. The commented or invalided code.
  3. Deprecations api migrate, like gconf to gsettings, dbus-glib to gdbus, etc.
  4. Use gresource to include resource files, like images, ui files, etc.
  5. Rewrite real object to instead alias or macro defined object under src/xiphos_html.
  6. Eliminate global and external variables, decouple code, and avoid the internal implementation of exposed objects.
  7. The address of the license is located in the header of some files.
@karlkleinpaste
Copy link
Contributor

particularly for the "#if 0" case, that has at times been a habit of mine, to remove something from current use but keep it present (and visible, especially, so it's not forgotten) in case it needs to be brought back into use later. i recall using that a number of times some years ago, when doing a round of cleanups consequent to cppcheck analysis -- quite a few unused functions were kept within #if 0 blocks because i wasn't sure actual removal was a good idea. perhaps it's time to make them go away.

but otherwise, yes, it seems there is always a great deal of clean-up opportunity available. there is a lot of quite old code -- old elements of the settings structure, no longer used, for example. what was previously called gnomesword started in 2000, using gtk1, and dead artifacts from almost 2 decades ago remain.

alerque added a commit to alerque/xiphos that referenced this issue Aug 14, 2018
This should be a complete no-op code wise. Nothing in this commit should
change the function of the program in any way. If `git bisect` or
similar ever traces a problem to this commit, then something is wrong
and I didn't match start/end markers properly.

This partially addresses issue crosswire#894, bullet point 1 & part of 2.
alerque added a commit to alerque/xiphos that referenced this issue Aug 14, 2018
This should be a complete no-op code wise. Nothing in this commit should
change the function of the program in any way. If `git bisect` or
similar ever traces a problem to this commit, then something is wrong
and I didn't match start/end markers properly.

This partially addresses issue crosswire#894, bullet point 1 & part of 2.
alerque added a commit to alerque/xiphos that referenced this issue Dec 20, 2019
This should be a complete no-op code wise. Nothing in this commit should
change the function of the program in any way. If `git bisect` or
similar ever traces a problem to this commit, then something is wrong
and I didn't match start/end markers properly.

This partially addresses issue crosswire#894, bullet point 1 & part of 2.
alerque added a commit to alerque/xiphos that referenced this issue Dec 20, 2019
This should be a complete no-op code wise. Nothing in this commit should
change the function of the program in any way. If `git bisect` or
similar ever traces a problem to this commit, then something is wrong
and I didn't match start/end markers properly.

This partially addresses issue crosswire#894, bullet point 1 & part of 2.
alerque added a commit to alerque/xiphos that referenced this issue Dec 20, 2019
This should be a complete no-op code wise. Nothing in this commit should
change the function of the program in any way. If `git bisect` or
similar ever traces a problem to this commit, then something is wrong
and I didn't match start/end markers properly.

This partially addresses issue crosswire#894, bullet point 1 & part of 2.
alerque added a commit to alerque/xiphos that referenced this issue Dec 20, 2019
This should be a complete no-op code wise. Nothing in this commit should
change the function of the program in any way. If `git bisect` or
similar ever traces a problem to this commit, then something is wrong
and I didn't match start/end markers properly.

This partially addresses issue crosswire#894, bullet point 1 & part of 2.
karlkleinpaste pushed a commit that referenced this issue Apr 16, 2020
This should be a complete no-op code wise. Nothing in this commit should
change the function of the program in any way. If `git bisect` or
similar ever traces a problem to this commit, then something is wrong
and I didn't match start/end markers properly.

This partially addresses issue #894, bullet point 1 & part of 2.
@stappersg
Copy link

About the deprecated 'dbus-glib',

That is about item 3, Deprecations api migrate, like gconf to gsettings, dbus-glib to gdbus, etc. from the opening of this issue.

Did it happen or did we learn that it is not wise to report several issues in a single issue?

@teusbenschop
Copy link
Contributor

I opened a new issue for migrating away from dbus-glib:

#1049

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants