[gedit-plugins/translate] UI improvements
- From: Jordi Mas <jmas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins/translate] UI improvements
- Date: Sat, 15 Jul 2017 17:55:10 +0000 (UTC)
commit 334f925d00c3cef439dbe6aa3445c433ddb52e23
Author: Jordi Mas <jmas softcatala org>
Date: Sat Jul 15 19:54:53 2017 +0200
UI improvements
plugins/translate/Makefile.am | 3 +-
plugins/translate/translate/apertium.py | 3 +-
plugins/translate/translate/ui/preferences.ui | 71 ++++++++++++++++++++++++-
3 files changed, 73 insertions(+), 4 deletions(-)
---
diff --git a/plugins/translate/Makefile.am b/plugins/translate/Makefile.am
index 2062296..338bfd6 100644
--- a/plugins/translate/Makefile.am
+++ b/plugins/translate/Makefile.am
@@ -4,7 +4,8 @@ plugins_translate_PYTHON = \
plugins/translate/translate/apertium.py \
plugins/translate/translate/__init__.py \
plugins/translate/translate/preferences.py \
- plugins/translate/translate/translateview.py
+ plugins/translate/translate/translator.py \
+ plugins/translate/translate/translateview.py
plugins_preferences_uidir = $(GEDIT_PLUGINS_DATA_DIR)/translate/ui
dist_plugins_preferences_ui_DATA = plugins/translate/translate/ui/preferences.ui
diff --git a/plugins/translate/translate/apertium.py b/plugins/translate/translate/apertium.py
index a15467e..a3f3f6d 100644
--- a/plugins/translate/translate/apertium.py
+++ b/plugins/translate/translate/apertium.py
@@ -20,8 +20,9 @@
import urllib.request, urllib.parse, urllib.error
import json
import locale
+from .translator import Translator
-class Apertium():
+class Apertium(Translator):
g_language_codes = []
g_language_names = []
diff --git a/plugins/translate/translate/ui/preferences.ui b/plugins/translate/translate/ui/preferences.ui
index e7edb59..6a16c07 100644
--- a/plugins/translate/translate/ui/preferences.ui
+++ b/plugins/translate/translate/ui/preferences.ui
@@ -5,6 +5,7 @@
<object class="GtkGrid" id="grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@@ -14,6 +15,7 @@
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="margin_right">3</property>
<property name="label" translatable="yes">Translation languages</property>
<property name="justify">right</property>
@@ -29,7 +31,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="active">0</property>
- <property name="has_entry">False</property>
<property name="id_column">0</property>
</object>
<packing>
@@ -41,7 +42,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -109,5 +110,71 @@
<property name="top_attach">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="api_key">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">API Key</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">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="left_attach">0</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Translation service:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="service">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]