[gtranslator] Do not expose translation memory configuration in the ui.



commit ea04afeb4091721d69a55666734a46c0172dc78e
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Wed Apr 6 14:26:32 2011 +0200

    Do not expose translation memory configuration in the ui.
    
    This configuration is quite advanced for users and it is pointless
    as it is something that people will not change very often

 src/dialogs/gtr-preferences-dialog.c  |   32 +------
 src/dialogs/gtr-preferences-dialog.ui |  193 +++++++++++++--------------------
 2 files changed, 75 insertions(+), 150 deletions(-)
---
diff --git a/src/dialogs/gtr-preferences-dialog.c b/src/dialogs/gtr-preferences-dialog.c
index 07d7c14..1fef54b 100644
--- a/src/dialogs/gtr-preferences-dialog.c
+++ b/src/dialogs/gtr-preferences-dialog.c
@@ -96,24 +96,8 @@ struct _GtrPreferencesDialogPrivate
   GtkWidget *search_button;
   GtkWidget *add_database_button;
   GtkWidget *add_database_progressbar;
-
-  GtkWidget *use_lang_profile_in_tm;
   GtkWidget *tm_lang_entry;
-  GtkWidget *missing_words_spinbutton;
-  GtkWidget *sentence_length_spinbutton;
-
-  /*PO header->Personal information */
-  GtkWidget *name_entry;
-  GtkWidget *email_entry;
-
-  /*PO header->Language settings */
-  GtkWidget *language_comboentry;
-  GtkWidget *langcode_comboentry;
-  GtkWidget *charset_comboentry;
-  GtkWidget *encoding_comboentry;
-  GtkWidget *team_email_comboentry;
-  GtkWidget *plurals_entry;
-  GtkWidget *number_plurals_spinbutton;
+  GtkWidget *use_lang_profile_in_tm;
 
   /*Plugins */
   GtkWidget *plugins_box;
@@ -815,16 +799,6 @@ setup_tm_pages (GtrPreferencesDialog * dlg)
                    "active",
                    G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
   g_settings_bind (dlg->priv->tm_settings,
-                   GTR_SETTINGS_MAX_MISSING_WORDS,
-                   dlg->priv->missing_words_spinbutton,
-                   "value",
-                   G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (dlg->priv->tm_settings,
-                   GTR_SETTINGS_MAX_LENGTH_DIFF,
-                   dlg->priv->sentence_length_spinbutton,
-                   "value",
-                   G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (dlg->priv->tm_settings,
                    GTR_SETTINGS_PO_DIRECTORY,
                    dlg->priv->directory_entry,
                    "text",
@@ -967,10 +941,6 @@ gtr_preferences_dialog_init (GtrPreferencesDialog * dlg)
                                   "use_lang_profile_in_tm",
                                   &dlg->priv->use_lang_profile_in_tm,
                                   "tm_lang_entry", &dlg->priv->tm_lang_entry,
-                                  "missing_words_spinbutton",
-                                  &dlg->priv->missing_words_spinbutton,
-                                  "sentence_length_spinbutton",
-                                  &dlg->priv->sentence_length_spinbutton,
                                   "plugins_box", &dlg->priv->plugins_box,
                                   NULL);
   g_free (path);
diff --git a/src/dialogs/gtr-preferences-dialog.ui b/src/dialogs/gtr-preferences-dialog.ui
index cb3d938..327f21c 100644
--- a/src/dialogs/gtr-preferences-dialog.ui
+++ b/src/dialogs/gtr-preferences-dialog.ui
@@ -55,43 +55,6 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="close_button">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</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>
-          </object>
-        </child>
         <child>
           <object class="GtkNotebook" id="notebook">
             <property name="visible">True</property>
@@ -752,6 +715,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">6</property>
+                    <property name="expand">False</property>
                     <child>
                       <object class="GtkLabel" id="label20">
                         <property name="visible">True</property>
@@ -899,6 +863,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">6</property>
+                    <property name="expand">False</property>
                     <child>
                       <object class="GtkLabel" id="label21">
                         <property name="visible">True</property>
@@ -937,97 +902,50 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkTable" id="table1">
+                              <object class="GtkBox" id="box1">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="n_rows">4</property>
-                                <property name="n_columns">2</property>
-                                <property name="column_spacing">12</property>
-                                <child>
-                                  <object class="GtkEntry" id="tm_lang_entry">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="use_lang_profile_in_tm">
-                                    <property name="label" translatable="yes">Use only files with this name:</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_action_appearance">False</property>
-                                    <property name="draw_indicator">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkSpinButton" id="missing_words_spinbutton">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="adjustment">adjustment2</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label23">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Max. # of missing words:</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkSpinButton" id="sentence_length_spinbutton">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="adjustment">adjustment3</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">3</property>
-                                    <property name="bottom_attach">4</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
+                                <property name="orientation">vertical</property>
                                 <child>
-                                  <object class="GtkLabel" id="label24">
+                                  <object class="GtkBox" id="box2">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Max. difference in sentence length:</property>
+                                    <child>
+                                      <object class="GtkCheckButton" id="use_lang_profile_in_tm">
+                                        <property name="label" translatable="yes">Use only files with this name:</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">False</property>
+                                        <property name="use_action_appearance">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">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="invisible_char">â??</property>
+                                        <property name="invisible_char_set">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
                                   </object>
                                   <packing>
-                                    <property name="top_attach">3</property>
-                                    <property name="bottom_attach">4</property>
-                                    <property name="x_options">GTK_FILL</property>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
                                   </packing>
                                 </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
                               </object>
                               <packing>
                                 <property name="expand">True</property>
@@ -1098,6 +1016,43 @@
             <property name="position">1</property>
           </packing>
         </child>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="help_button">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="close_button">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</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>
+          </object>
+        </child>
       </object>
     </child>
     <action-widgets>



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