summaryrefslogtreecommitdiff
path: root/deskutils
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-01-28 09:23:43 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-01-28 09:23:43 +0000
commite5babde3eb694e745afc04a756ca0dc5178575d5 (patch)
tree4ad75074eff3d968f5c7915ab7dd403e7c993d96 /deskutils
parentUpdate to 0.52, set maintainer to perl. (diff)
- Update to 0.6
- Pass maintainership to Jean-Yves PR: ports/76774 Submitted by: Jean-Yves Lefort <jylefort@brutele.be> Approved by: Piotr Smyrak <piotr.smyrak@heron.pl> (old maintainer)
Notes
Notes: svn path=/head/; revision=127531
Diffstat (limited to 'deskutils')
-rw-r--r--deskutils/gruler/Makefile22
-rw-r--r--deskutils/gruler/distinfo4
-rw-r--r--deskutils/gruler/files/patch-Makefile.in42
-rw-r--r--deskutils/gruler/files/patch-configure11
-rw-r--r--deskutils/gruler/files/patch-gRuler.desktop.in16
-rw-r--r--deskutils/gruler/files/patch-gruler.desktop.in18
-rw-r--r--deskutils/gruler/files/patch-src::Makefile.in6
-rw-r--r--deskutils/gruler/files/patch-src::draw.c163
-rw-r--r--deskutils/gruler/files/patch-src::gui.c139
-rw-r--r--deskutils/gruler/files/patch-src::gui_callbacks.c76
-rw-r--r--deskutils/gruler/files/patch-src::prefs.c70
-rw-r--r--deskutils/gruler/pkg-descr20
-rw-r--r--deskutils/gruler/pkg-plist10
13 files changed, 83 insertions, 514 deletions
diff --git a/deskutils/gruler/Makefile b/deskutils/gruler/Makefile
index 66de8ca4d134..5c7346f4c223 100644
--- a/deskutils/gruler/Makefile
+++ b/deskutils/gruler/Makefile
@@ -6,20 +6,26 @@
#
PORTNAME= gruler
-PORTVERSION= 0.4
-PORTREVISION= 1
-CATEGORIES= deskutils gnome
+PORTVERSION= 0.6
+CATEGORIES= deskutils
MASTER_SITES= http://linuxadvocate.org/projects/gruler/downloads/
-DISTNAME=${PORTNAME:S/gr/gR/}-${PORTVERSION}
-MAINTAINER= smyru@heron.pl
-COMMENT= Screen ruler for GNOME desktop
+MAINTAINER= jylefort@brutele.be
+COMMENT= A customizable screen ruler for GNOME
-USE_GMAKE= yes
USE_X_PREFIX= yes
USE_GNOME= gnomeprefix gnomehack libgnomeui libglade2
-USE_LIBTOOL_VER=15
+GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
+USE_REINPLACE= yes
+USE_GCC= 3.4
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|^CFLAGS=""||' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|PACKAGE_DATA_DIR|"${PREFIX}/share/gnome"|' \
+ ${WRKSRC}/src/gui.c
+ @${REINPLACE_CMD} -e 's|^\(gruler_pixmapsdir = \).*|\1${PREFIX}/share/gnome/pixmaps|' \
+ ${WRKSRC}/pixmaps/Makefile.in
.include <bsd.port.mk>
diff --git a/deskutils/gruler/distinfo b/deskutils/gruler/distinfo
index 9c413f6d2de8..98aa5c48c3d6 100644
--- a/deskutils/gruler/distinfo
+++ b/deskutils/gruler/distinfo
@@ -1,2 +1,2 @@
-MD5 (gRuler-0.4.tar.gz) = 9fb13566b8c254af8ddce93cbee43c8a
-SIZE (gRuler-0.4.tar.gz) = 322121
+MD5 (gruler-0.6.tar.gz) = 62f5c8e1814b615456be76f9677e6d49
+SIZE (gruler-0.6.tar.gz) = 339440
diff --git a/deskutils/gruler/files/patch-Makefile.in b/deskutils/gruler/files/patch-Makefile.in
index c1a517134242..be6b1592ef78 100644
--- a/deskutils/gruler/files/patch-Makefile.in
+++ b/deskutils/gruler/files/patch-Makefile.in
@@ -1,32 +1,34 @@
---- Makefile.in.orig Tue Nov 23 02:26:57 2004
-+++ Makefile.in Tue Nov 23 02:29:44 2004
-@@ -155,26 +155,14 @@
+--- Makefile.in.orig Thu Jan 27 22:20:10 2005
++++ Makefile.in Thu Jan 27 22:21:10 2005
+@@ -155,7 +155,7 @@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
--SUBDIRS = intl po macros include src
--
--grulerdocdir = ${prefix}/doc/gRuler
--grulerdoc_DATA = \
-- README\
-- COPYING\
-- AUTHORS\
-- ChangeLog\
-- INSTALL\
-- NEWS\
-- TODO\
-- ABOUT-NLS
--
-+SUBDIRS = intl po macros src
+-SUBDIRS = intl po macros include src pixmaps
++SUBDIRS = intl po macros src pixmaps
+
+ grulerdocdir = ${prefix}/doc/gruler
+ grulerdoc_DATA = \
+@@ -171,10 +171,10 @@
EXTRA_DIST = $(grulerdoc_DATA)
-gnomemenudir = $(prefix)/@NO_PREFIX_PACKAGE_MENU_DIR@/Utilities
+gnomemenudir = $(datadir)/applications
- gnomemenu_DATA = gRuler.desktop
+ gnomemenu_DATA = gruler.desktop
-gruler_glade_filedir = $(prefix)/@NO_PREFIX_PACKAGE_DATA_DIR@/@PACKAGE@/glade
-+gruler_glade_filedir = $(prefix)/@NO_PREFIX_PACKAGE_DATA_DIR@/glade
- gruler_glade_file_DATA = gRuler.glade
++gruler_glade_filedir = $(datadir)/@PACKAGE@/glade
+ gruler_glade_file_DATA = gruler.glade gruler-icon.png
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+@@ -605,8 +605,7 @@
+
+ info-am:
+
+-install-data-am: install-gnomemenuDATA install-gruler_glade_fileDATA \
+- install-grulerdocDATA
++install-data-am: install-gnomemenuDATA install-gruler_glade_fileDATA
+
+ install-exec-am:
+
diff --git a/deskutils/gruler/files/patch-configure b/deskutils/gruler/files/patch-configure
deleted file mode 100644
index f50648ca1162..000000000000
--- a/deskutils/gruler/files/patch-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig Tue Nov 16 00:57:01 2004
-+++ configure Tue Nov 16 00:57:52 2004
-@@ -12430,7 +12430,7 @@
- packageprefix=${prefix}
- fi
-
--packagedatadir=share
-+packagedatadir=share/${PACKAGE}
- packagedocdir=doc/${PACKAGE}
-
- packagepixmapsdir=share/pixmaps/${PACKAGE}
diff --git a/deskutils/gruler/files/patch-gRuler.desktop.in b/deskutils/gruler/files/patch-gRuler.desktop.in
deleted file mode 100644
index 1f217ffe2905..000000000000
--- a/deskutils/gruler/files/patch-gRuler.desktop.in
+++ /dev/null
@@ -1,16 +0,0 @@
---- gRuler.desktop.in.orig Tue Nov 23 02:50:31 2004
-+++ gRuler.desktop.in Tue Nov 23 02:52:00 2004
-@@ -1,10 +1,8 @@
--
- [Desktop Entry]
--Name=gRuler Version 0.1
--Comment=gRuler Version 0.1
-+Name=Screen Ruler
-+Comment=gRuler 0.1 measures screen distances
- Exec=gruler
--Icon=@PACKAGE_PIXMAPS_DIR@/
-+TryExec=gruler
- Terminal=false
--MultipleArgs=false
- Type=Application
-
diff --git a/deskutils/gruler/files/patch-gruler.desktop.in b/deskutils/gruler/files/patch-gruler.desktop.in
new file mode 100644
index 000000000000..6264d8197cb6
--- /dev/null
+++ b/deskutils/gruler/files/patch-gruler.desktop.in
@@ -0,0 +1,18 @@
+--- gruler.desktop.in.orig Thu Jan 27 22:22:49 2005
++++ gruler.desktop.in Thu Jan 27 22:48:49 2005
+@@ -1,10 +1,10 @@
+-
+ [Desktop Entry]
+-Name=gRuler
+-Comment=Screen Ruler
++Name=Screen Ruler
++Comment=Measure distances
+ Exec=gruler
+-Icon=@PACKAGE_PIXMAPS_DIR@/gruler-icon.png
++Icon=gruler-icon.png
+ Terminal=false
+ MultipleArgs=false
+ Type=Application
+-
++Categories=GNOME;Application;Utility;
++StartupNotify=true
diff --git a/deskutils/gruler/files/patch-src::Makefile.in b/deskutils/gruler/files/patch-src::Makefile.in
index b0478cce32d9..677664129523 100644
--- a/deskutils/gruler/files/patch-src::Makefile.in
+++ b/deskutils/gruler/files/patch-src::Makefile.in
@@ -1,12 +1,12 @@
---- src/Makefile.in.orig Tue Oct 5 05:18:57 2004
-+++ src/Makefile.in Tue Oct 5 05:19:02 2004
+--- src/Makefile.in.orig Thu Jan 27 22:24:50 2005
++++ src/Makefile.in Thu Jan 27 22:25:13 2005
@@ -159,9 +159,6 @@
$(GNOME_CFLAGS)
-AM_CFLAGS = \
- -Wall\
-- -O2
+- -g
bin_PROGRAMS = gruler
diff --git a/deskutils/gruler/files/patch-src::draw.c b/deskutils/gruler/files/patch-src::draw.c
deleted file mode 100644
index 138e8c2cd830..000000000000
--- a/deskutils/gruler/files/patch-src::draw.c
+++ /dev/null
@@ -1,163 +0,0 @@
---- src/draw.c.orig Wed Sep 29 02:58:00 2004
-+++ src/draw.c Tue Nov 23 09:06:43 2004
-@@ -32,10 +32,11 @@
- // draws given text centered on given point
- static void draw_centered_label(const gchar* pText, GdkDrawable* pDrawable, GdkGC* pGC, PangoLayout* pPangoLayout, GdkColor* pClrForeground, GdkColor* pClrBackground, gint nX, gint nY)
- {
-+ int nTextWidth = 0, nTextHeight = 0;
-+
- pango_layout_set_text(pPangoLayout, pText, -1);
-
- // measure text
-- int nTextWidth = 0, nTextHeight = 0;
- pango_layout_get_pixel_size(pPangoLayout, &nTextWidth, &nTextHeight);
-
- // draw text, centered and colored
-@@ -47,32 +48,41 @@
-
- gboolean draw_ruler_window(GtkWidget* pDrawingArea)
- {
-+ GdkPixmap* pPixmap;
-+ GtkWidget* pTopLevel;
-+ gint nWindowWidth, nWindowHeight;
-+ PangoLayout* pPangoLayout;
-+ PangoFontDescription *pPangoFontDescription;
-+ GdkColor clrBackground;
-+ GdkColor clrForeground;
-+ GdkGCValues gcsave;
-+ RulerOrientation eRulerOrientation;
-+
- // g_message("draw_ruler_window");
- g_return_val_if_fail(pDrawingArea != NULL, FALSE);
- if(pDrawingArea->window == NULL) return FALSE; // don't generate a warning
-
- // Extract pixmap pointer from window data
-- GdkPixmap* pPixmap = g_object_get_data(G_OBJECT(pDrawingArea), KEY_PIXMAP_POINTER);
-+ pPixmap = g_object_get_data(G_OBJECT(pDrawingArea), KEY_PIXMAP_POINTER);
- g_return_val_if_fail(pPixmap != NULL, FALSE);
-
- // Get top-level window and figure out orientation from window data
-- GtkWidget* pTopLevel = gtk_widget_get_toplevel(pDrawingArea);
-- RulerOrientation eRulerOrientation = (RulerOrientation)g_object_get_data(G_OBJECT(pTopLevel), KEY_RULER_ORIENTATION);
-+ pTopLevel = gtk_widget_get_toplevel(pDrawingArea);
-+ eRulerOrientation = (RulerOrientation)g_object_get_data(G_OBJECT(pTopLevel), KEY_RULER_ORIENTATION);
-
- // (for easy access)
-- gint nWindowWidth = pDrawingArea->allocation.width;
-- gint nWindowHeight = pDrawingArea->allocation.height;
-+ nWindowWidth = pDrawingArea->allocation.width;
-+ nWindowHeight = pDrawingArea->allocation.height;
-
- // Save GC values
-- GdkGCValues gcsave;
- gdk_gc_get_values(pDrawingArea->style->fg_gc[GTK_WIDGET_STATE(pDrawingArea)], &gcsave);
-
- // Create a Pango layout for text rendering
-- PangoLayout* pPangoLayout = gtk_widget_create_pango_layout(pDrawingArea, NULL);
-+ pPangoLayout = gtk_widget_create_pango_layout(pDrawingArea, NULL);
- g_return_val_if_fail(pPangoLayout != NULL, FALSE);
-
- // Set the font from the Pref dialog
-- PangoFontDescription *pPangoFontDescription = pango_font_description_from_string(gui_get_font_string());
-+ pPangoFontDescription = pango_font_description_from_string(gui_get_font_string());
- pango_layout_set_font_description(pPangoLayout, pPangoFontDescription);
-
- //=======================================
-@@ -80,7 +90,6 @@
- //=======================================
-
- // Find background color, and fill window with it
-- GdkColor clrBackground;
- gui_get_background_color(&clrBackground);
- gdk_gc_set_rgb_fg_color(pDrawingArea->style->fg_gc[GTK_WIDGET_STATE(pDrawingArea)], &clrBackground);
- gdk_draw_rectangle(pPixmap, pDrawingArea->style->fg_gc[GTK_WIDGET_STATE (pDrawingArea)],
-@@ -89,7 +98,6 @@
- nWindowWidth, nWindowHeight);
-
- // Outline the whole window with foreground color
-- GdkColor clrForeground;
- gui_get_foreground_color(&clrForeground);
- gdk_gc_set_rgb_fg_color(pDrawingArea->style->fg_gc[GTK_WIDGET_STATE (pDrawingArea)], &clrForeground);
- gdk_draw_rectangle(pPixmap, pDrawingArea->style->fg_gc[GTK_WIDGET_STATE (pDrawingArea)],
-@@ -182,21 +190,35 @@
- gint nWindowHeight = pDrawingArea->allocation.height;
-
- gint nMouseX, nMouseY;
-+ PangoLayout* pPangoLayout;
-+ PangoFontDescription *pPangoFontDescription;
-+ gint32 nClippedMouseX, nClippedMouseY;
-+ gchar buffer[100];
-+ int nTextWidth = 0, nTextHeight = 0;
-+ int nBoxWidth, nBoxHeight;
-+ GdkGCValues gcSavedValues;
-+ GdkGC* pGC;
-+ GdkColor clrLine = {0, 65535, 65535, 65535};
-+ GdkColor clrTextBoxBackground = {0, 62000, 62000, 62000};
-+ GdkColor clrTextBoxOutline = {0, 0, 0, 0};
-+ GdkColor clrText = {0, 0, 0, 0};
-+ gint nBoxCenterX;
-+ gint nBoxCenterY;
-+
- gdk_window_get_pointer(pDrawingArea->window, &nMouseX, &nMouseY, NULL);
-
- // Set text style and measure text
-- PangoLayout* pPangoLayout = gtk_widget_create_pango_layout(pDrawingArea, NULL); g_return_if_fail(pPangoLayout != NULL);
-- PangoFontDescription *pPangoFontDescription = pango_font_description_from_string(gui_get_font_string());
-+ pPangoLayout = gtk_widget_create_pango_layout(pDrawingArea, NULL); g_return_if_fail(pPangoLayout != NULL);
-+ pPangoFontDescription = pango_font_description_from_string(gui_get_font_string());
-
- pango_layout_set_font_description(pPangoLayout, pPangoFontDescription);
- // XXX: free any of these?
-
-- gint32 nClippedMouseX = max(nMouseX, 0);
-+ nClippedMouseX = max(nMouseX, 0);
- nClippedMouseX = min(nClippedMouseX, nWindowWidth);
-- gint32 nClippedMouseY = max(nMouseY, 0);
-+ nClippedMouseY = max(nMouseY, 0);
- nClippedMouseY = min(nClippedMouseY, nWindowHeight);
-
-- gchar buffer[100];
- if(eRulerOrientation == RulerOrientationHorizontal) {
- g_snprintf(buffer, 100, "%d", nClippedMouseX);
- }
-@@ -206,21 +228,18 @@
- pango_layout_set_text(pPangoLayout, buffer, -1);
-
- // Measure the text
-- int nTextWidth = 0, nTextHeight = 0;
- pango_layout_get_pixel_size(pPangoLayout, &nTextWidth, &nTextHeight);
-
-- int nBoxWidth = nTextWidth + (TEXT_BOX_RELIEF*2);
-- int nBoxHeight = nTextHeight + (TEXT_BOX_RELIEF*2);
-+ nBoxWidth = nTextWidth + (TEXT_BOX_RELIEF*2);
-+ nBoxHeight = nTextHeight + (TEXT_BOX_RELIEF*2);
-
- //=======================
- // Begin drawing
- //=======================
-
-- GdkGCValues gcSavedValues;
-- GdkGC* pGC = pDrawingArea->style->fg_gc[GTK_WIDGET_STATE(pDrawingArea)];
-+ pGC = pDrawingArea->style->fg_gc[GTK_WIDGET_STATE(pDrawingArea)];
-
- // == Draw background line
-- GdkColor clrLine = {0, 65535, 65535, 65535};
- gdk_gc_get_values(pGC, &gcSavedValues);
- gdk_gc_set_rgb_fg_color(pGC, &clrLine);
- gdk_gc_set_function(pGC, GDK_XOR);
-@@ -236,15 +255,9 @@
- //
- // Draw box around text
- //
-- GdkColor clrTextBoxBackground = {0, 62000, 62000, 62000};
-- GdkColor clrTextBoxOutline = {0, 0, 0, 0};
-- GdkColor clrText = {0, 0, 0, 0};
-
- gdk_gc_get_values(pGC, &gcSavedValues);
-
-- gint nBoxCenterX;
-- gint nBoxCenterY;
--
- if(eRulerOrientation == RulerOrientationHorizontal) {
- nBoxCenterX = max(nMouseX, 0 + (nBoxWidth/2));
- nBoxCenterX = min(nBoxCenterX, nWindowWidth - (nBoxWidth/2));;
diff --git a/deskutils/gruler/files/patch-src::gui.c b/deskutils/gruler/files/patch-src::gui.c
deleted file mode 100644
index 334c4876fa2c..000000000000
--- a/deskutils/gruler/files/patch-src::gui.c
+++ /dev/null
@@ -1,139 +0,0 @@
---- src/gui.c.orig Wed Sep 29 03:13:11 2004
-+++ src/gui.c Tue Nov 23 09:10:43 2004
-@@ -54,6 +54,7 @@
-
- static void gui_ruler_configure(GtkWindow* pWindow, RulerOrientation eRulerOrientation)
- {
-+ GtkWidget* pDrawingArea;
- g_object_set_data(G_OBJECT(pWindow), KEY_RULER_ORIENTATION, (gpointer)eRulerOrientation);
-
- // add signal handlers to ruler
-@@ -66,7 +67,7 @@
- G_CALLBACK (on_application_delete_event), NULL);
-
- // create drawing area and add to window
-- GtkWidget* pDrawingArea = gtk_drawing_area_new();
-+ pDrawingArea = gtk_drawing_area_new();
- gtk_container_add(GTK_CONTAINER(pWindow), pDrawingArea);
-
- // add signal handlers to drawing area
-@@ -82,24 +83,27 @@
-
- gboolean gui_init()
- {
-+ GtkWidget *pHorizontalRulerWindow;
-+ GtkWidget *pVerticalRulerWindow;
-+ GtkWidget *pPreferencesWindow;
- glade_gnome_init ();
-
- // Load and connect glade file
-- g_pXML = glade_xml_new (PACKAGE_SOURCE_DIR"/gRuler.glade", NULL, NULL);
-+ g_pXML = glade_xml_new (PACKAGE_DATA_DIR"/glade/gRuler.glade", NULL, NULL);
- glade_xml_signal_autoconnect (g_pXML);
-
- // load and configure horizontal ruler
-- GtkWidget *pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
-+ pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
- g_return_val_if_fail(pHorizontalRulerWindow != NULL, FALSE);
- gui_ruler_configure(GTK_WINDOW(pHorizontalRulerWindow), RulerOrientationHorizontal);
-
- // load and configure vertical ruler
-- GtkWidget *pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
-+ pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
- g_return_val_if_fail(pVerticalRulerWindow != NULL, 1);
- gui_ruler_configure(GTK_WINDOW(pVerticalRulerWindow), RulerOrientationVertical);
-
- // Don't kill dialog(s) when closing; instead, hide them.
-- GtkWidget *pPreferencesWindow = glade_xml_get_widget(g_pXML, "preferenceswindow");
-+ pPreferencesWindow = glade_xml_get_widget(g_pXML, "preferenceswindow");
- g_return_val_if_fail(pPreferencesWindow != NULL, 1);
-
- g_signal_connect(G_OBJECT(pPreferencesWindow), "delete_event", G_CALLBACK(gtk_widget_hide), NULL);
-@@ -108,12 +112,15 @@
-
- void gui_show()
- {
-+ GtkWidget *pHorizontalRulerWindow;
-+ GtkWidget *pVerticalRulerWindow;
-+
- // Show ruler and start gtk loop
-- GtkWidget *pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
-+ pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
- g_return_if_fail(pHorizontalRulerWindow != NULL);
- gtk_widget_show(pHorizontalRulerWindow);
-
-- GtkWidget *pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
-+ pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
- g_return_if_fail(pVerticalRulerWindow != NULL);
- gtk_widget_show(pVerticalRulerWindow);
-
-@@ -184,9 +191,12 @@
-
- void gui_redraw_rulers()
- {
-+ GtkWidget *pHorizontalRulerWindow;
-+ GtkWidget *pVerticalRulerWindow;
-+
- // request a redraw of both ruler windows
- // horizontal
-- GtkWidget *pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
-+ pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
- g_return_if_fail(pHorizontalRulerWindow != NULL);
-
- // TODO: these callbacks don't take a userdata param.. is that a problem?
-@@ -194,7 +204,7 @@
- gtk_container_foreach(GTK_CONTAINER(pHorizontalRulerWindow), (GtkCallback)gtk_widget_queue_draw, NULL);
-
- // vertical
-- GtkWidget *pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
-+ pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
- g_return_if_fail(pVerticalRulerWindow != NULL);
-
- gtk_container_foreach(GTK_CONTAINER(pVerticalRulerWindow), (GtkCallback)draw_ruler_window, NULL);
-@@ -203,11 +213,11 @@
-
- void gui_set_horizontal_length(gint nLength)
- {
-+ gint nWindowWidth, nWindowHeight;
- // change ruler window width
- GtkWindow *pRulerWindow = GTK_WINDOW(glade_xml_get_widget(g_pXML, "horizontalrulerwindow"));
- g_return_if_fail(pRulerWindow != NULL);
-
-- gint nWindowWidth, nWindowHeight;
- gtk_window_get_size(pRulerWindow, &nWindowWidth, &nWindowHeight);
-
- gtk_window_resize(pRulerWindow, nLength, nWindowHeight);
-@@ -215,11 +225,11 @@
-
- void gui_set_vertical_length(gint nLength)
- {
-+ gint nWindowWidth, nWindowHeight;
- // change ruler window width
- GtkWindow *pRulerWindow = GTK_WINDOW(glade_xml_get_widget(g_pXML, "verticalrulerwindow"));
- g_return_if_fail(pRulerWindow != NULL);
-
-- gint nWindowWidth, nWindowHeight;
- gtk_window_get_size(pRulerWindow, &nWindowWidth, &nWindowHeight);
-
- gtk_window_resize(pRulerWindow, nWindowWidth, nLength);
-@@ -227,18 +237,18 @@
-
- gint gui_get_horizontal_length()
- {
-+ gint nWindowWidth, nWindowHeight;
- GtkWidget *pHorizontalRulerWindow = glade_xml_get_widget (g_pXML, "horizontalrulerwindow");
- g_return_val_if_fail(pHorizontalRulerWindow != NULL, 0);
-- gint nWindowWidth, nWindowHeight;
- gtk_window_get_size(GTK_WINDOW(pHorizontalRulerWindow), &nWindowWidth, &nWindowHeight);
- return nWindowWidth;
- }
-
- gint gui_get_vertical_length()
- {
-+ gint nWindowWidth, nWindowHeight;
- GtkWidget *pVerticalRulerWindow = glade_xml_get_widget (g_pXML, "verticalrulerwindow");
- g_return_val_if_fail(pVerticalRulerWindow != NULL, 0);
-- gint nWindowWidth, nWindowHeight;
- gtk_window_get_size(GTK_WINDOW(pVerticalRulerWindow), &nWindowWidth, &nWindowHeight);
- return nWindowHeight;
- }
diff --git a/deskutils/gruler/files/patch-src::gui_callbacks.c b/deskutils/gruler/files/patch-src::gui_callbacks.c
deleted file mode 100644
index 59cff4bd65c4..000000000000
--- a/deskutils/gruler/files/patch-src::gui_callbacks.c
+++ /dev/null
@@ -1,76 +0,0 @@
---- src/gui_callbacks.c.orig Wed Sep 29 03:10:39 2004
-+++ src/gui_callbacks.c Tue Nov 23 09:14:51 2004
-@@ -55,6 +55,8 @@
-
- gboolean on_expose_event(GtkWidget *pDrawingArea, GdkEventExpose *event, gpointer data)
- {
-+ GtkWidget* pRulerWindow;
-+ RulerOrientation eRulerOrientation;
- // g_message("on_expose_event(x %d,y %d,a %d,w %d)", event->area.x, event->area.y, event->area.width, event->area.height);
-
- GdkPixmap* pPixmap = g_object_get_data(G_OBJECT(pDrawingArea), KEY_PIXMAP_POINTER);
-@@ -67,10 +69,10 @@
- event->area.x, event->area.y,
- event->area.width, event->area.height);
-
-- GtkWidget* pRulerWindow = gtk_widget_get_toplevel(pDrawingArea);
-+ pRulerWindow = gtk_widget_get_toplevel(pDrawingArea);
- g_return_val_if_fail(pRulerWindow != NULL, FALSE);
-
-- RulerOrientation eRulerOrientation = (RulerOrientation)g_object_get_data(G_OBJECT(pRulerWindow), KEY_RULER_ORIENTATION);
-+ eRulerOrientation = (RulerOrientation)g_object_get_data(G_OBJECT(pRulerWindow), KEY_RULER_ORIENTATION);
- g_return_val_if_fail(eRulerOrientation != 0, FALSE);
-
- if(gui_get_draw_mouse_measurement_lines()) {
-@@ -115,13 +117,14 @@
-
- // ALT key means resize, otherwise move
- if(((event->state & GDK_ALT_MASK) > 0)) {
-+ RulerOrientation eRulerOrientation;
-+ gint nWindowWidth, nWindowHeight;
- // resize
- GtkWindow *pRulerWindow = GTK_WINDOW(gtk_widget_get_toplevel(pWidget));
- g_return_val_if_fail(pRulerWindow != NULL, 1);
-
-- RulerOrientation eRulerOrientation = (RulerOrientation)g_object_get_data(G_OBJECT(pRulerWindow), KEY_RULER_ORIENTATION);
-+ eRulerOrientation = (RulerOrientation)g_object_get_data(G_OBJECT(pRulerWindow), KEY_RULER_ORIENTATION);
-
-- gint nWindowWidth, nWindowHeight;
- gtk_window_get_size(pRulerWindow, &nWindowWidth, &nWindowHeight);
-
- if(eRulerOrientation == RulerOrientationHorizontal) {
-@@ -154,12 +157,12 @@
- }
- }
- else {
-+ gint nRootX, nRootY;
- // move
- GtkWindow *pRulerWindow = GTK_WINDOW(gtk_widget_get_toplevel(pWidget));
- g_return_val_if_fail(pRulerWindow != NULL, 1);
-
- // get position of window in root coords
-- gint nRootX, nRootY;
- gtk_window_get_position(pRulerWindow, &nRootX, &nRootY);
-
- if(event->keyval == GDK_Left) {
-@@ -185,16 +188,17 @@
- {
- // begin draw if left click
- if(event->button == 1) {
-+ gint nWindowWidth, nWindowHeight;
-+ gint nWindowClickX, nWindowClickY;
-+ gint nRootClickX, nRootClickY;
-+
- // Get the window the widget is in
- GtkWidget *pTopWindow = GTK_WIDGET(gtk_widget_get_toplevel(pWidget));
- g_return_val_if_fail(GTK_WIDGET_TOPLEVEL(pTopWindow), FALSE);
-
-- gint nWindowWidth, nWindowHeight;
- gtk_window_get_size(GTK_WINDOW(pTopWindow), &nWindowWidth, &nWindowHeight);
-
-- gint nWindowClickX, nWindowClickY;
- gdk_window_get_pointer(pTopWindow->window, &nWindowClickX, &nWindowClickY, NULL);
-- gint nRootClickX, nRootClickY;
- gdk_window_get_pointer(gtk_widget_get_root_window(pWidget), &nRootClickX, &nRootClickY, NULL);
-
- // Drag window
diff --git a/deskutils/gruler/files/patch-src::prefs.c b/deskutils/gruler/files/patch-src::prefs.c
deleted file mode 100644
index 98e6129aacd6..000000000000
--- a/deskutils/gruler/files/patch-src::prefs.c
+++ /dev/null
@@ -1,70 +0,0 @@
---- src/prefs.c.orig Wed Sep 29 03:14:17 2004
-+++ src/prefs.c Tue Nov 23 09:13:01 2004
-@@ -52,17 +52,18 @@
- void prefs_read()
- {
- gchar* str = NULL;
-+ GdkColor clrForeground = DEFAULT_FOREGROUND_COLOR;
-+ GdkColor clrBackground = DEFAULT_BACKGROUND_COLOR;
-+ gint nLength;
-+ gboolean bDrawMeasurementLines;
-
- // Read foreground color
-- GdkColor clrForeground = DEFAULT_FOREGROUND_COLOR;
- if((str = gconf_client_get_string(g_pGConfClient, GCONF_ROOT"/foreground_color", NULL)) != NULL) {
- gdk_color_parse(str, &clrForeground);
- }
- gui_set_foreground_color(&clrForeground);
-
- // Read background color
-- GdkColor clrBackground = DEFAULT_BACKGROUND_COLOR;
--
- if((str = gconf_client_get_string(g_pGConfClient, GCONF_ROOT"/background_color", NULL)) != NULL) {
- gdk_color_parse(str, &clrBackground);
- }
-@@ -74,7 +75,6 @@
- }
-
- // Read horizontal ruler length
-- gint nLength;
- nLength=gconf_client_get_int(g_pGConfClient, GCONF_ROOT"/horizontal_length", NULL);
- if(nLength == 0) {
- nLength = DEFAULT_HORIZONTAL_RULER_LENGTH;
-@@ -91,7 +91,7 @@
- gui_set_ruler_vertical_length_spinbutton(nLength);
-
- // Read mouse-measurement-lines preference
-- gboolean bDrawMeasurementLines = gconf_client_get_bool(g_pGConfClient, GCONF_ROOT"/measurement_lines", NULL);
-+ bDrawMeasurementLines = gconf_client_get_bool(g_pGConfClient, GCONF_ROOT"/measurement_lines", NULL);
- gui_set_draw_mouse_measurement_lines(bDrawMeasurementLines);
-
- g_bPrefsRead = TRUE;
-@@ -99,15 +99,17 @@
-
- void prefs_write_style()
- {
-+ GdkColor clrBackground;
-+ GdkColor clrForeground;
-+ gboolean bDrawMeasurementLines;
-+
- if(!g_bPrefsRead) return;
-
- // Write background color
-- GdkColor clrBackground;
- gui_get_background_color(&clrBackground);
- gconf_client_set_color_hex_triplet(g_pGConfClient, GCONF_ROOT"/background_color", &clrBackground);
-
- // Write background color
-- GdkColor clrForeground;
- gui_get_foreground_color(&clrForeground);
- gconf_client_set_color_hex_triplet(g_pGConfClient, GCONF_ROOT"/foreground_color", &clrForeground);
-
-@@ -115,7 +117,7 @@
- gconf_client_set_string(g_pGConfClient, GCONF_ROOT"/font", gui_get_font_string(), NULL);
-
- // Write measurement lines setting
-- gboolean bDrawMeasurementLines = gui_get_draw_mouse_measurement_lines();
-+ bDrawMeasurementLines = gui_get_draw_mouse_measurement_lines();
- gconf_client_set_bool(g_pGConfClient, GCONF_ROOT"/measurement_lines", bDrawMeasurementLines, NULL);
- }
-
diff --git a/deskutils/gruler/pkg-descr b/deskutils/gruler/pkg-descr
index 24b69302655b..b36042486b95 100644
--- a/deskutils/gruler/pkg-descr
+++ b/deskutils/gruler/pkg-descr
@@ -1,4 +1,20 @@
-Gnome Screen Ruler is a tool that helps measure dimension
-of the on-screen objects, one very helpful to webmasters.
+Gnome Screen Ruler is an on-screen ruler for measuring horizontal and
+vertical distances in any application. Features:
+
+ * Horizontal and vertical display
+ * Multiple units: pixels, inches, centimeters, picas, points,
+ percentage
+ * Configurable colors and font
+ * Can be set always-on-top
+ * Measurement lines track mouse cursor to help measure
+ anything on screen
+ * Move and resize via click-and-drag with the mouse
+ * Align with other windows while dragging (hold SHIFT key)
+ * Move using the keyboard for precision (arrow keys)
+ * Resize using keyboard (ALT+arrow keys)
+ * Speed up keyboard operations (hold SHIFT key)
WWW: http://linuxadvocate.org/projects/gruler/
+
+- Jean-Yves Lefort
+jylefort@brutele.be
diff --git a/deskutils/gruler/pkg-plist b/deskutils/gruler/pkg-plist
index 9c8e78601b24..d64c60bf448f 100644
--- a/deskutils/gruler/pkg-plist
+++ b/deskutils/gruler/pkg-plist
@@ -1,5 +1,7 @@
bin/gruler
-share/gRuler/glade/gRuler.glade
-share/gnome/applications/gRuler.desktop
-@dirrm share/gRuler/glade
-@dirrm share/gRuler
+share/gnome/applications/gruler.desktop
+share/gnome/gruler/glade/gruler-icon.png
+share/gnome/gruler/glade/gruler.glade
+share/gnome/pixmaps/gruler-icon.png
+@dirrm share/gnome/gruler/glade
+@dirrm share/gnome/gruler