[gthumb] find: optionally use the headerbar



commit 6b9df114f7e7202b8016c9e8fa494f7a5871c62a
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Jan 3 12:37:57 2016 +0100

    find: optionally use the headerbar

 extensions/search/actions.c                  |    3 +++
 extensions/search/gth-search-editor-dialog.c |   10 ++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/extensions/search/actions.c b/extensions/search/actions.c
index 0e5815a..6ffa488 100644
--- a/extensions/search/actions.c
+++ b/extensions/search/actions.c
@@ -80,6 +80,9 @@ gth_browser_activate_find (GSimpleAction *action,
        gtk_dialog_add_button (GTK_DIALOG (dialog), _GTK_LABEL_CANCEL, GTK_RESPONSE_CANCEL);
        gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Find"), GTK_RESPONSE_OK);
 
+       gtk_style_context_add_class (gtk_widget_get_style_context (gtk_dialog_get_widget_for_response 
(GTK_DIALOG (dialog), GTK_RESPONSE_OK)),
+                                    GTK_STYLE_CLASS_SUGGESTED_ACTION);
+
        g_signal_connect (dialog, "response",
                          G_CALLBACK (search_editor_dialog__response_cb),
                          browser);
diff --git a/extensions/search/gth-search-editor-dialog.c b/extensions/search/gth-search-editor-dialog.c
index cf828fa..346464e 100644
--- a/extensions/search/gth-search-editor-dialog.c
+++ b/extensions/search/gth-search-editor-dialog.c
@@ -82,7 +82,7 @@ gth_search_editor_dialog_construct (GthSearchEditorDialog *self,
        gtk_container_set_border_width (GTK_CONTAINER (self), 5);
 
        self->priv->search_editor = gth_search_editor_new (search);
-       gtk_container_set_border_width (GTK_CONTAINER (self->priv->search_editor), 5);
+       gtk_container_set_border_width (GTK_CONTAINER (self->priv->search_editor), 10);
        gtk_widget_show (self->priv->search_editor);
        gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (self))), 
self->priv->search_editor, TRUE, TRUE, 0);
 }
@@ -95,7 +95,13 @@ gth_search_editor_dialog_new (const char *title,
 {
        GthSearchEditorDialog *self;
 
-       self = g_object_new (GTH_TYPE_SEARCH_EDITOR_DIALOG, NULL);
+       self = g_object_new (GTH_TYPE_SEARCH_EDITOR_DIALOG,
+                            "title", title,
+                            "transient-for", parent,
+                            "modal", FALSE,
+                            "destroy-with-parent", FALSE,
+                            "use-header-bar", _gtk_settings_get_dialogs_use_header (),
+                            NULL);
        gth_search_editor_dialog_construct (self, title, search, parent);
 
        return (GtkWidget *) self;


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