Also intern static strings passed to g_object_set_data()
This commit is contained in:
@ -1139,7 +1139,8 @@ gtk_about_dialog_set_website (GtkAboutDialog *about,
|
||||
if (activate_url_hook != NULL)
|
||||
{
|
||||
g_object_set_data_full (G_OBJECT (priv->website_button),
|
||||
"url", g_strdup (website), g_free);
|
||||
g_intern_static_string ("url"),
|
||||
g_strdup (website), g_free);
|
||||
if (priv->website_label == NULL)
|
||||
gtk_about_dialog_set_website_label (about, website);
|
||||
}
|
||||
@ -1156,7 +1157,8 @@ gtk_about_dialog_set_website (GtkAboutDialog *about,
|
||||
else
|
||||
{
|
||||
priv->website = NULL;
|
||||
g_object_set_data (G_OBJECT (priv->website_button), "url", NULL);
|
||||
g_object_set_data (G_OBJECT (priv->website_button),
|
||||
g_intern_static_string ("url"), NULL);
|
||||
gtk_widget_hide (priv->website_button);
|
||||
}
|
||||
g_free (tmp);
|
||||
@ -1693,7 +1695,9 @@ create_link_button (GtkWidget *about,
|
||||
GTK_WIDGET_UNSET_FLAGS (button, GTK_RECEIVES_DEFAULT);
|
||||
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (button), "url", g_strdup (url), g_free);
|
||||
g_object_set_data_full (G_OBJECT (button),
|
||||
g_intern_static_string ("url"),
|
||||
g_strdup (url), g_free);
|
||||
set_link_button_text (about, button, text);
|
||||
|
||||
g_signal_connect (button, "clicked", callback, data);
|
||||
@ -1987,10 +1991,10 @@ add_credits_page (GtkAboutDialog *about,
|
||||
{
|
||||
q1++;
|
||||
q0++;
|
||||
link_type = "email";
|
||||
link_type = g_intern_static_string ("email");
|
||||
}
|
||||
else
|
||||
link_type = "url";
|
||||
link_type = g_intern_static_string ("url");
|
||||
|
||||
link = g_strndup (q1, q2 - q1);
|
||||
tag = gtk_text_buffer_create_tag (buffer, NULL,
|
||||
@ -2292,7 +2296,8 @@ gtk_show_about_dialog (GtkWindow *parent,
|
||||
{
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
|
||||
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
|
||||
g_object_set_data_full (G_OBJECT (parent), "gtk-about-dialog",
|
||||
g_object_set_data_full (G_OBJECT (parent),
|
||||
g_intern_static_string ("gtk-about-dialog"),
|
||||
dialog, g_object_unref);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user