- Update to 1.7.2

This commit is contained in:
Miroslav Lichvar 2009-08-25 14:28:32 +00:00
parent 0c08a70e56
commit f58168b4ca
4 changed files with 19 additions and 87 deletions

View File

@ -1 +1 @@
conky-1.7.1.1.tar.bz2
conky-1.7.2.tar.bz2

View File

@ -1,81 +0,0 @@
commit 1571bb1aad01d8a475d7022ce4a47740fe90149d
Author: Brenden Matthews <brenden@rty.ca>
Date: Wed Jun 10 14:08:39 2009 -0600
Fix regression with loading of non-Xft fonts (sf.net #2804324).
diff --git a/ChangeLog b/ChangeLog
index 3973494..a8c6166 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2009-06-10
+ * Fix regression with loading of non-Xft fonts (sf.net #2804324)
+
2009-06-09
* Fixed a regression which causes fonts to not be rendered properly with
certain types of windows
diff --git a/src/conky.c b/src/conky.c
index 98492b6..bad64f7 100644
--- a/src/conky.c
+++ b/src/conky.c
@@ -6526,6 +6526,7 @@ static void draw_line(char *s)
cur_y -= font_ascent();
selected_font = specials[special_index].font_added;
+ set_font();
if (cur_y + font_ascent() < cur_y + old) {
cur_y += old;
} else {
diff --git a/src/fonts.c b/src/fonts.c
index 67e363a..61c7b85 100644
--- a/src/fonts.c
+++ b/src/fonts.c
@@ -32,6 +32,16 @@ int selected_font = 0;
int font_count = -1;
struct font_list *fonts = NULL;
+void set_font(void)
+{
+#ifdef XFT
+ if (use_xft) return;
+#endif /* XFT */
+ if (font_count > -1 && fonts[selected_font].font) {
+ XSetFont(display, window.gc, fonts[selected_font].font->fid);
+ }
+}
+
void setup_fonts(void)
{
if ((output_methods & TO_X) == 0) {
@@ -45,7 +55,8 @@ void setup_fonts(void)
window.xftdraw = XftDrawCreate(display, window.drawable,
DefaultVisual(display, screen), DefaultColormap(display, screen));
}
-#endif
+#endif /* XFT */
+ set_font();
}
int add_font(const char *data_in)
@@ -171,7 +182,7 @@ void load_fonts(void)
}
#endif
/* load normal font */
- if (fonts[i].font || (fonts[i].font = XLoadQueryFont(display, fonts[i].name)) == NULL) {
+ if (!fonts[i].font && (fonts[i].font = XLoadQueryFont(display, fonts[i].name)) == NULL) {
ERR("can't load font '%s'", fonts[i].name);
if ((fonts[i].font = XLoadQueryFont(display, "fixed")) == NULL) {
CRIT_ERR("can't load font '%s'", "fixed");
diff --git a/src/fonts.h b/src/fonts.h
index 5ff3d46..4853047 100644
--- a/src/fonts.h
+++ b/src/fonts.h
@@ -71,6 +71,7 @@ extern int selected_font;
extern int font_count;
void setup_fonts(void);
+void set_font(void);
int add_font(const char *);
void set_first_font(const char *);
void free_fonts(void);

View File

@ -2,6 +2,8 @@
%bcond_without audacious
%bcond_with imlib
%bcond_without lua
%bcond_without lua_cairo
%bcond_with lua_imlib
%bcond_with moc
%bcond_without mpd
%bcond_with nvidia
@ -10,8 +12,8 @@
%bcond_without wlan
Name: conky
Version: 1.7.1.1
Release: 3%{?dist}
Version: 1.7.2
Release: 1%{?dist}
Summary: A system monitor for X
Group: User Interface/X
@ -19,7 +21,6 @@ License: GPLv3+
URL: http://conky.sf.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: conky-1.7.1.1-nonxft.patch
BuildRequires: libXft-devel
BuildRequires: libXt-devel
@ -32,6 +33,8 @@ BuildRequires: dbus-glib-devel
%{?with_alsa:BuildRequires: alsa-lib-devel}
%{?with_imlib:BuildRequires: imlib2-devel}
%{?with_lua:BuildRequires: lua-devel}
%{?with_lua_cairo:BuildRequires: cairo-devel tolua++-devel}
%{?with_lua_imlib:BuildRequires: imlib2-devel tolua++-devel}
%{?with_nvidia:BuildRequires: libXNVCtrl-devel}
%{?with_rss:BuildRequires: curl-devel libxml2-devel}
%{?with_wlan:BuildRequires: wireless-tools-devel}
@ -42,7 +45,6 @@ It just keeps on given'er. Yeah.
%prep
%setup -q
%patch0 -p1 -b .nonxft
for i in AUTHORS; do
iconv -f iso8859-1 -t utf8 -o ${i}{_,} && touch -r ${i}{,_} && mv -f ${i}{_,}
@ -54,6 +56,8 @@ done
%{?with_audacious: --enable-audacious=yes} \
%{?with_imlib: --enable-imlib2} \
%{!?with_lua: --disable-lua} \
%{?with_lua_cairo: --enable-lua-cairo} \
%{?with_lua_imlib: --enable-lua-imlib2} \
%{!?with_moc: --disable-moc} \
%{!?with_mpd: --disable-mpd} \
%{?with_nvidia: --enable-nvidia} \
@ -69,6 +73,9 @@ make %{?_smp_mflags}
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/conky/conky_no_x11.conf
rm -f $RPM_BUILD_ROOT%{_libdir}/conky/*.{la,a}
%clean
rm -rf $RPM_BUILD_ROOT
@ -79,10 +86,16 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_sysconfdir}/conky
%config %{_sysconfdir}/conky/conky.conf
%{_bindir}/*
%if %{with lua_cairo} || %{with lua_imlib}
%{_libdir}/conky
%endif
%{_mandir}/man1/*
%changelog
* Tue Aug 25 2009 Miroslav Lichvar <mlichvar@redhat.com> - 1.7.2-1
- Update to 1.7.2
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

View File

@ -1 +1 @@
153a661e78a466c95b1b332e7cd599cb conky-1.7.1.1.tar.bz2
cf6f5d45d42ad68c618c00271813b80d conky-1.7.2.tar.bz2