3
* Copyright (c) 2006 Benedikt Meurer <benny@xfce.org>
5
* This program is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License as published by the Free
7
* Software Foundation; either version 2 of the License, or (at your option)
10
* This program is distributed in the hope that it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15
* You should have received a copy of the GNU General Public License along with
16
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17
* Place, Suite 330, Boston, MA 02111-1307 USA
24
#include <thunar-tpa/thunar-tpa-icon.h>
26
#include <libxfce4panel/xfce-panel-plugin.h>
30
static void thunar_tpa_construct (XfcePanelPlugin *panel_plugin);
35
thunar_tpa_construct (XfcePanelPlugin *panel_plugin)
40
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
42
/* setup the trash icon */
43
icon = thunar_tpa_icon_new ();
44
gtk_container_add (GTK_CONTAINER (panel_plugin), icon);
45
xfce_panel_plugin_add_action_widget (panel_plugin, gtk_bin_get_child (GTK_BIN (icon)));
46
gtk_widget_show (icon);
48
/* add the "Empty Trash" menu item */
49
item = gtk_menu_item_new_with_mnemonic (_("_Empty Trash"));
50
exo_binding_new (G_OBJECT (icon), "full", G_OBJECT (item), "sensitive");
51
g_signal_connect_swapped (G_OBJECT (item), "activate", G_CALLBACK (thunar_tpa_icon_empty_trash), icon);
52
xfce_panel_plugin_menu_insert_item (panel_plugin, GTK_MENU_ITEM (item));
53
gtk_widget_show (item);
55
/* configure the plugin */
56
g_signal_connect_swapped (G_OBJECT (panel_plugin), "size-changed", G_CALLBACK (thunar_tpa_icon_set_size), icon);
61
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (thunar_tpa_construct);