Commit d52caae6 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Add gtk_drag_source_set/get_target_list(). (#127499, based on patch from

Mon Mar  1 19:30:25 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdnd.[ch]: Add gtk_drag_source_set/get_target_list().
        (#127499, based on patch from Michael Natterer)

        * tests/testgtk.c: Fix bidi strings to display correctly
        with new auto-bidi.
parent 7002bb3e
Mon Mar 1 19:30:25 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch]: Add gtk_drag_source_set/get_target_list().
(#127499, based on patch from Michael Natterer)
* tests/testgtk.c: Fix bidi strings to display correctly
with new auto-bidi.
Tue Mar 2 01:34:40 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtksettings.c: Remove the include of Xft.h, which is already
......
Mon Mar 1 19:30:25 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch]: Add gtk_drag_source_set/get_target_list().
(#127499, based on patch from Michael Natterer)
* tests/testgtk.c: Fix bidi strings to display correctly
with new auto-bidi.
Tue Mar 2 01:34:40 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtksettings.c: Remove the include of Xft.h, which is already
......
Mon Mar 1 19:30:25 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch]: Add gtk_drag_source_set/get_target_list().
(#127499, based on patch from Michael Natterer)
* tests/testgtk.c: Fix bidi strings to display correctly
with new auto-bidi.
Tue Mar 2 01:34:40 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtksettings.c: Remove the include of Xft.h, which is already
......
Mon Mar 1 19:30:25 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch]: Add gtk_drag_source_set/get_target_list().
(#127499, based on patch from Michael Natterer)
* tests/testgtk.c: Fix bidi strings to display correctly
with new auto-bidi.
Tue Mar 2 01:34:40 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtksettings.c: Remove the include of Xft.h, which is already
......
Mon Mar 1 19:30:25 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.[ch]: Add gtk_drag_source_set/get_target_list().
(#127499, based on patch from Michael Natterer)
* tests/testgtk.c: Fix bidi strings to display correctly
with new auto-bidi.
Tue Mar 2 01:34:40 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtksettings.c: Remove the include of Xft.h, which is already
......
......@@ -4829,6 +4829,8 @@ gtk_drag_source_set_icon
gtk_drag_source_set_icon_pixbuf
gtk_drag_source_set_icon_stock
gtk_drag_source_unset
gtk_drag_source_set_target_list
gtk_drag_source_get_target_list
</SECTION>
......
......@@ -156,6 +156,11 @@ The #GtkEntry-struct struct contains only private data.
</para>
<!-- ##### ARG GtkEntry:xalign ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_entry_new ##### -->
<para>
Creates a new #GtkEntry widget.
......@@ -353,6 +358,24 @@ use gtk_editable_set_editable() instead.
@Returns:
<!-- ##### FUNCTION gtk_entry_set_alignment ##### -->
<para>
</para>
@entry:
@xalign:
<!-- ##### FUNCTION gtk_entry_get_alignment ##### -->
<para>
</para>
@entry:
@Returns:
<!-- ##### FUNCTION gtk_entry_get_layout ##### -->
<para>
......
......@@ -209,6 +209,11 @@ types related to the text widget and how they work together.
</para>
<!-- ##### ARG GtkTextView:error-underline-color ##### -->
<para>
</para>
<!-- ##### ENUM GtkTextWindowType ##### -->
<para>
......
......@@ -490,6 +490,16 @@ Deprecated alias for gtk_window_set_position().
@Returns:
<!-- ##### FUNCTION gtk_window_activate_key ##### -->
<para>
</para>
@window:
@event:
@Returns:
<!-- ##### FUNCTION gtk_window_get_focus ##### -->
<para>
......
......@@ -1006,9 +1006,10 @@ gtk_drag_dest_set_target_list (GtkWidget *widget,
site = g_object_get_data (G_OBJECT (widget), "gtk-drag-dest");
if (site == NULL)
if (!site)
{
g_warning ("can't set a target list on a widget until you've called gtk_drag_dest_set() to make the widget into a drag destination");
g_warning ("Can't set a target list on a widget until you've called gtk_drag_dest_set() "
"to make the widget into a drag destination");
return;
}
......@@ -2099,6 +2100,61 @@ gtk_drag_source_unset (GtkWidget *widget)
}
}
/**
* gtk_drag_source_get_target_list:
* @widget: a #GtkWidget
*
* Gets the list of targets this widget can provide for
* drag-and-drop.
*
* Return value: the #GtkTargetList, or %NULL if none
**/
GtkTargetList *
gtk_drag_source_get_target_list (GtkWidget *widget)
{
GtkDragSourceSite *site;
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
site = g_object_get_data (G_OBJECT (widget), "gtk-site-data");
return site ? site->target_list : NULL;
}
/**
* gtk_drag_source_set_target_list:
* @widget: a #GtkWidget that's a drag source
* @target_list: list of draggable targets, or %NULL for none
*
* Changes the target types that this widget offers for drag-and-drop.
* The widget must first be made into a drag source with
* gtk_drag_source_set().
**/
void
gtk_drag_source_set_target_list (GtkWidget *widget,
GtkTargetList *target_list)
{
GtkDragSourceSite *site;
g_return_if_fail (GTK_IS_WIDGET (widget));
site = g_object_get_data (G_OBJECT (widget), "gtk-site-data");
if (site == NULL)
{
g_warning ("gtk_drag_source_set_target_list() requires the widget "
"to already be a drag source.");
return;
}
if (target_list)
gtk_target_list_ref (target_list);
if (site->target_list)
gtk_target_list_unref (site->target_list);
site->target_list = target_list;
}
static void
gtk_drag_source_unset_icon (GtkDragSourceSite *site)
{
......
......@@ -96,6 +96,10 @@ void gtk_drag_source_set (GtkWidget *widget,
void gtk_drag_source_unset (GtkWidget *widget);
GtkTargetList* gtk_drag_source_get_target_list (GtkWidget *widget);
void gtk_drag_source_set_target_list (GtkWidget *widget,
GtkTargetList *target_list);
void gtk_drag_source_set_icon (GtkWidget *widget,
GdkColormap *colormap,
GdkPixmap *pixmap,
......
......@@ -2591,10 +2591,8 @@ void create_labels (GtkWidget *widget)
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
frame = gtk_frame_new ("Bidirection Label");
label = gtk_label_new ("Arabic \330\247\331\204\330\263\331\204\330\247\331\205 \330\271\331\204\331\212\331\203\331\205\n"
"Hebrew \327\251\327\234\327\225\327\235");
gtk_widget_set_direction (label, GTK_TEXT_DIR_RTL);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
label = gtk_label_new ("\342\200\217Arabic \330\247\331\204\330\263\331\204\330\247\331\205 \330\271\331\204\331\212\331\203\331\205\n"
"\342\200\217Hebrew \327\251\327\234\327\225\327\235");
gtk_container_add (GTK_CONTAINER (frame), label);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
......
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