[nautilus/wip/alexpandelea/batchRename: 8/17] Simplify setting use-header-bar property
- From: Alexandru-Ionut Pandelea <alexpandelea src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/alexpandelea/batchRename: 8/17] Simplify setting use-header-bar property
- Date: Tue, 5 Jul 2016 16:49:10 +0000 (UTC)
commit fb95c78c8ef445114dff6555948f982dd821e4e9
Author: Alexandru Pandelea <alexandru pandelea gmail com>
Date: Sat Jun 18 19:01:27 2016 +0300
Simplify setting use-header-bar property
Don't override the constructor, since this can be done easier, by
setting the property in g_object_new
https://bugzilla.gnome.org/show_bug.cgi?id=768311
src/nautilus-batch-rename.c | 21 +--------------------
1 files changed, 1 insertions(+), 20 deletions(-)
---
diff --git a/src/nautilus-batch-rename.c b/src/nautilus-batch-rename.c
index c8289ce..815db75 100644
--- a/src/nautilus-batch-rename.c
+++ b/src/nautilus-batch-rename.c
@@ -420,30 +420,11 @@ file_names_widget_on_activate (NautilusBatchRename *dialog)
g_list_free (new_names);
}
-static GObject*
-nautilus_batch_rename_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_params)
-{
- GObject *object;
-
- object = (* G_OBJECT_CLASS (nautilus_batch_rename_parent_class)->constructor) (type,
-
n_construct_properties,
- construct_params);
-
- g_object_set (object,"use-header-bar",1, NULL);
-
- return object;
-}
-
static void
nautilus_batch_rename_class_init (NautilusBatchRenameClass *klass)
{
GtkDialogClass *dialog_class = GTK_DIALOG_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- GObjectClass *oclass = G_OBJECT_CLASS (klass);
-
- oclass->constructor = nautilus_batch_rename_constructor;
dialog_class->close = batch_rename_dialog_on_closed;
@@ -478,7 +459,7 @@ nautilus_batch_rename_new (NautilusFilesView *view)
{
NautilusBatchRename *dialog;
- dialog = g_object_new (NAUTILUS_TYPE_BATCH_RENAME, NULL);
+ dialog = g_object_new (NAUTILUS_TYPE_BATCH_RENAME,"use-header-bar",1, NULL);
dialog->selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
dialog->view = view;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]