Re: gtk_dialog_get_action_area() deprecation
- From: Emmanuele Bassi <ebassi gmail com>
- To: Gergely Polonkai <gergely polonkai eu>, Richard Shann <richard rshann plus com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtk_dialog_get_action_area() deprecation
- Date: Sat, 31 Dec 2016 15:44:41 +0000
Hi;
Deprecations will only impact you if you want to update the code base to
the next major API bump. Since you don't have or want to commit resources
to do so, you can keep using the deprecated API in the same major API
version. If you want to avoid deprecation warnings, you can use the various
approaches GTK provides for that:
- disable deprecation warnings using GDK_DISABLE_DEPRECATION_WARNINGS
defined before importing gtk.h
- GDK_VERSION_MIN_REQUIRED and GDK_VERSION_MAX_ALLOWED defined before
importing gtk.h
- G_GNUC_BEGIN_IGNORE_DEPRECATION and G_GNUC_END_IGNORE_DEPRECATION to
mark sections of the code with calls to deprecated API
Deprecated API is generally guaranteed to work between minor releases of
the same API version, unless it calls into other deprecated functionality.
Walking the widget hierarchy created internally by a widget, on the other
hand, is never guaranteed to work, even between minor or micro releases.
tl;dr - keep using the deprecated API unless you can commit yourself to
rework your code to keep up with different major API versions.
Ciao,
Emmanuele.
On Sat, 31 Dec 2016 at 14:46, Richard Shann <richard rshann plus com> wrote:
On Sat, 2016-12-31 at 10:05 +0000, Gergely Polonkai wrote:
It would be helpful to see your exact use case. If you put only
buttons in your GtkBox, you will be fine with gtk_dialog_add_button().
If you add other, more complex widgets, there might be a design flaw
in your application. Solutions in between might be OK, but without
knowing what you want to achieve, it's hard to tell.
Thank you for you quick reply. I guess the answer to my question was
"no".
There isn't the manpower to investigate the purpose of this bit of code
nor to start re-imagining the design 17 years in to this project,
unfortunately.
For now, I see that I can get at the action area via
action_area = gtk_widget_get_parent (cancelbutton);
which will be ok unless the GtkDialog widget gets some new internal
implementation. Perhaps this will be useful to other developers hitting
this deprecation.
Richard
Best,
Gergely
On Sat, Dec 31, 2016, 10:39 Richard Shann <richard rshann plus com>
wrote:
The documentation for gtk_dialog_get_action_area() suggests
using
gtk_dialog_add_button() etc. However, my application is
storing a GtkBox
in that area - is there a way to do this, going forward?
Richard
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]