[gtk+/wip/baedert/box: 38/65] messagedialog: Remove deprecated API



commit d288200c1af0dfd3a73741c8d7949729adc1c418
Author: Timm Bäder <mail baedert org>
Date:   Fri Oct 14 21:14:18 2016 +0200

    messagedialog: Remove deprecated API

 docs/reference/gtk/gtk4-sections.txt |    2 -
 gtk/gtkmessagedialog.c               |   86 ----------------------------------
 gtk/gtkmessagedialog.h               |    7 ---
 tests/testdialog.c                   |    4 --
 4 files changed, 0 insertions(+), 99 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index d79d1a3..e87992e 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -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
diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c
index f55479b..39af8f0 100644
--- a/gtk/gtkmessagedialog.c
+++ b/gtk/gtkmessagedialog.c
@@ -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;
@@ -251,22 +250,6 @@ gtk_message_dialog_class_init (GtkMessageDialogClass *class)
                                                         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:
    *
    * The #GtkBox that corresponds to the message area of this dialog.  See
@@ -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;
@@ -700,67 +675,6 @@ gtk_message_dialog_new_with_markup (GtkWindow     *parent,
 }
 
 /**
- * gtk_message_dialog_set_image:
- * @dialog: a #GtkMessageDialog
- * @image: the image
- * 
- * Sets the dialog’s 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 dialog’s image.
- *
- * Returns: (transfer none): the dialog’s 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
  * @str: markup string (see [Pango markup format][PangoMarkupFormat])
diff --git a/gtk/gtkmessagedialog.h b/gtk/gtkmessagedialog.h
index d06f374..7fa0d86 100644
--- a/gtk/gtkmessagedialog.h
+++ b/gtk/gtkmessagedialog.h
@@ -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);
diff --git a/tests/testdialog.c b/tests/testdialog.c
index df36f0f..0b90b69 100644
--- a/tests/testdialog.c
+++ b/tests/testdialog.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]