Hello community,

here is the log from the commit of package poedit for openSUSE:Factory checked 
in at 2015-04-23 08:03:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/poedit (Old)
 and      /work/SRC/openSUSE:Factory/.poedit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "poedit"

Changes:
--------
--- /work/SRC/openSUSE:Factory/poedit/poedit.changes    2015-03-12 
16:39:09.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.poedit.new/poedit.changes       2015-04-23 
08:03:48.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Apr 20 17:25:51 UTC 2015 - astie...@suse.com
+
+- poedit 1.7.6:
+  + fix handling of multiple displays
+
+-------------------------------------------------------------------

Old:
----
  poedit-1.7.5.tar.gz

New:
----
  poedit-1.7.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ poedit.spec ++++++
--- /var/tmp/diff_new_pack.q0O8Z4/_old  2015-04-23 08:03:49.000000000 +0200
+++ /var/tmp/diff_new_pack.q0O8Z4/_new  2015-04-23 08:03:49.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           poedit
-Version:        1.7.5
+Version:        1.7.6
 Release:        0
 Summary:        Cross-platform Gettext Catalogs Editing Tool
 License:        MIT

++++++ poedit-1.7.5.tar.gz -> poedit-1.7.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poedit-1.7.5/NEWS new/poedit-1.7.6/NEWS
--- old/poedit-1.7.5/NEWS       2015-03-11 17:34:16.000000000 +0100
+++ new/poedit-1.7.6/NEWS       2015-04-18 20:01:37.000000000 +0200
@@ -1,4 +1,11 @@
 
+Version 1.7.6
+-------------
+
+- fix handling of multiple displays
+- [Windows] fix "file couldn't be formatted nicely" problems with files in
+  directories with (some) Unicode names
+
 Version 1.7.5
 -------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poedit-1.7.5/configure new/poedit-1.7.6/configure
--- old/poedit-1.7.5/configure  2015-03-11 17:36:15.000000000 +0100
+++ new/poedit-1.7.6/configure  2015-04-18 20:02:30.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for poedit 1.7.5.
+# Generated by GNU Autoconf 2.68 for poedit 1.7.6.
 #
 # Report bugs to <poe...@googlegroups.com>.
 #
@@ -560,8 +560,8 @@
 # Identity of this package.
 PACKAGE_NAME='poedit'
 PACKAGE_TARNAME='poedit'
-PACKAGE_VERSION='1.7.5'
-PACKAGE_STRING='poedit 1.7.5'
+PACKAGE_VERSION='1.7.6'
+PACKAGE_STRING='poedit 1.7.6'
 PACKAGE_BUGREPORT='poe...@googlegroups.com'
 PACKAGE_URL=''
 
@@ -1281,7 +1281,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures poedit 1.7.5 to adapt to many kinds of systems.
+\`configure' configures poedit 1.7.6 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1351,7 +1351,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of poedit 1.7.5:";;
+     short | recursive ) echo "Configuration of poedit 1.7.6:";;
    esac
   cat <<\_ACEOF
 
@@ -1472,7 +1472,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-poedit configure 1.7.5
+poedit configure 1.7.6
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1715,7 +1715,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by poedit $as_me 1.7.5, which was
+It was created by poedit $as_me 1.7.6, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -2063,7 +2063,7 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-PACKAGE_SHORT_VERSION=1.7.5
+PACKAGE_SHORT_VERSION=1.7.6
 
 
 ac_aux_dir=
@@ -2607,7 +2607,7 @@
 
 # Define the identity of the package.
  PACKAGE='poedit'
- VERSION='1.7.5'
+ VERSION='1.7.6'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -6437,7 +6437,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by poedit $as_me 1.7.5, which was
+This file was extended by poedit $as_me 1.7.6, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6494,7 +6494,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-poedit config.status 1.7.5
+poedit config.status 1.7.6
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poedit-1.7.5/configure.ac 
new/poedit-1.7.6/configure.ac
--- old/poedit-1.7.5/configure.ac       2015-03-11 17:34:17.000000000 +0100
+++ new/poedit-1.7.6/configure.ac       2015-04-18 20:01:37.000000000 +0200
@@ -2,8 +2,8 @@
 
 AC_PREREQ(2.59)
 
-AC_INIT([poedit], [1.7.5], [poe...@googlegroups.com])
-PACKAGE_SHORT_VERSION=1.7.5
+AC_INIT([poedit], [1.7.6], [poe...@googlegroups.com])
+PACKAGE_SHORT_VERSION=1.7.6
 AC_SUBST(PACKAGE_SHORT_VERSION)
 
 AC_CONFIG_AUX_DIR([admin])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poedit-1.7.5/docs/poedit.1 
new/poedit-1.7.6/docs/poedit.1
--- old/poedit-1.7.5/docs/poedit.1      2015-03-11 17:36:17.000000000 +0100
+++ new/poedit-1.7.6/docs/poedit.1      2015-04-18 20:02:32.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: poedit
 .\"    Author: Vaclav Slavik <vac...@slavik.io>
 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      Date: 03/11/2015
+.\"      Date: 04/18/2015
 .\"    Manual: \ \&
 .\"    Source: \ \&
 .\"  Language: English
 .\"
-.TH "POEDIT" "1" "03/11/2015" "\ \&" "\ \&"
+.TH "POEDIT" "1" "04/18/2015" "\ \&" "\ \&"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poedit-1.7.5/src/catalog.cpp 
new/poedit-1.7.6/src/catalog.cpp
--- old/poedit-1.7.5/src/catalog.cpp    2015-03-11 17:34:28.000000000 +0100
+++ new/poedit-1.7.6/src/catalog.cpp    2015-04-18 20:01:44.000000000 +0200
@@ -1536,9 +1536,11 @@
         else if (wrapping != DEFAULT_WRAPPING)
             wrappingFlag.Printf(" --width=%d", wrapping);
 
+        TempOutputFileFor po_file_temp2_obj(po_file_temp);
+        const wxString po_file_temp2 = po_file_temp2_obj.FileName();
         auto msgcatCmd = wxString::Format("msgcat --force-po%s -o %s %s",
                                           wrappingFlag,
-                                          QuoteCmdlineArg(po_file),
+                                          QuoteCmdlineArg(po_file_temp2),
                                           QuoteCmdlineArg(po_file_temp));
         wxLogTrace("poedit", "formatting file with %s", msgcatCmd);
 
@@ -1548,7 +1550,9 @@
         //      msgids) that, while correct, are not something a *translator* 
can
         //      do anything about.
         wxLogNull null;
-        msgcat_ok = ExecuteGettext(msgcatCmd) && wxFileExists(po_file);
+        msgcat_ok = ExecuteGettext(msgcatCmd) &&
+                    wxFileExists(po_file_temp2) &&
+                    wxRenameFile(po_file_temp2, po_file, /*overwrite=*/true);
     }
 
     if ( msgcat_ok )
@@ -1600,7 +1604,7 @@
                   (
                       wxString::Format("msgfmt -o %s %s",
                                        QuoteCmdlineArg(mo_file_temp),
-                                       QuoteCmdlineArg(po_file))
+                                       
QuoteCmdlineArg(CliSafeFileName(po_file)))
                   ) )
             {
                 mo_compilation_status = CompilationStatus::Success;
@@ -1862,7 +1866,7 @@
     GettextErrors err;
     ExecuteGettextAndParseOutput
     (
-        wxString::Format("msgfmt -o /dev/null -c %s", 
QuoteCmdlineArg(po_file)),
+        wxString::Format("msgfmt -o /dev/null -c %s", 
QuoteCmdlineArg(CliSafeFileName(po_file))),
         err
     );
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poedit-1.7.5/src/utility.cpp 
new/poedit-1.7.6/src/utility.cpp
--- old/poedit-1.7.5/src/utility.cpp    2015-03-11 17:34:28.000000000 +0100
+++ new/poedit-1.7.6/src/utility.cpp    2015-04-18 20:01:44.000000000 +0200
@@ -136,6 +136,8 @@
 {
     wxString path, name, ext;
     wxFileName::SplitPath(filename, &path, &name, &ext);
+    if (!ext.empty())
+        ext = "." + ext;
 
 #ifdef __WXOSX__
     NSURL *fileUrl = [NSURL fileURLWithPath:wxStringToNS(filename)];
@@ -146,22 +148,38 @@
                                                  create:YES
                                                   error:nil];
     if (tempdirUrl)
-    {
-        NSURL *newFileUrl = [tempdirUrl URLByAppendingPathComponent:[fileUrl 
lastPathComponent]];
-        NSString *newFilePath = [newFileUrl path];
-        m_filenameTmp = wxStringFromNS(newFilePath);
         m_tempDir = wxStringFromNS([tempdirUrl path]);
-    }
-    // else: fall through to the generic code
-#endif // __WXOSX__
+#endif
 
-    if (m_filenameTmp.empty())
+    wxString counter;
+    for (;;)
     {
-        m_filenameTmp = filename + ".temp." + ext;
-    }
+#ifdef __WXOSX__
+        if (!m_tempDir.empty())
+        {
+            m_filenameTmp = m_tempDir + wxFILE_SEP_PATH + name + counter + ext;
+        }
+        else
+#endif // __WXOSX__
+        {
+            // Temp filenames may be ugly, nobody cares. Make them safe for
+            // Unicode-unfriendly uses on Windows, i.e. 8.3 without non-ASCII
+            // characters:
+            auto base = CliSafeFileName(path) + wxFILE_SEP_PATH;
+#ifdef __WXMSW__
+            // this is OK, ToAscii() replaces non-ASCII with '_':
+            base += name.ToAscii();
+#else
+            base += name;
+#endif
+            m_filenameTmp = base + ".temp" + counter + ext;
+        }
+
+        if (!wxFileExists(m_filenameTmp))
+            break; // good!
 
-    if ( wxFileExists(m_filenameTmp) )
-        wxRemoveFile(m_filenameTmp);
+        counter += wchar_t('a' + rand() % 26);
+    }
 }
 
 
@@ -173,6 +191,33 @@
 #endif
 }
 
+#ifdef __WXMSW__
+wxString CliSafeFileName(const wxString& fn)
+{
+    if (fn.IsAscii())
+    {
+        return fn;
+    }
+    else if (wxFileExists(fn) || wxDirExists(fn))
+    {
+        return wxFileName(fn).GetShortPath();
+    }
+    else
+    {
+        wxString path, name, ext;
+        wxFileName::SplitPath(fn, &path, &name, &ext);
+        if (wxDirExists(path))
+        {
+            auto p = wxFileName(path).GetShortPath() + wxFILE_SEP_PATH + name;
+            if (!ext.empty())
+                p += "." + ext;
+            return p;
+        }
+    }
+    return fn;
+}
+#endif // __WXMSW__
+
 
 // ----------------------------------------------------------------------
 // Helpers for persisting windows' state
@@ -226,7 +271,14 @@
         int width = (int)cfg->Read(path + "w", defaultSize.x);
         int height = (int)cfg->Read(path + "h", defaultSize.y);
         if ( width != -1 || height != -1 )
+        {
+            // filter out ridiculous sizes:
+            if (width != -1 && width < 100)
+                width = defaultSize.x;
+            if (height != -1 && height < 100)
+                height = defaultSize.y;
             win->SetClientSize(width, height);
+        }
     }
 
 #if defined(__WXMSW__) || defined(__WXOSX__)
@@ -263,17 +315,10 @@
 
     // If the window is completely out of all screens (e.g. because
     // screens configuration changed), move it to primary screen:
-#ifdef __WXOSX__
-    if ( win->GetPosition().x < 0 || win->GetPosition().y < 0 )
-        win->Move(20, 30);
-#else
     if ( wxDisplay::GetFromWindow(win) == wxNOT_FOUND )
-        win->Move(0, 0);
-#endif
-
+        win->Move(20, 40);
 #endif // __WXMSW__/__WXOSX__
 
-#ifndef __WXOSX__
     // If the window is larger than current screen, resize it to fit:
     int display = wxDisplay::GetFromWindow(win);
     if ( display == wxNOT_FOUND )
@@ -283,10 +328,13 @@
 
     wxRect winRect = win->GetRect();
     if ( winRect.GetPosition() == wxDefaultPosition )
-        winRect.SetPosition(screenRect.GetPosition()); // not place yet, fake 
it
+        winRect.SetPosition(screenRect.GetPosition()); // not placed yet, fake 
it
 
     if ( !screenRect.Contains(winRect) )
     {
+        // Don't crop the window immediately, because it could become too small
+        // due to it. Try to move it to the center of the screen first, then 
crop.
+        winRect = winRect.CenterIn(screenRect);
         winRect.Intersect(screenRect);
         win->SetSize(winRect);
     }
@@ -296,5 +344,4 @@
     {
         win->Maximize();
     }
-#endif // !__WXOSX__
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poedit-1.7.5/src/utility.h 
new/poedit-1.7.6/src/utility.h
--- old/poedit-1.7.5/src/utility.h      2015-03-11 17:34:28.000000000 +0100
+++ new/poedit-1.7.6/src/utility.h      2015-04-18 20:01:44.000000000 +0200
@@ -98,7 +98,14 @@
     wxString m_filenameTmp;
 };
 
-// Helper for writing files
+
+#ifdef __WXMSW__
+/// Return filename safe for passing to CLI tools (gettext).
+/// Uses 8.3 short names to avoid Unicode and codepage issues.
+wxString CliSafeFileName(const wxString& fn);
+#else
+inline wxString CliSafeFileName(const wxString& fn) { return fn; }
+#endif
 
 
 // ----------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/poedit-1.7.5/src/version.h 
new/poedit-1.7.6/src/version.h
--- old/poedit-1.7.5/src/version.h      2015-03-11 17:34:28.000000000 +0100
+++ new/poedit-1.7.6/src/version.h      2015-04-18 20:01:44.000000000 +0200
@@ -26,7 +26,7 @@
 #ifndef _VERSION_H_
 #define _VERSION_H_
 
-#define POEDIT_VERSION           "1.7.5"
-#define POEDIT_VERSION_WIN        1,7,5,0
+#define POEDIT_VERSION           "1.7.6"
+#define POEDIT_VERSION_WIN        1,7,6,0
 
 #endif // _VERSION_H_


Reply via email to