gnome: support changes to GtkScaleButton on older gtk+
Gtk+3.10 had a different layout of the GtkScaleButton internals.
Refs #77698
Change-Id: Ia8ba50682aa51681f1aedcef37799e3943c6f269
diff --git a/src/currentcallview.cpp b/src/currentcallview.cpp
index 0c21a31..1a8b704 100644
--- a/src/currentcallview.cpp
+++ b/src/currentcallview.cpp
@@ -176,10 +176,14 @@
GtkScale *scale = NULL;
GtkWidget *dock = gtk_scale_button_get_popup(button);
- // the dock is a popup window which contains a frame, which contains a box
+ // the dock is a popover which contains a box
// which contains the + button, scale, and - button
// we want to get the scale
if (GtkWidget *box = gtk_bin_get_child(GTK_BIN(dock))) {
+ if (GTK_IS_FRAME(box)) {
+ // support older versions of gtk; the box used to be in a frame
+ box = gtk_bin_get_child(GTK_BIN(box));
+ }
GList *children = gtk_container_get_children(GTK_CONTAINER(box));
for (GList *c = children; c && !scale; c = c->next) {
if (GTK_IS_SCALE(c->data))