Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (b1daefc181f5bf17bd047b7a350b7a5cd07987d8)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (b1daefc181f5bf17bd047b7a350b7a5cd07987d8)
  • Date: Sat, 20 Sep 2008 08:43:06 -0500

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

editors/translator/DETAILS | 2 -
editors/translator/HISTORY | 6 +++
editors/translator/PRE_BUILD | 7 ++-
editors/translator/save.patch | 82
++++++++++++++++++++++++++++++++++++++++++
4 files changed, 93 insertions(+), 4 deletions(-)

New commits:
commit b1daefc181f5bf17bd047b7a350b7a5cd07987d8
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

translator: apply save.patch to fix save dialog appearance on "Save"

diff --git a/editors/translator/DETAILS b/editors/translator/DETAILS
index 1246096..f9a81d6 100755
--- a/editors/translator/DETAILS
+++ b/editors/translator/DETAILS
@@ -3,7 +3,7 @@
SOURCE=gettext_$SPELL-$VERSION.tar.gz
SOURCE_URL[0]=http://emiml.pl/$SPELL/$SOURCE

SOURCE_HASH=sha512:63c44ad1687da68bf5ed6458c15d0d807811caab7b712404eaea66ad8dd4d6a47b013a24d2840b9e33a6e464cfa5b14f2a2cb1687301736001fe01d982f8fb38
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/gettext_$SPELL-$VERSION
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/gettext_$SPELL-$VERSION"
WEB_SITE=http://freshmeat.net/projects/translator/
LICENSE[0]=GPL
ENTERED=20080118
diff --git a/editors/translator/HISTORY b/editors/translator/HISTORY
index 50ab5ac..202ab59 100644
--- a/editors/translator/HISTORY
+++ b/editors/translator/HISTORY
@@ -1,3 +1,9 @@
+2008-09-20 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: quoting paths
+ * PRE_BUILD: apply save.patch to fix save dialog appearance on "Save",
+ quoting paths
+ * save.patch: added
+
2008-05-28 Vlad Glagolev <stealth AT sourcemage.org>
* PRE_BUILD: added enchant patch
* BUILD: added check.sh script running
diff --git a/editors/translator/PRE_BUILD b/editors/translator/PRE_BUILD
index edb849d..8908538 100755
--- a/editors/translator/PRE_BUILD
+++ b/editors/translator/PRE_BUILD
@@ -1,5 +1,6 @@
default_pre_build &&
-cd $SOURCE_DIRECTORY &&
+cd "$SOURCE_DIRECTORY" &&

