Hello community, here is the log from the commit of package computertemp for openSUSE:Factory checked in at Mon Dec 20 14:59:46 CET 2010. -------- --- GNOME/computertemp/computertemp.changes 2009-08-28 17:28:13.000000000 +0200 +++ computertemp/computertemp.changes 2010-12-15 12:53:34.000000000 +0100 @@ -1,0 +2,17 @@ +Wed Dec 15 12:34:04 CET 2010 - vuntz@opensuse.org + +- Add computertemp-better-theming-and-fixes.patch that contains + fixes from svn: + + Removed event_box, now using just a hbox + + Better handling of dark themes + + Use of gtk.Tooltip() API instead of deprecated API + + Better "theme changed" handling + + Add padding of 2 pixels to the text + + Allow custom icons in ~/.local/share/computertemp +- Stop passing --libexecdir=%{_libexecdir}/gnome-panel to + configure, it's not needed. We can therefore remove the + gnome-panel BuildRequires. +- Add gnome-python-desktop BuildRequires (which is already a + Requires), for directory ownership, to fix build. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- computertemp-better-theming-and-fixes.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ computertemp.spec ++++++ --- /var/tmp/diff_new_pack.6KCZBQ/_old 2010-12-20 14:57:05.000000000 +0100 +++ /var/tmp/diff_new_pack.6KCZBQ/_new 2010-12-20 14:57:05.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package computertemp (Version 0.9.6.1) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,18 +19,20 @@ Name: computertemp Version: 0.9.6.1 -Release: 6 -License: GPL v2 only +Release: 13 +License: GPLv2 Summary: GNOME Panel Applet displaying the temperature of your CPU and disks Url: http://computertemp.berlios.de Group: System/GUI/GNOME Source0: %{name}-%{version}.tar.bz2 # PATCH-FIX-OPENSUSE computertemp-use-libexecdir.patch vuntz@novell.com -- Make it install the applet in the right directory Patch0: computertemp-use-libexecdir.patch +# PATCH-FIX-UPSTREAM computertemp-better-theming-and-fixes.patch vuntz@opensuse.org -- Better handling of dark themes, and various other fixes that were in the same commits. Taken from svn: based on svn diff -r 9:10 and svn diff -r 13:17 http://svn.infinicode.org/computertemp/trunk/computertemp +Patch1: computertemp-better-theming-and-fixes.patch BuildRequires: fdupes BuildRequires: gconf2-devel -# For directory ownership: -BuildRequires: gnome-panel +# For directory ownership +BuildRequires: gnome-python-desktop BuildRequires: intltool BuildRequires: python-gtk-devel Requires: %{name}-lang = %{version} @@ -40,7 +42,6 @@ %if %suse_version <= 1110 %define python_sitelib %{py_sitedir} %endif -%gconf_schemas_prereq %description Computer Temperature Monitor is a little applet for the GNOME desktop @@ -54,11 +55,11 @@ %prep %setup -q %patch0 -p1 +%patch1 -p0 %build %configure \ - --disable-schemas-install \ - --libexecdir=%{_libexecdir}/gnome-panel + --disable-schemas-install %__make %{?jobs:-j%jobs} %install @@ -79,7 +80,7 @@ %files -f %{name}.schemas_list %defattr(-, root, root) %doc AUTHORS ChangeLog NEWS README TODO -%{_libexecdir}/gnome-panel/computertemp +%{_libexecdir}/computertemp %{_libdir}/bonobo/servers/*.server %{_datadir}/computertemp/ %{python_sitelib}/computertemp/ ++++++ computertemp-better-theming-and-fixes.patch ++++++ Index: computertemp/computertemp_applet.py =================================================================== --- computertemp/computertemp_applet.py (révision 9) +++ computertemp/computertemp_applet.py (révision 10) @@ -394,11 +394,11 @@ class computertempApplet(gnomeapplet.App # Callback: panel background changed def change_background(self, panelapplet, backgroundtype, color, pixmap): self.applet.modify_bg(gtk.STATE_NORMAL, color) - self.box.modify_bg(gtk.STATE_NORMAL, color) + self.inside_applet.modify_bg(gtk.STATE_NORMAL, color) if pixmap is not None: s1 = self.applet.get_style() - s2 = self.box.get_style() + s2 = self.inside_applet.get_style() s1.bg_pixmap[gtk.STATE_NORMAL] = pixmap s2.bg_pixmap[gtk.STATE_NORMAL] = pixmap @@ -409,7 +409,7 @@ class computertempApplet(gnomeapplet.App self.inside_applet.remove(self.icon) self.inside_applet.remove(self.temp) - self.box.remove(self.inside_applet) + self.applet.remove(self.inside_applet) if self.orientation == 2 or self.orientation == 3: self.inside_applet = gtk.VBox() @@ -419,20 +419,14 @@ class computertempApplet(gnomeapplet.App self.inside_applet.pack_start(self.icon) self.inside_applet.pack_start(self.temp) self.inside_applet.show_all() - self.box.add(self.inside_applet) + self.applet.add(self.inside_applet) + # Draws applet def create_applet(self): app_window = self.applet - # Creates eventbox - event_box = gtk.EventBox() - event_box.set_events(gtk.gdk.BUTTON_PRESS_MASK | - gtk.gdk.POINTER_MOTION_MASK | - gtk.gdk.POINTER_MOTION_HINT_MASK | - gtk.gdk.CONFIGURE ) - # Creates icon for applet self.icon = gtk.Image() self.update_icon() @@ -450,11 +444,9 @@ class computertempApplet(gnomeapplet.App self.tooltip = gtk.Tooltips() self.update_tooltip() - # Adds hbox to eventbox - event_box.add(self.inside_applet) - app_window.add(event_box) + # Adds hbox to applet + app_window.add(self.inside_applet) app_window.show_all() - return event_box def menu_set(self): @@ -557,7 +549,7 @@ class computertempApplet(gnomeapplet.App self.tempmon = tempf.TempFuncs(self) # Lets create the gui - self.box = self.create_applet() + self.create_applet() self.change_orientation(None, None) # Forcing to get panel position self.prefs = prefs.ComputertempPrefs(self) Index: computertemp/computertemp_applet.py =================================================================== --- computertemp/computertemp_applet.py (révision 13) +++ computertemp/computertemp_applet.py (révision 17) @@ -31,9 +31,12 @@ import gnomeapplet import time import sys import os +import os.path as ospath import string import gc +from xdg import BaseDirectory as bdir + # Import libraries try: import computertemp @@ -203,25 +206,36 @@ class computertempApplet(gnomeapplet.App if temp < self.min_temp+(diff*1) and self.tempzone != 1: self.tempzone = 1 - self.icon_path = glob.pixmaps_dir + "/" + prefix + "_25.png" + self.icon_path = self.get_icon_file(prefix + "_25.png") self.set_icon(self.icon_path) elif self.min_temp+(diff*1) <= temp < self.min_temp+(diff*2) and self.tempzone != 2: - self.icon_path = glob.pixmaps_dir + "/" + prefix + "_50.png" + self.icon_path = self.get_icon_file(prefix + "_50.png") self.tempzone = 2 self.set_icon(self.icon_path) elif self.min_temp+(diff*2) <= temp < self.min_temp+(diff*3) and self.tempzone != 3: - self.icon_path = glob.pixmaps_dir + "/" + prefix + "_75.png" + self.icon_path = self.get_icon_file(prefix + "_75.png") self.tempzone = 3 self.set_icon(self.icon_path) elif self.min_temp+(diff*3) <= temp and self.tempzone != 4: - self.icon_path = glob.pixmaps_dir + "/" + prefix + "_100.png" + self.icon_path = self.get_icon_file(prefix + "_100.png") self.tempzone = 4 self.set_icon(self.icon_path) else: - self.icon_path = glob.pixmaps_dir + "/temp_na.png" + self.icon_path = self.get_icon_file(prefix + "_na.png") self.tempzone = 0 self.set_icon(self.icon_path) + def get_icon_file(self, file): + localdir = ospath.join(bdir.xdg_data_home, glob.name) + if ospath.isdir(localdir): + localfile = ospath.join(localdir, file) + if ospath.isfile(localfile): + return ospath.join(localdir, file) + else: + return ospath.join(glob.pixmaps_dir, file) + else: + return ospath.join(glob.pixmaps_dir, file) + # Updates data shown on applet tooltip def update_tooltip(self): @@ -259,9 +273,9 @@ class computertempApplet(gnomeapplet.App text += "\n Icon: %s" % self.icon_path text += "\n Log: %s" % self.parselogfilename(self.log_filename) - self.tooltip.set_tip(self.applet, text) + self.applet.set_tooltip_text(text) else: - self.tooltip.set_tip(self.applet, _('No Thermal Monitor Support!')) + self.applet.set_tooltip_text(_('No Thermal Monitor Support!')) # Update text def update_text(self): @@ -420,12 +434,13 @@ class computertempApplet(gnomeapplet.App self.inside_applet.pack_start(self.temp) self.inside_applet.show_all() self.applet.add(self.inside_applet) - # Draws applet - def create_applet(self): + def create_applet(self, applet): - app_window = self.applet + # Set applet properties + applet.set_applet_flags (gnomeapplet.EXPAND_MINOR) + applet.connect('style-set', self.set_text_style) # Creates icon for applet self.icon = gtk.Image() @@ -433,6 +448,7 @@ class computertempApplet(gnomeapplet.App # Create label for temp self.temp = gtk.Label() + self.temp.set_padding(2, 0) self.update_text() # Creates hbox with icon and temp @@ -441,12 +457,16 @@ class computertempApplet(gnomeapplet.App self.inside_applet.pack_start(self.temp) # Creates tooltip - self.tooltip = gtk.Tooltips() self.update_tooltip() # Adds hbox to applet - app_window.add(self.inside_applet) - app_window.show_all() + applet.add(self.inside_applet) + applet.show_all() + + def set_text_style(self, widget, prev, *params): + settings = gtk.settings_get_default() + style = gtk.rc_get_style_by_paths(settings, "*PanelApplet*", "PanelApp*" , None) + self.temp.set_style(style) def menu_set(self): @@ -549,7 +569,7 @@ class computertempApplet(gnomeapplet.App self.tempmon = tempf.TempFuncs(self) # Lets create the gui - self.create_applet() + self.create_applet(applet) self.change_orientation(None, None) # Forcing to get panel position self.prefs = prefs.ComputertempPrefs(self) Index: computertemp/computertemp_prefs.py =================================================================== --- computertemp/computertemp_prefs.py (révision 13) +++ computertemp/computertemp_prefs.py (révision 17) @@ -509,9 +509,7 @@ class ComputertempPrefs: self.logentry.set_text(self.app.log_filename) self.logentry.set_sensitive(not self.app.autologname and self.app.logging) self.logentry.set_activates_default(True) - - self.logentrytooltip = gtk.Tooltips() - self.logentrytooltip.set_tip(self.logentry, self.app.tips_logname) + self.logentry.set_tooltip_text(self.app.tips_logname) self.lognamelabel = gtk.Label() self.lognamelabel.set_use_markup(True) @@ -529,9 +527,7 @@ class ComputertempPrefs: self.logformat_entry.set_text(self.app.log_info) self.logformat_entry.set_sensitive(self.app.logging) self.logformat_entry.set_activates_default(True) - - self.logformattooltip = gtk.Tooltips() - self.logformattooltip.set_tip(self.logformat_entry, self.app.tips_loginfo) + self.logformat_entry.set_tooltip_text(self.app.tips_loginfo) logformathbox = gtk.HBox() logformathbox.set_spacing(12) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org