VTE 2.91 support

Bug #1374939 reported by Maxime Gauduin
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cairo-Dock Plug-ins
Fix Committed
Medium
Matthieu Baerts

Bug Description

VTE 2.91 just landed in Arch Linux' testing repo along with GNOME 3.14. It brings some API changes so I put together a quick patch and it seems to work, but vte_terminal_set_font_from_string does not exist anymore. Since I don't know C and I'm not sure how to deal with this, I just removed it (disabling custom fonts afaict). You'll surely come up with sth better, but here is the patch anyway.

Revision history for this message
Anatol Pomozov (anatol) wrote :

This patch has something similar https://mail.gnome.org/archives/commits-list/2014-July/msg02062.html

- vte_terminal_set_font_from_string (vte, "monospace");
+ Pango::FontDescription font_desc ("monospace");
+ vte_terminal_set_font (vte, font_desc.gobj());

Revision history for this message
Maxime Gauduin (alucryd) wrote :

Thx for the pointer, I added this to the patch. Now this adds a dep on pangomm, and even though I added the correct cflags and ldflags via cmake, I end up getting this: https://paste.xinu.at/yg8A/. New patch attached.

Can somebody reproduce?

Revision history for this message
Matthieu Baerts (matttbe) wrote :

Hello and thank you for this bug report!

Thank you for this patch!
I'll have a look to it ASAP but after a quick look, I can't apply it like that in the trunk because we also want to be compatible with previous versions of VTE. But it's nice to have this patch because we can know what compiles for you :-)

About the link given by Anatol, we can see a patch for Nemiver but this application is written in C++. This is why we can't use their code like that. But it's helpful to have some tips about how to support this new version of VTE :-)

Changed in cairo-dock-plug-ins:
status: New → Triaged
assignee: nobody → Matthieu Baerts (matttbe)
milestone: none → 3.3.99.rc
importance: Undecided → Medium
Revision history for this message
Anatol Pomozov (anatol) wrote :

Non C++ version of the patch would be something like:

PangoFontDescription *font_desc = pango_font_description_from_string(name);
vte_terminal_set_font (vte, font_desc);

Revision history for this message
Maxime Gauduin (alucryd) wrote :

Serves me right for not knowing the difference between C and C++. I still get the no such file on the cctype include though, I have no clue why.

Anyway, glad to know you'll be looking into this Matthieu, we will probably keep vte 2.90 lying around while all packages are updated upstream so there's no real rush.

Revision history for this message
Maxime Gauduin (alucryd) wrote :

Turns out pangomm is c++ only, thx Anatol for noticing. Using regular pango does the trick, custom font works here. Deleted the old patches and attched the new one instead.

I realize you still need to provide support for both 2.90 and 2.91, but I hope this'll come in handy :)

Revision history for this message
Matthieu Baerts (matttbe) wrote :

Hello Maxime,

I just applied your patch on BZR (rev 3122) ;-)

Here are the two main changes:
 * I added preprocessor conditions to support both new and old versions
    => #if VTE_CHECK_VERSION(2,91,0)
 * I removed the modification of CMakeLists.txt files (not needed because Pango is already included by GTK, etc.)

Thank you for your help!

Changed in cairo-dock-plug-ins:
status: Triaged → Fix Committed
Revision history for this message
Maxime Gauduin (alucryd) wrote :

Thank you for the quick fix!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.