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

Add some changes from the dev branch #242

Merged
merged 12 commits into from Dec 17, 2023

Conversation

LaserEyess
Copy link
Member

@LaserEyess LaserEyess commented Dec 8, 2023

This is the dev branch for those curious. This PR is both an advertisement for it, as well as a chance to merge some mildly-invasive changes along with actual improvements to the code.

Breaking Changes:

  • pod2man -> rst2man (not really relevant but it does add python-docutils as a build dep)
  • -m, --minimize options are now gone. To be clear: they did absolutely nothing
  • geoip is gone: It didn't work and is deprecated upstream. It has to be replaced regardless
  • local commands feature is gone: see below
  • win32rc is gone: Don't know what this did, Windows is barely "supported"

Removing local-commands is likely the most controversial changes here, but it was pretty fragile and a security concern. I am not an expert in glib, safe string parsing in C, regex, shell quoting, or common practices in maintaining in parsing unsafe user data from over a network. Also, TRG shouldn't be a file manager imo. Patches welcome to bring it back (hopefully written in a more modular and secure way. Even better, in a memory safe language).

Good changes:

  • gobject deprecations are gone
  • Meson code cleanups
  • 1000s of lines of unused code gone
  • bumped to warning_level=3 in meson, still warning free! Apparently meson reconfigure isn't working right lol

@TingPing I will not ask you to review this, because honestly I can't even review this myself. But if you see any glaring issues let me know.

trg_bin was an unused parameter
This should have been done in the meson switch; none of this is
necessary.
It's easier to understand, as well as being better supported in various
linux distributions.
First, this was just broken and didn't work. Second, minimizing to tray
is a weird thing that I just don't understand. Just minimize the window?
Is having the icon in the task bar really that distracting?
Again this was another feature that didn't work, and overall made the
codebase more complicated. libgeoip is also deprecated upstream by
maxmind, so it's best to use their updated lib or just drop it all
together. The latter is easier.
This was never ported from GTK2, and no one seems to have minded so far.
It can be added back later in theory, post GTK4
This might be controversial, but this was removed for a couple of
reasons:

  1. It seems really niche, you need TRG constantly running in the
     background for it to actually work. The tray is popular, as is
     minimize to tray as a feature. However, I just don't know how much
     this particular feature is worth it.
  2. It was semi-broken because shell quoting was wrong in certain
     cases, and the code to fix it was really kind of confusing (to me
     at least).

So, it gets the axe. Sorry if you used this.
I don't know what these do, it could be that removing them is a bad
idea, but from my perspective they aren't doing anything and they're
egregiously out of date. Someone can add back windows support if they
want.
This is a massive commit that surely breaks *something* (but I don't
know what right now). Fundamentally all it does is switch to glib 2.70's
API and removes a ton of deprecated declarations and macros. It
accomplishes this by modifying how pretty much every single GObject
subclass used in this project is made. With this change comes a few
other things:

 1. #pragma once, if a header was changed
 2. Removing Privates in final types, just put the vars directly in the
    struct
 3. Since 2) was done, a lot of code was able to be removed that set up
    priv-> struct access.
 4. Renaming variables where appropriate due to 3) (via find/replace and
    sed)

Scattered throughout this is also a bunch of general cleanups I took the
liberty of doing when I saw them.
@LaserEyess
Copy link
Member Author

I lost the simplify main() commit in my git debauchery, whatever

@LaserEyess
Copy link
Member Author

This works well enough for me, I'm sure there are some bugs, but I'm going to be using this build for myself so I'll find them.

@LaserEyess LaserEyess merged commit c7017f5 into transmission-remote-gtk:master Dec 17, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

None yet

1 participant