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

MultiTerm: Add support for GTK3 #95

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

codebrainz
Copy link
Member

This PR adds support for GTK3 by adjusting the build system and updating the GTK3(-stack) API used.

It includes an ugly hack for the geany.vapi and geany.deps files by simply copying them to new names, replacing and/or commenting-out some incompatible stuff and using the appropriate one decided at build time. I think it's OK for now since we'll be improving/sharing Vala bindings support for plugins soon enough and this part won't be needed once the GTK3 support is done correctly in the future shared bindings.

TODO: Waf build system support for GTK3 MultiTerm plugin.

/* TODO: this is deprecated, try and figure out alternative
* from GtkNotebook docs. */
this.set_tab_label_packing(term, true, true, PackType.END);
this.child_set(term, "tab-expand", true, "tab-fill", true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be in a separate commit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, with GTK3 it's really gone now instead of just deprecated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, but the docs says "Modifying the packing of the tab label is a deprecated feature and shouldn't be done anymore." So the real fix is to remove this code altogether IIUC.

@frlan
Copy link
Member

frlan commented May 10, 2013

PR look ready to merge for me. Am I right?

@codebrainz
Copy link
Member Author

It wouldn't be that bad but if you don't mind waiting I'll try and cleanup this and the other one in the next couple days hopefully.

@lpaulsen93
Copy link
Contributor

@codebrainz: how about finishing this gtk3 stuff?

@codebrainz
Copy link
Member Author

@LarsGit223 eventually... I don't use or like GTK+3 so it hasn't been a priority.

If you want to work on it, I'd be more than happy to add you as a contributor on my GP fork so you can push to it.

@lpaulsen93
Copy link
Contributor

@codebrainz: I would prefer to team up with someone, helping with the gtk3 porting. All the warnings on compiling for gtk3 are quite annoying. I ported scope some months ago and already got new gtk3 deprecation warnings. Also, this PR looks pretty complete - what is missing?

@lpaulsen93
Copy link
Contributor

@codebrainz: ok, I changed my mind. Add me and I will see what I can do.

@codebrainz
Copy link
Member Author

@LarsGit223 done, I also checked the "Allow edits by maintainers" which I think does something like allowing you to push to this PR or something like that.

@lpaulsen93
Copy link
Contributor

@codebrainz: ok, thanks.

@@ -149,7 +153,11 @@ namespace MultiTerm
context_menu.new_window_activate.connect(on_new_window_activate);
context_menu.move_to_location_activate.connect(on_move_to_location);
}
#if MULTITERM_GTK3
context_menu.popup_at_pointer(event);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires GTK+ 3.22 but I think the build system only checks for GTK+ >= 3.0, so if someone built it with any version of GTK+ between 3.0 and 3.22, it would cause a build error.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I use normal gtk C-style version checks in valac?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for compile-time versions (ie. GTK_CHECK_VERSION macros), Vala's preprocessor is too wimpy. You can pass along a macro from the build system using -D option if it's really needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I tried defining something like MULTITERM_GTK_3_22 but failed at changing the makefiles properly. So I leave this as is for now.

@lpaulsen93
Copy link
Contributor

lpaulsen93 commented Jul 11, 2019

@codebrainz: Hmmm...I can now at least build your repo but if I open the plugin manager I do not see the Multiterm plugin (already did a ldconfig /usr/local/lib).

Update:
Forget it - if a open the plugin manager again I get the following debug messages:

22:12:02: Geany INFO		: Can't load plugin: /usr/local/lib/geany/multiterm.so: undefined symbol: vte_terminal_fork_command_full
22:12:02: Geany INFO		: Failed to load "/usr/local/lib/geany/multiterm.so" - ignoring plugin!

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

Successfully merging this pull request may close these issues.

4 participants