Yes, later gtk +3 vte didn't provide that inner_border property, but since gtk +2 version did (which is what Puppy and DebianDog's use), I can't say it is a proper 'fix' to resort to use of long deprecated vte_terminal_get_padding() function. So here, pedantic perhaps, is the main parts of the actual fix to allow use of inner_border property in gtk +2 vte gtkdialog code:
Code: Select all
#if VTE_CHECK_VERSION(0,26,0)
/* Note from wiak: Please note inner_border as pointer to GtkBorder below */
GtkBorder *inner_border = NULL;
#endif
... etc ...
#if HAVE_VTE
/* wiak now FIXED: VTE is telling me that vte_terminal_get_padding() has been
* deprecated since 0.26 and that I should get 'inner-border'
* but GLib is telling me that 'VteTerminal' has no property
* named 'inner-border' so I have to go with the deprecated
* vte_terminal_get_padding() */
#if VTE_CHECK_VERSION(0,26,0)
gtk_widget_style_get (widget, "inner-border", &inner_border, NULL);
#ifdef DEBUG_CONTENT
...Needs modified appropriately too...
#endif
/* xpad = inner_border.left + inner_border.right;
ypad = inner_border.top + inner_border.bottom;
wiak note: The following is needed instead of the above non-bounds/checking gtkdialog 01micko github original:*/
xpad = (inner_border ? inner_border->left : 0) + (inner_border ? inner_border->right : 0);
ypad = (inner_border ? inner_border->top : 0) + (inner_border ? inner_border->bottom : 0);
gtk_border_free (inner_border);
#else
----------------------------------------------------
NOTE that the following also basically maybe 'works' except for complaint "(gtkdialog:564): GLib-GObject-WARNING **: g_object_get_valist: object class 'VteTerminal' has no property named 'inner_border'". Not sure how important that is, but I'd use above instead just in case... Also freeing up with gtk_border_free() is good...
Code: Select all
#
#if VTE_CHECK_VERSION(0,26,0)
/* Note from wiak: Please note inner_border as pointer to GtkBorder below */
GtkBorder *inner_border = NULL;
#endif
... etc ...
if HAVE_VTE
/* VTE is telling me that vte_terminal_get_padding() has been
* deprecated since 0.26 and that I should get 'inner-border'
* but GLib is telling me that 'VteTerminal' has no property
* named 'inner-border' so I have to go with the deprecated
* vte_terminal_get_padding() */
#if VTE_CHECK_VERSION(0,26,0)
g_object_get(G_OBJECT(widget), "inner-border", &inner_border, NULL);
xpad = (inner_border ? inner_border->left : 0) + (inner_border ? inner_border->right : 0);
ypad = (inner_border ? inner_border->top : 0) + (inner_border ? inner_border->bottom : 0);
#else
Since vte_terminal_get_padding() is considered fine by maintainer at 01micko legacy gtkdialog repo I won't push this change up there (I haven't implemented it formally in gtkwialog yet anyway) but I will use it in gtkwialog in preference just because I don't like using deprecated gtk +2 code. Gtk +3 fixes are another matter, which I'll add to gtkwialog later.
Anyway, at the very least, I like solving what to me remained a weird and unexplained mystery.
wiak