* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Global clipboard abstraction.
*/
{
clipboard_unset (clipboard);
- if (clipboard->get_func)
- {
- /* Calling unset() caused the clipboard contents to be reset!
- * Avoid leaking and return
- */
- if (!(clipboard->have_owner && have_owner) ||
- clipboard->user_data != user_data)
- {
- (*clear_func) (clipboard, user_data);
- return FALSE;
- }
- else
- return TRUE;
- }
- else
- {
- clipboard->user_data = user_data;
- clipboard->have_owner = have_owner;
- if (have_owner)
- clipboard_add_owner_notify (clipboard);
- }
-
+ clipboard->user_data = user_data;
+ clipboard->have_owner = have_owner;
+ if (have_owner)
+ clipboard_add_owner_notify (clipboard);
}
clipboard->get_func = get_func;
if (g_main_loop_is_running (results.loop))
{
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
g_main_loop_run (results.loop);
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
}
g_main_loop_unref (results.loop);
if (g_main_loop_is_running (results.loop))
{
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
g_main_loop_run (results.loop);
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
}
g_main_loop_unref (results.loop);
if (g_main_loop_is_running (results.loop))
{
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
g_main_loop_run (results.loop);
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
}
g_main_loop_unref (results.loop);
if (g_main_loop_is_running (results.loop))
{
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
g_main_loop_run (results.loop);
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
}
g_main_loop_unref (results.loop);
if (g_main_loop_is_running (results.loop))
{
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
g_main_loop_run (results.loop);
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
}
g_main_loop_unref (results.loop);
}
/**
- * gtk_clipboard_wait_for_targets
+ * gtk_clipboard_wait_for_targets:
* @clipboard: a #GtkClipboard
* @targets: (out) (array length=n_targets) (transfer container): location
* to store an array of targets. The result stored here must
* @n_targets: location to store number of items in @targets.
*
* Returns a list of targets that are present on the clipboard, or %NULL
- * if there aren't any targets available. The returned list must be
+ * if there aren't any targets available. The returned list must be
* freed with g_free().
- * This function waits for the data to be received using the main
+ * This function waits for the data to be received using the main
* loop, so events, timeouts, etc, may be dispatched during the wait.
*
* Return value: %TRUE if any targets are present on the clipboard,
{
g_main_loop_quit (clipboard->store_loop);
- return FALSE;
+ return G_SOURCE_REMOVE;
}
/**
if (g_main_loop_is_running (clipboard->store_loop))
{
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
g_main_loop_run (clipboard->store_loop);
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
}
g_main_loop_unref (clipboard->store_loop);