[gtk+/refactor] tests/testwindows.c: Use accessor functions to access GtkWidget
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/refactor] tests/testwindows.c: Use accessor functions to access GtkWidget
- Date: Sun, 15 Aug 2010 22:40:30 +0000 (UTC)
commit 53d636068ff9119f503b1adb4208b47cae6b5292
Author: Javier Jardón <jjardon gnome org>
Date: Mon Aug 16 00:31:39 2010 +0200
tests/testwindows.c: Use accessor functions to access GtkWidget
tests/testwindows.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/tests/testwindows.c b/tests/testwindows.c
index 48e2b4b..4109d7f 100644
--- a/tests/testwindows.c
+++ b/tests/testwindows.c
@@ -209,7 +209,7 @@ add_window_clicked (GtkWidget *button,
if (l != NULL)
parent = l->data;
else
- parent = darea->window;
+ parent = gtk_widget_get_window (darea);
g_list_free (l);
@@ -284,7 +284,7 @@ save_clicked (GtkWidget *button,
s = g_string_new ("");
- save_children (s, darea->window);
+ save_children (s, gtk_widget_get_window (darea));
dialog = gtk_file_chooser_dialog_new ("Filename for window data",
NULL,
@@ -362,18 +362,21 @@ parse_window (GdkWindow *parent, char **lines)
static void
load_file (GFile *file)
{
+ GdkWindow *window;
char *data;
char **lines, **l;
if (g_file_load_contents (file, NULL, &data, NULL, NULL, NULL))
{
- destroy_children (darea->window);
+ window = gtk_widget_get_window (darea);
+
+ destroy_children (window);
lines = g_strsplit (data, "\n", -1);
l = lines;
while (*l != NULL)
- l = parse_window (darea->window, l);
+ l = parse_window (window, l);
}
update_store ();
@@ -777,7 +780,7 @@ update_store (void)
gtk_tree_store_clear (window_store);
- add_children (window_store, darea->window, NULL);
+ add_children (window_store, gtk_widget_get_window (darea), NULL);
gtk_tree_view_expand_all (GTK_TREE_VIEW (treeview));
select_windows (selected);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]