[gtranslator] Update the po state to modified when a note is added
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] Update the po state to modified when a note is added
- Date: Sat, 21 Apr 2012 11:49:28 +0000 (UTC)
commit 41be204b88f7f30c424adfc46347679b20a59bf0
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sat Apr 21 11:45:30 2012 +0200
Update the po state to modified when a note is added
https://bugzilla.gnome.org/show_bug.cgi?id=622518
src/gtr-context.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gtr-context.c b/src/gtr-context.c
index 309c253..45ffe5c 100644
--- a/src/gtr-context.c
+++ b/src/gtr-context.c
@@ -313,6 +313,8 @@ on_accept_button_clicked (GtkButton *button, GtrContextPanel *panel)
GtkTextBuffer *buffer;
GtkTextIter start, end;
gchar *text;
+ GtrPo *po;
+ GtrPoState po_state;
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (panel->priv->context));
@@ -324,6 +326,12 @@ on_accept_button_clicked (GtkButton *button, GtrContextPanel *panel)
g_free (text);
+ /* Update the po state if needed after adding a comment */
+ po = gtr_tab_get_po (panel->priv->tab);
+ po_state = gtr_po_get_state (po);
+ if (po_state != GTR_PO_STATE_MODIFIED)
+ gtr_po_set_state (po, GTR_PO_STATE_MODIFIED);
+
reload_values (panel);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]