Added a tooltip to the close applet

This commit is contained in:
Pierre Pronchery 2011-07-16 02:56:24 +00:00
parent ec208fd5bc
commit 439ba37ced
3 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,7 @@
../src/applets/battery.c ../src/applets/battery.c
../src/applets/bluetooth.c ../src/applets/bluetooth.c
../src/applets/clock.c ../src/applets/clock.c
../src/applets/close.c
../src/applets/cpu.c ../src/applets/cpu.c
../src/applets/cpufreq.c ../src/applets/cpufreq.c
../src/applets/desktop.c ../src/applets/desktop.c

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Panel 0.0.5\n" "Project-Id-Version: Panel 0.0.5\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-07-16 04:29+0200\n" "POT-Creation-Date: 2011-07-16 04:55+0200\n"
"PO-Revision-Date: 2010-04-22 12:45+0200\n" "PO-Revision-Date: 2010-04-22 12:45+0200\n"
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n" "Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
"Language-Team: French\n" "Language-Team: French\n"
@ -51,6 +51,10 @@ msgstr ""
"%H:%M:%S\n" "%H:%M:%S\n"
"%d/%m/%Y" "%d/%m/%Y"
#: ../src/applets/close.c:96
msgid "Close"
msgstr "Fermer"
#: ../src/applets/cpu.c:95 #: ../src/applets/cpu.c:95
msgid "CPU:" msgid "CPU:"
msgstr "" msgstr ""

View File

@ -23,6 +23,7 @@
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include "Panel.h" #include "Panel.h"
#define _(string) gettext(string)
/* Close */ /* Close */
@ -91,6 +92,9 @@ static GtkWidget * _close_init(PanelApplet * applet)
close->helper = applet->helper; close->helper = applet->helper;
close->widget = gtk_button_new(); close->widget = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(close->widget), GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(close->widget), GTK_RELIEF_NONE);
#if GTK_CHECK_VERSION(2, 12, 0)
gtk_widget_set_tooltip_text(close->widget, _("Close"));
#endif
image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_BUTTON); image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image(GTK_BUTTON(close->widget), image); gtk_button_set_image(GTK_BUTTON(close->widget), image);
g_signal_connect_swapped(G_OBJECT(close->widget), "clicked", G_CALLBACK( g_signal_connect_swapped(G_OBJECT(close->widget), "clicked", G_CALLBACK(