Hello community,
here is the log from the commit of package yast2-gtk
checked in at Fri Jan 18 01:35:43 CET 2008.
--------
--- yast2-gtk/yast2-gtk.changes 2008-01-12 00:42:25.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-gtk/yast2-gtk.changes 2008-01-16 14:43:04.000000000 +0100
@@ -1,0 +2,5 @@
+Wed Jan 16 14:42:56 CET 2008 - coolo@suse.de
+
+- update to latest yast2-core API
+
+-------------------------------------------------------------------
@@ -16,0 +22,5 @@
+Wed Oct 6 15:32:01 BST 2007 - mmichael@suse.de
+
+- n#300750: big speedup wrt. search / sort
+
+-------------------------------------------------------------------
@@ -21,0 +32,17 @@
+Wed Aug 26 15:32:01 BST 2007 - mmichael@suse.de
+
+- n#300390: warn if cancelling a non-submitted transaction.
+
+-------------------------------------------------------------------
+Fri Aug 10 18:01:20 CEST 2007 - mvidner@suse.cz
+
+- Finished integrating Feature #120292, UI as a namespace callable
+ from yast2-*-bindings.
+- 2.5.9
+
+-------------------------------------------------------------------
+Wed Aug 8 15:32:01 BST 2007 - mmichael@suse.de
+
+- #296945: pulse progress bar impl.
+
+-------------------------------------------------------------------
Old:
----
yast2-gtk-2.15.9r43566.tar.bz2
yast2-gtk-disable-torture-tests.patch
New:
----
yast2-gtk-2.16.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-gtk.spec ++++++
--- /var/tmp/diff_new_pack.d30719/_old 2008-01-18 01:35:02.000000000 +0100
+++ /var/tmp/diff_new_pack.d30719/_new 2008-01-18 01:35:02.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-gtk (Version 2.15.9r43566)
+# spec file for package yast2-gtk (Version 2.16.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,16 +12,17 @@
Name: yast2-gtk
Url: http://en.opensuse.org/YaST2-GTK
-Version: 2.15.9r43566
+Version: 2.16.1
Release: 1
License: LGPL v2.1 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-gtk-2.15.9r43566.tar.bz2
-Patch1: yast2-gtk-disable-torture-tests.patch
+Source0: yast2-gtk-2.16.1.tar.bz2
Prefix: /usr
Source2: yast2-gtk-rpmlintrc
-BuildRequires: blocxx-devel gcc-c++ gtk2-devel libxcrypt-devel libzypp-devel yast2-core-devel yast2-devtools
+BuildRequires: blocxx-devel gcc-c++ gtk2-devel libxcrypt-devel libzypp-devel yast2-devtools
+BuildRequires: yast2-core-devel >= 2.16.21
+Requires: yast2-core >= 2.16.21
Summary: YaST2 - Gtk Graphical User Interface
Provides: yast2_ui
@@ -37,8 +38,7 @@
Michael Meeks
%prep
-%setup -n yast2-gtk-2.15.9r43566
-%patch1 -p1
+%setup -n yast2-gtk-2.16.1
%build
%{prefix}/bin/y2tool y2autoconf
@@ -67,63 +67,72 @@
%doc %{prefix}/share/doc/packages/yast2-gtk
%{_libdir}/YaST2/plugin/libpy2gtk.so.*
%{_libdir}/YaST2/plugin/libpy2gtk.so
-
%changelog
-* Fri Jan 11 2008 - btimothy@suse.de
+* Wed Jan 16 2008 coolo@suse.de
+- update to latest yast2-core API
+* Fri Jan 11 2008 btimothy@suse.de
- Updating the tarball directly from SVN Trunk revision to be
version 2.15.9r43566 so the package won't fail to build anymore.
- Removed all the old patches since they are no longer necessary
with newer code.
-* Wed Oct 24 2007 - btimothy@suse.de
+* Wed Oct 24 2007 btimothy@suse.de
- Include patches from SVN head to fix various package selector
bugs. Included are fixes for bugzilla.novell.com bugs: 300390
300750, 300737, 330235, 330467, 336124.
-* Wed Sep 26 2007 - sreeves@suse.de
+* Sat Oct 06 2007 mmichael@suse.de
+- n#300750: big speedup wrt. search / sort
+* Wed Sep 26 2007 sreeves@suse.de
- Partial fix for Bug# 328213 - package selector untranslated
-* Fri Aug 10 2007 - mvidner@suse.cz
+* Sun Aug 26 2007 mmichael@suse.de
+- n#300390: warn if cancelling a non-submitted transaction.
+* Fri Aug 10 2007 mvidner@suse.cz
+- Finished integrating Feature #120292, UI as a namespace callable
+ from yast2-*-bindings.
+- 2.5.9
- Finished integrating Feature #120292, UI as a namespace callable
from yast2-*-bindings.
- 2.5.9
-* Wed Aug 08 2007 - mmichael@suse.de
+* Wed Aug 08 2007 mmichael@suse.de
+- #296945: pulse progress bar impl.
- FaTE #302018: details on how to print the license
- 2.15.8
-* Wed Aug 08 2007 - mvidner@suse.cz
+* Wed Aug 08 2007 mvidner@suse.cz
- Don't build-require yast2-devel-doc.
- 2.15.7.2
-* Mon Aug 06 2007 - mvidner@suse.cz
+* Mon Aug 06 2007 mvidner@suse.cz
- Adapted to changes in yast2-core needed for making UI callable from
yast2-*-bindings.
- 2.15.7.1
-* Thu Jul 26 2007 - jsrain@suse.cz
+* Thu Jul 26 2007 jsrain@suse.cz
- removed yast2-devel from BuildRequires
- 2.15.7
-* Mon Jul 23 2007 - mmichael@suse.de
+* Mon Jul 23 2007 mmichael@suse.de
- fix crash-on-start n#293065
- fix uninitialized warnings
- fix empty-partition divide by 0 case
- 2.15.6
-* Mon Jul 16 2007 - jsrain@suse.cz
+* Mon Jul 16 2007 jsrain@suse.cz
- adapted to new libzypp
- added support for translations
- 2.15.5
-* Thu Jun 21 2007 - mmichael@suse.de
+* Thu Jun 21 2007 mmichael@suse.de
- upgrade to yast2-gtk-2.15.4, fixes many bugs, pwrt.
package selector, improved search, multi-select for
installations &, large scale robustness & functionality
table-sorting fix, progress bar fix, initial easter-egg,
add rpmlintrc to avoid complaints about plugin .so name
-* Fri May 11 2007 - mmichael@suse.de
+* Fri May 11 2007 mmichael@suse.de
- upgrade to yast2-gtk-2.15.3, fixes #268146, #271716
and improves package selector search / sort.
-* Tue Apr 17 2007 - mmichael@suse.de
+* Tue Apr 17 2007 mmichael@suse.de
- upgrade to yast2-gtk-2.15.2, fixes upgrade.ycp
-* Fri Mar 16 2007 - mmichael@suse.de
+* Fri Mar 16 2007 mmichael@suse.de
- upgrade to yast2-gtk-2.15.1, several fixes, including #247682, #247683
-* Wed Feb 07 2007 - mmichael@suse.de
+* Wed Feb 07 2007 mmichael@suse.de
- update to yast2-gtk-2.15.0, fixes build and adds new Frame type
-* Wed Aug 30 2006 - cthiel@suse.de
+* Wed Aug 30 2006 cthiel@suse.de
- added yast2-gtk-autogen.patch to fix build with latests yast2-devtools
-* Mon Aug 28 2006 - cthiel@suse.de
+* Mon Aug 28 2006 cthiel@suse.de
- fix build
-* Wed Aug 23 2006 - mmichael@suse.de
+* Wed Aug 23 2006 mmichael@suse.de
- import yast2-gtk into autobuild.
++++++ yast2-gtk-2.15.9r43566.tar.bz2 -> yast2-gtk-2.16.1.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/ChangeLog new/yast2-gtk-2.16.1/ChangeLog
--- old/yast2-gtk-2.15.9r43566/ChangeLog 2008-01-12 00:00:05.000000000 +0100
+++ new/yast2-gtk-2.16.1/ChangeLog 2008-01-16 14:36:27.000000000 +0100
@@ -1,3 +1,42 @@
+2008-01-16 Ricardo Cruz
+
+ * src/YGDialog.cc, src/YGLayout.cc & src/YGWidget.cc: ditched the old
+ sync-stretchable approach by an iteration on YDialog::setSize() (called
+ by UI::Recalc() and similar).
+ * src/ygtkratiobox.h/.c: merged and removed some calls.
+
+ * src/ygtkfieldentry.c: bug fix: mnemonic on YGTextEntry (and also, but less
+ significatively, to YGDate and YGTime) was not functional.
+
+ * src/YGTable.c: bug fix: trees looked awful. Made everything use our
+ YGtkCellRendererTextPixbuf.
+
+2008-01-15 Ricardo Cruz
+
+ * src/YGProgressBar.cc (YGBusyIndicator): implemented YBusyIndicator
+ (which is an undetermined progress bar). IMHO its semantics are a bit
+ contrived...
+
+ * You may notice some layout glitches, like the labels alignment on the tools
+ initialization screens. The thing is that we sync layout properties when
+ widgets are added or removed from a container, but with the new libyui,
+ properties like hstretch are not set on the constructor, and on the other hand,
+ widgets are now added to containers at the constructor, so layout properties are
+ only set afterwards.
+
+ * src/YGRadioButton.cc (YGRadioButton & Group): bug fix: not working, looks
+ like we have to add the button to the group ourselves. And re-written the thing.
+
+2008-01-13 Ricardo Cruz
+
+ * src/yzyppwrapper.cc: bug fix: we weren't escaping description text.
+
+2008-01-11 Ricardo Cruz
+
+ * src/yzyppwrapper.cc: fixed search: ignore cases.
+
+ * src/YGPackageSelector.cc: renamed Accept to Apply.
+
2008-01-11 Boyd Timothy
* src/Makefile.am: Added the icon files in icons/* to
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/configure new/yast2-gtk-2.16.1/configure
--- old/yast2-gtk-2.15.9r43566/configure 2008-01-02 18:26:10.000000000 +0100
+++ new/yast2-gtk-2.16.1/configure 2008-01-16 14:37:31.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for yast2-gtk 2.15.9.
+# Generated by GNU Autoconf 2.61 for yast2-gtk 2.16.1.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -728,8 +728,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-gtk'
PACKAGE_TARNAME='yast2-gtk'
-PACKAGE_VERSION='2.15.9'
-PACKAGE_STRING='yast2-gtk 2.15.9'
+PACKAGE_VERSION='2.16.1'
+PACKAGE_STRING='yast2-gtk 2.16.1'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1444,7 +1444,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 yast2-gtk 2.15.9 to adapt to many kinds of systems.
+\`configure' configures yast2-gtk 2.16.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1515,7 +1515,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-gtk 2.15.9:";;
+ short | recursive ) echo "Configuration of yast2-gtk 2.16.1:";;
esac
cat <<\_ACEOF
@@ -1626,7 +1626,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-gtk configure 2.15.9
+yast2-gtk configure 2.16.1
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1640,7 +1640,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-gtk $as_me 2.15.9, which was
+It was created by yast2-gtk $as_me 2.16.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2461,7 +2461,7 @@
# Define the identity of the package.
PACKAGE='yast2-gtk'
- VERSION='2.15.9'
+ VERSION='2.16.1'
cat >>confdefs.h <<_ACEOF
@@ -2689,7 +2689,7 @@
-VERSION="2.15.9"
+VERSION="2.16.1"
RPMNAME="yast2-gtk"
MAINTAINER="Ricardo Cruz \
Michael Meeks "
@@ -21941,7 +21941,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-gtk $as_me 2.15.9, which was
+This file was extended by yast2-gtk $as_me 2.16.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21994,7 +21994,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-gtk config.status 2.15.9
+yast2-gtk config.status 2.16.1
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/configure.in new/yast2-gtk-2.16.1/configure.in
--- old/yast2-gtk-2.15.9r43566/configure.in 2008-01-02 18:26:00.000000000 +0100
+++ new/yast2-gtk-2.16.1/configure.in 2008-01-16 14:37:15.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.16.3 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-gtk, 2.15.9, http://bugs.opensuse.org/, yast2-gtk)
+AC_INIT(yast2-gtk, 2.16.1, http://bugs.opensuse.org/, yast2-gtk)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.15.9"
+VERSION="2.16.1"
RPMNAME="yast2-gtk"
MAINTAINER="Ricardo Cruz \
Michael Meeks "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/YGDialog.cc new/yast2-gtk-2.16.1/src/YGDialog.cc
--- old/yast2-gtk-2.15.9r43566/src/YGDialog.cc 2008-01-02 01:13:33.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/YGDialog.cc 2008-01-16 14:36:27.000000000 +0100
@@ -386,6 +386,35 @@
gdk_window_set_cursor (m_window->getWidget()->window, cursor);
}
+
+// YWidget
+void YGDialog::setEnabled (bool enabled)
+{
+ doSetEnabled (enabled);
+ YWidget::setEnabled (enabled);
+}
+
+void YGDialog::setSize (int width, int height)
+{
+ // libyui calls YDialog::setSize() to force a geometry recalculation as a
+ // result of changed layout properties
+ struct inner {
+ static void syncStretchable (YWidget *ywidget, YGWidget *widget)
+ {
+ for (YWidgetListConstIterator it = ywidget->childrenBegin();
+ it != ywidget->childrenEnd(); it++) {
+ YWidget *ychild = const_cast (*it);
+ YGWidget *child = YGWidget::get (ychild);
+ if (child) {
+ widget->syncStretchable (ychild, child);
+ syncStretchable (ychild, child);
+ }
+ }
+ }
+ };
+ inner::syncStretchable (this, this);
+}
+
YDialog *YGWidgetFactory::createDialog (YDialogType dialogType, YDialogColorMode colorMode)
{
IMPL
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/YGDialog.h new/yast2-gtk-2.16.1/src/YGDialog.h
--- old/yast2-gtk-2.15.9r43566/src/YGDialog.h 2008-01-02 01:13:33.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/YGDialog.h 2008-01-16 14:36:27.000000000 +0100
@@ -28,7 +28,11 @@
static YGDialog *currentDialog();
static GtkWindow *currentWindow();
- YGWIDGET_IMPL_COMMON
+ virtual void setSize (int width, int height);
+ virtual void setEnabled (bool enabled);
+ virtual int preferredWidth() { return 0; }
+ virtual int preferredHeight() { return 0; }
+
YGWIDGET_IMPL_CHILD_ADDED (m_containee)
YGWIDGET_IMPL_CHILD_REMOVED (m_containee)
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/YGLayout.cc new/yast2-gtk-2.16.1/src/YGLayout.cc
--- old/yast2-gtk-2.15.9r43566/src/YGLayout.cc 2008-01-02 18:30:11.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/YGLayout.cc 2008-01-16 14:36:27.000000000 +0100
@@ -36,63 +36,58 @@
g_object_unref (G_OBJECT (m_labels_group));
}
+ YGWIDGET_IMPL_CHILD_ADDED (getWidget())
+ YGWIDGET_IMPL_CHILD_REMOVED (getWidget())
virtual string getDebugLabel() const
{ return primary() == YD_HORIZ ? "horizontal" : "vertical"; }
+ virtual void moveChild (YWidget *child, int x, int y) {}
- virtual void doAddChild (YWidget *ychild, GtkWidget *container)
- {
- IMPL
- YGWidget::doAddChild (ychild, container);
- // set labels of YGLabeledWidgets to the same width
- // we have to do quite some work due to over-clutter on YCP progs
- while (ychild) {
- if (ychild->hasChildren()) { // container
- // try to see if there is a YGLabeledWidget at start
- // (and ignore YSpacings)
- YWidget *container = ychild;
- for (YWidgetListConstIterator it = container->childrenBegin();
- it != container->childrenEnd(); it++) {
- ychild = *it;
- if (!dynamic_cast (ychild))
- break;
- }
- }
- else {
- YGWidget *ygchild = YGWidget::get (ychild);
- YGLabeledWidget *labeled_child = dynamic_cast (ygchild);
- if (labeled_child && labeled_child->orientation() == YD_HORIZ) {
- if (!m_labels_group)
- m_labels_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (m_labels_group,
- labeled_child->getLabelWidget());
- }
- break;
- }
+ void addSizeGroup (YGLabeledWidget *labeledWidget)
+ {
+ GtkWidget *label = labeledWidget->getLabelWidget();
+ if (m_labels_group) {
+ GSList *labels = gtk_size_group_get_widgets (m_labels_group);
+ if (g_slist_find (labels, label)) // contains label already?
+ return;
+ // labels is not to be freed!
}
+ else
+ m_labels_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+ gtk_size_group_add_widget (m_labels_group, label);
}
- YGWIDGET_IMPL_CHILD_ADDED (getWidget())
- YGWIDGET_IMPL_CHILD_REMOVED (getWidget())
-
- virtual void sync_stretchable (YWidget *ychild)
+ virtual void syncStretchable (YWidget *ychild, YGWidget *child)
{
IMPL
YGtkRatioBox *box = YGTK_RATIO_BOX (getWidget());
- YGWidget *child = YGWidget::get (ychild);
YUIDimension dim = primary();
bool horiz_fill = ychild->stretchable (YD_HORIZ) || ychild->hasWeight (YD_HORIZ);
bool vert_fill = ychild->stretchable (YD_VERT) || ychild->hasWeight (YD_VERT);
- ygtk_ratio_box_set_child_packing (box, child->getLayout(), ychild->weight (dim),
- horiz_fill, vert_fill, 0);
- ygtk_ratio_box_set_child_expand (box, child->getLayout(),
- ychild->stretchable (dim), isLayoutStretch (ychild, dim));
- YGWidget::sync_stretchable();
- }
+ ygtk_ratio_box_set_child_packing (box, child->getLayout(), ychild->stretchable (dim),
+ isLayoutStretch (ychild, dim), ychild->weight (dim), horiz_fill, vert_fill, 0);
- virtual void moveChild (YWidget *, int, int) {} // ignore
+ // align horizontal widget labels to the same width
+ // we do some work here, since they may be placed inside a HBox or something...
+ if (!horiz_fill)
+ return;
+ YWidget *yLabeledWidget = ychild;
+ while (yLabeledWidget->hasChildren()) { // container
+ YWidget *container = yLabeledWidget;
+ for (YWidgetListConstIterator it = container->childrenBegin();
+ it != container->childrenEnd(); it++) {
+ yLabeledWidget = *it;
+ if (!dynamic_cast (yLabeledWidget) /*ignore spacings*/)
+ break;
+ }
+ }
+ YGLabeledWidget *labeledWidget =
+ dynamic_cast (YGWidget::get (yLabeledWidget));
+ if (labeledWidget && labeledWidget->orientation() == YD_HORIZ)
+ addSizeGroup (labeledWidget);
+ }
};
YLayoutBox *YGWidgetFactory::createLayoutBox (YWidget *parent, YUIDimension dimension)
@@ -134,12 +129,12 @@
}
YGWIDGET_IMPL_CHILD_ADDED (m_widget)
YGWIDGET_IMPL_CHILD_REMOVED (m_widget)
+ virtual void moveChild (YWidget *child, int x, int y) {}
- virtual void sync_stretchable (YWidget *child)
+ virtual void syncStretchable (YWidget *ychild, YGWidget *child)
{
IMPL
setAlignment (alignment (YD_HORIZ), alignment (YD_VERT));
- YGWidget::sync_stretchable();
}
void setAlignment (YAlignmentType halign, YAlignmentType valign)
@@ -223,8 +218,6 @@
return TRUE;
}
- virtual void moveChild (YWidget *, int, int) {}; // ignore
-
virtual string getDebugLabel() const
{
struct inner {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/YGPackageSelector.cc new/yast2-gtk-2.16.1/src/YGPackageSelector.cc
--- old/yast2-gtk-2.15.9r43566/src/YGPackageSelector.cc 2008-01-02 18:30:11.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/YGPackageSelector.cc 2008-01-16 14:36:27.000000000 +0100
@@ -1624,7 +1624,7 @@
ygtk_wizard_set_abort_button_label (wizard, _("_Cancel"));
ygtk_wizard_set_abort_button_str_id (wizard, "cancel");
ygtk_wizard_set_back_button_label (wizard, "");
- ygtk_wizard_set_next_button_label (wizard, _("_Accept"));
+ ygtk_wizard_set_next_button_label (wizard, _("_Apply"));
ygtk_wizard_set_next_button_str_id (wizard, "accept");
g_signal_connect (G_OBJECT (getWidget()), "action-triggered",
G_CALLBACK (wizard_action_cb), this);
@@ -1784,7 +1784,7 @@
}
return FALSE;
}
- static void truncate (std::string &str, int size)
+ static void truncate (std::string &str, unsigned int size)
{
if (str.size() > size) {
str.erase (size-3);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/YGProgressBar.cc new/yast2-gtk-2.16.1/src/YGProgressBar.cc
--- old/yast2-gtk-2.15.9r43566/src/YGProgressBar.cc 2008-01-02 18:30:11.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/YGProgressBar.cc 2008-01-16 14:36:27.000000000 +0100
@@ -45,7 +45,7 @@
class YGDownloadProgress : public YDownloadProgress, public YGLabeledWidget
{
- guint timeout_id;
+guint timeout_id;
public:
YGDownloadProgress (YWidget *parent, const string &label,
@@ -155,3 +155,75 @@
return new YGMultiProgressMeter (parent, dim, maxValues);
}
+#include "YBusyIndicator.h"
+
+/* YBusyIndicator semantics are pretty contrived. It seems we should animate the widget
+ until timeout is reached. The application will ping setAlive(true) calls -- and we
+ reset the timeout -- as an indication that the program hasn't hang in some operation. */
+
+#define PULSE_INTERVAL 150
+
+class YGBusyIndicator : public YBusyIndicator, public YGLabeledWidget
+{
+guint pulse_timeout_id;
+int alive_timeout;
+
+public:
+ YGBusyIndicator (YWidget *parent, const string &label, int timeout)
+ : YBusyIndicator (NULL, label, timeout)
+ , YGLabeledWidget (this, parent, label, YD_VERT, true,
+ GTK_TYPE_PROGRESS_BAR, NULL)
+ {
+ pulse_timeout_id = 0;
+ pulse();
+ }
+
+ virtual ~YGBusyIndicator()
+ { stop(); }
+
+ void pulse()
+ {
+ alive_timeout = timeout();
+ if (!pulse_timeout_id)
+ pulse_timeout_id = g_timeout_add (PULSE_INTERVAL, pulse_timeout_cb, this);
+ }
+
+ void stop()
+ {
+ alive_timeout = 0;
+ if (pulse_timeout_id) {
+ g_source_remove (pulse_timeout_id);
+ pulse_timeout_id = 0;
+ }
+ }
+
+ // YBusyIndicator
+ virtual void setAlive (bool alive)
+ {
+ alive ? pulse() : stop();
+ YBusyIndicator::setAlive (alive);
+ }
+
+ // callbacks
+ static gboolean pulse_timeout_cb (void *pData)
+ {
+ YGBusyIndicator *pThis = (YGBusyIndicator*) pData;
+ if (pThis->alive_timeout > 0) {
+ pThis->alive_timeout -= PULSE_INTERVAL;
+ gtk_progress_bar_pulse (GTK_PROGRESS_BAR (pThis->getWidget()));
+ return TRUE;
+ }
+ pThis->pulse_timeout_id = 0;
+ return FALSE;
+ }
+
+ YGWIDGET_IMPL_COMMON
+ YGLABEL_WIDGET_IMPL_SET_LABEL_CHAIN (YBusyIndicator)
+};
+
+YBusyIndicator *YGWidgetFactory::createBusyIndicator (YWidget *parent, const string &label, int timeout)
+{
+ IMPL
+ return new YGBusyIndicator (parent, label, timeout);
+}
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/YGRadioButton.cc new/yast2-gtk-2.16.1/src/YGRadioButton.cc
--- old/yast2-gtk-2.15.9r43566/src/YGRadioButton.cc 2008-01-02 18:30:11.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/YGRadioButton.cc 2008-01-16 14:36:27.000000000 +0100
@@ -8,6 +8,8 @@
#include "YGUtils.h"
#include "YGWidget.h"
+#if 0
+//** Older approach:
// Sub-class GtkRadioButton to get a widget that renders like
// a radio-button, but behaves like a check/toggle-button.
static GType getCheckRadioButtonType()
@@ -31,26 +33,31 @@
klass_new->clicked = klass_sane->clicked;
return type;
}
+#endif
-#include "YRadioButtonGroup.h"
#include "YRadioButton.h"
+#include "YRadioButtonGroup.h"
class YGRadioButton : public YRadioButton, public YGWidget
{
public:
YGRadioButton (YWidget *parent, const std::string &label, bool isChecked)
: YRadioButton (NULL, label),
- YGWidget (this, parent, true, getCheckRadioButtonType(), NULL)
+ YGWidget (this, parent, true, GTK_TYPE_RADIO_BUTTON, NULL)
{
IMPL
setBorder (0);
- setValue (isChecked);
-
- gtk_button_set_use_underline (GTK_BUTTON (getWidget()), TRUE);
setLabel (label);
+ gtk_button_set_use_underline (GTK_BUTTON (getWidget()), TRUE);
- g_signal_connect (G_OBJECT (getWidget()), "toggled",
- G_CALLBACK (toggled_cb), this);
+ g_signal_connect_after (G_OBJECT (getWidget()), "toggled",
+ G_CALLBACK (toggled_cb), this);
+ }
+
+ GSList *setGroup (GSList *group)
+ {
+ gtk_radio_button_set_group (GTK_RADIO_BUTTON (getWidget()), group);
+ return gtk_radio_button_get_group (GTK_RADIO_BUTTON (getWidget()));
}
// YRadioButton
@@ -73,13 +80,11 @@
virtual void setValue (bool checked)
{
IMPL
- g_signal_handlers_block_by_func (getWidget(), (gpointer) toggled_cb, this);
-
- if (checked)
- buttonGroup()->uncheckOtherButtons ((YRadioButton *) this);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (getWidget()), checked);
-
- g_signal_handlers_unblock_by_func (getWidget(), (gpointer) toggled_cb, this);
+ if (checked) { // can't uncheck a radio button
+ g_signal_handlers_block_by_func (getWidget(), (gpointer) toggled_cb, this);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (getWidget()), checked);
+ g_signal_handlers_unblock_by_func (getWidget(), (gpointer) toggled_cb, this);
+ }
}
YGWIDGET_IMPL_COMMON
@@ -89,16 +94,8 @@
static void toggled_cb (GtkButton *button, YGRadioButton *pThis)
{
IMPL
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button))) {
- pThis->buttonGroup()->uncheckOtherButtons ((YRadioButton *) pThis);
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))
pThis->emitEvent (YEvent::ValueChanged);
- }
- else {
- // leave it active
- g_signal_handlers_block_by_func (button, (gpointer) toggled_cb, pThis);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
- g_signal_handlers_unblock_by_func (button, (gpointer) toggled_cb, pThis);
- }
}
};
@@ -106,18 +103,44 @@
bool isChecked)
{
IMPL
- return new YGRadioButton (parent, label, isChecked);
+ YRadioButton *button = new YGRadioButton (parent, label, isChecked);
+
+ // libyui instructs us to do it here due to vfuncs craziness
+ YRadioButtonGroup *group = button->buttonGroup();
+ if (group)
+ group->addRadioButton (button);
+ button->setValue (isChecked);
+
+ return button;
}
// YRadioButtonGroup
class YGRadioButtonGroup : public YRadioButtonGroup, public YGWidget
{
+GSList *group;
+
public:
YGRadioButtonGroup(YWidget *parent)
: YRadioButtonGroup (NULL),
YGWidget (this, parent, true, GTK_TYPE_EVENT_BOX, NULL)
- {}
+ {
+ group = NULL;
+ }
+
+ virtual void addRadioButton (YRadioButton *_button)
+ {
+ YGRadioButton *button = (YGRadioButton *) YGWidget::get (_button);
+ group = button->setGroup (group);
+ YRadioButtonGroup::addRadioButton (_button);
+ }
+
+ virtual void removeRadioButton (YRadioButton *_button)
+ {
+ YGRadioButton *button = (YGRadioButton *) YGWidget::get (_button);
+ button->setGroup (NULL);
+ YRadioButtonGroup::removeRadioButton (_button);
+ }
YGWIDGET_IMPL_COMMON
YGWIDGET_IMPL_CHILD_ADDED (m_widget)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/YGTable.cc new/yast2-gtk-2.16.1/src/YGTable.cc
--- old/yast2-gtk-2.15.9r43566/src/YGTable.cc 2008-01-02 01:13:33.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/YGTable.cc 2008-01-16 14:36:27.000000000 +0100
@@ -26,9 +26,9 @@
{
IMPL
if (ordinaryModel) {
- addColumn (GDK_TYPE_PIXBUF, "", YAlignUnchanged, YGSelectionModel::ICON_COLUMN);
- addColumn (G_TYPE_STRING, "", YAlignUnchanged, YGSelectionModel::LABEL_COLUMN);
- gtk_tree_view_set_model (getView(), getModel());
+ appendIconTextColumn ("", YAlignUnchanged, YGSelectionModel::ICON_COLUMN,
+ YGSelectionModel::LABEL_COLUMN);
+ setModel();
}
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (getWidget()), FALSE);
@@ -44,14 +44,18 @@
inline GtkTreeView *getView()
{ return GTK_TREE_VIEW (getWidget()); }
- void addColumn (GType type, string header, YAlignmentType header_align, int col_nb)
+ void appendIconTextColumn (string header, YAlignmentType align, int icon_col, int text_col)
{
IMPL
- GtkTreeViewColumn *column = 0;
+ GtkTreeViewColumn *column;
+ GtkCellRenderer *renderer;
+
+ renderer = ygtk_cell_renderer_text_pixbuf_new();
+ column = gtk_tree_view_column_new_with_attributes (header.c_str(),
+ renderer, "pixbuf", icon_col, "text", text_col, NULL);
- // The allignment of the column items
gfloat xalign = -1;
- switch (header_align) {
+ switch (align) {
case YAlignBegin:
xalign = 0.0;
break;
@@ -64,45 +68,33 @@
case YAlignUnchanged:
break;
}
+ if (xalign != -1)
+ g_object_set (renderer, "xalign", xalign, NULL);
- GtkCellRenderer *renderer = 0;
- if (type == G_TYPE_STRING) {
- renderer = gtk_cell_renderer_text_new();
- column = gtk_tree_view_column_new_with_attributes (header.c_str(),
- renderer, "text", col_nb, NULL);
- }
- else if (type == GDK_TYPE_PIXBUF) {
- renderer = gtk_cell_renderer_pixbuf_new();
- column = gtk_tree_view_column_new_with_attributes (header.c_str(),
- renderer, "pixbuf", col_nb, NULL);
- }
- else if (type == G_TYPE_BOOLEAN) { // toggle button
- renderer = gtk_cell_renderer_toggle_new();
- g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (col_nb));
- column = gtk_tree_view_column_new_with_attributes (header.c_str(),
- renderer, "active", col_nb, NULL);
+ gtk_tree_view_column_set_resizable (column, TRUE);
+ gtk_tree_view_append_column (getView(), column);
+ }
- g_signal_connect (G_OBJECT (renderer), "toggled",
- G_CALLBACK (toggled_cb), this);
- }
- else if (type == YGTK_TYPE_CELL_RENDERER_TEXT_PIXBUF) { // string, pixbuf combo
- renderer = ygtk_cell_renderer_text_pixbuf_new();
- g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (col_nb));
- column = gtk_tree_view_column_new_with_attributes (header.c_str(),
- renderer, "pixbuf", col_nb, "text", col_nb+1, NULL);
- }
- else
- g_error ("YGTable: no support for column of given type");
+ void appendCheckColumn (string header, int bool_col)
+ {
+ IMPL
+ GtkTreeViewColumn *column;
+ GtkCellRenderer *renderer;
- if (renderer && xalign != -1)
- g_object_set (renderer, "xalign", xalign, NULL);
+ renderer = gtk_cell_renderer_toggle_new();
+ g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (bool_col));
+ column = gtk_tree_view_column_new_with_attributes (header.c_str(),
+ renderer, "active", bool_col, NULL);
+
+ g_signal_connect (G_OBJECT (renderer), "toggled",
+ G_CALLBACK (toggled_cb), this);
gtk_tree_view_column_set_resizable (column, TRUE);
gtk_tree_view_append_column (getView(), column);
}
- virtual void setModel (GtkTreeModel *model)
- { gtk_tree_view_set_model (GTK_TREE_VIEW (getWidget()), model); }
+ void setModel()
+ { gtk_tree_view_set_model (GTK_TREE_VIEW (getWidget()), getModel()); }
// YGSelectionModel
virtual void setFocusItem (GtkTreeIter *iter, bool addingRow)
@@ -216,10 +208,11 @@
types.push_back (G_TYPE_STRING);
}
createModel (types);
- for (int i = 0; i < columns(); i++)
- addColumn (YGTK_TYPE_CELL_RENDERER_TEXT_PIXBUF,
- header (i), alignment (i), i*2);
- gtk_tree_view_set_model (getView(), getModel());
+ for (int i = 0; i < columns(); i++) {
+ int col = i*2;
+ appendIconTextColumn (header (i), alignment (i), col, col+1);
+ }
+ setModel();
g_signal_connect (G_OBJECT (getWidget()), "row-activated",
G_CALLBACK (activated_cb), (YGTableView*) this);
@@ -331,10 +324,9 @@
types.push_back (GDK_TYPE_PIXBUF);
types.push_back (G_TYPE_STRING);
createModel (types);
- addColumn (G_TYPE_BOOLEAN, "", YAlignUnchanged, 0);
- addColumn (GDK_TYPE_PIXBUF, "", YAlignUnchanged, 1);
- addColumn (G_TYPE_STRING, "", YAlignUnchanged, 2);
- gtk_tree_view_set_model (getView(), getModel());
+ appendCheckColumn ("", 0);
+ appendIconTextColumn ("", YAlignUnchanged, 1, 2);
+ setModel();
g_signal_connect (G_OBJECT (getWidget()), "cursor-changed",
G_CALLBACK (selected_cb), (YGTableView*) this);
@@ -414,6 +406,7 @@
: YTree (NULL, label)
, YGTableView (this, parent, label, true, true)
{
+ gtk_tree_view_set_enable_tree_lines (getView(), TRUE);
g_signal_connect (G_OBJECT (getWidget()), "row-activated",
G_CALLBACK (activated_cb), (YGTableView*) this);
g_signal_connect (G_OBJECT (getWidget()), "cursor-changed",
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/ygtkbargraph.c new/yast2-gtk-2.16.1/src/ygtkbargraph.c
--- old/yast2-gtk-2.15.9r43566/src/ygtkbargraph.c 2008-01-02 01:13:33.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/ygtkbargraph.c 2008-01-16 14:36:27.000000000 +0100
@@ -95,8 +95,8 @@
// Set proportion
gtk_widget_set_size_request (box, 10, -1); // for homogeneous...
- ygtk_ratio_box_set_child_packing (YGTK_RATIO_BOX (bar), box, MAX (value, 1),
- TRUE, TRUE, 0);
+ ygtk_ratio_box_set_child_packing (YGTK_RATIO_BOX (bar), box, TRUE, FALSE,
+ MAX (value, 1), TRUE, TRUE, 0);
// Set background color
// The Tango palette
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/ygtkcellrenderertextpixbuf.c new/yast2-gtk-2.16.1/src/ygtkcellrenderertextpixbuf.c
--- old/yast2-gtk-2.15.9r43566/src/ygtkcellrenderertextpixbuf.c 2008-01-02 01:13:33.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/ygtkcellrenderertextpixbuf.c 2008-01-16 14:36:27.000000000 +0100
@@ -98,8 +98,10 @@
// will be calculated at expose, as both pixbuf and text have their offsets...
if (xoffset) *xoffset = 0;
if (yoffset) *yoffset = 0;
- if (!width && !height)
+ if (!width || !height)
return;
+ *width = 0;
+ *height = 0;
if (tpcell->pixbuf) {
*width += gdk_pixbuf_get_width (tpcell->pixbuf);
@@ -117,9 +119,8 @@
g_object_unref (G_OBJECT (layout));
}
-
*width += cell->xpad*2;
- *height += cell->ypad*2;
+ *height += cell->ypad*2 + 2;
}
static void ygtk_cell_renderer_text_pixbuf_render (GtkCellRenderer *cell,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/ygtkfieldentry.c new/yast2-gtk-2.16.1/src/ygtkfieldentry.c
--- old/yast2-gtk-2.15.9r43566/src/ygtkfieldentry.c 2008-01-02 01:13:33.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/ygtkfieldentry.c 2008-01-16 14:36:27.000000000 +0100
@@ -167,10 +167,21 @@
return gtk_entry_get_text (entry);
}
+static gboolean ygtk_field_entry_mnemonic_activate (GtkWidget *widget, gboolean cycling)
+{
+ YGtkFieldEntry *fields = YGTK_FIELD_ENTRY (widget);
+ GtkEntry *entry = ygtk_field_entry_get_field_widget (fields, 0);
+ gtk_widget_grab_focus (GTK_WIDGET (entry));
+ return TRUE;
+}
+
static void ygtk_field_entry_class_init (YGtkFieldEntryClass *klass)
{
ygtk_field_entry_parent_class = g_type_class_peek_parent (klass);
+ GtkWidgetClass* widget_class = GTK_WIDGET_CLASS (klass);
+ widget_class->mnemonic_activate = ygtk_field_entry_mnemonic_activate;
+
filter_entry_signal = g_signal_new ("field_entry_changed",
G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (YGtkFieldEntryClass, filter_entry_changed),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/ygtkratiobox.c new/yast2-gtk-2.16.1/src/ygtkratiobox.c
--- old/yast2-gtk-2.15.9r43566/src/ygtkratiobox.c 2008-01-02 01:13:33.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/ygtkratiobox.c 2008-01-16 14:36:27.000000000 +0100
@@ -285,12 +285,11 @@
}
void ygtk_ratio_box_set_child_packing (YGtkRatioBox *box, GtkWidget *child,
- gfloat ratio, gboolean xfill, gboolean yfill,
- guint padding)
+ gboolean expand, gboolean must_expand, gfloat ratio, gboolean xfill, gboolean yfill,
+ guint padding)
{
YGtkRatioBoxChild *child_info;
child_info = ygtk_ratio_get_child_info (box, child);
-
if (child_info) {
gtk_widget_freeze_child_notify (child);
@@ -298,8 +297,8 @@
child_info->xfill = xfill;
child_info->yfill = yfill;
child_info->padding = padding;
- child_info->expand = 0;
- child_info->must_expand = 0;
+ child_info->expand = expand;
+ child_info->must_expand = expand && must_expand;
if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (box))
gtk_widget_queue_resize (child);
@@ -308,47 +307,6 @@
}
}
-void ygtk_ratio_box_get_child_packing (YGtkRatioBox *box, GtkWidget *child,
- gfloat *ratio, gboolean *xfill,
- gboolean *yfill, guint *padding,
- gboolean *expand)
-{
- YGtkRatioBoxChild *child_info;
- child_info = ygtk_ratio_get_child_info (box, child);
-
- if (child_info) {
- gtk_widget_freeze_child_notify (child);
-
- if (ratio) *ratio = child_info->ratio;
- if (xfill) *xfill = child_info->xfill;
- if (yfill) *yfill = child_info->yfill;
- if (padding) *padding = child_info->padding;
- if (expand) *expand = child_info->expand;
- }
-}
-
-void ygtk_ratio_box_set_child_expand (YGtkRatioBox *box, GtkWidget *child,
- gboolean expand, gboolean must_expand)
-{
- YGtkRatioBoxChild *child_info;
- child_info = ygtk_ratio_get_child_info (box, child);
- if (child_info)
- {
- child_info->expand = expand;
- if (expand)
- child_info->must_expand = must_expand;
- }
-}
-
-void ygtk_ratio_box_set_child_ratio (YGtkRatioBox *box, GtkWidget *child,
- gfloat ratio)
-{
- YGtkRatioBoxChild *child_info;
- child_info = ygtk_ratio_get_child_info (box, child);
- if (child_info)
- child_info->ratio = ratio;
-}
-
void ygtk_ratio_box_set_spacing (YGtkRatioBox *box, gint spacing)
{
box->spacing = spacing;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/ygtkratiobox.h new/yast2-gtk-2.16.1/src/ygtkratiobox.h
--- old/yast2-gtk-2.15.9r43566/src/ygtkratiobox.h 2008-01-02 01:13:33.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/ygtkratiobox.h 2008-01-16 14:36:27.000000000 +0100
@@ -79,22 +79,13 @@
void ygtk_ratio_box_pack (YGtkRatioBox *box, GtkWidget *child, gfloat ratio,
gboolean xfill, gboolean yfill, guint padding);
-// If you don't want to use ratios, you can use the ordinary expand flag. NOTE:
-// If some other child has ratio > 0, this one won't expand.
-// All this mess is so we can conform with yast-core.
-void ygtk_ratio_box_set_child_expand (YGtkRatioBox *box, GtkWidget *child,
- gboolean expand, gboolean must_expand);
-void ygtk_ratio_box_set_child_ratio (YGtkRatioBox *box, GtkWidget *child,
- gfloat ratio);
-
+// You can either use ratios or the expand boolean. If some child has a ratio set (to
+// a value other than 0), then expand flags will be ignored -- use must_expand in such
+// cases, when you want a child to expand like the child of the most ratio.
+// (rules based on those of libyui -- check top)
void ygtk_ratio_box_set_child_packing (YGtkRatioBox *box, GtkWidget *child,
- gfloat ratio, gboolean xfill,
- gboolean yfill, guint padding);
-
-void ygtk_ratio_box_get_child_packing (YGtkRatioBox *box, GtkWidget *child,
- gfloat *ratio, gboolean *xfill,
- gboolean *yfill, guint *padding,
- gboolean *expandable);
+ gboolean expand, gboolean must_expand, gfloat ratio, gboolean xfill, gboolean yfill,
+ guint padding);
/* RatioHBox */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/YGUI.cc new/yast2-gtk-2.16.1/src/YGUI.cc
--- old/yast2-gtk-2.15.9r43566/src/YGUI.cc 2008-01-02 01:13:33.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/YGUI.cc 2008-01-16 14:36:27.000000000 +0100
@@ -97,13 +97,6 @@
g_free (m_argv);
}
-static gboolean ycp_wakeup_fn (GIOChannel *source, GIOCondition condition,
- gpointer data)
-{
- *(int *)data = TRUE;
- return TRUE;
-}
-
void YGUI::checkInit()
{
if (!m_done_init) {
@@ -114,6 +107,13 @@
//#define PRINT_EVENTS
+static gboolean ycp_wakeup_fn (GIOChannel *source, GIOCondition condition,
+ gpointer data)
+{
+ *(int *)data = TRUE;
+ return TRUE;
+}
+
void YGUI::idleLoop (int fd_ycp)
{
IMPL
@@ -151,12 +151,6 @@
return FALSE;
}
-void YGUI::sendEvent (YEvent *event)
-{
- m_event_handler.sendEvent (event);
- g_main_context_wakeup (NULL);
-}
-
// utility that implements both userInput() and pollInput()
YEvent *YGUI::waitInput (unsigned long timeout_ms, bool block)
{
@@ -206,6 +200,12 @@
YEvent *YGUI::pollInput()
{ return waitInput (0, false); }
+void YGUI::sendEvent (YEvent *event)
+{
+ m_event_handler.sendEvent (event);
+ g_main_context_wakeup (NULL);
+}
+
static inline GdkScreen *getScreen ()
{ return gdk_display_get_default_screen (gdk_display_get_default()); }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/YGUI.h new/yast2-gtk-2.16.1/src/YGUI.h
--- old/yast2-gtk-2.15.9r43566/src/YGUI.h 2008-01-02 01:13:33.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/YGUI.h 2008-01-16 14:36:27.000000000 +0100
@@ -148,6 +148,7 @@
virtual YTree *createTree (YWidget *parent, const string &label);
virtual YTable *createTable (YWidget * parent, YTableHeader *header);
virtual YProgressBar *createProgressBar (YWidget *parent, const string &label, int maxValue);
+ virtual YBusyIndicator *createBusyIndicator (YWidget *parent, const string &label, int timeout);
virtual YRichText *createRichText (YWidget *parent, const string &text, bool plainTextMode);
virtual YIntField *createIntField (YWidget *parent, const string &label, int minVal, int maxVal, int initialVal);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/YGWidget.cc new/yast2-gtk-2.16.1/src/YGWidget.cc
--- old/yast2-gtk-2.15.9r43566/src/YGWidget.cc 2008-01-02 18:30:11.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/YGWidget.cc 2008-01-16 14:36:27.000000000 +0100
@@ -74,11 +74,17 @@
return gtk_widget_is_focus (GTK_WIDGET (getWidget()));
}
-void YGWidget::doSetEnabling (bool enabled)
+void YGWidget::doSetEnabled (bool enabled)
{
gtk_widget_set_sensitive (getWidget(), enabled);
}
+void YGWidget::doSetUseBoldFont (bool useBold)
+{
+ PangoWeight weight = useBold ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL;
+ YGUtils::setWidgetFont (getWidget(), weight, PANGO_SCALE_MEDIUM);
+}
+
void YGWidget::doAddChild (YWidget *ychild, GtkWidget *container)
{
GtkWidget *child = YGWidget::get (ychild)->getLayout();
@@ -147,14 +153,6 @@
setMinSize (width, height);
}
-void YGWidget::sync_stretchable (YWidget *child)
-{
- IMPL
- YWidget *parent = m_ywidget->parent();
- if (parent)
- YGWidget::get (parent)->sync_stretchable (m_ywidget);
-}
-
/* YGLabeledWidget follows */
YGLabeledWidget::YGLabeledWidget (YWidget *ywidget, YWidget *parent,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/YGWidget.h new/yast2-gtk-2.16.1/src/YGWidget.h
--- old/yast2-gtk-2.15.9r43566/src/YGWidget.h 2008-01-02 01:13:33.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/YGWidget.h 2008-01-16 14:36:27.000000000 +0100
@@ -33,9 +33,10 @@
// for YWidget
virtual bool doSetKeyboardFocus();
- virtual void doSetEnabling (bool enabled);
+ virtual void doSetEnabled (bool enabled);
virtual void doAddChild (YWidget *child, GtkWidget *container);
virtual void doRemoveChild (YWidget *child, GtkWidget *container);
+ void doSetUseBoldFont (bool useBold);
// Event handling
void emitEvent(YEvent::EventReason reason, bool if_notify = true,
@@ -48,7 +49,7 @@
// whenever the stretchable property may change (eg. when adding a child
// for a container), call this function to make sure it is honored.
- virtual void sync_stretchable (YWidget *child = 0);
+ virtual void syncStretchable (YWidget *ychild, YGWidget *child) {}
protected:
void show();
@@ -70,17 +71,17 @@
#define YGWIDGET_IMPL_COMMON \
virtual bool setKeyboardFocus() \
{ return doSetKeyboardFocus(); } \
- virtual void setEnabling (bool enabled) \
- { doSetEnabling (enabled); } \
+ virtual void setEnabled (bool enabled) { \
+ doSetEnabled (enabled); \
+ YWidget::setEnabled (enabled); \
+ } \
virtual int preferredWidth() { return 0; } \
virtual int preferredHeight() { return 0; } \
- virtual void moveChild (YWidget *child, int x, int y) {} \
virtual void setSize (int width, int height) {}
#define YGWIDGET_IMPL_USE_BOLD(ParentClass) \
virtual void setUseBoldFont (bool useBold) { \
- PangoWeight weight = useBold ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL; \
- YGUtils::setWidgetFont (getWidget(), weight, PANGO_SCALE_MEDIUM); \
+ doSetUseBoldFont (useBold); \
ParentClass::setUseBoldFont (useBold); \
}
@@ -89,7 +90,6 @@
virtual void addChild (YWidget *ychild) { \
YWidget::addChild (ychild); \
doAddChild (ychild, container); \
- sync_stretchable (ychild); \
}
#define YGWIDGET_IMPL_CHILD_REMOVED(container) \
virtual void removeChild (YWidget *ychild) { \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/src/yzyppwrapper.cc new/yast2-gtk-2.16.1/src/yzyppwrapper.cc
--- old/yast2-gtk-2.15.9r43566/src/yzyppwrapper.cc 2008-01-02 18:30:11.000000000 +0100
+++ new/yast2-gtk-2.16.1/src/yzyppwrapper.cc 2008-01-16 14:36:27.000000000 +0100
@@ -258,15 +258,16 @@
{
ZyppObject object = impl->zyppSel->theObj();
std::string text = object->description(), br = "<br>";
- if (impl->type == PACKAGE_TYPE) {
- // if it has this header, then it is HTML
- const char *header = "<!-- DT:Rich -->", header_len = 16;
- if (!text.compare (0, header_len, header, header_len))
- text.erase (0, header_len);
- else
- // add breakline for every double one...
- YGUtils::replace (text, "\n\n", 2, "<br>");
+ // if it has this header, then it is HTML
+ const char *header = "<!-- DT:Rich -->", header_len = 16;
+ if (!text.compare (0, header_len, header, header_len))
+ text.erase (0, header_len);
+ else {
+ YGUtils::escapeMarkup (text);
+ YGUtils::replace (text, "\n\n", 2, "<br>"); // break every double line
+ }
+ if (impl->type == PACKAGE_TYPE) {
ZyppPackage package = tryCastToZyppPkg (object);
std::string url = package->url(), license = package->license();
if (!url.empty())
@@ -788,13 +789,15 @@
if (match && names.defined) {
const std::list std::string &values = names.values;
std::list std::string::const_iterator it;
- for (it = values.begin(); it != values.end(); it++)
- if (package->name().find (*it) == std::string::npos &&
- package->summary().find (*it) == std::string::npos &&
- package->provides().find (*it) == std::string::npos) {
+ for (it = values.begin(); it != values.end(); it++) {
+ const char *key = it->c_str();
+ if (!strcasestr (package->name().c_str(), key) &&
+ !strcasestr (package->summary().c_str(), key) &&
+ !strcasestr (package->provides().c_str(), key)) {
match = false;
break;
}
+ }
}
if (match && categories.defined) {
Ypp::Node *pkg_category = package->category();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-gtk-2.15.9r43566/VERSION new/yast2-gtk-2.16.1/VERSION
--- old/yast2-gtk-2.15.9r43566/VERSION 2008-01-12 00:01:50.000000000 +0100
+++ new/yast2-gtk-2.16.1/VERSION 2008-01-16 14:36:51.000000000 +0100
@@ -1 +1 @@
-2.15.9r43566
+2.16.1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org