aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-21 19:20:02 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-12 19:22:41 +0800
commit183fa2e8a94d94a7098120fc43cde9ad83869de6 (patch)
tree2175dab6ad485f72fac95f9a6da85c876b6a18ac /src
parent7e1c5b16b61c68e536c005b5286fbe9823db5d2f (diff)
downloadgsoc2013-empathy-183fa2e8a94d94a7098120fc43cde9ad83869de6.tar
gsoc2013-empathy-183fa2e8a94d94a7098120fc43cde9ad83869de6.tar.gz
gsoc2013-empathy-183fa2e8a94d94a7098120fc43cde9ad83869de6.tar.bz2
gsoc2013-empathy-183fa2e8a94d94a7098120fc43cde9ad83869de6.tar.lz
gsoc2013-empathy-183fa2e8a94d94a7098120fc43cde9ad83869de6.tar.xz
gsoc2013-empathy-183fa2e8a94d94a7098120fc43cde9ad83869de6.tar.zst
gsoc2013-empathy-183fa2e8a94d94a7098120fc43cde9ad83869de6.zip
chat_window_create_label: ref the widgets stored as data so we are sure they stay alive when doing DnD
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 5ad66fd26..8cdc58f79 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -252,9 +252,9 @@ chat_window_create_label (EmpathyChatWindow *window,
gtk_misc_set_padding (GTK_MISC (name_label), 2, 0);
gtk_misc_set_alignment (GTK_MISC (name_label), 0.0, 0.5);
- g_object_set_data (G_OBJECT (chat),
+ g_object_set_data_full (G_OBJECT (chat),
is_tab_label ? "chat-window-tab-label" : "chat-window-menu-label",
- name_label);
+ g_object_ref (name_label), g_object_unref);
status_image = gtk_image_new ();
@@ -264,12 +264,12 @@ chat_window_create_label (EmpathyChatWindow *window,
gtk_box_pack_start (GTK_BOX (event_box_hbox), status_image, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (event_box_hbox), name_label, TRUE, TRUE, 0);
- g_object_set_data (G_OBJECT (chat),
+ g_object_set_data_full (G_OBJECT (chat),
is_tab_label ? "chat-window-tab-image" : "chat-window-menu-image",
- status_image);
- g_object_set_data (G_OBJECT (chat),
+ g_object_ref (status_image), g_object_unref);
+ g_object_set_data_full (G_OBJECT (chat),
is_tab_label ? "chat-window-tab-tooltip-widget" : "chat-window-menu-tooltip-widget",
- event_box);
+ g_object_ref (event_box), g_object_unref);
gtk_container_add (GTK_CONTAINER (event_box), event_box_hbox);
gtk_box_pack_start (GTK_BOX (hbox), event_box, TRUE, TRUE, 0);
@@ -277,7 +277,8 @@ chat_window_create_label (EmpathyChatWindow *window,
if (is_tab_label) {
close_button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (close_button), GTK_RELIEF_NONE);
- g_object_set_data (G_OBJECT (chat), "chat-window-tab-close-button", close_button);
+ g_object_set_data_full (G_OBJECT (chat), "chat-window-tab-close-button",
+ g_object_ref (close_button), g_object_unref);
/* We don't want focus/keynav for the button to avoid clutter, and
* Ctrl-W works anyway.