diff options
author | Shaun McCance <shaunm@gnome.org> | 2010-03-12 11:27:25 -0600 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2010-03-12 11:27:25 -0600 |
commit | c869dc0ffee5a410963784ffa78d6e0d1a876eba (patch) | |
tree | b053ce1f935807f970b3c467b5eea1822f8cee72 /tests | |
parent | 091177fb0da5593e9dc4582d6d98336e44f1cfc2 (diff) | |
download | yelp-c869dc0ffee5a410963784ffa78d6e0d1a876eba.tar.gz |
[libyelp/yelp-view] Adding page title/desc to view, hooks in document
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-view.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test-view.c b/tests/test-view.c index 984546c3..211144c1 100644 --- a/tests/test-view.c +++ b/tests/test-view.c @@ -49,6 +49,17 @@ state_cb (YelpView *view, printf ("STATE: %i\n", state); } +static void +title_cb (YelpView *view, + GParamSpec *spec, + GtkWindow *window) +{ + gchar *title; + g_object_get (view, "page-title", &title, NULL); + gtk_window_set_title (window, title); + g_free (title); +} + int main (int argc, char **argv) { @@ -81,6 +92,8 @@ main (int argc, char **argv) view = yelp_view_new (); g_signal_connect (view, "notify::state", G_CALLBACK (state_cb), window); + g_signal_connect (view, "notify::title", + G_CALLBACK (title_cb), window); gtk_container_add (GTK_CONTAINER (scroll), view); |