-patch -p0 < $SPELL_DIRECTORY/enchant.patch &&
-patch -p0 < $SPELL_DIRECTORY/gcc43.patch
+patch -p0 < "$SPELL_DIRECTORY/save.patch" &&
+patch -p0 < "$SPELL_DIRECTORY/enchant.patch" &&
+patch -p0 < "$SPELL_DIRECTORY/gcc43.patch"
diff --git a/editors/translator/save.patch b/editors/translator/save.patch
new file mode 100644
index 0000000..63f3baf
--- /dev/null
+++ b/editors/translator/save.patch
@@ -0,0 +1,82 @@
+--- MainWindow.cc.orig 2007-09-25 05:07:26.000000000 +0400
++++ MainWindow.cc 2008-09-20 17:28:28.794041766 +0400
+@@ -18,7 +18,7 @@
+ m_menu_bar.signal_jump_to().connect(sigc::mem_fun(this,
&MainWindow::onJumpTo));
+ m_menu_bar.signal_open_file().connect(sigc::mem_fun(this,
&MainWindow::onOpenFile));
+ m_menu_bar.signal_save().connect(sigc::mem_fun(this,
&MainWindow::onSaveFile));
+- m_menu_bar.signal_save_as().connect(sigc::mem_fun(this,
&MainWindow::onSaveFile));
++ m_menu_bar.signal_save_as().connect(sigc::mem_fun(this,
&MainWindow::onSaveFileAs));
+ m_menu_bar.signal_header_edit().connect(sigc::mem_fun(this,
&MainWindow::onHeaderEdit));
+ m_menu_bar.signal_switch_fuzzy().connect(sigc::mem_fun(this,
&MainWindow::onSwitchFuzzy));
+ m_menu_bar.signal_prev_msg().connect(sigc::mem_fun(this,
&MainWindow::onPreviousMessage));
+@@ -225,6 +225,19 @@
+ char buf[BUFSIZ];
+ strftime(buf, BUFSIZ, "%Y-%m-%d %H:%M%z", tmp);
+ m_po_reader->setHeader("PO-Revision-Date", buf);
++
++ m_po_reader->saveToFile(m_po_reader->getFilePath());
++}
++
++void MainWindow::onSaveFileAs() {
++ this->fromGui2Po();
++ m_po_reader->setHeader("X-Generator", PROGRAM_NAME" "PROGRAM_VERSION);
++ time_t t = time(NULL);
++ struct tm *tmp;
++ tmp = localtime(&t);
++ char buf[BUFSIZ];
++ strftime(buf, BUFSIZ, "%Y-%m-%d %H:%M%z", tmp);
++ m_po_reader->setHeader("PO-Revision-Date", buf);
+ Gtk::FileChooserDialog save_dialog(*this, _("Save file"),
Gtk::FILE_CHOOSER_ACTION_SAVE);
+ save_dialog.add_button(Gtk::Stock::CANCEL, 0);
+ Gtk::Button *save_btn = save_dialog.add_button(Gtk::Stock::SAVE, 1);
+--- MainWindow.h.orig 2007-09-25 05:07:26.000000000 +0400
++++ MainWindow.h 2008-09-20 17:28:45.439041521 +0400
+@@ -42,6 +42,7 @@
+ void onJumpTo();
+ void onOpenFile();
+ void onSaveFile();
++ void onSaveFileAs();
+ void onHeaderEdit();
+ void onCopyMsgid();
+ void onSwitchFuzzy();
+--- PoReader.cc.orig 2007-09-25 05:07:26.000000000 +0400
++++ PoReader.cc 2008-09-20 17:29:18.978042298 +0400
+@@ -9,6 +9,9 @@
+ struct po_xerror_handler error_handler;
+ error_handler.xerror = xerror_handler;
+ error_handler.xerror2 = xerror2_handler;
++
++ m_filepath = file_path;
++
+ debug("Opening file %s\n", file_path.c_str());
+ m_pofile = po_file_read(file_path.c_str(), &error_handler);
+
+@@ -18,6 +21,10 @@
+ po_next_message(m_miter); //we skip header which is msgid
+ }
+
++Glib::ustring PoReader::getFilePath() {
++ return m_filepath;
++}
++
+ Glib::ustring PoReader::getEncoding() {
+ Glib::ustring content_type = this->getHeader("Content-Type");
+
+--- PoReader.h.orig 2007-09-25 05:07:26.000000000 +0400
++++ PoReader.h 2008-09-20 17:29:09.269041934 +0400
+@@ -12,6 +12,7 @@
+ PoReader(const Glib::ustring &file_path);
+ Glib::ustring getHeader(const Glib::ustring &header_name);
+ void setHeader(const Glib::ustring &name, const Glib::ustring
&value);
++ Glib::ustring getFilePath();
+ Glib::ustring getEncoding();
+
+ Glib::ustring getMsgid();
+@@ -47,6 +48,7 @@
+ ~PoReader();
+ private:
+ po_file_t m_pofile;
++ Glib::ustring m_filepath;
+ Glib::ustring m_file_encoding;
+ po_message_iterator_t m_miter;
+ po_message_t m_current_msg;



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (b1daefc181f5bf17bd047b7a350b7a5cd07987d8), Vlad Glagolev, 09/20/2008

Archive powered by MHonArc 2.6.24.

Top of Page