# HG changeset patch
# Node ID ad0a00690ce5
# Parent  71e6d642fcf2
diff --git a/talkatu/data/linkdialog.ui b/talkatu/data/linkdialog.ui
--- a/talkatu/data/linkdialog.ui
+++ b/talkatu/data/linkdialog.ui
@@ -19,180 +19,79 @@
 
 -->
 <interface>
-  <requires lib="gtk+" version="3.10"/>
+  <requires lib="gtk" version="4.0"/>
   <!-- interface-license-type gplv2 -->
   <!-- interface-name Talkatu -->
   <!-- interface-description GTK widgets for chat applications -->
   <!-- interface-copyright Gary Kramlich <grim@reaperworld.com> -->
   <template class="TalkatuLinkDialog" parent="GtkDialog">
-    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Insert Link</property>
-    <property name="resizable">False</property>
+    <property name="resizable">0</property>
     <property name="type_hint">dialog</property>
     <child>
       <placeholder/>
     </child>
-    <child internal-child="vbox">
+    <child internal-child="content_area">
       <object class="GtkBox">
-        <property name="can_focus">False</property>
+        <property name="visible">0</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox">
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label" translatable="yes">Cancel</property>
-                <property name="name">cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="insert">
-                <property name="label" translatable="yes">Insert</property>
-                <property name="name">insert</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
         <child>
           <object class="GtkBox">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="orientation">vertical</property>
             <property name="spacing">4</property>
             <child>
               <object class="GtkLabel">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">&lt;span font-size="large" font-weight="bold"&gt;Insert Link&lt;/span&gt;</property>
-                <property name="use_markup">True</property>
+                <property name="label" translatable="yes">&lt;span font-size=&quot;large&quot; font-weight=&quot;bold&quot;&gt;Insert Link&lt;/span&gt;</property>
+                <property name="use_markup">1</property>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
             </child>
             <child>
               <object class="GtkLabel">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Please enter the URL and optional display text you would like to insert.</property>
-                <property name="wrap">True</property>
+                <property name="wrap">1</property>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkBox">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <property name="spacing">2</property>
                 <child>
                   <object class="GtkLabel" id="url_label">
                     <property name="name">url_label</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">URL:</property>
                     <property name="xalign">0</property>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
                 <child>
                   <object class="GtkEntry" id="url">
+                    <property name="hexpand">1</property>
                     <property name="name">url</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
+                    <property name="focusable">1</property>
                     <property name="input_purpose">url</property>
                   </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
                 </child>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
             </child>
             <child>
               <object class="GtkBox">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
                 <property name="spacing">2</property>
                 <child>
                   <object class="GtkLabel" id="display_label">
                     <property name="name">display_label</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Display Text:</property>
                     <property name="xalign">0</property>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
                 <child>
                   <object class="GtkEntry" id="display">
+                    <property name="hexpand">1</property>
                     <property name="name">display</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
+                    <property name="focusable">1</property>
                   </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
                 </child>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">3</property>
-              </packing>
             </child>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
         </child>
       </object>
     </child>
@@ -200,6 +99,41 @@
       <action-widget response="-6">cancel</action-widget>
       <action-widget response="-3">insert</action-widget>
     </action-widgets>
+    <child internal-child="action_area">
+      <object class="GtkButtonBox">
+        <property name="valign">center</property>
+        <property name="can_focus">False</property>
+        <property name="layout_style">end</property>
+        <child>
+          <object class="GtkButton" id="cancel">
+            <property name="label" translatable="yes">Cancel</property>
+            <property name="name">cancel</property>
+            <property name="focusable">1</property>
+            <property name="receives_default">1</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="insert">
+            <property name="label" translatable="yes">Insert</property>
+            <property name="name">insert</property>
+            <property name="focusable">1</property>
+            <property name="can_default">True</property>
+            <property name="has_default">1</property>
+            <property name="receives_default">1</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
   </template>
   <object class="GtkSizeGroup">
     <widgets>
diff --git a/talkatu/talkatulinkdialog.c b/talkatu/talkatulinkdialog.c
--- a/talkatu/talkatulinkdialog.c
+++ b/talkatu/talkatulinkdialog.c
@@ -90,7 +90,7 @@
 	if(GTK_IS_ENTRY(dialog->url)) {
 		gchar *raw = NULL, *ret = NULL;
 
-		raw = g_strdup(gtk_entry_get_text(GTK_ENTRY(dialog->url)));
+		raw = g_strdup(gtk_editable_get_text(GTK_EDITABLE(dialog->url)));
 		ret = g_strdup(g_strstrip(raw));
 		g_free(raw);
 
@@ -116,7 +116,7 @@
 	if(GTK_IS_ENTRY(dialog->display)) {
 		gchar *ret = NULL;
 
-		ret = g_strdup(gtk_entry_get_text(GTK_ENTRY(dialog->display)));
+		ret = g_strdup(gtk_editable_get_text(GTK_EDITABLE(dialog->display)));
 		return g_strstrip(ret);
 	}
 
