Commit c730d79b authored by Cosimo Cecchi's avatar Cosimo Cecchi Committed by Cosimo Cecchi

bump required GTK+ version to 2.16.0. Update the trash icon in the "Go"

2009-03-19  Cosimo Cecchi  <cosimoc@gnome.org>

	* configure.in: bump required GTK+ version to 2.16.0.
	* src/nautilus-window-menus.c: (trash_state_changed_cb),
	(nautilus_window_initialize_trash_icon_monitor),
	(nautilus_window_initialize_menus):
	Update the trash icon in the "Go" menu according to the
	trash state (#575282).

svn path=/trunk/; revision=15142
parent 84a4d0de
2009-03-19 Cosimo Cecchi <cosimoc@gnome.org>
* configure.in: bump required GTK+ version to 2.16.0.
* src/nautilus-window-menus.c: (trash_state_changed_cb),
(nautilus_window_initialize_trash_icon_monitor),
(nautilus_window_initialize_menus):
Update the trash icon in the "Go" menu according to the
trash state (#575282).
2009-03-19 Cosimo Cecchi <cosimoc@gnome.org>
* src/file-manager/nautilus-audio-mime-types.h:
......
......@@ -5,7 +5,7 @@ dnl ===========================================================================
m4_define(glib_minver, 2.19.0)
m4_define(gnome_desktop_minver, 2.25.5)
m4_define(pango_minver, 1.1.2)
m4_define(gtk_minver, 2.13.0)
m4_define(gtk_minver, 2.16.0)
m4_define(xml_minver, 2.4.7)
m4_define(exif_minver, 0.5.12)
m4_define(beagle_minver, 0.2.4)
......
......@@ -54,6 +54,7 @@
#include <libnautilus-private/nautilus-search-directory.h>
#include <libnautilus-private/nautilus-search-engine.h>
#include <libnautilus-private/nautilus-signaller.h>
#include <libnautilus-private/nautilus-trash-monitor.h>
#include <string.h>
#define MENU_PATH_EXTENSION_ACTIONS "/MenuBar/File/Extension Actions"
......@@ -732,6 +733,39 @@ connect_proxy_cb (GtkUIManager *manager,
}
}
static void
trash_state_changed_cb (NautilusTrashMonitor *monitor,
gboolean state,
NautilusWindow *window)
{
GtkActionGroup *action_group;
GtkAction *action;
GIcon *gicon;
action_group = window->details->main_action_group;
action = gtk_action_group_get_action (action_group, "Go to Trash");
gicon = nautilus_trash_monitor_get_icon ();
if (gicon) {
g_object_set (action, "gicon", gicon, NULL);
g_object_unref (gicon);
}
}
static void
nautilus_window_initialize_trash_icon_monitor (NautilusWindow *window)
{
NautilusTrashMonitor *monitor;
monitor = nautilus_trash_monitor_get ();
trash_state_changed_cb (monitor, TRUE, window);
g_signal_connect (monitor, "trash_state_changed",
G_CALLBACK (trash_state_changed_cb), window);
}
static const GtkActionEntry main_entries[] = {
/* name, stock id, label */ { "File", NULL, N_("_File") },
/* name, stock id, label */ { "Edit", NULL, N_("_Edit") },
......@@ -889,6 +923,7 @@ nautilus_window_initialize_menus (NautilusWindow *window)
ui = nautilus_ui_string_get ("nautilus-shell-ui.xml");
gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, NULL);
nautilus_window_initialize_trash_icon_monitor (window);
nautilus_window_initialize_bookmarks_menu (window);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment