forked from AuroraMiddleware/gtk
Make the reference to the mnemonic widget weak. (#93334, Murray Cumming)
Mon Sep 30 15:45:49 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtklabel.c (gtk_label_set_mnemonic_widget): Make the reference to the mnemonic widget weak. (#93334, Murray Cumming)
This commit is contained in:
parent
ee6acce769
commit
d1d235adcb
@ -1,3 +1,9 @@
|
|||||||
|
Mon Sep 30 15:45:49 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtklabel.c (gtk_label_set_mnemonic_widget):
|
||||||
|
Make the reference to the mnemonic widget weak.
|
||||||
|
(#93334, Murray Cumming)
|
||||||
|
|
||||||
Mon Sep 30 15:38:53 2002 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 30 15:38:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gdk/gdkwindow.h: Remove a duplicate definition
|
* gdk/gdkwindow.h: Remove a duplicate definition
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Mon Sep 30 15:45:49 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtklabel.c (gtk_label_set_mnemonic_widget):
|
||||||
|
Make the reference to the mnemonic widget weak.
|
||||||
|
(#93334, Murray Cumming)
|
||||||
|
|
||||||
Mon Sep 30 15:38:53 2002 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 30 15:38:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gdk/gdkwindow.h: Remove a duplicate definition
|
* gdk/gdkwindow.h: Remove a duplicate definition
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Mon Sep 30 15:45:49 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtklabel.c (gtk_label_set_mnemonic_widget):
|
||||||
|
Make the reference to the mnemonic widget weak.
|
||||||
|
(#93334, Murray Cumming)
|
||||||
|
|
||||||
Mon Sep 30 15:38:53 2002 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 30 15:38:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gdk/gdkwindow.h: Remove a duplicate definition
|
* gdk/gdkwindow.h: Remove a duplicate definition
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Mon Sep 30 15:45:49 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtklabel.c (gtk_label_set_mnemonic_widget):
|
||||||
|
Make the reference to the mnemonic widget weak.
|
||||||
|
(#93334, Murray Cumming)
|
||||||
|
|
||||||
Mon Sep 30 15:38:53 2002 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 30 15:38:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gdk/gdkwindow.h: Remove a duplicate definition
|
* gdk/gdkwindow.h: Remove a duplicate definition
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Mon Sep 30 15:45:49 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtklabel.c (gtk_label_set_mnemonic_widget):
|
||||||
|
Make the reference to the mnemonic widget weak.
|
||||||
|
(#93334, Murray Cumming)
|
||||||
|
|
||||||
Mon Sep 30 15:38:53 2002 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 30 15:38:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gdk/gdkwindow.h: Remove a duplicate definition
|
* gdk/gdkwindow.h: Remove a duplicate definition
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Mon Sep 30 15:45:49 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtklabel.c (gtk_label_set_mnemonic_widget):
|
||||||
|
Make the reference to the mnemonic widget weak.
|
||||||
|
(#93334, Murray Cumming)
|
||||||
|
|
||||||
Mon Sep 30 15:38:53 2002 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 30 15:38:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gdk/gdkwindow.h: Remove a duplicate definition
|
* gdk/gdkwindow.h: Remove a duplicate definition
|
||||||
|
@ -718,6 +718,15 @@ gtk_label_hierarchy_changed (GtkWidget *widget,
|
|||||||
gtk_label_setup_mnemonic (label, label->mnemonic_keyval);
|
gtk_label_setup_mnemonic (label, label->mnemonic_keyval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
label_mnemonic_widget_weak_notify (gpointer data,
|
||||||
|
GObject *where_the_object_was)
|
||||||
|
{
|
||||||
|
GtkLabel *label = data;
|
||||||
|
|
||||||
|
label->mnemonic_widget = NULL;
|
||||||
|
g_object_notify (G_OBJECT (label), "mnemonic_widget");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_label_set_mnemonic_widget:
|
* gtk_label_set_mnemonic_widget:
|
||||||
@ -747,10 +756,14 @@ gtk_label_set_mnemonic_widget (GtkLabel *label,
|
|||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||||
|
|
||||||
if (label->mnemonic_widget)
|
if (label->mnemonic_widget)
|
||||||
gtk_widget_unref (label->mnemonic_widget);
|
g_object_weak_unref (label->mnemonic_widget,
|
||||||
|
label_mnemonic_widget_weak_notify,
|
||||||
|
label);
|
||||||
label->mnemonic_widget = widget;
|
label->mnemonic_widget = widget;
|
||||||
if (label->mnemonic_widget)
|
if (label->mnemonic_widget)
|
||||||
gtk_widget_ref (label->mnemonic_widget);
|
g_object_weak_ref (label->mnemonic_widget,
|
||||||
|
label_mnemonic_widget_weak_notify,
|
||||||
|
label);
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (label), "mnemonic_widget");
|
g_object_notify (G_OBJECT (label), "mnemonic_widget");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user