summaryrefslogtreecommitdiff
path: root/src/file-manager/fm-directory-view.c
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/fm-directory-view.c
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/fm-directory-view.c')
-rw-r--r--src/file-manager/fm-directory-view.c62
1 files changed, 41 insertions, 21 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);