
Modification de propriétés sur .
___________________________________________________________________
Nom : svn:ignore
   - aclocal.m4
autom4te.cache
Makefile
Makefile.in
aclocal.m4
confdefs.h
config.cache
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
install-sh
intltool-extract
intltool-merge
intltool-update
libtool
missing
mkinstalldirs
stamp-h
stamp-h1
stamp-h.in
resapplet.spec
depcomp
resapplet.desktop
*.tar.gz

   + aclocal.m4
autom4te.cache
Makefile
Makefile.in
aclocal.m4
confdefs.h
config.cache
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
install-sh
intltool-extract*
intltool-merge*
intltool-update*
libtool
missing
mkinstalldirs
stamp-h
stamp-h1
stamp-h.in
resapplet.spec
depcomp
resapplet.desktop
*.tar.gz


Index: configure.in
===================================================================
--- configure.in	(révision 95)
+++ configure.in	(copie de travail)
@@ -2,15 +2,19 @@ dnl -*- tab-width: 2; indent-tabs-mode: 
 
 ### init & version stuff
 
-AC_INIT(src/resapplet.c)
+m4_define([resapplet_major_version],[0])
+m4_define([resapplet_minor_version],[1])
+m4_define([resapplet_micro_version],[3])
+m4_define([resapplet_version],[resapplet_major_version.resapplet_minor_version.resapplet_micro_version])
+
 AC_PREREQ(2.52)
 
-MAJOR_VERSION=0
-MINOR_VERSION=1
-MICRO_VERSION=3
-VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
+AC_INIT([ResApplet],[resapplet_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=resapplet],[resapplet])
 
-AM_INIT_AUTOMAKE(resapplet, $VERSION)
+MAJOR_VERSION=resapplet_major_version
+MINOR_VERSION=resapplet_minor_version
+MICRO_VERSION=resapplet_micro_version
+VERSION=resapplet_version
 
 AC_SUBST(MAJOR_VERSION)
 AC_SUBST(MINOR_VERSION)
@@ -20,7 +24,9 @@ AC_DEFINE_UNQUOTED(MAJOR_VERSION, $MAJOR
 AC_DEFINE_UNQUOTED(MINOR_VERSION, $MINOR_VERSION, [Minor Version Number])
 AC_DEFINE_UNQUOTED(MICRO_VERSION, $MICRO_VERSION, [Micro Version Number])
 
-AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])
+
+AC_CONFIG_HEADERS([config.h])
 AM_MAINTAINER_MODE
 
 ### basic checks
@@ -33,7 +39,7 @@ AC_HEADER_STDC
 
 ### get cflags and libs
 
-PKG_CHECK_MODULES(RESAPPLET, gtk+-2.0 gconf-2.0 libgnomeui-2.0 >= 2.2.0)
+PKG_CHECK_MODULES([RESAPPLET],[gtk+-2.0 >= 2.10 gconf-2.0 libgnomeui-2.0 >= 2.2.0])
 
 ### Check for XRandR
 AC_PATH_XTRA
