Hello community,
here is the log from the commit of package yast2-packager
checked in at Fri Feb 16 19:45:29 CET 2007.
--------
--- yast2-packager/yast2-packager.changes 2007-02-15 13:13:12.000000000 +0100
+++ yast2-packager/yast2-packager.changes 2007-02-16 13:26:24.613639000 +0100
@@ -1,0 +2,8 @@
+Fri Feb 16 13:06:45 CET 2007 - lslezak@suse.cz
+
+- Replace the middle part of a long URL/file name by ellipsis
+ to display the most interesting part of the message in
+ the progress popup (#221163)
+- 2.15.14
+
+-------------------------------------------------------------------
Old:
----
yast2-packager-2.15.13.tar.bz2
New:
----
yast2-packager-2.15.14.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.C18785/_old 2007-02-16 19:44:32.000000000 +0100
+++ /var/tmp/diff_new_pack.C18785/_new 2007-02-16 19:44:32.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-packager (Version 2.15.13)
+# spec file for package yast2-packager (Version 2.15.14)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,19 +11,19 @@
# norootforbuild
Name: yast2-packager
-Version: 2.15.13
+Version: 2.15.14
Release: 1
License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-packager-2.15.13.tar.bz2
+Source0: yast2-packager-2.15.14.tar.bz2
prefix: /usr
BuildRequires: docbook-xsl-stylesheets doxygen gcc-c++ libxcrypt-devel libxslt perl-XML-Writer sgml-skel update-desktop-files yast2 yast2-country yast2-devtools yast2-slp yast2-testsuite yast2-xml
Requires: yast2-country
# new Pkg::*Locale() functions (#223624)
Requires: yast2-pkg-bindings >= 2.15.4
-# Label::SkipButton()
-Requires: yast2 >= 2.15.2
+# URL::FormatURL()
+Requires: yast2 >= 2.15.10
Provides: yast2-config-package-manager
Obsoletes: yast2-config-package-manager
Provides: y2t_spkg y2t_inst-packages y2pkginf y2c_spkg
@@ -45,7 +45,7 @@
Arvin Schnell
%prep
-%setup -n yast2-packager-2.15.13
+%setup -n yast2-packager-2.15.14
%build
%{prefix}/bin/y2tool y2autoconf
@@ -82,7 +82,12 @@
/usr/share/YaST2/control/*.xml
%doc %{prefix}/share/doc/packages/yast2-packager
-%changelog -n yast2-packager
+%changelog
+* Fri Feb 16 2007 - lslezak@suse.cz
+- Replace the middle part of a long URL/file name by ellipsis
+ to display the most interesting part of the message in
+ the progress popup (#221163)
+- 2.15.14
* Thu Feb 15 2007 - locilka@suse.cz
- Disabling removing information about installed patches
(FATE #301990, Bugzilla #238488).
++++++ yast2-packager-2.15.13.tar.bz2 -> yast2-packager-2.15.14.tar.bz2 ++++++
++++ 2865 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.15.13/VERSION new/yast2-packager-2.15.14/VERSION
--- old/yast2-packager-2.15.13/VERSION 2007-02-15 13:11:11.000000000 +0100
+++ new/yast2-packager-2.15.14/VERSION 2007-02-16 13:13:50.000000000 +0100
@@ -1 +1 @@
-2.15.13
+2.15.14
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.15.13/configure.in new/yast2-packager-2.15.14/configure.in
--- old/yast2-packager-2.15.13/configure.in 2007-02-13 13:59:47.000000000 +0100
+++ new/yast2-packager-2.15.14/configure.in 2007-02-16 13:19:56.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-packager, 2.15.11, http://bugs.opensuse.org/, yast2-packager)
+AC_INIT(yast2-packager, 2.15.14, http://bugs.opensuse.org/, yast2-packager)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.15.11"
+VERSION="2.15.14"
RPMNAME="yast2-packager"
MAINTAINER="Ladislav Slezak "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.15.13/src/modules/PackageCallbacks.ycp new/yast2-packager-2.15.14/src/modules/PackageCallbacks.ycp
--- old/yast2-packager-2.15.13/src/modules/PackageCallbacks.ycp 2007-02-15 13:10:45.000000000 +0100
+++ new/yast2-packager-2.15.14/src/modules/PackageCallbacks.ycp 2007-02-16 10:34:13.000000000 +0100
@@ -771,8 +771,61 @@
// reference couter to the open popup window
integer _source_open = 0;
+
+string ProcessMessage(string msg, integer max_len)
+{
+
+ list<string> words = splitstring(msg, " ");
+
+ y2internal("words: %1", words);
+
+ words = maplist(string w, words,
+ {
+ map parsed = URL::Parse(w);
+ integer req_size = max_len - (size(msg) - size(w));
+
+ y2internal("parsed: %1", parsed);
+
+ // is it a valid URL?
+ if (contains(["ftp", "http", "nfs", "file", "dir", "iso", "smb", "disk"], parsed["scheme"]:""))
+ {
+ y2internal("Found URL: %1", w);
+
+
+ w = URL::FormatURL(parsed, max_len);
+ y2internal("Converted to: %1", w);
+ }
+ // is it a file name?
+ {
+ if (substring(w, 0, 1) == "/")
+ {
+ list<string> parts = splitstring(w, "/");
+
+ if (size(parts) >= 3)
+ {
+ w = String::FormatFilename(w, req_size);
+ }
+ }
+ }
+
+ return w;
+ }
+ );
+
+ string ret = mergestring(words, " ");
+
+ if (ret != msg)
+ {
+ y2internal("URL conversion: '%1' converted to '%2'", msg, ret);
+ }
+
+ return ret;
+}
+
void OpenSourcePopup(string text)
{
+ integer max_size = 60;
+
if (_source_open == 0)
{
// the popup doesn't exist
@@ -782,16 +835,23 @@
// and then refresh the label to the full string
// reason: display a small popup, but user can resize it to see
// the full message
- integer max_size = 60;
string display = text;
boolean refresh_label = false;
+ // Qt UI uses bold font, the string must be shortened even more
+ integer ui_adjustment = UI::GetDisplayInfo()["TextMode"]:false ? 0 : 5;
+
+ if (size(display) > max_size - ui_adjustment)
+ {
+ display = ProcessMessage(display, max_size - ui_adjustment);
+ }
// truncate long text
- if (size(display) > max_size)
+ if (size(display) > max_size - ui_adjustment)
{
// ellipsis appended to a truncated text (if it's too long)
- display = substring(text, 0, max_size - 1) + _("...");
+ string ellipsis = _("...");
+ display = substring(display, 0, max_size - ui_adjustment - 1 - size(ellipsis)) + ellipsis;
refresh_label = true;
}
@@ -811,6 +871,14 @@
}
else
{
+ // Qt uses proportional font, the string might be longer
+ integer ui_adjustment = UI::GetDisplayInfo()["TextMode"]:false ? 0 : 6;
+
+ if (size(text) > max_size + ui_adjustment)
+ {
+ text = ProcessMessage(text, max_size + ui_adjustment);
+ }
+
// refresh the labels in the popup
UI::ChangeWidget(`progress, `Label, text);
// reset the progressbar
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.15.13/src/modules/test.ycp new/yast2-packager-2.15.14/src/modules/test.ycp
--- old/yast2-packager-2.15.13/src/modules/test.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-packager-2.15.14/src/modules/test.ycp 2007-02-14 16:46:43.000000000 +0100
@@ -0,0 +1,5 @@
+{
+ import "PackageCallbacks";
+
+ PackageCallbacks::ErrorScanDb(1, ";;;;;;;;;;sdfdf sdffd sdfgds sdfghdf dsgfdsf");
+}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org