[nautilus] Focus and sensitivity fixes.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Focus and sensitivity fixes.
- Date: Mon, 26 Apr 2010 14:55:16 +0000 (UTC)
commit d63623cee6ac5cbbb74f6f31a7afa660d2037cbe
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Apr 9 11:27:23 2010 +0200
Focus and sensitivity fixes.
.../nautilus-file-conflict-dialog.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-conflict-dialog.c b/libnautilus-private/nautilus-file-conflict-dialog.c
index 67751e3..a245e0f 100644
--- a/libnautilus-private/nautilus-file-conflict-dialog.c
+++ b/libnautilus-private/nautilus-file-conflict-dialog.c
@@ -335,9 +335,19 @@ entry_text_changed_cb (GtkEditable *entry,
g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (entry)), details->conflict_name) != 0) {
gtk_widget_hide (details->replace_button);
gtk_widget_show (details->rename_button);
+
+ gtk_widget_set_sensitive (details->checkbox, FALSE);
+
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog),
+ CONFLICT_RESPONSE_RENAME);
} else {
gtk_widget_hide (details->rename_button);
gtk_widget_show (details->replace_button);
+
+ gtk_widget_set_sensitive (details->checkbox, TRUE);
+
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog),
+ CONFLICT_RESPONSE_REPLACE);
}
}
@@ -351,10 +361,10 @@ expander_activated_cb (GtkExpander *w,
details = dialog->details;
if (!gtk_expander_get_expanded (w)) {
- gtk_widget_grab_focus (details->entry);
-
if (g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (details->entry)),
details->conflict_name) == 0) {
+ gtk_widget_grab_focus (details->entry);
+
eel_filename_get_rename_region (details->conflict_name,
&start_pos, &end_pos);
gtk_editable_select_region (GTK_EDITABLE (details->entry),
@@ -506,6 +516,7 @@ nautilus_file_conflict_dialog_init (NautilusFileConflictDialog *fcd)
gtk_dialog_add_button (dialog,
_("Replace"),
CONFLICT_RESPONSE_REPLACE);
+ gtk_widget_grab_focus (details->replace_button);
/* Setup HIG properties */
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]