[gnome-calendar/wip/cdavis/use-entry-row] event-editor: Use AdwEntryRow




commit d1448b11e16a408bf4d3435dbe199ee762a8cb3b
Author: Christopher Davis <christopherdavis gnome org>
Date:   Thu Jul 7 12:12:57 2022 -0400

    event-editor: Use AdwEntryRow

 src/gui/event-editor/gcal-summary-section.c  | 24 ----------------------
 src/gui/event-editor/gcal-summary-section.ui | 30 ++++++++--------------------
 2 files changed, 8 insertions(+), 46 deletions(-)
---
diff --git a/src/gui/event-editor/gcal-summary-section.c b/src/gui/event-editor/gcal-summary-section.c
index 220669ea..401a8c9b 100644
--- a/src/gui/event-editor/gcal-summary-section.c
+++ b/src/gui/event-editor/gcal-summary-section.c
@@ -51,27 +51,6 @@ enum
   N_PROPS
 };
 
-/*
- * Auxiliary methods
- */
-
-static void
-make_entry_expandable (GtkEditable *entry)
-{
-  GtkWidget *child;
-
-  for (child = gtk_widget_get_first_child (GTK_WIDGET (entry));
-       child;
-       child = gtk_widget_get_next_sibling (child))
-    {
-      if (!GTK_IS_TEXT (child))
-        continue;
-
-      gtk_text_set_propagate_text_width (GTK_TEXT (child), TRUE);
-    }
-}
-
-
 /*
  * GcalEventEditorSection interface
  */
@@ -204,7 +183,4 @@ static void
 gcal_summary_section_init (GcalSummarySection *self)
 {
   gtk_widget_init_template (GTK_WIDGET (self));
-
-  make_entry_expandable (self->location_entry);
-  make_entry_expandable (self->summary_entry);
 }
diff --git a/src/gui/event-editor/gcal-summary-section.ui b/src/gui/event-editor/gcal-summary-section.ui
index 33d7b2bf..b427567d 100644
--- a/src/gui/event-editor/gcal-summary-section.ui
+++ b/src/gui/event-editor/gcal-summary-section.ui
@@ -12,37 +12,23 @@
 
         <!-- Summary -->
         <child>
-          <object class="AdwActionRow">
+          <object class="AdwEntryRow" id="summary_entry">
             <property name="title" translatable="yes">Title</property>
-            <property name="activatable-widget">summary_entry</property>
-
-            <child>
-              <object class="GtkEntry" id="summary_entry">
-                <property name="hexpand">True</property>
-                <property name="halign">end</property>
-                <property name="valign">center</property>
-                <property name="width-chars">20</property>
-                <property name="max-width-chars">30</property>
-              </object>
-            </child>
-
           </object>
         </child>
 
         <!-- Location -->
         <child>
-          <object class="AdwActionRow">
+          <object class="AdwEntryRow" id="location_entry">
             <property name="title" translatable="yes">Location</property>
-            <property name="activatable-widget">location_entry</property>
 
-            <child>
-              <object class="GtkEntry" id="location_entry">
-                <property name="hexpand">True</property>
-                <property name="halign">end</property>
+            <child type="suffix">
+              <object class="GtkButton">
                 <property name="valign">center</property>
-                <property name="width-chars">20</property>
-                <property name="max-width-chars">30</property>
-                <property name="secondary_icon_name">find-location-symbolic</property>
+                <property name="icon-name">find-location-symbolic</property>
+                <style>
+                  <class name="flat"/>
+                </style>
               </object>
             </child>
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]