From b08cadb9ab90b41af81b9fd8da65fb52433c8004 Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Tue, 4 Aug 2009 21:52:29 +0000 Subject: GTK: implement bookmark manager copy/paste. - Refactor bookmark util clipboard code to be cross platform. - Add a CBF_DATA format for writing arbitrary data to the clipboard. - Change MenuGtk so that showing a menu only makes the menu items update asynchronously. This way we can show the menu immediately and we won't get in trouble if the delegate's IsCommandEnabled() runs a nested message loop. I did not do any mac-side implementation of the new clipboard stuff. The implementation should be easy when they get around to writing the bookmark manager. Review URL: http://codereview.chromium.org/159815 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22419 0039d316-1c4b-4281-b951-d872f2087c98 --- tools/gtk_clipboard_dump/gtk_clipboard_dump.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/gtk_clipboard_dump') diff --git a/tools/gtk_clipboard_dump/gtk_clipboard_dump.cc b/tools/gtk_clipboard_dump/gtk_clipboard_dump.cc index a064792..c96ee00 100644 --- a/tools/gtk_clipboard_dump/gtk_clipboard_dump.cc +++ b/tools/gtk_clipboard_dump/gtk_clipboard_dump.cc @@ -19,6 +19,11 @@ void PrintClipboardContents(GtkClipboard* clip) { GtkSelectionData* target_data = gtk_clipboard_wait_for_contents(clip, gdk_atom_intern("TARGETS", false)); + if (!target_data) { + printf("failed to get the contents!\n"); + return; + } + gtk_selection_data_get_targets(target_data, &targets, &num_targets); printf("%d available targets:\n---------------\n", num_targets); -- cgit v1.1