@@ -52,23 +58,17 @@ AM_CONDITIONAL(HAVE_RANDR, [test $have_r
 RESAPPLET_LIBS="$RESAPPLET_LIBS $RANDR_LIBS"
 
 ### Internationalization support
-AC_PROG_INTLTOOL([0.33])
+AC_PROG_INTLTOOL([0.35.0])
 
 GETTEXT_PACKAGE=resapplet
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
 
-ALL_LINGUAS="ar ca cs da de dz en_GB es fr fi hu it ja mk pl pt_BR sk vi zh_CN zh_TW"
 AM_GLIB_GNU_GETTEXT
 
-# AM_GLIB_GNU_GETTEXT above subst. $DATADIRNAME
-# this is the directory where the *.{mo,gmo} files are installed
-localedir='${prefix}/${DATADIRNAME}/locale'
-AC_SUBST(localedir)
-
 ### build makefiles
 
-AC_OUTPUT([
+AC_CONFIG_FILES([
 resapplet.spec
 Makefile
 po/Makefile.in
@@ -76,6 +76,8 @@ src/Makefile
 icons/Makefile
 ])
 
+AC_OUTPUT
+
 echo "
 
 Configuration:
Index: src/resapplet.c
===================================================================
--- src/resapplet.c	(révision 95)
+++ src/resapplet.c	(copie de travail)
@@ -25,7 +25,6 @@
 #include <gtk/gtk.h>
 
 #include "clipboard.h"
-#include "eggtrayicon.h"
 
 #define REVERT_COUNT	20
 #define YAST2_ARGV { "/opt/gnome/bin/gnomesu", "/sbin/yast2", "x11", NULL }
@@ -58,7 +57,6 @@ typedef struct {
 
 typedef struct {
 	unsigned int time;
-	GtkLabel *label;
 	GtkDialog *dialog;
 	gboolean timed_out;
 } TimeoutData;
@@ -66,13 +64,10 @@ typedef struct {
 typedef struct {
 	DisplayInfo *di;
 	
-	EggTrayIcon *tray_icon;	
-	GtkWidget *menu_bar;
-	GtkWidget *event_box;
-	GtkWidget *icon;
-	GtkTooltips *tooltips;
+	GtkStatusIcon *status_icon;
 	GtkWidget *popup_menu;
-	gboolean ignore_menus;
+	unsigned int ignore_menus : 1;
+	unsigned int ignore_activation : 1;
 	int last_panel_height;
 
 	TimeoutData timeout_data;
@@ -109,19 +104,23 @@ depth_to_string (guint depth)
 static void
 resapplet_set_tooltip (void)
 {
+	GdkScreen *screen;
 	ScreenInfo *current_screen;
 	GdkWindow *root;
 	char *tip;
 	gint gdk_depth;
 	guint depth;
 	char *resstr;
-	
-	if (resapplet->tooltips == NULL)
-		resapplet->tooltips = gtk_tooltips_new ();
 
-	current_screen = & resapplet->di->screens [gdk_screen_get_number (gtk_widget_get_screen (resapplet->menu_bar))];
+#if GTK_CHECK_VERSION (2, 11, 0)
+	screen = gtk_status_icon_get_screen (resapplet->status_icon);
+#else
+	screen = gdk_screen_get_default ();
+#endif
+
+	current_screen = & resapplet->di->screens [gdk_screen_get_number (screen)];
 
-	root = gtk_widget_get_root_window (resapplet->menu_bar);
+	root = gdk_screen_get_root_window (screen);
 	gdk_window_get_geometry (root, NULL, NULL, NULL, NULL, &gdk_depth);
 
 	if (gdk_depth < 0)
@@ -139,8 +138,7 @@ resapplet_set_tooltip (void)
 
 	g_free (resstr);
 
-	gtk_tooltips_set_tip (resapplet->tooltips, resapplet->event_box, tip,
-			      NULL);
+	gtk_status_icon_set_tooltip (resapplet->status_icon, tip);
 
 	g_free (tip);
 }
@@ -175,7 +173,7 @@ screen_size_changed_cb (GdkScreen *scree
 	GdkDisplay *display = gdk_display_get_default ();
 	ScreenInfo *screen_info;
 	int i;
-	
+
 	g_assert (resapplet->di->n_screens ==
 		  gdk_display_get_n_screens (display));
        
@@ -372,19 +370,22 @@ show_resolution (int width, int height)
 	return FALSE;
 }
 
-static char *
-timeout_string (unsigned int seconds)
+static void
+format_secondary_text (GtkMessageDialog *dialog,
+		       unsigned int seconds)
 {
-	return g_strdup_printf (ngettext ("Testing the new settings. If you don't respond in %d second the previous settings will be restored.",
-			  "Testing the new settings. If you don't respond in %d seconds the previous settings will be restored.",
-		seconds), seconds);
+	gtk_message_dialog_format_secondary_text
+		(dialog,
+		 ngettext ("Testing the new settings. If you don't respond in %d second the previous settings will be restored.",
+			   "Testing the new settings. If you don't respond in %d seconds the previous settings will be restored.",
+			   seconds),
+		 seconds);
 }
 
 static gboolean
 save_timeout_callback (gpointer _data)
 {
 	TimeoutData *data = _data;
-	char *str;
   
 	data->time --;
 
@@ -394,81 +395,54 @@ save_timeout_callback (gpointer _data)
 		return FALSE;
 	}
 
-	str = timeout_string (data->time);
-	gtk_label_set_text (data->label, str);
-	g_free (str);
+	format_secondary_text (GTK_MESSAGE_DIALOG (data->dialog), data->time);
 
 	return TRUE;
 }
 
 static int
-run_revert_dialog (DisplayInfo *info, GtkWidget *parent, int changed)
+run_revert_dialog (Resapplet *applet, int changed)
 {
 	GtkWidget *dialog;
-	GtkWidget *hbox;
-	GtkWidget *vbox;
-	GtkWidget *label;
-	GtkWidget *label_sec;
-	GtkWidget *image;
 	int res;
 	guint timeout;
-	char *str;
+	const char *title, *primary;
 	ScreenInfo *current_screen;
+	DisplayInfo *info = applet->di;
 	GtkRequisition requisition;
 
-	dialog = gtk_dialog_new ();
-	gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
-	gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
-	gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
-	gtk_container_set_border_width (GTK_CONTAINER (dialog), 12);
-	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
-
-	label = gtk_label_new (NULL);
 	if (changed == CHANGED_RATE)
 	{
-	    gtk_window_set_title (GTK_WINDOW (dialog), _ ("Keep Refresh Rate"));
-	    str = g_strdup_printf ("<b>%s</b>",
-				   _("Do you want to keep this refresh rate?"));
+	    title = _("Keep Refresh Rate?");
+	    primary = _("Do you want to keep this refresh rate?");
 	}
 	else if (changed == CHANGED_ROTATION)
 	{
-	    gtk_window_set_title (GTK_WINDOW (dialog), _ ("Keep Rotation"));
-	    str = g_strdup_printf ("<b>%s</b>",
-				   _("Do you want to keep this rotation?"));
+	    title = _("Keep Rotation?");
+	    primary = _("Do you want to keep this rotation?");
 	}
 	else /* changed == CHANGED_RESOLUTION */
 	{
-	    gtk_window_set_title (GTK_WINDOW (dialog), _ ("Keep Resolution"));
-	    str = g_strdup_printf ("<b>%s</b>",
-				   _("Do you want to keep this resolution?"));
+	    title = _("Keep Resolution?");
+	    primary = _("Do you want to keep this resolution?");
 	}
 
-	gtk_label_set_markup (GTK_LABEL (label), str);
-	g_free (str);
-	image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION,
-					  GTK_ICON_SIZE_DIALOG);
-	gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
-  
-	gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-	gtk_label_set_selectable (GTK_LABEL (label), TRUE);
-	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-
-	str = timeout_string (REVERT_COUNT);
-	label_sec = gtk_label_new (str);
-	g_free (str);
-	gtk_label_set_line_wrap (GTK_LABEL (label_sec), TRUE);
-	gtk_label_set_selectable (GTK_LABEL (label_sec), TRUE);
-	gtk_misc_set_alignment (GTK_MISC (label_sec), 0.0, 0.5);
-
-	hbox = gtk_hbox_new (FALSE, 6);
-	vbox = gtk_vbox_new (FALSE, 6);
-
-	gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
-	gtk_box_pack_start (GTK_BOX (vbox), label_sec, TRUE, TRUE, 0);
-	gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
-	gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
-	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE,
-			    FALSE, 0);
+	dialog = gtk_message_dialog_new (NULL,
+					 GTK_DIALOG_MODAL,
+					 GTK_MESSAGE_QUESTION,
+					 GTK_BUTTONS_NONE,
+					 "%s",
+					 primary);
+	format_secondary_text (GTK_MESSAGE_DIALOG (dialog), REVERT_COUNT);
+
+	gtk_window_set_title (GTK_WINDOW (dialog), title);
+	gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
+	gtk_window_set_keep_above (GTK_WINDOW (dialog), TRUE);
+
+#if GTK_CHECK_VERSION (2, 11, 0)
+	gtk_window_set_screen (GTK_WINDOW (dialog),
+			       gtk_status_icon_get_screen (applet->status_icon));
+#endif
 
 	if (changed == CHANGED_RATE)
 	{
@@ -492,9 +466,6 @@ run_revert_dialog (DisplayInfo *info, Gt
 				    GTK_RESPONSE_YES, NULL);
 	}
 
-
-	gtk_widget_show_all (hbox);
-
 	/*
 	 * Center the dialog.  Using the window manager to center it doesn't
 	 * work, since it takes metacity a few seconds to figure out where it
@@ -507,23 +478,23 @@ run_revert_dialog (DisplayInfo *info, Gt
 			 (current_screen->current_height / 2) - (requisition.height / 2));
 
 	resapplet->timeout_data.time      = REVERT_COUNT;
-	resapplet->timeout_data.label     = GTK_LABEL (label_sec);
 	resapplet->timeout_data.dialog    = GTK_DIALOG (dialog);
 	resapplet->timeout_data.timed_out = FALSE;
 
 	timeout = g_timeout_add (1000, save_timeout_callback, & (resapplet->timeout_data));
 
-	gtk_widget_set_sensitive (resapplet->menu_bar, FALSE);
+	applet->ignore_activation = TRUE;
 
 	res = gtk_dialog_run (GTK_DIALOG (dialog));
 
+	applet->ignore_activation = FALSE;
+
 	if (! resapplet->timeout_data.timed_out)
 		g_source_remove (timeout);
 
 	gtk_widget_destroy (dialog);
 	resapplet->timeout_data.dialog = NULL;
-	gtk_widget_set_sensitive (resapplet->menu_bar, TRUE);
-	
+
 	return (res == GTK_RESPONSE_YES);
 }
 
@@ -591,7 +562,7 @@ save_to_gconf (DisplayInfo *info, gboole
 static void
 quit_cb (GtkMenuItem *mi G_GNUC_UNUSED, gpointer user_data G_GNUC_UNUSED)
 {
-	gtk_exit (0);
+	gtk_main_quit ();
 }
 
 static void
@@ -622,8 +593,7 @@ menu_select_cb (GtkMenuItem *mi, gpointe
 	si->user_set_rotation = rotation;
 
 	if (apply_config (resapplet->di)) {
-		if (!run_revert_dialog (resapplet->di,
-				GTK_WIDGET (resapplet->tray_icon), changed)) {
+		if (!run_revert_dialog (resapplet, changed)) {
 			revert_config (resapplet->di);
 			return;
 		}
@@ -918,158 +888,46 @@ populate_popup_menu (void)
 }
 
 static void
-resapplet_set_icon (void)
+status_icon_activate_cb (GtkStatusIcon *icon,
+			 Resapplet *applet)
 {
-	GdkPixbuf *pixbuf;
-	int panel_w;
-	int panel_h;
-	int icon_size;
-
-	gtk_window_get_size (
-		GTK_WINDOW (gtk_widget_get_toplevel (resapplet->menu_bar)),
-		&panel_w, &panel_h);
-
-	if (panel_h == resapplet->last_panel_height)
+	if (applet->ignore_activation)
 		return;
 
-	resapplet->last_panel_height = panel_h;
-	
-	if (panel_h < 30)
-		icon_size = 16;
-	else
-		icon_size = 24;
-
-	pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
-					   "resapplet", icon_size, 0, NULL);
-	/*
-	 * Scale the icon rather than clip it if our allocation just isn't
-	 * what we want it to be.
-	 */
-	if (GTK_WIDGET_REALIZED (resapplet->icon) &&
-		resapplet->icon->allocation.height < icon_size) {
-		int new_size = resapplet->icon->allocation.height;
-		GdkPixbuf *new_pixbuf;
-
-		new_pixbuf = gdk_pixbuf_scale_simple (pixbuf,
-						      new_size, new_size,
-						      GDK_INTERP_BILINEAR);
-		g_object_unref (pixbuf);
-		pixbuf = new_pixbuf;
-	}
-
-	if (pixbuf) {
-		gtk_image_set_from_pixbuf (GTK_IMAGE (resapplet->icon), pixbuf);
-		g_object_unref (pixbuf);
-	}
-}
-
-static void
-size_changed_cb (void)
-{
-	/* If the panel changed size, we might need to change the icon. */
-	resapplet_set_icon ();
-}
-
-/* I hate doing this. */
-static void tray_icon_destroy_cb (GtkWidget *, void *);
-
-static void menu_show_cb (GtkWidget *menu G_GNUC_UNUSED,
-			  void *data G_GNUC_UNUSED)
-{
-	if (resapplet->tooltips)
-		gtk_tooltips_disable (resapplet->tooltips);
-}
-
-static void menu_hide_cb (GtkWidget *menu G_GNUC_UNUSED,
-			  void *data G_GNUC_UNUSED)
-{
-	if (resapplet->tooltips)
-		gtk_tooltips_enable (resapplet->tooltips);
+	gtk_menu_popup (GTK_MENU (applet->popup_menu), NULL, NULL,
+			gtk_status_icon_position_menu, icon,
+			1, gtk_get_current_event_time ());
 }
 
 static gboolean
 resapplet_create_tray_icon (gpointer data)
 {
 	Resapplet *applet = (Resapplet *) data;
-	GtkWidget *top_menu_item;
-	GtkStyle  *style;
-	int       i;
-	const gchar *rcstyle = " \
-		style \"MenuBar\" \n\
-		{ \n\
-			GtkMenuBar::shadow_type = none \n\
-			GtkMenuBar::internal-padding = 0 \n\
-		} \n\
-		style \"MenuItem\" \n\
-		{ \n\
-			xthickness=0 \n\
-			ythickness=0 \n\
-		} \n\
-		widget_class \"GtkMenuBar\" style \"MenuBar\"\n\
-		widget \"*ToplevelMenu*\" style \"MenuItem\"\n";
+	const gchar rcstyle[] = " \n"
+		"style \"MenuBar\" \n"
+		"{ \n"
+			"GtkMenuBar::shadow_type = none \n"
+			"GtkMenuBar::internal-padding = 0 \n"
+		"} \n"
+		"style \"MenuItem\" \n"
+		"{ \n"
+		"	xthickness=0 \n"
+		"	ythickness=0 \n"
+		"} \n"
+		"widget_class \"GtkMenuBar\" style \"MenuBar\"\n"
+		"widget \"*ToplevelMenu*\" style \"MenuItem\"\n";
 
 	gtk_rc_parse_string (rcstyle);
 
-	/* Event box for tooltips */
-	applet->event_box = gtk_event_box_new ();
-	gtk_container_set_border_width (GTK_CONTAINER (applet->event_box), 0);
-
-	applet->tray_icon = egg_tray_icon_new ("applet");
-	g_signal_connect (G_OBJECT (applet->tray_icon), "destroy",
-			  G_CALLBACK (tray_icon_destroy_cb), NULL);
-
-	applet->menu_bar = gtk_menu_bar_new ();
-	style = gtk_style_new ();
-	for (i = 0; i < 5; i++)
-		style->bg_pixmap[i] = (GdkPixmap *) GDK_PARENT_RELATIVE;
-	style->xthickness = style->ythickness = 0;
-
-	gtk_widget_set_style (applet->menu_bar, style);
-
-	top_menu_item = gtk_menu_item_new();
-	gtk_widget_set_name (top_menu_item, "ToplevelMenu");
-	gtk_container_set_border_width (GTK_CONTAINER (top_menu_item), 0);
-
-	gtk_container_add (GTK_CONTAINER (applet->event_box),
-			   applet->menu_bar);
-	gtk_container_add (GTK_CONTAINER (applet->tray_icon),
-			   applet->event_box);
-	gtk_widget_show_all (GTK_WIDGET (applet->event_box));
-
-	g_signal_connect (top_menu_item, "size-allocate",
-			  G_CALLBACK (size_changed_cb), NULL);
-
-	applet->icon = gtk_image_new ();
-	gtk_container_add (GTK_CONTAINER (top_menu_item), applet->icon);
-	gtk_widget_show (applet->icon);
-
-	gtk_menu_shell_append (GTK_MENU_SHELL (applet->menu_bar),
-			       top_menu_item);
-
-	gtk_widget_show (top_menu_item);
+	applet->status_icon = gtk_status_icon_new_from_icon_name ("resapplet");
+	g_signal_connect (applet->status_icon, "activate",
+			  G_CALLBACK (status_icon_activate_cb), applet);
 
 	applet->popup_menu = gtk_menu_new ();
-	gtk_menu_item_set_submenu (GTK_MENU_ITEM (top_menu_item),
-				   applet->popup_menu);
-	g_signal_connect (applet->popup_menu, "show",
-			  G_CALLBACK (menu_show_cb), NULL);
-	g_signal_connect (applet->popup_menu, "hide",
-			  G_CALLBACK (menu_hide_cb), NULL);
 
 	return FALSE;
 }
 
-static void
-tray_icon_destroy_cb (GtkWidget *widget G_GNUC_UNUSED, void *data G_GNUC_UNUSED)
-{
-	g_return_if_fail (resapplet);
-	g_return_if_fail (resapplet->tray_icon);
-
-	g_object_unref (G_OBJECT (resapplet->tray_icon));
-	resapplet->tray_icon = NULL;
-	g_idle_add (resapplet_create_tray_icon, resapplet);
-}
-
 static Resapplet *
 resapplet_new (void)
 {
@@ -1087,25 +945,24 @@ resapplet_new (void)
 int
 main (int argc, char *argv[])
 {
+	GnomeProgram *program;
 	GnomeClient *client;
 	Display *xdisplay;
 	GdkDisplay *display;
 	int event_base, error_base;
 
 #ifdef ENABLE_NLS
-	const char *domaindir, *codeset, *domain;
-
-	domaindir = bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
-	codeset = bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-	domain = textdomain (GETTEXT_PACKAGE);
+	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
 #endif
 
-	gnome_program_init ("resapplet", VERSION,
-			    LIBGNOMEUI_MODULE,
-			    argc, argv,
-			    GNOME_PROGRAM_STANDARD_PROPERTIES,
-			    GNOME_CLIENT_PARAM_SM_CONNECT, TRUE,
-			    NULL);
+	program = gnome_program_init ("resapplet", VERSION,
+				      LIBGNOMEUI_MODULE,
+				      argc, argv,
+				      GNOME_PROGRAM_STANDARD_PROPERTIES,
+				      GNOME_CLIENT_PARAM_SM_CONNECT, TRUE,
+				      NULL);
 
 	gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
 					   ICONDIR);
@@ -1128,18 +985,17 @@ main (int argc, char *argv[])
 	if (!XRRQueryExtension (xdisplay, &event_base, &error_base))
 		return 1;
 
-	gtk_init (&argc, &argv);
-
 	resapplet = resapplet_new ();
-	resapplet_set_icon ();
 
 	resapplet_set_tooltip ();
 
 	populate_popup_menu ();
 
-	gtk_widget_show (GTK_WIDGET (resapplet->tray_icon));
+	gtk_status_icon_set_visible (resapplet->status_icon, TRUE);
 
 	gtk_main ();
 
+	g_object_unref (program);
+
 	return 0;
 }
Index: src/eggtrayicon.h
===================================================================
--- src/eggtrayicon.h	(révision 95)
+++ src/eggtrayicon.h	(copie de travail)
@@ -1,80 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* eggtrayicon.h
- * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __EGG_TRAY_ICON_H__
-#define __EGG_TRAY_ICON_H__
-
-#include <gtk/gtkplug.h>
-#ifdef GDK_WINDOWING_X11
-#include <gdk/gdkx.h>
-#endif
-
-G_BEGIN_DECLS
-
-#define EGG_TYPE_TRAY_ICON		(egg_tray_icon_get_type ())
-#define EGG_TRAY_ICON(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon))
-#define EGG_TRAY_ICON_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
-#define EGG_IS_TRAY_ICON(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON))
-#define EGG_IS_TRAY_ICON_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON))
-#define EGG_TRAY_ICON_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
-	
-typedef struct _EggTrayIcon	  EggTrayIcon;
-typedef struct _EggTrayIconClass  EggTrayIconClass;
-
-struct _EggTrayIcon
-{
-  GtkPlug parent_instance;
-
-  guint stamp;
-  
-#ifdef GDK_WINDOWING_X11
-  Atom selection_atom;
-  Atom manager_atom;
-  Atom system_tray_opcode_atom;
-  Atom orientation_atom;
-  Window manager_window;
-#endif
-  GtkOrientation orientation;
-};
-
-struct _EggTrayIconClass
-{
-  GtkPlugClass parent_class;
-};
-
-GType        egg_tray_icon_get_type       (void);
-
-EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen   *screen,
-					   const gchar *name);
-
-EggTrayIcon *egg_tray_icon_new            (const gchar *name);
-
-guint        egg_tray_icon_send_message   (EggTrayIcon *icon,
-					   gint         timeout,
-					   const char  *message,
-					   gint         len);
-void         egg_tray_icon_cancel_message (EggTrayIcon *icon,
-					   guint        id);
-
-GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon);
-					    
-G_END_DECLS
-
-#endif /* __EGG_TRAY_ICON_H__ */
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(révision 95)
+++ src/Makefile.am	(copie de travail)
@@ -17,8 +17,6 @@ INCLUDES =						\
 bin_PROGRAMS = resapplet 
 
 resapplet_SOURCES =	\
-	eggtrayicon.c	\
-	eggtrayicon.h	\
 	clipboard.c	\
 	clipboard.h	\
 	resapplet.c
Index: src/eggtrayicon.c
===================================================================
--- src/eggtrayicon.c	(révision 95)
+++ src/eggtrayicon.c	(copie de travail)
@@ -1,509 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* eggtrayicon.c
- * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-#include <string.h>
-#include <libintl.h>
-
-#include "eggtrayicon.h"
-
-#include <gdkconfig.h>
-#if defined (GDK_WINDOWING_X11)
-#include <gdk/gdkx.h>
-#include <X11/Xatom.h>
-#elif defined (GDK_WINDOWING_WIN32)
-#include <gdk/gdkwin32.h>
-#endif
-
-#ifndef EGG_COMPILATION
-#ifndef _
-#define _(x) dgettext (GETTEXT_PACKAGE, x)
-#define N_(x) x
-#endif
-#else
-#define _(x) x
-#define N_(x) x
-#endif
-
-#define SYSTEM_TRAY_REQUEST_DOCK    0
-#define SYSTEM_TRAY_BEGIN_MESSAGE   1
-#define SYSTEM_TRAY_CANCEL_MESSAGE  2
-
-#define SYSTEM_TRAY_ORIENTATION_HORZ 0
-#define SYSTEM_TRAY_ORIENTATION_VERT 1
-
-enum {
-  PROP_0,
-  PROP_ORIENTATION
-};
-         
-static GtkPlugClass *parent_class = NULL;
-
-static void egg_tray_icon_init (EggTrayIcon *icon);
-static void egg_tray_icon_class_init (EggTrayIconClass *klass);
-
-static void egg_tray_icon_get_property (GObject    *object,
-					guint       prop_id,
-					GValue     *value,
-					GParamSpec *pspec);
-
-static void egg_tray_icon_realize   (GtkWidget *widget);
-static void egg_tray_icon_unrealize (GtkWidget *widget);
-
-#ifdef GDK_WINDOWING_X11
-static void egg_tray_icon_update_manager_window    (EggTrayIcon *icon,
-						    gboolean     dock_if_realized);
-static void egg_tray_icon_manager_window_destroyed (EggTrayIcon *icon);
-#endif
-
-GType
-egg_tray_icon_get_type (void)
-{
-  static GType our_type = 0;
-
-  if (our_type == 0)
-    {
-      static const GTypeInfo our_info =
-      {
-	.class_size = sizeof (EggTrayIconClass),
-	.class_init = (GClassInitFunc) egg_tray_icon_class_init,
-	.instance_size = sizeof (EggTrayIcon),
-	.n_preallocs = 0,
-	.instance_init = (GInstanceInitFunc) egg_tray_icon_init,
-      };
-
-      our_type = g_type_register_static (GTK_TYPE_PLUG, "EggTrayIcon", &our_info, 0);
-    }
-
-  return our_type;
-}
-
-static void
-egg_tray_icon_init (EggTrayIcon *icon)
-{
-  icon->stamp = 1;
-  icon->orientation = GTK_ORIENTATION_HORIZONTAL;
-  
-  gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK);
-}
-
-static void
-egg_tray_icon_class_init (EggTrayIconClass *klass)
-{
-  GObjectClass *gobject_class = (GObjectClass *)klass;
-  GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
-
-  parent_class = g_type_class_peek_parent (klass);
-
-  gobject_class->get_property = egg_tray_icon_get_property;
-
-  widget_class->realize   = egg_tray_icon_realize;
-  widget_class->unrealize = egg_tray_icon_unrealize;
-
-  g_object_class_install_property (gobject_class,
-				   PROP_ORIENTATION,
-				   g_param_spec_enum ("orientation",
-						      _("Orientation"),
-						      _("The orientation of the tray."),
-						      GTK_TYPE_ORIENTATION,
-						      GTK_ORIENTATION_HORIZONTAL,
-						      G_PARAM_READABLE));
-
-#if defined (GDK_WINDOWING_X11)
-  /* Nothing */
-#elif defined (GDK_WINDOWING_WIN32)
-  g_warning ("Port eggtrayicon to Win32");
-#else
-  g_warning ("Port eggtrayicon to this GTK+ backend");
-#endif
-}
-
-static void
-egg_tray_icon_get_property (GObject    *object,
-			    guint       prop_id,
-			    GValue     *value,
-			    GParamSpec *pspec)
-{
-  EggTrayIcon *icon = EGG_TRAY_ICON (object);
-
-  switch (prop_id)
-    {
-    case PROP_ORIENTATION:
-      g_value_set_enum (value, icon->orientation);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-#ifdef GDK_WINDOWING_X11
-
-static void
-egg_tray_icon_get_orientation_property (EggTrayIcon *icon)
-{
-  Display *xdisplay;
-  Atom type;
-  int format;
-  union {
-	gulong *prop;
-	guchar *prop_ch;
-  } prop = { NULL };
-  gulong nitems;
-  gulong bytes_after;
-  int error, result;
-
-  g_assert (icon->manager_window != None);
-  
-  xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-
-  gdk_error_trap_push ();
-  type = None;
-  result = XGetWindowProperty (xdisplay,
-			       icon->manager_window,
-			       icon->orientation_atom,
-			       0, G_MAXLONG, FALSE,
-			       XA_CARDINAL,
-			       &type, &format, &nitems,
-			       &bytes_after, &(prop.prop_ch));
-  error = gdk_error_trap_pop ();
-
-  if (error || result != Success)
-    return;
-
-  if (type == XA_CARDINAL)
-    {
-      GtkOrientation orientation;
-
-      orientation = (prop.prop [0] == SYSTEM_TRAY_ORIENTATION_HORZ) ?
-					GTK_ORIENTATION_HORIZONTAL :
-					GTK_ORIENTATION_VERTICAL;
-
-      if (icon->orientation != orientation)
-	{
-	  icon->orientation = orientation;
-
-	  g_object_notify (G_OBJECT (icon), "orientation");
-	}
-    }
-
-  if (prop.prop)
-    XFree (prop.prop);
-}
-
-static GdkFilterReturn
-egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_data)
-{
-  EggTrayIcon *icon = user_data;
-  XEvent *xev = (XEvent *)xevent;
-
-  if (xev->xany.type == ClientMessage &&
-      xev->xclient.message_type == icon->manager_atom &&
-      xev->xclient.data.l[1] == (signed) icon->selection_atom)
-    {
-      egg_tray_icon_update_manager_window (icon, TRUE);
-    }
-  else if (xev->xany.window == icon->manager_window)
-    {
-      if (xev->xany.type == PropertyNotify &&
-	  xev->xproperty.atom == icon->orientation_atom)
-	{
-	  egg_tray_icon_get_orientation_property (icon);
-	}
-      if (xev->xany.type == DestroyNotify)
-	{
-	  egg_tray_icon_manager_window_destroyed (icon);
-	}
-    }
-  return GDK_FILTER_CONTINUE;
-}
-
-#endif  
-
-static void
-egg_tray_icon_unrealize (GtkWidget *widget)
-{
-#ifdef GDK_WINDOWING_X11
-  EggTrayIcon *icon = EGG_TRAY_ICON (widget);
-  GdkWindow *root_window;
-
-  if (icon->manager_window != None)
-    {
-      GdkWindow *gdkwin;
-
-      gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
-                                              icon->manager_window);
-
-      gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
-    }
-
-  root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
-
-  gdk_window_remove_filter (root_window, egg_tray_icon_manager_filter, icon);
-
-  if (GTK_WIDGET_CLASS (parent_class)->unrealize)
-    (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
-#endif
-}
-
-#ifdef GDK_WINDOWING_X11
-
-static void
-egg_tray_icon_send_manager_message (EggTrayIcon *icon,
-				    long         message,
-				    Window       window,
-				    long         data1,
-				    long         data2,
-				    long         data3)
-{
-  XClientMessageEvent ev;
-  Display *display;
-  
-  ev.type = ClientMessage;
-  ev.window = window;
-  ev.message_type = icon->system_tray_opcode_atom;
-  ev.format = 32;
-  ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window);
-  ev.data.l[1] = message;
-  ev.data.l[2] = data1;
-  ev.data.l[3] = data2;
-  ev.data.l[4] = data3;
-
-  display = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-  
-  gdk_error_trap_push ();
-  XSendEvent (display,
-	      icon->manager_window, False, NoEventMask, (XEvent *)&ev);
-  XSync (display, False);
-  gdk_error_trap_pop ();
-}
-
-static void
-egg_tray_icon_send_dock_request (EggTrayIcon *icon)
-{
-  egg_tray_icon_send_manager_message (icon,
-				      SYSTEM_TRAY_REQUEST_DOCK,
-				      icon->manager_window,
-				      gtk_plug_get_id (GTK_PLUG (icon)),
-				      0, 0);
-}
-
-static void
-egg_tray_icon_update_manager_window (EggTrayIcon *icon,
-				     gboolean     dock_if_realized)
-{
-  Display *xdisplay;
-  
-  if (icon->manager_window != None)
-    return;
-
-  xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-  
-  XGrabServer (xdisplay);
-  
-  icon->manager_window = XGetSelectionOwner (xdisplay,
-					     icon->selection_atom);
-
-  if (icon->manager_window != None)
-    XSelectInput (xdisplay,
-		  icon->manager_window, StructureNotifyMask|PropertyChangeMask);
-
-  XUngrabServer (xdisplay);
-  XFlush (xdisplay);
-  
-  if (icon->manager_window != None)
-    {
-      GdkWindow *gdkwin;
-
-      gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
-					      icon->manager_window);
-      
-      gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
-
-      if (dock_if_realized && GTK_WIDGET_REALIZED (icon))
-	egg_tray_icon_send_dock_request (icon);
-
-      egg_tray_icon_get_orientation_property (icon);
-    }
-}
-
-static void
-egg_tray_icon_manager_window_destroyed (EggTrayIcon *icon)
-{
-  GdkWindow *gdkwin;
-  
-  g_return_if_fail (icon->manager_window != None);
-
-  gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
-					  icon->manager_window);
-      
-  gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
-
-  icon->manager_window = None;
-
-  egg_tray_icon_update_manager_window (icon, TRUE);
-}
-
-#endif
-
-static void
-egg_tray_icon_realize (GtkWidget *widget)
-{
-#ifdef GDK_WINDOWING_X11
-  EggTrayIcon *icon = EGG_TRAY_ICON (widget);
-  GdkScreen *screen;
-  GdkDisplay *display;
-  Display *xdisplay;
-  char buffer[256];
-  GdkWindow *root_window;
-
-  if (GTK_WIDGET_CLASS (parent_class)->realize)
-    GTK_WIDGET_CLASS (parent_class)->realize (widget);
-
-  screen = gtk_widget_get_screen (widget);
-  display = gdk_screen_get_display (screen);
-  xdisplay = gdk_x11_display_get_xdisplay (display);
-
-  /* Now see if there's a manager window around */
-  g_snprintf (buffer, sizeof (buffer),
-	      "_NET_SYSTEM_TRAY_S%d",
-	      gdk_screen_get_number (screen));
-
-  icon->selection_atom = XInternAtom (xdisplay, buffer, False);
-  
-  icon->manager_atom = XInternAtom (xdisplay, "MANAGER", False);
-  
-  icon->system_tray_opcode_atom = XInternAtom (xdisplay,
-						   "_NET_SYSTEM_TRAY_OPCODE",
-						   False);
-
-  icon->orientation_atom = XInternAtom (xdisplay,
-					"_NET_SYSTEM_TRAY_ORIENTATION",
-					False);
-
-  egg_tray_icon_update_manager_window (icon, FALSE);
-  egg_tray_icon_send_dock_request (icon);
-
-  root_window = gdk_screen_get_root_window (screen);
-  
-  /* Add a root window filter so that we get changes on MANAGER */
-  gdk_window_add_filter (root_window,
-			 egg_tray_icon_manager_filter, icon);
-#endif
-}
-
-EggTrayIcon *
-egg_tray_icon_new_for_screen (GdkScreen *screen, const char *name)
-{
-  g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
-
-  return g_object_new (EGG_TYPE_TRAY_ICON, "screen", screen, "title", name, NULL);
-}
-
-EggTrayIcon*
-egg_tray_icon_new (const gchar *name)
-{
-  return g_object_new (EGG_TYPE_TRAY_ICON, "title", name, NULL);
-}
-
-guint
-egg_tray_icon_send_message (EggTrayIcon *icon,
-			    gint         timeout,
-			    const gchar *message,
-			    gint         len)
-{
-  guint stamp;
-  
-  g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), 0);
-  g_return_val_if_fail (timeout >= 0, 0);
-  g_return_val_if_fail (message != NULL, 0);
-		     
-#ifdef GDK_WINDOWING_X11
-  if (icon->manager_window == None)
-    return 0;
-#endif
-
-  if (len < 0)
-    len = strlen (message);
-
-  stamp = icon->stamp++;
-  
-#ifdef GDK_WINDOWING_X11
-  /* Get ready to send the message */
-  egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_BEGIN_MESSAGE,
-				      (Window)gtk_plug_get_id (GTK_PLUG (icon)),
-				      timeout, len, stamp);
-
-  /* Now to send the actual message */
-  gdk_error_trap_push ();
-  while (len > 0)
-    {
-      XClientMessageEvent ev;
-      Display *xdisplay;
-
-      xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-      
-      ev.type = ClientMessage;
-      ev.window = (Window)gtk_plug_get_id (GTK_PLUG (icon));
-      ev.format = 8;
-      ev.message_type = XInternAtom (xdisplay,
-				     "_NET_SYSTEM_TRAY_MESSAGE_DATA", False);
-      if (len > 20)
-	{
-	  memcpy (&ev.data, message, 20);
-	  len -= 20;
-	  message += 20;
-	}
-      else
-	{
-	  memcpy (&ev.data, message, len);
-	  len = 0;
-	}
-
-      XSendEvent (xdisplay,
-		  icon->manager_window, False, StructureNotifyMask, (XEvent *)&ev);
-      XSync (xdisplay, False);
-    }
-  gdk_error_trap_pop ();
-#endif
-
-  return stamp;
-}
-
-void
-egg_tray_icon_cancel_message (EggTrayIcon *icon,
-			      guint        id)
-{
-  g_return_if_fail (EGG_IS_TRAY_ICON (icon));
-  g_return_if_fail (id > 0);
-#ifdef GDK_WINDOWING_X11  
-  egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_CANCEL_MESSAGE,
-				      (Window)gtk_plug_get_id (GTK_PLUG (icon)),
-				      id, 0, 0);
-#endif
-}
-
-GtkOrientation
-egg_tray_icon_get_orientation (EggTrayIcon *icon)
-{
-  g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), GTK_ORIENTATION_HORIZONTAL);
-
-  return icon->orientation;
-}
Index: autogen.sh
===================================================================
--- autogen.sh	(révision 95)
+++ autogen.sh	(copie de travail)
@@ -19,7 +19,7 @@ which gnome-autogen.sh || {
     exit 1
 }
 
-REQUIRED_AUTOMAKE_VERSION=1.6
+REQUIRED_AUTOMAKE_VERSION=1.9
 export REQUIRED_AUTOMAKE_VERSION
 
 USE_GNOME2_MACROS=1 . gnome-autogen.sh

Modification de propriétés sur po
___________________________________________________________________
Nom : svn:ignore
   - *.gmo
*.mo
*.pot
Makefile
Makefile.in
Makefile.in.in
POTFILES
cat-id-tbl.c
messages
missing
notexist
stamp-cat-id
.intltool*

   + *.gmo
*.mo
*.pot
Makefile
Makefile.in
Makefile.in.in
POTFILES
cat-id-tbl.c
messages
missing
notexist
stamp-cat-id
.intltool*
stamp-it


Index: po/LINGUAS
===================================================================
--- po/LINGUAS	(révision 0)
+++ po/LINGUAS	(révision 0)
@@ -0,0 +1,22 @@
+ar
+ca
+cs
+da
+de
+dz
+en_GB
+es
+fi
+fr
+hu
+it
+ja
+mk
+nl
+pl
+pt_BR
+sk
+sv
+vi
+zh_CN
+zh_TW
