diff options
author | 2010-08-30 22:05:54 +0000 | |
---|---|---|
committer | 2010-08-30 22:05:54 +0000 | |
commit | 18203fec845ec4eac5301cf950d3133cc0b4f43a (patch) | |
tree | bd94ca139bddb4347e38f788cab356e3da3f9881 /gnome-extra/hamster-applet/files | |
parent | Version bump. Translation updates and one bug fix. (diff) | |
download | historical-18203fec845ec4eac5301cf950d3133cc0b4f43a.tar.gz historical-18203fec845ec4eac5301cf950d3133cc0b4f43a.tar.bz2 historical-18203fec845ec4eac5301cf950d3133cc0b4f43a.zip |
Add missing dependencies per configure and code inspection. Clean up old revisions.
Package-Manager: portage-2.2_rc68/cvs/Linux x86_64
Diffstat (limited to 'gnome-extra/hamster-applet/files')
3 files changed, 0 insertions, 333 deletions
diff --git a/gnome-extra/hamster-applet/files/hamster-applet-2.24.0-gnomevfs.patch b/gnome-extra/hamster-applet/files/hamster-applet-2.24.0-gnomevfs.patch deleted file mode 100644 index 731bc8b3d058..000000000000 --- a/gnome-extra/hamster-applet/files/hamster-applet-2.24.0-gnomevfs.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Naur hamster-applet-2.24.0/hamster/about.py hamster-applet-2.24.0.new/hamster/about.py ---- hamster-applet-2.24.0/hamster/about.py 2008-09-22 22:20:02.000000000 +0530 -+++ hamster-applet-2.24.0.new/hamster/about.py 2008-09-29 09:10:13.000000000 +0530 -@@ -21,15 +21,15 @@ - from os.path import join - from hamster import SHARED_DATA_DIR - from hamster.defs import VERSION --import gtk, gnomevfs -+import gtk - import hamster - - - def on_email(about, mail): -- gnomevfs.url_show("mailto:%s" % mail) -+ gtk.show_uri(gtk.gdk.Screen(), "mailto:%s" % mail, 0L) - - def on_url(about, link): -- gnomevfs.url_show(link) -+ gtk.show_uri(gtk.gdk.Screen(), link, 0L) - - gtk.about_dialog_set_email_hook(on_email) - gtk.about_dialog_set_url_hook(on_url) diff --git a/gnome-extra/hamster-applet/files/hamster-applet-2.24.0-python25.patch b/gnome-extra/hamster-applet/files/hamster-applet-2.24.0-python25.patch deleted file mode 100644 index 335389e8b0cd..000000000000 --- a/gnome-extra/hamster-applet/files/hamster-applet-2.24.0-python25.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -Naur hamster-applet-2.24.0.orig/configure.ac hamster-applet-2.24.0/configure.ac ---- hamster-applet-2.24.0.orig/configure.ac 2008-09-22 22:20:03.000000000 +0530 -+++ hamster-applet-2.24.0/configure.ac 2008-09-26 15:46:37.000000000 +0530 -@@ -100,20 +100,38 @@ - AC_MSG_RESULT($PYGTK_DEFSDIR) - - --AC_MSG_CHECKING([for pysqlite2 module]) --if AC_RUN_LOG([DISPLAY= $PYTHON -c ' -+if test "x$PYTHON_VERSION" = "x2.5"; then -+ AC_MSG_CHECKING([for python sqlite module]) -+ if AC_RUN_LOG([DISPLAY= $PYTHON -c ' -+try: -+ import sqlite3 -+except ImportError, e: -+ if str(e).find("sqlite3") >= 0: -+ raise -+except: -+ pass -+ ']); then -+ AC_MSG_RESULT([yes]) -+ else -+ AC_MSG_RESULT([no]) -+ AC_MSG_ERROR([Python 2.5: inbuilt sqlite is required to build hamster]) -+ fi -+else -+ AC_MSG_CHECKING([for pysqlite2 module]) -+ if AC_RUN_LOG([DISPLAY= $PYTHON -c ' - try: - import pysqlite2 - except ImportError, e: - if str(e).find("pysqlite2") >= 0: -- raise -+ raise - except: - pass --']); then -- AC_MSG_RESULT([yes]) --else -- AC_MSG_RESULT([no]) -- AC_MSG_ERROR([pysqlite2 Python module required to build hamster]) -+ ']); then -+ AC_MSG_RESULT([yes]) -+ else -+ AC_MSG_RESULT([no]) -+ AC_MSG_ERROR([Python 2.4: pysqlite2 module required to build hamster]) -+ fi - fi - - -diff -Naur hamster-applet-2.24.0.orig/hamster/db.py hamster-applet-2.24.0/hamster/db.py ---- hamster-applet-2.24.0.orig/hamster/db.py 2008-09-22 22:20:02.000000000 +0530 -+++ hamster-applet-2.24.0/hamster/db.py 2008-09-26 16:05:58.000000000 +0530 -@@ -21,7 +21,14 @@ - - """separate file for database operations""" - --from pysqlite2 import dbapi2 as sqlite -+try: -+ import sqlite3 as sqlite -+except ImportError: -+ try: -+ from pysqlite2 import dbapi2 as sqlite -+ except ImportError: -+ print "Error: Neither sqlite3 nor pysqlite2 found" -+ raise - import os, time - import datetime - import hamster diff --git a/gnome-extra/hamster-applet/files/hamster-applet-2.26.2-pango-layout.patch b/gnome-extra/hamster-applet/files/hamster-applet-2.26.2-pango-layout.patch deleted file mode 100644 index 03a72c68254a..000000000000 --- a/gnome-extra/hamster-applet/files/hamster-applet-2.26.2-pango-layout.patch +++ /dev/null @@ -1,242 +0,0 @@ -From 47ca98014276fe73314abd10366f1e9b6c835650 Mon Sep 17 00:00:00 2001 -From: =?utf-8?q?Toms=20Bau=C4=A3is?= <toms.baugis@gmail.com> -Date: Thu, 11 Jun 2009 13:38:42 +0100 -Subject: [PATCH] use layout to set text instead of the cairo not suggested show_text. fixes bug 585420 - ---- - hamster/charting.py | 111 +++++++++++++++++++++++++++++++-------------------- - 1 files changed, 68 insertions(+), 43 deletions(-) - -diff --git a/hamster/charting.py b/hamster/charting.py -index 657fad6..49b4608 100644 ---- a/hamster/charting.py -+++ b/hamster/charting.py -@@ -53,7 +53,7 @@ Example: - - import gtk - import gobject --import cairo -+import cairo, pango - import copy - import math - -@@ -139,13 +139,19 @@ class Chart(gtk.DrawingArea): - self.animation_timeout = 20 #in miliseconds - - self.current_frame = self.animation_frames -- self.freeze_animation = False -+ self.freeze_animation = False -+ self.layout = None #pango text layout - - def _expose(self, widget, event): # expose is when drawing's going on - context = widget.window.cairo_create() - context.rectangle(event.area.x, event.area.y, event.area.width, event.area.height) - context.clip() - -+ self.layout = context.create_layout() -+ default_font = pango.FontDescription(gtk.Style().font_desc.to_string()) -+ default_font.set_size(8 * pango.SCALE) -+ self.layout.set_font_description(default_font) -+ - if self.orient_vertical: - # for simple bars figure, when there is way too much data for bars - # and go to lines (yay!) -@@ -417,21 +423,27 @@ class Chart(gtk.DrawingArea): - - # scale labels - set_color_gdk(context, self.style.fg[gtk.STATE_NORMAL]); -+ self.layout.set_width(-1) -+ - for i in range(records): -- extent = context.text_extents(data[i]["label"]) #x, y, width, height -- context.move_to(graph_x + (step * i) + (step - extent[2]) / 2.0, -- graph_y + graph_height + 13) -- context.show_text(data[i]["label"]) -+ self.layout.set_text(data[i]["label"]) -+ label_w, label_h = self.layout.get_pixel_size() -+ context.move_to(graph_x + (step * i) + (step - label_w) / 2.0, -+ graph_y + graph_height + 2) -+ -+ self.layout.set_text(data[i]["label"]) -+ -+ context.show_layout(self.layout) - - # values for max min and average - max_label = "%d" % self.max - if self.there_are_floats: - max_label = "%.1f" % self.max - -- extent = context.text_extents(max_label) #x, y, width, height -- -- context.move_to(graph_x - extent[2] - 16, rect.y + 10) -- context.show_text(max_label) -+ self.layout.set_text(max_label) -+ label_w, label_h = self.layout.get_pixel_size() -+ context.move_to(graph_x - label_w - 16, rect.y) -+ context.show_layout(self.layout) - - - #flip the matrix vertically, so we do not have to think upside-down -@@ -474,40 +486,45 @@ class Chart(gtk.DrawingArea): - label = "%.1f" % data[i]["value"] - else: - label = "%d" % data[i]["value"] -- extent = context.text_extents(label) #x, y, width, height -+ -+ self.layout.set_text(label) -+ label_w, label_h = self.layout.get_pixel_size() - - bar_size = graph_height * data[i]["factor"] -- - if self.animate: - bar_size = bar_size * 0.8 - else: - bar_size = bar_size * 0.9 - -- vertical_offset = (step - extent[2]) / 2.0 -+ vertical_offset = (step - label_h) / 2.0 - -- if self.animate or bar_size - vertical_offset < extent[3]: -- graph_y = -bar_size - 3 -+ if self.animate or bar_size - vertical_offset < label_h: -+ graph_y = -bar_size - label_h - else: -- graph_y = -bar_size + extent[3] + vertical_offset -+ graph_y = - bar_size - label_h + vertical_offset + 3 - -- context.move_to(graph_x + (step * i) + (step - extent[2]) / 2.0, -+ context.move_to(graph_x + (step * i) + (step - label_w) / 2.0, - graph_y) -- context.show_text(label) -+ context.show_layout(self.layout) - - - def _ellipsize_text (self, context, text, width): - """try to constrain text into pixels by ellipsizing end - TODO - check if cairo maybe has ability to ellipsize automatically - """ -- extent = context.text_extents(text) #x, y, width, height -- if extent[2] <= width: -+ self.layout.set_text(text) -+ label_w, label_h = self.layout.get_pixel_size() -+ -+ if label_w <= width: - return text - - res = text - while res: - res = res[:-1] -- extent = context.text_extents(res + "…") #x, y, width, height -- if extent[2] <= width: -+ -+ self.layout.set_text(text + "…") -+ label_w, label_h = self.layout.get_pixel_size() -+ if label_w <= width: - return res + "…" - - return text # if can't fit - return what we have -@@ -523,8 +540,9 @@ class Chart(gtk.DrawingArea): - else: - max_extent = 0 - for i in range(records): -- extent = context.text_extents(data[i]["label"]) #x, y, width, height -- max_extent = max(max_extent, extent[2] + 8) -+ self.layout.set_text(data[i]["label"]) -+ label_w, label_h = self.layout.get_pixel_size() -+ max_extent = max(max_extent, label_w + 8) - - - #push graph to the right, so it doesn't overlap, and add little padding aswell -@@ -551,15 +569,18 @@ class Chart(gtk.DrawingArea): - ellipsize_label = lambda(text): 3 - - # now let's put scale labels and align them right -- set_color_gdk(context, self.style.fg[gtk.STATE_NORMAL]); -+ set_color_gdk(context, self.style.fg[gtk.STATE_NORMAL]) - for i in range(records): - label = data[i]["label"] - if self.legend_width: - label = self._ellipsize_text(context, label, max_extent - 8) -- extent = context.text_extents(label) #x, y, width, height -+ -+ self.layout.set_text(label) -+ label_w, label_h = self.layout.get_pixel_size() - -- context.move_to(rect.x + max_extent - extent[2] - 8, rect.y + (step * i) + (step + extent[3]) / 2) -- context.show_text(label) -+ context.move_to(rect.x + max_extent - label_w - 8, -+ rect.y + (step * i) + (step - label_h) / 2) -+ context.show_layout(self.layout) - - context.stroke() - -@@ -624,18 +645,21 @@ class Chart(gtk.DrawingArea): - label = "%.1f" % data[i]["value"] - else: - label = "%d" % data[i]["value"] -- extent = context.text_extents(label) #x, y, width, height -+ -+ self.layout.set_text(label) -+ label_w, label_h = self.layout.get_pixel_size() - - bar_size = max_size * data[i]["factor"] -- horizontal_offset = (step + extent[3]) / 2.0 - extent[3] -+ horizontal_offset = (step - label_h) / 2.0 - -- if bar_size - horizontal_offset < extent[2]: -+ if bar_size - horizontal_offset < label_w: - label_x = graph_x + bar_size + horizontal_offset - else: -- label_x = graph_x + bar_size - extent[2] - horizontal_offset -+ label_x = graph_x + bar_size - label_w - horizontal_offset - -- context.move_to(label_x, graph_y + (step * i) + (step + extent[3]) / 2.0) -- context.show_text(label) -+ context.move_to(label_x, -+ graph_y + (step * i) + (step - label_h) / 2.0) -+ context.show_layout(self.layout) - - else: - # values for max min and average -@@ -645,7 +669,8 @@ class Chart(gtk.DrawingArea): - else: - max_label = "%d" % self.max - -- context.show_text(max_label) -+ self.layout.set_text(max_label) -+ context.show_layout(self.layout) - - - def _area_chart(self, context): -@@ -717,20 +742,20 @@ class Chart(gtk.DrawingArea): - set_color_gdk(context, self.style.fg[gtk.STATE_NORMAL]); - for i in range(records): - if i % 5 == 0: -- context.move_to(graph_x + 5 + (step * i), graph_y + graph_height + 13) -- context.show_text(data[i]["label"]) -+ context.move_to(graph_x + 5 + (step * i), graph_y + graph_height + 3) -+ self.layout.set_text(data[i]["label"]) -+ context.show_layout(self.layout) - - # values for max min and average - if self.there_are_floats: - max_label = "%.1f" % self.max - else: - max_label = "%d" % self.max -- -- extent = context.text_extents(max_label) #x, y, width, height -- -- context.move_to(graph_x - extent[2] - 16, rect.y + 10) -- context.show_text(max_label) -- -+ -+ self.layout.set_text(max_label) -+ label_w, label_h = self.layout.get_pixel_size() -+ context.move_to(graph_x - label_w - 16, rect.y) -+ context.show_layout(self.layout) - - context.rectangle(graph_x, graph_y, graph_width, graph_height + 1) - context.clip() --- -1.6.3.1 - |