diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-01 13:42:43 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-01 13:42:43 +0800 |
commit | 7565c39bfa0f118fb513c0af86a5ba0ef7976277 (patch) | |
tree | 2ef5089b3ead7f04af0dfeca1f4f5b810425b435 /libempathy-gtk | |
parent | 3b86a347cd3e859c427b7e596d949d6ce0094840 (diff) | |
download | gsoc2013-empathy-7565c39bfa0f118fb513c0af86a5ba0ef7976277.tar gsoc2013-empathy-7565c39bfa0f118fb513c0af86a5ba0ef7976277.tar.gz gsoc2013-empathy-7565c39bfa0f118fb513c0af86a5ba0ef7976277.tar.bz2 gsoc2013-empathy-7565c39bfa0f118fb513c0af86a5ba0ef7976277.tar.lz gsoc2013-empathy-7565c39bfa0f118fb513c0af86a5ba0ef7976277.tar.xz gsoc2013-empathy-7565c39bfa0f118fb513c0af86a5ba0ef7976277.tar.zst gsoc2013-empathy-7565c39bfa0f118fb513c0af86a5ba0ef7976277.zip |
Add expander toggles
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-log-window.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c index 9459ce26b..ef6450f36 100644 --- a/libempathy-gtk/empathy-log-window.c +++ b/libempathy-gtk/empathy-log-window.c @@ -430,6 +430,27 @@ store_events_row_deleted (GtkTreeModel *model, } static void +store_events_has_child_rows (GtkTreeModel *model, + GtkTreePath *path, + GtkTreeIter *iter, + EmpathyLogWindow *self) +{ + char *str = gtk_tree_path_to_string (path); + char *script; + + script = g_strdup_printf ("javascript:hasChildRows([%s], %u);", + g_strdelimit (str, ":", ','), + gtk_tree_model_iter_has_child (model, iter)); + + // g_print ("%s\n", script); + webkit_web_view_execute_script (WEBKIT_WEB_VIEW (self->priv->webview), + script); + + g_free (str); + g_free (script); +} + +static void store_events_rows_reordered (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, @@ -695,6 +716,8 @@ empathy_log_window_init (EmpathyLogWindow *self) G_CALLBACK (store_events_row_deleted), self); g_signal_connect (self->priv->store_events, "rows-reordered", G_CALLBACK (store_events_rows_reordered), self); + g_signal_connect (self->priv->store_events, "row-has-child-toggled", + G_CALLBACK (store_events_has_child_rows), self); // debug gtk_notebook_set_show_tabs (GTK_NOTEBOOK (self->priv->notebook), TRUE); |