summaryrefslogtreecommitdiff
path: root/src/file-manager
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-03-17 00:20:14 +0100
committerPablo Barciela <[email protected]>2018-03-17 00:35:43 +0100
commit4fb359018441a9a80984a7a94be1a939efc51bde (patch)
treeaf0a1a561522282f1f50e1d593a9eb5d19e616d1 /src/file-manager
parente0c69f80861b85a1e34541875858bfbd9bdea240 (diff)
downloadcaja-4fb359018441a9a80984a7a94be1a939efc51bde.tar.bz2
caja-4fb359018441a9a80984a7a94be1a939efc51bde.tar.xz
avoid gtk_dialog_new_with_buttons with stock ids
Diffstat (limited to 'src/file-manager')
-rw-r--r--src/file-manager/fm-directory-view.c62
-rw-r--r--src/file-manager/fm-list-view.c16
2 files changed, 52 insertions, 26 deletions
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index a561609d..90697145 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -1194,16 +1194,26 @@ select_pattern (FMDirectoryView *view)
GtkWidget *entry;
char *example_pattern;
- dialog = gtk_dialog_new_with_buttons (_("Select Items Matching"),
- fm_directory_view_get_containing_window (view),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- "gtk-help",
- GTK_RESPONSE_HELP,
- "gtk-cancel",
- GTK_RESPONSE_CANCEL,
- "gtk-ok",
- GTK_RESPONSE_OK,
- NULL);
+ dialog = gtk_dialog_new ();
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Select Items Matching"));
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), fm_directory_view_get_containing_window (view));
+ gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
+
+ eel_dialog_add_button (GTK_DIALOG (dialog),
+ _("_Help"),
+ "help-browser",
+ GTK_RESPONSE_HELP);
+
+ eel_dialog_add_button (GTK_DIALOG (dialog),
+ _("_Cancel"),
+ "process-stop",
+ GTK_RESPONSE_CANCEL);
+
+ eel_dialog_add_button (GTK_DIALOG (dialog),
+ _("_OK"),
+ "gtk-ok",
+ GTK_RESPONSE_OK);
+
gtk_dialog_set_default_response (GTK_DIALOG (dialog),
GTK_RESPONSE_OK);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
@@ -1332,11 +1342,14 @@ action_save_search_as_callback (GtkAction *action,
CAJA_IS_SEARCH_DIRECTORY (directory_view->details->model)) {
search = CAJA_SEARCH_DIRECTORY (directory_view->details->model);
- dialog = gtk_dialog_new_with_buttons (_("Save Search as"),
- fm_directory_view_get_containing_window (directory_view),
- 0,
- "gtk-cancel", GTK_RESPONSE_CANCEL,
- NULL);
+ dialog = gtk_dialog_new ();
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Save Search as"));
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), fm_directory_view_get_containing_window (directory_view));
+
+ eel_dialog_add_button (GTK_DIALOG (dialog),
+ _("_Cancel"),
+ "process-stop",
+ GTK_RESPONSE_CANCEL);
save_button = eel_dialog_add_button (GTK_DIALOG (dialog), _("_Save"),
"document-save", GTK_RESPONSE_OK);
@@ -6984,12 +6997,19 @@ action_connect_to_server_link_callback (GtkAction *action,
if (uri != NULL) {
title = g_strdup_printf (_("Connect to Server %s"), name);
- dialog = gtk_dialog_new_with_buttons (title,
- fm_directory_view_get_containing_window (view),
- 0,
- "gtk-cancel", GTK_RESPONSE_CANCEL,
- _("_Connect"), GTK_RESPONSE_OK,
- NULL);
+
+ dialog = gtk_dialog_new ();
+ gtk_window_set_title (GTK_WINDOW (dialog), title);
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), fm_directory_view_get_containing_window (view));
+
+ eel_dialog_add_button (GTK_DIALOG (dialog),
+ _("_Cancel"),
+ "process-stop",
+ GTK_RESPONSE_CANCEL);
+
+ gtk_dialog_add_button (GTK_DIALOG (dialog),
+ _("_Connect"),
+ GTK_RESPONSE_OK);
g_object_set_data_full (G_OBJECT (dialog), "link-uri", g_strdup (uri), g_free);
g_object_set_data_full (G_OBJECT (dialog), "link-icon", g_strdup (icon_name), g_free);
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index 48d783e5..d2353e7a 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -36,6 +36,7 @@
#include <eel/eel-gdk-extensions.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-gtk-macros.h>
+#include <eel/eel-stock-dialogs.h>
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
@@ -2531,11 +2532,16 @@ create_column_editor (FMListView *view)
str = g_strdup_printf (_("%s Visible Columns"), name);
g_free (name);
- window = gtk_dialog_new_with_buttons (str,
- GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- "gtk-close", GTK_RESPONSE_CLOSE,
- NULL);
+ window = gtk_dialog_new ();
+ gtk_window_set_title (GTK_WINDOW (window), str);
+ gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))));
+ gtk_window_set_destroy_with_parent (GTK_WINDOW (window), TRUE);
+
+ eel_dialog_add_button (GTK_DIALOG (window),
+ _("_Close"),
+ "window-close",
+ GTK_RESPONSE_CLOSE);
+
g_free (str);
g_signal_connect (window, "response",
G_CALLBACK (column_editor_response_callback), NULL);