summaryrefslogtreecommitdiff
path: root/libxfce4ui/xfce-titled-dialog.c
diff options
context:
space:
mode:
authorSimon Steinbeiss <simon.steinbeiss@elfenbeinturm.at>2020-01-04 23:18:31 +0100
committerSimon Steinbeiss <simon.steinbeiss@elfenbeinturm.at>2020-01-09 23:31:37 +0100
commit807f74118b50d1c16d01ac07f8d78b6dd71174fe (patch)
tree95949c487aa6e2eadd98b086693194db57b78ff0 /libxfce4ui/xfce-titled-dialog.c
parent2ddcb99dbe15110a5285d0ceba1b4d8919fd7c41 (diff)
downloadlibxfce4ui-807f74118b50d1c16d01ac07f8d78b6dd71174fe.tar.gz
XfceTitledDialog: Keep buttons in the action area
Previously XfceTitledDialog would end up having its buttons moved to the headerbar by the constructed function of GtkDialog. By blocking this function we ensure that we have 1) a headerbar and 2) an action area. This is only desirable for XfceTitledDialog, which is a special kind of dialog (settings dialog). This commit fixes the behavior above when using the class directly.
Diffstat (limited to 'libxfce4ui/xfce-titled-dialog.c')
-rw-r--r--libxfce4ui/xfce-titled-dialog.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libxfce4ui/xfce-titled-dialog.c b/libxfce4ui/xfce-titled-dialog.c
index adf81a2..f88a7e5 100644
--- a/libxfce4ui/xfce-titled-dialog.c
+++ b/libxfce4ui/xfce-titled-dialog.c
@@ -59,6 +59,7 @@ enum
static GObject *xfce_titled_dialog_constructor (GType type,
guint n_construct_params,
GObjectConstructParam *construct_params);
+static void xfce_titled_dialog_constructed (GObject *object);
static void xfce_titled_dialog_finalize (GObject *object);
static void xfce_titled_dialog_get_property (GObject *object,
guint prop_id,
@@ -105,6 +106,7 @@ xfce_titled_dialog_class_init (XfceTitledDialogClass *klass)
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->constructor = xfce_titled_dialog_constructor;
+ gobject_class->constructed = xfce_titled_dialog_constructed;
gobject_class->get_property = xfce_titled_dialog_get_property;
gobject_class->set_property = xfce_titled_dialog_set_property;
gobject_class->finalize = xfce_titled_dialog_finalize;
@@ -151,6 +153,17 @@ xfce_titled_dialog_constructor (GType type,
+/*
+ * Block GtkDialog's constructed function which only repacks all items
+ * from the dialog's action area to its headerbar if use-header-bar is TRUE.
+ */
+static void
+xfce_titled_dialog_constructed (GObject *object)
+{
+}
+
+
+
static void
xfce_titled_dialog_init (XfceTitledDialog *titled_dialog)
{