[recipes] Change the error notification once more
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Change the error notification once more
- Date: Thu, 18 May 2017 23:46:23 +0000 (UTC)
commit de9418ba861d4a2d7c6bd42d5d15525c73e72cfd
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 18 19:45:05 2017 -0400
Change the error notification once more
Follow the pattern we use for in-app notifications elsewhere,
and put a text button next to the close button.
src/gr-edit-page.c | 7 +++++++
src/gr-edit-page.ui | 13 ++++++++++---
2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/src/gr-edit-page.c b/src/gr-edit-page.c
index a10e408..54b1093 100644
--- a/src/gr-edit-page.c
+++ b/src/gr-edit-page.c
@@ -151,6 +151,12 @@ static void
dismiss_error (GrEditPage *page)
{
gtk_revealer_set_reveal_child (GTK_REVEALER (page->error_revealer), FALSE);
+}
+
+static void
+focus_error (GrEditPage *page)
+{
+ dismiss_error (page);
if (page->error_field)
gtk_widget_grab_focus (page->error_field);
}
@@ -1103,6 +1109,7 @@ gr_edit_page_class_init (GrEditPageClass *klass)
gtk_widget_class_bind_template_child (widget_class, GrEditPage, cooking_view);
gtk_widget_class_bind_template_callback (widget_class, dismiss_error);
+ gtk_widget_class_bind_template_callback (widget_class, focus_error);
gtk_widget_class_bind_template_callback (widget_class, add_image_cb);
gtk_widget_class_bind_template_callback (widget_class, remove_image_cb);
gtk_widget_class_bind_template_callback (widget_class, rotate_image_left_cb);
diff --git a/src/gr-edit-page.ui b/src/gr-edit-page.ui
index 0476336..9daefd8 100644
--- a/src/gr-edit-page.ui
+++ b/src/gr-edit-page.ui
@@ -27,8 +27,7 @@
<child>
<object class="GtkBox">
<property name="visible">1</property>
- <property name="spacing">20</property>
- <property name="margin">10</property>
+ <property name="spacing">10</property>
<child>
<object class="GtkLabel" id="error_label">
<property name="visible">1</property>
@@ -40,6 +39,14 @@
<object class="GtkButton">
<property name="visible">1</property>
<property name="focus-on-click">0</property>
+ <property name="label" translatable="yes">Edit</property>
+ <signal name="clicked" handler="focus_error" swapped="yes"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton">
+ <property name="visible">1</property>
+ <property name="focus-on-click">0</property>
<property name="relief">none</property>
<signal name="clicked" handler="dismiss_error" swapped="yes"/>
<style>
@@ -48,7 +55,7 @@
<child>
<object class="GtkImage">
<property name="visible">1</property>
- <property name="icon-name">error-correct-symbolic</property>
+ <property name="icon-name">window-close-symbolic</property>
<property name="icon-size">1</property>
</object>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]