[gtranslator/gtk4: 33/52] Fix translation-memory-dialog UI file
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator/gtk4: 33/52] Fix translation-memory-dialog UI file
- Date: Mon, 5 Sep 2022 15:17:51 +0000 (UTC)
commit c5943ca631690ca4e4ef668c1dab91b27fd5596a
Author: Daniel García Moreno <dani danigm net>
Date: Thu Jul 21 17:12:27 2022 +0200
Fix translation-memory-dialog UI file
.../gtr-translation-memory-dialog.c | 15 +-
.../gtr-translation-memory-dialog.ui | 217 ++++-----------------
2 files changed, 51 insertions(+), 181 deletions(-)
---
diff --git a/src/translation-memory/gtr-translation-memory-dialog.c
b/src/translation-memory/gtr-translation-memory-dialog.c
index ab6ac8e5..ae56c345 100644
--- a/src/translation-memory/gtr-translation-memory-dialog.c
+++ b/src/translation-memory/gtr-translation-memory-dialog.c
@@ -300,6 +300,7 @@ gtr_translation_memory_dialog_init (GtrTranslationMemoryDialog *dlg)
GtrProfile *profile;
const gchar *language_code;
gchar *filename = NULL;
+ GError *error = NULL;
gchar *root_objects[] = {
"translation-memory-box",
NULL
@@ -319,7 +320,19 @@ gtr_translation_memory_dialog_init (GtrTranslationMemoryDialog *dlg)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dlg));
builder = gtk_builder_new ();
- gtk_builder_add_objects_from_resource (builder,
"/org/gnome/gtranslator/plugins/translation-memory/ui/gtr-translation-memory-dialog.ui", root_objects, NULL);
+ gtk_builder_add_objects_from_resource (
+ builder,
+ "/org/gnome/gtranslator/plugins/translation-memory/ui/gtr-translation-memory-dialog.ui",
+ root_objects,
+ &error
+ );
+
+ if (error != NULL)
+ {
+ g_warning ("Error parsing gtr-translation-memory-dialog.ui: %s", (error)->message);
+ g_error_free (error);
+ }
+
content = GTK_WIDGET (gtk_builder_get_object (builder, "translation-memory-box"));
g_object_ref (content);
priv->directory_entry = GTK_WIDGET (gtk_builder_get_object (builder, "directory-entry"));
diff --git a/src/translation-memory/gtr-translation-memory-dialog.ui
b/src/translation-memory/gtr-translation-memory-dialog.ui
index 48651878..b3cca9e1 100644
--- a/src/translation-memory/gtr-translation-memory-dialog.ui
+++ b/src/translation-memory/gtr-translation-memory-dialog.ui
@@ -16,33 +16,6 @@
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button1">
- <property name="label">gtk-close</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
<child>
<object class="GtkBox" id="translation-memory-box">
<property name="visible">True</property>
@@ -69,138 +42,75 @@
<attribute name="weight" value="bold"/>
</attributes>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment2">
+ <object class="GtkBox" id="hbox8">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="right_padding">12</property>
<child>
- <object class="GtkBox" id="hbox8">
+ <object class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox" id="vbox11">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">18</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <property name="hexpand">True</property>
<child>
- <object class="GtkLabel" id="label25">
+ <object class="GtkLabel" id="label26">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes">Select the directory which contains PO
files:</property>
+ <property name="xalign">0</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
- <object class="GtkBox" id="vbox11">
+ <object class="GtkBox" id="hbox9">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label26">
+ <object class="GtkEntry" id="directory-entry">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Select the directory which
contains PO files:</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="hbox9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkEntry" id="directory-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="xalign">0.0099999997764825821</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="search-button">
- <property name="label">gtk-find</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="xalign">0.0099999997764825821</property>
+ <property name="hexpand">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
<child>
- <object class="GtkButton" id="add-database-button">
- <property name="label" translatable="yes">Add to Database</property>
+ <object class="GtkButton" id="search-button">
+ <property name="icon-name">preferences-system-search-symbolic</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkProgressBar" id="add-database-progressbar">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="add-database-button">
+ <property name="label" translatable="yes">Add to Database</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkProgressBar" id="add-database-progressbar">
+ <property name="can_focus">False</property>
+ <property name="visible">False</property>
+ </object>
</child>
</object>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</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" id="vbox10">
@@ -218,32 +128,20 @@
<attribute name="weight" value="bold"/>
</attributes>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment3">
+ <object class="GtkBox" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="right_padding">12</property>
<child>
<object class="GtkBox" id="hbox7">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">18</property>
<child>
<object class="GtkLabel" id="label22">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
<object class="GtkBox" id="box1">
@@ -257,18 +155,10 @@
<child>
<object class="GtkCheckButton" id="use-lang-profile-in-tm">
<property name="label" translatable="yes">Use only files with this
name:</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</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="tm-lang-entry">
@@ -276,53 +166,20 @@
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
</object>
- <packing>
- <property name="expand">False</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">0</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
</child>
- <action-widgets>
- <action-widget response="0">button1</action-widget>
- </action-widgets>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]