diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 21:52:29 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 21:52:29 +0000 |
commit | b08cadb9ab90b41af81b9fd8da65fb52433c8004 (patch) | |
tree | 55738edf0c98b596cd6f9a89533e92f5a82c6fff /tools/gtk_clipboard_dump | |
parent | 021d688a1e02ae7bd88e54162d5d25e1dae52e7c (diff) | |
download | chromium_src-b08cadb9ab90b41af81b9fd8da65fb52433c8004.zip chromium_src-b08cadb9ab90b41af81b9fd8da65fb52433c8004.tar.gz chromium_src-b08cadb9ab90b41af81b9fd8da65fb52433c8004.tar.bz2 |
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
Diffstat (limited to 'tools/gtk_clipboard_dump')
-rw-r--r-- | tools/gtk_clipboard_dump/gtk_clipboard_dump.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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); |