messagedialog: Remove deprecated API

This commit is contained in:
Timm Bäder 2016-10-14 21:14:18 +02:00 committed by Benjamin Otte
parent be2f19663b
commit 1b2f291c1d
4 changed files with 0 additions and 99 deletions

View File

@ -2231,8 +2231,6 @@ GtkButtonsType
gtk_message_dialog_new
gtk_message_dialog_new_with_markup
gtk_message_dialog_set_markup
gtk_message_dialog_set_image
gtk_message_dialog_get_image
gtk_message_dialog_format_secondary_text
gtk_message_dialog_format_secondary_markup
gtk_message_dialog_get_message_area

View File

@ -100,7 +100,6 @@
struct _GtkMessageDialogPrivate
{
GtkWidget *image;
GtkWidget *label;
GtkWidget *message_area; /* vbox for the primary and secondary labels, and any extra content from the caller */
GtkWidget *secondary_label;
@ -250,22 +249,6 @@ gtk_message_dialog_class_init (GtkMessageDialogClass *class)
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkMessageDialog:image:
*
* The image for this dialog.
*
* Since: 2.10
* Deprecated: 3.12: Use #GtkDialog to create dialogs with images
*/
g_object_class_install_property (gobject_class,
PROP_IMAGE,
g_param_spec_object ("image",
P_("Image"),
P_("The image"),
GTK_TYPE_WIDGET,
GTK_PARAM_READWRITE|G_PARAM_DEPRECATED));
/**
* GtkMessageDialog:message-area:
*
@ -511,11 +494,6 @@ gtk_message_dialog_set_property (GObject *object,
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_IMAGE:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_message_dialog_set_image (dialog, g_value_get_object (value));
G_GNUC_END_IGNORE_DEPRECATIONS
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@ -557,9 +535,6 @@ gtk_message_dialog_get_property (GObject *object,
else
g_value_set_boolean (value, FALSE);
break;
case PROP_IMAGE:
g_value_set_object (value, priv->image);
break;
case PROP_MESSAGE_AREA:
g_value_set_object (value, priv->message_area);
break;
@ -699,67 +674,6 @@ gtk_message_dialog_new_with_markup (GtkWindow *parent,
return widget;
}
/**
* gtk_message_dialog_set_image:
* @dialog: a #GtkMessageDialog
* @image: the image
*
* Sets the dialogs image to @image.
*
* Since: 2.10
* Deprecated: 3.12: Use #GtkDialog to create dialogs with images
**/
void
gtk_message_dialog_set_image (GtkMessageDialog *dialog,
GtkWidget *image)
{
GtkMessageDialogPrivate *priv;
GtkWidget *parent;
g_return_if_fail (GTK_IS_MESSAGE_DIALOG (dialog));
g_return_if_fail (image == NULL || GTK_IS_WIDGET (image));
priv = dialog->priv;
if (priv->image)
gtk_widget_destroy (priv->image);
priv->image = image;
if (priv->image)
{
gtk_widget_set_halign (priv->image, GTK_ALIGN_CENTER);
gtk_widget_set_valign (priv->image, GTK_ALIGN_START);
parent = gtk_widget_get_parent (priv->message_area);
gtk_container_add (GTK_CONTAINER (parent), priv->image);
gtk_box_reorder_child (GTK_BOX (parent), priv->image, 0);
}
priv->message_type = GTK_MESSAGE_OTHER;
g_object_notify (G_OBJECT (dialog), "image");
g_object_notify (G_OBJECT (dialog), "message-type");
}
/**
* gtk_message_dialog_get_image:
* @dialog: a #GtkMessageDialog
*
* Gets the dialogs image.
*
* Returns: (transfer none): the dialogs image
*
* Since: 2.14
* Deprecated: 3.12: Use #GtkDialog for dialogs with images
**/
GtkWidget *
gtk_message_dialog_get_image (GtkMessageDialog *dialog)
{
g_return_val_if_fail (GTK_IS_MESSAGE_DIALOG (dialog), NULL);
return dialog->priv->image;
}
/**
* gtk_message_dialog_set_markup:
* @message_dialog: a #GtkMessageDialog

View File

@ -111,13 +111,6 @@ GtkWidget* gtk_message_dialog_new_with_markup (GtkWindow *parent,
const gchar *message_format,
...) G_GNUC_PRINTF (5, 6);
GDK_DEPRECATED_IN_3_12
void gtk_message_dialog_set_image (GtkMessageDialog *dialog,
GtkWidget *image);
GDK_DEPRECATED_IN_3_12
GtkWidget * gtk_message_dialog_get_image (GtkMessageDialog *dialog);
GDK_AVAILABLE_IN_ALL
void gtk_message_dialog_set_markup (GtkMessageDialog *message_dialog,
const gchar *str);

View File

@ -35,10 +35,6 @@ show_message_dialog1a (GtkWindow *parent)
image = gtk_image_new_from_icon_name ("computer-fail", GTK_ICON_SIZE_DIALOG);
gtk_widget_show (image);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_message_dialog_set_image (GTK_MESSAGE_DIALOG (dialog), image);
G_GNUC_END_IGNORE_DEPRECATIONS;
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);