1 | /* |
2 | * Copyright (C) 2014 Red Hat Inc. |
3 | * |
4 | * Author: |
5 | * Matthias Clasen <mclasen@redhat.com> |
6 | * |
7 | * This library is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU Library General Public |
9 | * License as published by the Free Software Foundation; either |
10 | * version 2 of the License, or (at your option) any later version. |
11 | * |
12 | * This library is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | * Library General Public License for more details. |
16 | * |
17 | * You should have received a copy of the GNU Library General Public |
18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
19 | */ |
20 | |
21 | #include "config.h" |
22 | |
23 | #include <gtk/gtk.h> |
24 | |
25 | #include "gtk-reftest.h" |
26 | |
27 | static gboolean |
28 | unblock (gpointer data) |
29 | { |
30 | reftest_uninhibit_snapshot (); |
31 | return G_SOURCE_REMOVE; |
32 | } |
33 | |
34 | G_MODULE_EXPORT void |
35 | expand_expander (GtkWidget *widget) |
36 | { |
37 | reftest_inhibit_snapshot (); |
38 | gtk_expander_set_expanded (GTK_EXPANDER (widget), TRUE); |
39 | g_timeout_add (interval: 500, function: unblock, NULL); |
40 | } |
41 | |