summaryrefslogtreecommitdiff
path: root/src/nautilus-file-management-properties.c
diff options
context:
space:
mode:
authorWilliam Jon McCann <william.jon.mccann@gmail.com>2014-02-06 14:41:55 -0500
committerWilliam Jon McCann <william.jon.mccann@gmail.com>2014-02-07 09:37:55 -0500
commitd8a8ab3b66a0a4849e2f9cd17e96f86f85541dee (patch)
tree112059588a2ab5e94afdc25da928bacfbba538b8 /src/nautilus-file-management-properties.c
parent8fd499e1ec12b82a0ecd42606b9a681f63871212 (diff)
downloadnautilus-d8a8ab3b66a0a4849e2f9cd17e96f86f85541dee.tar.gz
Use header bars for dialogs
https://bugzilla.gnome.org/show_bug.cgi?id=723793
Diffstat (limited to 'src/nautilus-file-management-properties.c')
-rw-r--r--src/nautilus-file-management-properties.c79
1 files changed, 3 insertions, 76 deletions
diff --git a/src/nautilus-file-management-properties.c b/src/nautilus-file-management-properties.c
index fe5c1d8fa..f1c7f80b2 100644
--- a/src/nautilus-file-management-properties.c
+++ b/src/nautilus-file-management-properties.c
@@ -170,75 +170,6 @@ nautilus_file_management_properties_size_group_create (GtkBuilder *builder,
}
static void
-preferences_show_help (GtkWindow *parent,
- char const *helpfile,
- char const *sect_id)
-{
- GError *error = NULL;
- GtkWidget *dialog;
- char *help_string;
-
- g_assert (helpfile != NULL);
- g_assert (sect_id != NULL);
-
- help_string = g_strdup_printf ("help:%s/%s", helpfile, sect_id);
-
- gtk_show_uri (gtk_window_get_screen (parent),
- help_string, gtk_get_current_event_time (),
- &error);
- g_free (help_string);
-
- if (error) {
- dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("There was an error displaying help: \n%s"),
- error->message);
-
- g_signal_connect (G_OBJECT (dialog),
- "response", G_CALLBACK (gtk_widget_destroy),
- NULL);
- gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
- gtk_widget_show (dialog);
- g_error_free (error);
- }
-}
-
-
-static void
-nautilus_file_management_properties_dialog_response_cb (GtkDialog *parent,
- int response_id,
- GtkBuilder *builder)
-{
- char *section;
-
- if (response_id == GTK_RESPONSE_HELP) {
- switch (gtk_notebook_get_current_page (GTK_NOTEBOOK (gtk_builder_get_object (builder, "notebook1")))) {
- default:
- case 0:
- section = "nautilus-views";
- break;
- case 1:
- section = "nautilus-behavior";
- break;
- case 2:
- section = "nautilus-display";
- break;
- case 3:
- section = "nautilus-list";
- break;
- case 4:
- section = "nautilus-preview";
- break;
- }
- preferences_show_help (GTK_WINDOW (parent), "gnome-help", section);
- } else if (response_id == GTK_RESPONSE_CLOSE) {
- gtk_widget_destroy (GTK_WIDGET (parent));
- }
-}
-
-static void
columns_changed_callback (NautilusColumnChooser *chooser,
gpointer callback_data)
{
@@ -735,13 +666,9 @@ nautilus_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow
/* UI callbacks */
dialog = GTK_WIDGET (gtk_builder_get_object (builder, "file_management_dialog"));
- g_signal_connect_data (dialog, "response",
- G_CALLBACK (nautilus_file_management_properties_dialog_response_cb),
- g_object_ref (builder),
- (GClosureNotify)g_object_unref,
- 0);
- g_signal_connect (dialog, "delete-event",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (dialog, "response",
+ G_CALLBACK (gtk_widget_destroy),
+ NULL);
gtk_window_set_icon_name (GTK_WINDOW (dialog), "system-file-manager");