[gtranslator/dl-workflow: 1/10] gtr-dl-teams: Store Damned Lies(DL) information




commit 4f656b48d9bb5d5a4a2935a40bb881385bf99a8b
Author: Amanda Shafack <shafack likhene gmail com>
Date:   Tue Jan 12 10:25:58 2021 +0100

    gtr-dl-teams: Store Damned Lies(DL) information
    
    Store DL information on the GtrPo object after a po file is downloaded.
    
    This will make the DL information available in memory for future use.

 src/gtr-dl-teams.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/src/gtr-dl-teams.c b/src/gtr-dl-teams.c
index 8788688a..ba250d7a 100644
--- a/src/gtr-dl-teams.c
+++ b/src/gtr-dl-teams.c
@@ -554,9 +554,20 @@ gtr_dl_teams_load_po_file (GtkButton *button, GtrDlTeams *self)
     info_msg = g_strdup_printf (_("The file '%s' has been saved in %s"),
                                 basename, dest_dir);
     gtr_tab_set_info (tab, info_msg, NULL);
+
+    GtrPo *po = gtr_tab_get_po(tab);
+    GError *po_error = NULL;
+    gtr_po_set_dl_info(po,
+                       priv->selected_team,
+                       priv->selected_module,
+                       priv->selected_branch,
+                       priv->selected_domain,
+                       priv->module_state);
+    // Save to update the headers
+    gtr_po_save_file(po, &po_error);
   }
 
-  g_object_unref (tmp_file);
+  g_object_unref(tmp_file);
 }
 
 static void
@@ -740,3 +751,4 @@ team_add_cb (GtkButton   *btn,
   gtr_open_file_dialog (NULL, window);
 }
 
+


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