]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkdialog.c
Remove container implementation, which isn't thought for handling
[~andy/gtk] / gtk / gtkdialog.c
index 969026458bbbb693cf39ddf5ba7f862ee38fb772..45471fad409d8da1b286dec7669f739387bc313b 100644 (file)
@@ -77,11 +77,6 @@ static void gtk_dialog_map               (GtkWidget        *widget);
 
 static void gtk_dialog_close             (GtkDialog        *dialog);
 
-static void gtk_dialog_add               (GtkContainer     *container,
-                                         GtkWidget        *widget);
-static void gtk_dialog_remove            (GtkContainer     *container,
-                                         GtkWidget        *widget);
-
 static ResponseData* get_response_data   (GtkWidget        *widget,
                                          gboolean          create);
 static void gtk_dialog_buildable_interface_init     (GtkBuildableIface *iface);
@@ -123,18 +118,13 @@ gtk_dialog_class_init (GtkDialogClass *class)
 {
   GObjectClass *gobject_class;
   GtkWidgetClass *widget_class;
-  GtkContainerClass *container_class;
   GtkBindingSet *binding_set;
   
   gobject_class = G_OBJECT_CLASS (class);
   widget_class = GTK_WIDGET_CLASS (class);
-  container_class = GTK_CONTAINER_CLASS (class);
   
   gobject_class->set_property = gtk_dialog_set_property;
   gobject_class->get_property = gtk_dialog_get_property;
-
-  container_class->add = gtk_dialog_add;
-  container_class->remove = gtk_dialog_remove;
   
   widget_class->map = gtk_dialog_map;
   widget_class->style_set = gtk_dialog_style_set;
@@ -362,28 +352,6 @@ gtk_dialog_get_property (GObject     *object,
     }
 }
 
-static void
-gtk_dialog_add (GtkContainer *container,
-               GtkWidget    *widget)
-{
-  GtkDialog *dialog;
-
-  dialog = GTK_DIALOG (container);
-
-  gtk_box_pack_start (GTK_BOX (dialog->vbox), widget, FALSE, FALSE, 0);
-}
-
-static void
-gtk_dialog_remove (GtkContainer *container,
-                  GtkWidget    *widget)
-{
-  GtkDialog *dialog;
-
-  dialog = GTK_DIALOG (container);
-
-  gtk_container_remove (GTK_CONTAINER (dialog->vbox), widget);
-}
-
 static gint
 gtk_dialog_delete_event_handler (GtkWidget   *widget,
                                  GdkEventAny *event,
@@ -1498,57 +1466,21 @@ gtk_dialog_get_action_area (GtkDialog *dialog)
 }
 
 /**
- * gtk_dialog_pack_start:
+ * gtk_dialog_get_content_area:
  * @dialog: a #GtkDialog
- * @widget: #GtkWidget to be added to @dialog.
- * @expand: %TRUE if @widget should take all extra space.
- * @fill: %TRUE if all space given should be used by @widget
- * @padding: extra pixels to put between @widget and its neighbors
  *
- * This function similar to gtk_box_pack_start() packs @widget
- * with reference to the start of @dialog.
+ * Returns the content area of @dialog.
  *
- * Since: 2.14
- **/
-void
-gtk_dialog_pack_start (GtkDialog *dialog,
-                      GtkWidget *widget,
-                      gboolean   expand,
-                      gboolean   fill,
-                      guint      padding)
-{
-  g_return_if_fail (GTK_IS_DIALOG (dialog));
-  g_return_if_fail (GTK_IS_WIDGET (widget));
-
-  gtk_box_pack_start (GTK_BOX (dialog->vbox),
-                     widget, expand, fill, padding);
-}
-
-/**
- * gtk_dialog_pack_end:
- * @dialog: a #GtkDialog
- * @widget: #GtkWidget to be added to @dialog.
- * @expand: %TRUE if @widget should take all extra space.
- * @fill: %TRUE if all space given should be used by @widget
- * @padding: extra pixels to put between @widget and its neighbors
- *
- * This function similar to gtk_box_pack_end() packs @widget
- * with reference to the end of @dialog.
+ * Returns: the content area #GtkVBox.
  *
  * Since: 2.14
  **/
-void
-gtk_dialog_pack_end (GtkDialog *dialog,
-                    GtkWidget *widget,
-                    gboolean   expand,
-                    gboolean   fill,
-                    guint      padding)
+GtkWidget *
+gtk_dialog_get_content_area (GtkDialog *dialog)
 {
-  g_return_if_fail (GTK_IS_DIALOG (dialog));
-  g_return_if_fail (GTK_IS_WIDGET (widget));
+  g_return_val_if_fail (GTK_IS_DIALOG (dialog), NULL);
 
-  gtk_box_pack_end (GTK_BOX (dialog->vbox),
-                   widget, expand, fill, padding);
+  return dialog->vbox;
 }
 
 #define __GTK_DIALOG_C__