Mercurial > pidgin
comparison src/gtkimhtml.c @ 2188:98c434792ab7
[gaim-migrate @ 2198]
la de dah.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 29 Aug 2001 00:04:59 +0000 |
parents | 66a84ff0445a |
children | e3939d21c2f0 |
comparison
equal
deleted
inserted
replaced
2187:66c7c5415377 | 2188:98c434792ab7 |
---|---|
1371 imhtml = GTK_IMHTML (widget); | 1371 imhtml = GTK_IMHTML (widget); |
1372 | 1372 |
1373 g_return_if_fail (imhtml->selected_text != NULL); | 1373 g_return_if_fail (imhtml->selected_text != NULL); |
1374 g_return_if_fail (imhtml->selected_text->str != NULL); | 1374 g_return_if_fail (imhtml->selected_text->str != NULL); |
1375 | 1375 |
1376 if (imhtml->selected_text->len <= 0) { | 1376 if (imhtml->selected_text->len <= 0) |
1377 string = NULL; | 1377 return; |
1378 length = 0; | 1378 |
1379 } else { | 1379 string = g_strdup (imhtml->selected_text->str); |
1380 string = g_strdup (imhtml->selected_text->str); | 1380 length = strlen (string); |
1381 length = strlen (string); | |
1382 } | |
1383 | 1381 |
1384 if (sel_info == TARGET_STRING) { | 1382 if (sel_info == TARGET_STRING) { |
1385 gtk_selection_data_set (sel_data, | 1383 gtk_selection_data_set (sel_data, |
1386 GDK_SELECTION_TYPE_STRING, | 1384 GDK_SELECTION_TYPE_STRING, |
1387 8 * sizeof (gchar), | 1385 8 * sizeof (gchar), |
1396 gdk_string_to_compound_text (string, &encoding, &format, &text, &new_length); | 1394 gdk_string_to_compound_text (string, &encoding, &format, &text, &new_length); |
1397 gtk_selection_data_set (sel_data, encoding, format, text, new_length); | 1395 gtk_selection_data_set (sel_data, encoding, format, text, new_length); |
1398 gdk_free_compound_text (text); | 1396 gdk_free_compound_text (text); |
1399 } | 1397 } |
1400 | 1398 |
1401 if (string) | 1399 g_free (string); |
1402 g_free (string); | |
1403 } | 1400 } |
1404 | 1401 |
1405 static gint | 1402 static gint |
1406 gtk_imhtml_selection_clear_event (GtkWidget *widget, | 1403 gtk_imhtml_selection_clear_event (GtkWidget *widget, |
1407 GdkEventSelection *event) | 1404 GdkEventSelection *event) |