[gthumb] preset dialog: optionally use the headerbar
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] preset dialog: optionally use the headerbar
- Date: Tue, 16 Aug 2016 16:16:05 +0000 (UTC)
commit b6cf0ac03c31063946fc853623daaaaa685517b5
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Aug 15 15:21:10 2016 +0200
preset dialog: optionally use the headerbar
.../file_tools/data/ui/curve-preset-editor.ui | 3 +-
.../file_tools/gth-curve-preset-editor-dialog.c | 24 ++++++++++----------
2 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/extensions/file_tools/data/ui/curve-preset-editor.ui
b/extensions/file_tools/data/ui/curve-preset-editor.ui
index 497aefe..eb82edd 100644
--- a/extensions/file_tools/data/ui/curve-preset-editor.ui
+++ b/extensions/file_tools/data/ui/curve-preset-editor.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.10"/>
<object class="GtkListStore" id="preset_liststore">
@@ -17,6 +17,7 @@
<property name="height_request">300</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="border_width">15</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
diff --git a/extensions/file_tools/gth-curve-preset-editor-dialog.c
b/extensions/file_tools/gth-curve-preset-editor-dialog.c
index f706163..73ca413 100644
--- a/extensions/file_tools/gth-curve-preset-editor-dialog.c
+++ b/extensions/file_tools/gth-curve-preset-editor-dialog.c
@@ -206,21 +206,16 @@ gth_curve_preset_editor_dialog_construct (GthCurvePresetEditorDialog *self,
int n, i;
GtkTreeIter iter;
- gtk_window_set_title (GTK_WINDOW (self), _("Presets"));
- if (parent != NULL)
- gtk_window_set_transient_for (GTK_WINDOW (self), parent);
- gtk_window_set_resizable (GTK_WINDOW (self), TRUE);
- gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (self))), 8);
- gtk_container_set_border_width (GTK_CONTAINER (self), 5);
- button = gtk_dialog_add_button (GTK_DIALOG (self), _GTK_LABEL_CLOSE, GTK_RESPONSE_CLOSE);
- g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), self);
-
self->priv->builder = _gtk_builder_new_from_file ("curve-preset-editor.ui", "file_tools");
-
content = _gtk_builder_get_widget (self->priv->builder, "curve_preset_editor");
- gtk_container_set_border_width (GTK_CONTAINER (content), 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (self))), content, TRUE, TRUE,
0);
+ button = gtk_dialog_add_button (GTK_DIALOG (self), _GTK_LABEL_CLOSE, GTK_RESPONSE_CLOSE);
+ g_signal_connect_swapped (button,
+ "clicked",
+ G_CALLBACK (gtk_widget_destroy),
+ self);
+
g_signal_connect (gtk_builder_get_object (self->priv->builder, "preset_name_cellrenderertext"),
"edited",
G_CALLBACK (preset_name_edited_cb),
@@ -267,7 +262,12 @@ gth_curve_preset_editor_dialog_new (GtkWindow *parent,
g_return_val_if_fail (preset != NULL, NULL);
- self = g_object_new (GTH_TYPE_CURVE_PRESET_EDITOR_DIALOG, NULL);
+ self = g_object_new (GTH_TYPE_CURVE_PRESET_EDITOR_DIALOG,
+ "title", _("Presets"),
+ "transient-for", parent,
+ "resizable", TRUE,
+ "use-header-bar", _gtk_settings_get_dialogs_use_header (),
+ NULL);
gth_curve_preset_editor_dialog_construct (self, parent, preset);
return (GtkWidget *) self;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]