[gtranslator] Edit header dialog in the main menu
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] Edit header dialog in the main menu
- Date: Mon, 15 Oct 2018 08:12:16 +0000 (UTC)
commit 82f426365de365cbcd2fe839027c74587fc824ad
Author: Daniel García Moreno <danigm wadobo com>
Date: Mon Oct 15 10:11:47 2018 +0200
Edit header dialog in the main menu
src/gtr-application.c | 11 +
src/gtr-header-dialog.c | 32 ++-
src/gtr-header-dialog.ui | 593 ++++++++++++++++-------------------------------
src/gtr-header.c | 6 +-
src/gtr-header.h | 1 +
src/gtr-notebook.ui | 31 ++-
6 files changed, 270 insertions(+), 404 deletions(-)
---
diff --git a/src/gtr-application.c b/src/gtr-application.c
index 765999f4..5bf6bf78 100644
--- a/src/gtr-application.c
+++ b/src/gtr-application.c
@@ -259,6 +259,16 @@ preferences_activated (GSimpleAction *action,
gtr_show_preferences_dialog (priv->active_window);
}
+static void
+edit_header_activated (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GtrApplication *app = GTR_APPLICATION (user_data);
+ GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
+ gtr_actions_edit_header (NULL, priv->active_window);
+}
+
static void
shortcuts_activated (GSimpleAction *action,
GVariant *parameter,
@@ -519,6 +529,7 @@ static GActionEntry app_entries[] = {
{ "find", find_activated, NULL, NULL, NULL },
{ "new_window", new_window_activated, NULL, NULL, NULL },
{ "preferences", preferences_activated, NULL, NULL, NULL },
+ { "edit_header", edit_header_activated, NULL, NULL, NULL },
{ "shortcuts", shortcuts_activated, NULL, NULL, NULL },
{ "help", help_activated, NULL, NULL, NULL },
{ "about", about_activated, NULL, NULL, NULL },
diff --git a/src/gtr-header-dialog.c b/src/gtr-header-dialog.c
index 39f3770d..40eb5dbb 100644
--- a/src/gtr-header-dialog.c
+++ b/src/gtr-header-dialog.c
@@ -55,6 +55,7 @@ typedef struct
GtkWidget *pot_date;
GtkWidget *po_date;
GtkWidget *language;
+ GtkWidget *lang_code;
GtkWidget *lg_email;
GtkWidget *charset;
GtkWidget *encoding;
@@ -105,6 +106,7 @@ take_my_options_checkbutton_toggled (GtkToggleButton * button,
gtk_widget_set_sensitive (priv->translator, !active);
gtk_widget_set_sensitive (priv->tr_email, !active);
gtk_widget_set_sensitive (priv->language, !active);
+ gtk_widget_set_sensitive (priv->lang_code, !active);
gtk_widget_set_sensitive (priv->lg_email, !active);
gtk_widget_set_sensitive (priv->encoding, !active);
}
@@ -183,15 +185,18 @@ translator_changed (GtkWidget * widget, GtrHeaderDialog * dlg)
static void
language_changed (GtkWidget * widget, GtrHeaderDialog * dlg)
{
- const gchar *language, *lg_email;
+ const gchar *language, *lg_email, *lang_code;
GtrHeaderDialogPrivate *priv = gtr_header_dialog_get_instance_private (dlg);
language = gtk_entry_get_text (GTK_ENTRY (priv->language));
lg_email = gtk_entry_get_text (GTK_ENTRY (priv->lg_email));
+ lang_code = gtk_entry_get_text (GTK_ENTRY (priv->lang_code));
if (language && lg_email)
{
- gtr_header_set_language (gtr_po_get_header (priv->po), language, lg_email);
+ gtr_header_set_language (gtr_po_get_header (priv->po),
+ language, lang_code,
+ lg_email);
po_state_set_modified (priv->po);
}
}
@@ -239,6 +244,10 @@ gtr_header_dialog_fill_from_header (GtrHeaderDialog * dlg)
gtk_entry_set_text (GTK_ENTRY (priv->language), text);
g_free (text);
+ text = gtr_header_get_language_code (header);
+ gtk_entry_set_text (GTK_ENTRY (priv->lang_code), text);
+ g_free (text);
+
text = gtr_header_get_lg_email (header);
gtk_entry_set_text (GTK_ENTRY (priv->lg_email), text);
g_free (text);
@@ -296,6 +305,7 @@ gtr_header_dialog_init (GtrHeaderDialog * dlg)
priv->pot_date = GTK_WIDGET (gtk_builder_get_object (builder, "pot_date"));
priv->po_date = GTK_WIDGET (gtk_builder_get_object (builder, "po_date"));
priv->language = GTK_WIDGET (gtk_builder_get_object (builder, "language_entry"));
+ priv->lang_code = GTK_WIDGET (gtk_builder_get_object (builder, "language_code_entry"));
priv->lg_email = GTK_WIDGET (gtk_builder_get_object (builder, "lg_email_entry"));
priv->charset = GTK_WIDGET (gtk_builder_get_object (builder, "charset_entry"));
priv->encoding = GTK_WIDGET (gtk_builder_get_object (builder, "encoding_entry"));
@@ -327,6 +337,7 @@ gtr_header_dialog_init (GtrHeaderDialog * dlg)
gtk_widget_set_sensitive (priv->translator, !active);
gtk_widget_set_sensitive (priv->tr_email, !active);
gtk_widget_set_sensitive (priv->language, !active);
+ gtk_widget_set_sensitive (priv->lang_code, !active);
gtk_widget_set_sensitive (priv->lg_email, !active);
gtk_widget_set_sensitive (priv->encoding, !active);
}
@@ -369,6 +380,9 @@ set_default_values (GtrHeaderDialog * dlg, GtrWindow * window)
g_signal_connect (priv->language, "changed",
G_CALLBACK (language_changed), dlg);
+ g_signal_connect (priv->lang_code, "changed",
+ G_CALLBACK (language_changed), dlg);
+
g_signal_connect (priv->lg_email, "changed",
G_CALLBACK (language_changed), dlg);
}
@@ -376,7 +390,7 @@ set_default_values (GtrHeaderDialog * dlg, GtrWindow * window)
void
gtr_show_header_dialog (GtrWindow * window)
{
- static GtrHeaderDialog *dlg = NULL;
+ static GtkWidget *dlg = NULL;
GtrTab *tab;
tab = gtr_window_get_active_tab (window);
@@ -386,20 +400,20 @@ gtr_show_header_dialog (GtrWindow * window)
if (dlg == NULL)
{
- dlg = g_object_new (GTR_TYPE_HEADER_DIALOG, NULL);
+ dlg = GTK_WIDGET (g_object_new (GTR_TYPE_HEADER_DIALOG,
+ "use-header-bar", TRUE, NULL));
g_signal_connect (dlg,
"destroy", G_CALLBACK (gtk_widget_destroyed), &dlg);
- set_default_values (dlg, window);
+ set_default_values (GTR_HEADER_DIALOG (dlg), window);
gtk_widget_show (GTK_WIDGET (dlg));
}
- if (GTK_WINDOW (window) != gtk_window_get_transient_for (GTK_WINDOW (dlg)))
- {
- gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (window));
- }
+ gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (window));
+ gtk_window_set_type_hint (GTK_WINDOW (dlg), GDK_WINDOW_TYPE_HINT_DIALOG);
+ gtk_window_set_modal (GTK_WINDOW (dlg), TRUE);
gtk_window_present (GTK_WINDOW (dlg));
}
diff --git a/src/gtr-header-dialog.ui b/src/gtr-header-dialog.ui
index b258744b..43d2db04 100644
--- a/src/gtr-header-dialog.ui
+++ b/src/gtr-header-dialog.ui
@@ -1,11 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
<interface>
- <!-- interface-requires gtk+ 2.12 -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="header_dialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox2">
<property name="visible">True</property>
@@ -23,7 +27,6 @@
<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>
@@ -51,251 +54,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vexpand">True</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="border_width">6</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTextView" id="prj_comment">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="editable">False</property>
- </object>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Comment</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="n_rows">5</property>
- <property name="n_columns">3</property>
- <property name="row_spacing">6</property>
- <child>
- <object class="GtkLabel" id="label15">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label17">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label18">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options"></property>
- <property name="y_options"></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="xpad">12</property>
- <property name="label" translatable="yes">Project Id _version:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="prj_id_version">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label24">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">12</property>
- <property name="label" translatable="yes">Pot _file creation date:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">pot_date</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>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="pot_date">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label25">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">12</property>
- <property name="label" translatable="yes">Po file _revision date:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">po_date</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>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="po_date">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label26">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">12</property>
- <property name="label" translatable="yes">Report message _bugs to:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">rmbt</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>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="rmbt">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Project</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
<child>
<object class="GtkBox" id="lang_vbox">
<property name="visible">True</property>
@@ -308,7 +66,6 @@
<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="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
@@ -320,275 +77,307 @@
</packing>
</child>
<child>
- <object class="GtkTable" id="lang_page">
+ <object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">6</property>
- <property name="n_columns">3</property>
- <property name="row_spacing">6</property>
+ <property name="row_spacing">2</property>
+ <property name="column_spacing">6</property>
<child>
- <object class="GtkEntry" id="encoding_entry">
+ <object class="GtkLabel" id="label33">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Translator’s _name:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">tr_name</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="charset_entry">
+ <object class="GtkLabel" id="label34">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="editable">False</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Translator’s _email:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">tr_email</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="lg_email_entry">
+ <object class="GtkLabel" id="label35">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Language:</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="language_entry">
+ <object class="GtkLabel" id="language_code_label">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Language Code:</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label27">
+ <object class="GtkLabel" id="label36">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes">Language gro_up email:</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label28">
+ <object class="GtkLabel" id="label37">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes">Char_set:</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label29">
+ <object class="GtkLabel" id="label38">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes">Enc_oding:</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">6</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label30">
+ <object class="GtkEntry" id="language_code_entry">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can_focus">True</property>
</object>
<packing>
+ <property name="left_attach">1</property>
<property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label31">
+ <object class="GtkEntry" id="encoding_entry">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</object>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">6</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label32">
+ <object class="GtkEntry" id="charset_entry">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="editable">False</property>
</object>
<packing>
+ <property name="left_attach">1</property>
<property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label33">
+ <object class="GtkEntry" id="lg_email_entry">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">12</property>
- <property name="label" translatable="yes">Translator’s _name:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">tr_name</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label34">
+ <object class="GtkEntry" id="language_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="tr_name">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="tr_email">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Translator and Language</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">2</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label23">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes">Project Id _version:</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
- <property name="xpad">12</property>
- <property name="label" translatable="yes">Translator’s _email:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label24">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Pot _file creation date:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">tr_email</property>
+ <property name="mnemonic_widget">pot_date</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label35">
+ <object class="GtkLabel" id="label25">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">12</property>
- <property name="label" translatable="yes">_Language:</property>
+ <property name="label" translatable="yes">Po file _revision date:</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">po_date</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label36">
+ <object class="GtkLabel" id="label26">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">12</property>
- <property name="label" translatable="yes">Language gro_up email:</property>
+ <property name="label" translatable="yes">Report message _bugs to:</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">rmbt</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label37">
+ <object class="GtkEntry" id="prj_id_version">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">12</property>
- <property name="label" translatable="yes">Char_set:</property>
- <property name="use_underline">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label38">
+ <object class="GtkEntry" id="pot_date">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">12</property>
- <property name="label" translatable="yes">Enc_oding:</property>
- <property name="use_underline">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="top_attach">1</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="tr_name">
+ <object class="GtkEntry" id="po_date">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="editable">False</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="y_options"></property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="tr_email">
+ <object class="GtkEntry" id="rmbt">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
</packing>
</child>
</object>
@@ -599,6 +388,36 @@
</packing>
</child>
</object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Project</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">6</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTextView" id="prj_comment">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="editable">False</property>
+ </object>
+ </child>
+ </object>
<packing>
<property name="position">2</property>
</packing>
@@ -607,7 +426,7 @@
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Translator and Language</property>
+ <property name="label" translatable="yes">Comment</property>
</object>
<packing>
<property name="position">2</property>
diff --git a/src/gtr-header.c b/src/gtr-header.c
index 28ed203d..057bfd92 100644
--- a/src/gtr-header.c
+++ b/src/gtr-header.c
@@ -419,7 +419,9 @@ gtr_header_get_lg_email (GtrHeader * header)
void
gtr_header_set_language (GtrHeader * header,
- const gchar * language, const gchar * email)
+ const gchar * language,
+ const gchar * lang_code,
+ const gchar * email)
{
gchar *lang_temp;
@@ -428,6 +430,7 @@ gtr_header_set_language (GtrHeader * header,
lang_temp = g_strconcat (language, " <", email, ">", NULL);
gtr_header_set_field (header, "Language-Team", lang_temp);
+ gtr_header_set_field (header, "Language", lang_code);
g_free (lang_temp);
}
@@ -579,6 +582,7 @@ set_profile_values (GtrHeader *header)
(active_profile));
gtr_header_set_language (header,
gtr_profile_get_language_name (active_profile),
+ gtr_profile_get_language_code (active_profile),
gtr_profile_get_group_email (active_profile));
gtr_header_set_charset (header,
gtr_profile_get_charset (active_profile));
diff --git a/src/gtr-header.h b/src/gtr-header.h
index 83efb306..7907a7ad 100644
--- a/src/gtr-header.h
+++ b/src/gtr-header.h
@@ -87,6 +87,7 @@ gchar *gtr_header_get_language (GtrHeader *header);
gchar *gtr_header_get_lg_email (GtrHeader *header);
void gtr_header_set_language (GtrHeader *header,
const gchar *language,
+ const gchar *lang_code,
const gchar *email);
gchar *gtr_header_get_mime_version (GtrHeader *header);
diff --git a/src/gtr-notebook.ui b/src/gtr-notebook.ui
index 45278cc9..8cbf8add 100644
--- a/src/gtr-notebook.ui
+++ b/src/gtr-notebook.ui
@@ -169,6 +169,22 @@
<property name="position">2</property>
</packing>
</child>
+
+ <child>
+ <object class="GtkModelButton" id="edit_header">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="action_name">app.edit_header</property>
+ <property name="text" translatable="yes">Edit header</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
@@ -179,7 +195,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
@@ -193,7 +209,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
<child>
@@ -207,7 +223,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">6</property>
</packing>
</child>
<child>
@@ -220,7 +236,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">6</property>
+ <property name="position">7</property>
</packing>
</child>
<child>
@@ -234,7 +250,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">7</property>
+ <property name="position">8</property>
</packing>
</child>
<child>
@@ -248,7 +264,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">8</property>
+ <property name="position">9</property>
</packing>
</child>
<child>
@@ -262,7 +278,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">9</property>
+ <property name="position">10</property>
</packing>
</child>
</object>
@@ -564,3 +580,4 @@
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]