[gnome-disk-utility] Change label dialog hint
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] Change label dialog hint
- Date: Mon, 10 Apr 2017 13:41:30 +0000 (UTC)
commit 42ca8a15a4a6f90b7b99c01ac7b0eb8d62f02cdf
Author: Kai Lüke <kailueke riseup net>
Date: Sun Apr 9 17:48:54 2017 +0200
Change label dialog hint
If the label matches the existing label the dialog
does not proceed.
Now an icon indicates this reason with a tooltip.
https://bugzilla.gnome.org/show_bug.cgi?id=689360
src/disks/gdufilesystemdialog.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/disks/gdufilesystemdialog.c b/src/disks/gdufilesystemdialog.c
index 8db4705..eb8b7bd 100644
--- a/src/disks/gdufilesystemdialog.c
+++ b/src/disks/gdufilesystemdialog.c
@@ -34,6 +34,13 @@ on_change_filesystem_label_entry_changed (GtkEditable *editable,
ChangeFilesystemLabelData *data = user_data;
gboolean sensitive;
+ gtk_entry_set_icon_from_icon_name (GTK_ENTRY (editable),
+ GTK_ENTRY_ICON_SECONDARY,
+ NULL);
+ gtk_entry_set_icon_tooltip_text (GTK_ENTRY (editable),
+ GTK_ENTRY_ICON_SECONDARY,
+ NULL);
+
_gtk_entry_buffer_truncate_bytes (gtk_entry_get_buffer (GTK_ENTRY (editable)),
data->label_max_length);
@@ -42,6 +49,15 @@ on_change_filesystem_label_entry_changed (GtkEditable *editable,
{
sensitive = TRUE;
}
+ else
+ {
+ gtk_entry_set_icon_from_icon_name (GTK_ENTRY (editable),
+ GTK_ENTRY_ICON_SECONDARY,
+ "dialog-warning-symbolic");
+ gtk_entry_set_icon_tooltip_text (GTK_ENTRY (editable),
+ GTK_ENTRY_ICON_SECONDARY,
+ _("The label matches the existing label"));
+ }
gtk_dialog_set_response_sensitive (GTK_DIALOG (data->dialog),
GTK_RESPONSE_OK,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]