aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLog.ja10
-rw-r--r--configure.in2
-rw-r--r--src/eggtrayicon.c6
-rw-r--r--src/eggtrayicon.h5
-rw-r--r--src/trayicon.c23
6 files changed, 39 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index d1194f40..29d299f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-11-10
+
+ * version 2.3.0beta5
+
+2006-11-10
+
+ * src/trayicon.[ch]: implemented trayicon_set_notify() with
+ eggtrayicon. Don't compile eggtrayicon with GTK+ >= 2.10.0.
+ Some code cleanups.
+
2006-11-09
* src/inc.c
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 25df5055..a30ac049 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,13 @@
+2006-11-10
+
+ * version 2.3.0beta5
+
+2006-11-10
+
+ * src/trayicon.c: eggtrayicon 版で trayicon_set_notify() を実装。
+ GTK+ >= 2.10.0 で eggtrayicon をコンパイルしないようにした。
+ コードの整理。
+
2006-11-09
* src/inc.c
diff --git a/configure.in b/configure.in
index cef75efe..019b676f 100644
--- a/configure.in
+++ b/configure.in
@@ -9,7 +9,7 @@ MINOR_VERSION=3
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=beta4+svn
+EXTRA_VERSION=beta5
BUILD_REVISION=0
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
diff --git a/src/eggtrayicon.c b/src/eggtrayicon.c
index b1c93e3d..d913736d 100644
--- a/src/eggtrayicon.c
+++ b/src/eggtrayicon.c
@@ -20,12 +20,12 @@
/* Added WINDOWING ifdef 2005-07-09 by Yoichi Imai <yoichi@silver-forest.com> */
#include <config.h>
-#include <string.h>
-#include <libintl.h>
#include "eggtrayicon.h"
-#ifdef GDK_WINDOWING_X11
+#if !GTK_CHECK_VERSION(2, 10, 0) && defined(GDK_WINDOWING_X11)
+#include <string.h>
+#include <libintl.h>
#include <gdk/gdkx.h>
#include <X11/Xatom.h>
diff --git a/src/eggtrayicon.h b/src/eggtrayicon.h
index 7bbfe8bf..c0abfc0a 100644
--- a/src/eggtrayicon.h
+++ b/src/eggtrayicon.h
@@ -21,10 +21,11 @@
#ifndef __EGG_TRAY_ICON_H__
#define __EGG_TRAY_ICON_H__
-#include <gtk/gtkplug.h>
+#include <gdkconfig.h>
#include <gtk/gtkversion.h>
-#ifdef GDK_WINDOWING_X11
+#if !GTK_CHECK_VERSION(2, 10, 0) && defined(GDK_WINDOWING_X11)
+#include <gtk/gtkplug.h>
#include <gdk/gdkx.h>
G_BEGIN_DECLS
diff --git a/src/trayicon.c b/src/trayicon.c
index 677c4f29..51d9f47c 100644
--- a/src/trayicon.c
+++ b/src/trayicon.c
@@ -213,12 +213,10 @@ void trayicon_set_notify(gboolean enabled)
GdkPixbuf *pixbuf;
if (enabled && !on_notify) {
- stock_pixbuf_gdk(NULL, TRAYICON_NEW_IMAGE, &pixbuf);
- gtk_status_icon_set_from_pixbuf(trayicon.status_icon, pixbuf);
+ trayicon_set_stock_icon(TRAYICON_NEW_IMAGE);
on_notify = TRUE;
} else if (!enabled && on_notify) {
- stock_pixbuf_gdk(NULL, TRAYICON_IMAGE, &pixbuf);
- gtk_status_icon_set_from_pixbuf(trayicon.status_icon, pixbuf);
+ trayicon_set_stock_icon(TRAYICON_IMAGE);
on_notify = FALSE;
}
@@ -234,13 +232,9 @@ void trayicon_set_notify(gboolean enabled)
void trayicon_set_stock_icon(StockPixmap icon)
{
GdkPixbuf *pixbuf;
- GdkPixbuf *scaled_pixbuf;
stock_pixbuf_gdk(NULL, icon, &pixbuf);
- scaled_pixbuf = gdk_pixbuf_scale_simple(pixbuf, 24, 24,
- GDK_INTERP_HYPER);
- gtk_status_icon_set_from_pixbuf(trayicon.status_icon, scaled_pixbuf);
- g_object_unref(scaled_pixbuf);
+ gtk_status_icon_set_from_pixbuf(trayicon.status_icon, pixbuf);
}
static void trayicon_activated(GtkStatusIcon *status_icon, gpointer data)
@@ -257,7 +251,7 @@ static void trayicon_popup_menu_cb(GtkStatusIcon *status_icon, guint button,
button, activate_time);
}
-#else
+#else /* GTK_CHECK_VERSION(2, 10, 0) */
void trayicon_show(TrayIcon *tray_icon)
{
@@ -294,6 +288,13 @@ void trayicon_set_tooltip(const gchar *text)
void trayicon_set_notify(gboolean enabled)
{
+ if (enabled && !on_notify) {
+ trayicon_set_stock_icon(TRAYICON_NEW_IMAGE);
+ on_notify = TRUE;
+ } else if (!enabled && on_notify) {
+ trayicon_set_stock_icon(TRAYICON_IMAGE);
+ on_notify = FALSE;
+ }
}
void trayicon_set_stock_icon(StockPixmap icon)
@@ -337,7 +338,7 @@ static void trayicon_destroy_cb(GtkWidget *widget, gpointer data)
g_idle_add(trayicon_restore, data);
}
-#endif
+#endif /* GTK_CHECK_VERSION(2, 10, 0) */
static void trayicon_present(GtkWidget *widget, gpointer data)
{