Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63bf953752 | ||
|
|
2528d290f4 | ||
|
|
86006f4300 |
7 changed files with 280 additions and 1 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
wp_tray-0.5.1.tar.gz
|
||||
|
|
@ -1 +0,0 @@
|
|||
Package is retired
|
||||
1
sources
Normal file
1
sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
b94b32245558cadd384538ff7d8df403 wp_tray-0.5.1.tar.gz
|
||||
67
wp_tray-0.5.1-miscfixes.patch
Normal file
67
wp_tray-0.5.1-miscfixes.patch
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
--- wp_tray-0.5.1/src/applet.cc.orig 2006-09-10 15:05:32.000000000 +0200
|
||||
+++ wp_tray-0.5.1/src/applet.cc 2006-09-11 10:24:21.000000000 +0200
|
||||
@@ -91,7 +91,7 @@
|
||||
// set up the gconf client
|
||||
m_ref_gconf_client = Gnome::Conf::Client::get_default_client();
|
||||
|
||||
- m_ref_gconf_client->add_dir("/apps/wp_tray/");
|
||||
+ m_ref_gconf_client->add_dir("/apps/wp_tray");
|
||||
|
||||
// add our directory to the list of directories the GConfClient will watch
|
||||
m_ref_gconf_client->add_dir("/desktop/gnome/background");
|
||||
--- wp_tray-0.5.1/src/main.cc.orig 2006-09-10 15:05:32.000000000 +0200
|
||||
+++ wp_tray-0.5.1/src/main.cc 2006-09-11 10:04:47.000000000 +0200
|
||||
@@ -61,4 +61,5 @@
|
||||
{
|
||||
std::cerr << ex.what() << std::endl;
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
--- wp_tray-0.5.1/src/wallpapers.cc.orig 2006-09-10 15:05:32.000000000 +0200
|
||||
+++ wp_tray-0.5.1/src/wallpapers.cc 2006-09-10 16:25:03.000000000 +0200
|
||||
@@ -12,14 +12,17 @@
|
||||
#include <cstdlib>
|
||||
#include "boost/filesystem/exception.hpp"
|
||||
|
||||
+bool name_check_yes(const std::string&) { return true; }
|
||||
+
|
||||
// definitions //
|
||||
//
|
||||
c_wallpapers::c_wallpapers ()
|
||||
{
|
||||
+ boost::filesystem::path::default_name_check(name_check_yes);
|
||||
// set up the gconf client
|
||||
m_ref_gconf_client = Gnome::Conf::Client::get_default_client();
|
||||
|
||||
- m_ref_gconf_client->add_dir("/apps/wp_tray/");
|
||||
+ m_ref_gconf_client->add_dir("/apps/wp_tray");
|
||||
|
||||
// seed random number generator
|
||||
std::srand(std::time(NULL));
|
||||
@@ -124,10 +127,10 @@
|
||||
{
|
||||
fs::directory_iterator end_iter;
|
||||
|
||||
- for(fs::directory_iterator dir_itr(path_current); dir_itr != end_iter; ++ dir_itr)
|
||||
- {
|
||||
try
|
||||
{
|
||||
+ for(fs::directory_iterator dir_itr(path_current); dir_itr != end_iter; ++ dir_itr)
|
||||
+ {
|
||||
if(fs::is_directory(*dir_itr))
|
||||
{
|
||||
if(fs::symbolic_link_exists(*dir_itr))
|
||||
@@ -151,11 +154,11 @@
|
||||
++ n_file_count;
|
||||
}// end else
|
||||
}// end try
|
||||
+ }// end for
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
- std::cerr << "c_wallpapers::count_entries_in_directory() : " << dir_itr->leaf() << " " << ex.what() << std::endl;
|
||||
+ std::cerr << "c_wallpapers::count_entries_in_directory() : " << ex.what() << std::endl;
|
||||
}// end catch
|
||||
- }// end for
|
||||
|
||||
return n_file_count;
|
||||
}// end c_wallpapers::count_directory_entries
|
||||
50
wp_tray-0.5.1-search.patch
Normal file
50
wp_tray-0.5.1-search.patch
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
--- wp_tray-0.5.1/src/search_dialog.cc.orig 2006-09-10 15:05:32.000000000 +0200
|
||||
+++ wp_tray-0.5.1/src/search_dialog.cc 2006-09-11 11:37:21.000000000 +0200
|
||||
@@ -85,23 +85,39 @@
|
||||
{
|
||||
std::list<Glib::ustring> ls_wp_dir, ls_results;
|
||||
|
||||
- if(m_p_entry_search_string->get_text().length() == 0)
|
||||
- return false;
|
||||
-
|
||||
ls_wp_dir = m_ref_gconf_client->get_string_list("/apps/wp_tray/dir_list");
|
||||
|
||||
+ boost::regex regex;
|
||||
+ Glib::ustring rstring;
|
||||
+
|
||||
+ try {
|
||||
+ rstring += ".*";
|
||||
+ rstring += m_p_entry_search_string->get_text();
|
||||
+ rstring += ".*";
|
||||
+ regex = boost::regex(rstring.c_str(), boost::regex::perl | boost::regex::icase);
|
||||
+ } catch (...) {
|
||||
+ Gtk::MessageDialog d(_("Incorrect regular expression.\n"
|
||||
+ "Please use Perl-style format."), false,
|
||||
+ Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
|
||||
+ d.run();
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
// search each directory
|
||||
for(std::list<Glib::ustring>::iterator it = ls_wp_dir.begin(); it != ls_wp_dir.end(); ++ it)
|
||||
{
|
||||
// do the boost regex search
|
||||
// TODO: C string conversion is 'orrible :/
|
||||
- c_search_dialog::wallpaper_search (
|
||||
- fs::path(*it),
|
||||
- boost::regex(m_p_entry_search_string->get_text().c_str(), boost::regex::icase),
|
||||
- ls_results
|
||||
- );
|
||||
+ c_search_dialog::wallpaper_search(fs::path(*it), regex, ls_results);
|
||||
}// end for
|
||||
|
||||
+ if (ls_results.size() == 0) {
|
||||
+ Gtk::MessageDialog d(_("\nNo wallpapers found."), false, Gtk::MESSAGE_INFO,
|
||||
+ Gtk::BUTTONS_OK, true);
|
||||
+ d.run();
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
// clear list store
|
||||
m_ref_liststore->clear();
|
||||
|
||||
76
wp_tray-0.5.1-thumbs.patch
Normal file
76
wp_tray-0.5.1-thumbs.patch
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
--- wp_tray-0.5.1/src/applet.cc.orig 2006-09-10 15:05:32.000000000 +0200
|
||||
+++ wp_tray-0.5.1/src/applet.cc 2006-09-11 10:24:21.000000000 +0200
|
||||
@@ -368,6 +368,15 @@
|
||||
{
|
||||
Glib::RefPtr<Gdk::Pixbuf> gdk_pixbuf = Glib::RefPtr<Gdk::Pixbuf>();
|
||||
|
||||
+ int targetw, targeth;
|
||||
+ if (c_applet::horizontal()) {
|
||||
+ targetw = (int)(c_applet::get_size() * 1.3);
|
||||
+ targeth = c_applet::get_size();
|
||||
+ } else {
|
||||
+ targetw = c_applet::get_size();
|
||||
+ targeth = (int)(c_applet::get_size() * 0.77);
|
||||
+ }
|
||||
+
|
||||
try
|
||||
{
|
||||
gdk_pixbuf =
|
||||
@@ -376,16 +385,9 @@
|
||||
catch(...)
|
||||
{
|
||||
// bugger, slap a black square in there for now
|
||||
- if(c_applet::horizontal() == true)
|
||||
- {
|
||||
- gdk_pixbuf =
|
||||
- Gdk::Pixbuf::create(Gdk::COLORSPACE_RGB, 0, 8, static_cast<int>(c_applet::get_size() * 1.3f), c_applet::get_size());
|
||||
- }// end if
|
||||
- else
|
||||
- {
|
||||
- gdk_pixbuf =
|
||||
- Gdk::Pixbuf::create(Gdk::COLORSPACE_RGB, 0, 8, c_applet::get_size(), static_cast<int>(c_applet::get_size() * 1.3f));
|
||||
- }// end else
|
||||
+ gdk_pixbuf =
|
||||
+ Gdk::Pixbuf::create(Gdk::COLORSPACE_RGB, 0, 8, targetw,
|
||||
+ targeth);
|
||||
|
||||
gdk_pixbuf->fill(0x000000ff);
|
||||
|
||||
@@ -396,24 +398,19 @@
|
||||
|
||||
Glib::RefPtr<Gdk::Pixbuf> gdk_pixbuf_scaled = Glib::RefPtr<Gdk::Pixbuf>();
|
||||
|
||||
- if(c_applet::horizontal() == true)
|
||||
- {
|
||||
- gdk_pixbuf_scaled =
|
||||
- Gnome::UI::thumbnail_scale_down_pixbuf( gdk_pixbuf,
|
||||
- static_cast<int>(c_applet::get_size() * 1.3f),
|
||||
- c_applet::get_size());
|
||||
- }// end if
|
||||
- else
|
||||
- {
|
||||
- // PIXBUF_ROTATE_COUNTERCLOCKWISE
|
||||
- // PIXBUF_ROTATE_CLOCKWISE
|
||||
- /*
|
||||
- gdk_pixbuf_scaled =
|
||||
- Gnome::UI::thumbnail_scale_down_pixbuf( gdk_pixbuf_scaled->rotate_simple(Gnome::UI::PIXBUF_ROTATE_CLOCKWISE),
|
||||
- c_applet::get_size(),
|
||||
- static_cast<int>(c_applet::get_size() * 1.3f));
|
||||
- */
|
||||
- }// end else
|
||||
+ // Only scale down if we're sure the starting image is
|
||||
+ // completely larger than the destination size (or it will
|
||||
+ // abort).
|
||||
+ if (gdk_pixbuf->get_width() < targetw ||
|
||||
+ gdk_pixbuf->get_height() < targeth) {
|
||||
+ gdk_pixbuf_scaled = gdk_pixbuf;
|
||||
+ } else {
|
||||
+
|
||||
+ gdk_pixbuf_scaled =
|
||||
+ Gnome::UI::thumbnail_scale_down_pixbuf(gdk_pixbuf,
|
||||
+ targetw,
|
||||
+ targeth);
|
||||
+ }
|
||||
|
||||
m_gtk_image.set(gdk_pixbuf_scaled);
|
||||
}// end c_applet::render_thumbnail
|
||||
85
wp_tray.spec
Normal file
85
wp_tray.spec
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
Name: wp_tray
|
||||
Version: 0.5.1
|
||||
Release: 4%{?dist}
|
||||
Summary: A wallpaper-changing applet for GNOME
|
||||
|
||||
Group: Amusements/Graphics
|
||||
License: GPL
|
||||
URL: http://planetearthworm.com/projects/wp_tray/
|
||||
Source0: http://planetearthworm.com/projects/wp_tray/files/%{name}-%{version}.tar.gz
|
||||
Patch0: wp_tray-0.5.1-thumbs.patch
|
||||
Patch1: wp_tray-0.5.1-search.patch
|
||||
Patch2: wp_tray-0.5.1-miscfixes.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: gettext libglademm24-devel libgnomecanvasmm26-devel
|
||||
BuildRequires: gconfmm26-devel libgnomemm26-devel libgnomeuimm26-devel
|
||||
BuildRequires: gnome-panel-devel boost-devel
|
||||
|
||||
%description
|
||||
Wallpaper Tray is a GNOME applet used for changing your wallpaper.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .thumbs
|
||||
%patch1 -p1 -b .search
|
||||
%patch2 -p1 -b .miscfixes
|
||||
|
||||
%build
|
||||
%configure --with-boostfilesystem=%{_libdir}/libboost_filesystem.so \
|
||||
--with-boostregex=%{_libdir}/libboost_regex.so
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
%find_lang %{name}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
||||
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/wp_tray.schemas > /dev/null || :
|
||||
killall -HUP gconfd-2 &>/dev/null || :
|
||||
|
||||
%postun
|
||||
if [ "$1" -gt 1 ]; then
|
||||
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
||||
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/wp_tray.schemas >/dev/null || :
|
||||
killall -HUP gconfd-2 &>/dev/null || :
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ "$1" -eq 0 ]; then
|
||||
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
||||
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/wp_tray.schemas > /dev/null || :
|
||||
killall -HUP gconfd-2 &>/dev/null || :
|
||||
fi
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS ChangeLog COPYING NEWS README
|
||||
%{_datadir}/%{name}
|
||||
%{_datadir}/pixmaps/*
|
||||
%{_libdir}/bonobo/servers/*.server
|
||||
%{_libexecdir}/*
|
||||
%{_sysconfdir}/gconf/schemas/*.schemas
|
||||
|
||||
%changelog
|
||||
* Mon Sep 11 2006 Denis Leroy <denis@poolshark.org> - 0.5.1-4
|
||||
- Added patches to fix many bugs (see bug 205869)
|
||||
|
||||
* Sun Sep 3 2006 Denis Leroy <denis@poolshark.org> - 0.5.1-3
|
||||
- FE6 Rebuild
|
||||
|
||||
* Mon Feb 13 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.5.1-2
|
||||
- Rebuild for Fedora Extras 5
|
||||
|
||||
* Tue Jan 17 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.5.1-1
|
||||
- Upstream update
|
||||
- Merge Chris Chabot's spec file changes
|
||||
|
||||
* Mon Jan 2 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.4.6-1
|
||||
- Initial RPM release
|
||||
Loading…
Add table
Add a link
Reference in a new issue