aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-01-03 15:05:59 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-01-03 15:05:59 +0000
commit3a55b21964e24a683029b484a90b80c61dd518b2 (patch)
treeb2b81491c2b1e0d2be3833ce296cc60be8d31440
parent1dcd8eadfd45cc933161bf419a05f5cee3fe722b (diff)
downloadports-3a55b21964e24a683029b484a90b80c61dd518b2.tar.gz
ports-3a55b21964e24a683029b484a90b80c61dd518b2.zip
Notes
-rw-r--r--sysutils/gapcmon/Makefile5
-rw-r--r--sysutils/gapcmon/distinfo6
-rw-r--r--sysutils/gapcmon/files/patch-src:eggtrayicon.c90
-rw-r--r--sysutils/gapcmon/pkg-plist1
4 files changed, 95 insertions, 7 deletions
diff --git a/sysutils/gapcmon/Makefile b/sysutils/gapcmon/Makefile
index ec5fe7b98ab6..5a64fdcf1a96 100644
--- a/sysutils/gapcmon/Makefile
+++ b/sysutils/gapcmon/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= gapcmon
-PORTVERSION= 0.8.3
+PORTVERSION= 0.8.4
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -17,7 +17,6 @@ COMMENT= Montior apcupsd with GTK+2 GUI
USE_BZIP2= yes
USE_GMAKE= yes
USE_ICONV= yes
-USE_X_PREFIX= yes
USE_GNOME= gnomehack gnometarget gnomevfs2
GNU_CONFIGURE= yes
@@ -26,8 +25,6 @@ PORTDOCS= AUTHORS ChangeLog INSTALL
post-extract:
@${REINPLACE_CMD} "s|/usr/share/pixmaps/|${PREFIX}/share/pixmaps/|" \
${WRKSRC}/src/gapcmon.c
- @${REINPLACE_CMD} "s|/usr/share/icons/gnome/48x48/devices/gnome-dev-battery.png|${PREFIX}/share/pixmaps/apcupsd.png|" \
- ${WRKSRC}/gapcmon.desktop
@${REINPLACE_CMD} 's|install-gapcmondocDATA \\|\\|' \
${WRKSRC}/Makefile.in
diff --git a/sysutils/gapcmon/distinfo b/sysutils/gapcmon/distinfo
index 848c50a49725..a33ff4432830 100644
--- a/sysutils/gapcmon/distinfo
+++ b/sysutils/gapcmon/distinfo
@@ -1,3 +1,3 @@
-MD5 (gapcmon-0.8.3.tar.bz2) = 30ddd7bcd92df8984e815dcc6c10a52b
-SHA256 (gapcmon-0.8.3.tar.bz2) = 1e7adbe8271eb7a8058f4194eb3650c113fcd878fc65717fa6e292095fba4acf
-SIZE (gapcmon-0.8.3.tar.bz2) = 120343
+MD5 (gapcmon-0.8.4.tar.bz2) = fe27c144da76af5e4d41d65dfeebec05
+SHA256 (gapcmon-0.8.4.tar.bz2) = dfd39df2a0709bac23af41e082e647be85bcdf75e33eaebf1c4bfcdb10036674
+SIZE (gapcmon-0.8.4.tar.bz2) = 120468
diff --git a/sysutils/gapcmon/files/patch-src:eggtrayicon.c b/sysutils/gapcmon/files/patch-src:eggtrayicon.c
new file mode 100644
index 000000000000..306965bee417
--- /dev/null
+++ b/sysutils/gapcmon/files/patch-src:eggtrayicon.c
@@ -0,0 +1,90 @@
+--- src/eggtrayicon.c.orig Fri May 12 10:54:17 2006
++++ src/eggtrayicon.c Mon Jan 1 12:46:03 2007
+@@ -61,6 +61,9 @@
+ static void egg_tray_icon_realize(GtkWidget * widget);
+ static void egg_tray_icon_unrealize(GtkWidget * widget);
+
++static void egg_tray_icon_add (GtkContainer *container,
++ GtkWidget *widget);
++
+ static void egg_tray_icon_update_manager_window(EggTrayIcon * icon,
+ gboolean dock_if_realized);
+ static void egg_tray_icon_manager_window_destroyed(EggTrayIcon * icon);
+@@ -101,6 +104,7 @@
+ {
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GtkWidgetClass *widget_class = (GtkWidgetClass *) klass;
++ GtkContainerClass *container_class = (GtkContainerClass *)klass;
+
+ parent_class = g_type_class_peek_parent(klass);
+
+@@ -109,6 +113,8 @@
+ widget_class->realize = egg_tray_icon_realize;
+ widget_class->unrealize = egg_tray_icon_unrealize;
+
++ container_class->add = egg_tray_icon_add;
++
+ g_object_class_install_property(gobject_class,
+ PROP_ORIENTATION,
+ g_param_spec_enum("orientation",
+@@ -298,6 +304,36 @@
+ }
+ }
+
++static gboolean
++transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
++{
++ gdk_window_clear_area (widget->window, event->area.x, event->area.y,
++ event->area.width, event->area.height);
++ return FALSE;
++}
++
++static void
++make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
++ gpointer user_data)
++{
++ gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
++}
++
++static void
++make_transparent (GtkWidget *widget, gpointer user_data)
++{
++ if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
++ return;
++
++ gtk_widget_set_app_paintable (widget, TRUE);
++ gtk_widget_set_double_buffered (widget, FALSE);
++ gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
++ g_signal_connect (widget, "expose_event",
++ G_CALLBACK (transparent_expose_event), NULL);
++ g_signal_connect_after (widget, "style_set",
++ G_CALLBACK (make_transparent_again), NULL);
++}
++
+ static void egg_tray_icon_manager_window_destroyed(EggTrayIcon * icon)
+ {
+ GdkWindow *gdkwin;
+@@ -327,6 +363,8 @@
+ if (GTK_WIDGET_CLASS(parent_class)->realize)
+ GTK_WIDGET_CLASS(parent_class)->realize(widget);
+
++ make_transparent (widget, NULL);
++
+ screen = gtk_widget_get_screen(widget);
+ display = gdk_screen_get_display(screen);
+ xdisplay = gdk_x11_display_get_xdisplay(display);
+@@ -352,6 +390,14 @@
+
+ /* Add a root window filter so that we get changes on MANAGER */
+ gdk_window_add_filter(root_window, egg_tray_icon_manager_filter, icon);
++}
++
++static void
++egg_tray_icon_add (GtkContainer *container, GtkWidget *widget)
++{
++ g_signal_connect (widget, "realize",
++ G_CALLBACK (make_transparent), NULL);
++ GTK_CONTAINER_CLASS (parent_class)->add (container, widget);
+ }
+
+ EggTrayIcon *egg_tray_icon_new_for_screen(GdkScreen * screen, const char *name)
diff --git a/sysutils/gapcmon/pkg-plist b/sysutils/gapcmon/pkg-plist
index a645105f34a1..9c8805d329f2 100644
--- a/sysutils/gapcmon/pkg-plist
+++ b/sysutils/gapcmon/pkg-plist
@@ -7,3 +7,4 @@ share/pixmaps/onbatt.png
share/pixmaps/online.png
share/pixmaps/unplugged.png
@dirrmtry share/applications
+@dirrmtry share/pixmaps