Fix docs syntax.

2006-03-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtknotebook.c (gtk_notebook_set_tab_detachable): Fix
	docs syntax.
This commit is contained in:
Matthias Clasen 2006-03-28 18:58:05 +00:00 committed by Matthias Clasen
parent b435c6b967
commit 57e2e0d9b9
3 changed files with 29 additions and 32 deletions

View File

@ -1,5 +1,8 @@
2006-03-28 Matthias Clasen <mclasen@redhat.com> 2006-03-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_tab_detachable): Fix
docs syntax.
* gtk/gtktextview.c (gtk_text_view_start_selection_drag): * gtk/gtktextview.c (gtk_text_view_start_selection_drag):
(selection_motion_event_handler): Fix drag-selection after (selection_motion_event_handler): Fix drag-selection after
double-click. (#323862, Benjamin Berg) double-click. (#323862, Benjamin Berg)

View File

@ -1,5 +1,8 @@
2006-03-28 Matthias Clasen <mclasen@redhat.com> 2006-03-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_tab_detachable): Fix
docs syntax.
* gtk/gtktextview.c (gtk_text_view_start_selection_drag): * gtk/gtktextview.c (gtk_text_view_start_selection_drag):
(selection_motion_event_handler): Fix drag-selection after (selection_motion_event_handler): Fix drag-selection after
double-click. (#323862, Benjamin Berg) double-click. (#323862, Benjamin Berg)

View File

@ -339,8 +339,7 @@ static void gtk_notebook_draw_arrow (GtkNotebook *notebook,
static void gtk_notebook_pages_allocate (GtkNotebook *notebook, static void gtk_notebook_pages_allocate (GtkNotebook *notebook,
GtkNotebookDragOperation operation); GtkNotebookDragOperation operation);
static void gtk_notebook_page_allocate (GtkNotebook *notebook, static void gtk_notebook_page_allocate (GtkNotebook *notebook,
GtkNotebookPage *page, GtkNotebookPage *page);
GtkAllocation *allocation);
static void gtk_notebook_calc_tabs (GtkNotebook *notebook, static void gtk_notebook_calc_tabs (GtkNotebook *notebook,
GList *start, GList *start,
GList **end, GList **end,
@ -2641,8 +2640,10 @@ gtk_notebook_motion_notify (GtkWidget *widget,
if (!notebook->cur_page) if (!notebook->cur_page)
return FALSE; return FALSE;
priv->mouse_x = (gint) event->x; gdk_window_get_pointer (notebook->event_window,
priv->mouse_y = (gint) event->y; &priv->mouse_x,
&priv->mouse_y,
NULL);
if (notebook->cur_page->detachable && if (notebook->cur_page->detachable &&
check_threshold (notebook, priv->mouse_x, priv->mouse_y)) check_threshold (notebook, priv->mouse_x, priv->mouse_y))
@ -4775,9 +4776,6 @@ gtk_notebook_pages_allocate (GtkNotebook *notebook,
(notebook->cur_page->pack == GTK_PACK_END && left_x < anchor_x)) (notebook->cur_page->pack == GTK_PACK_END && left_x < anchor_x))
{ {
left_x = notebook->cur_page->allocation.x = anchor_x; left_x = notebook->cur_page->allocation.x = anchor_x;
gtk_notebook_page_allocate (notebook, notebook->cur_page,
&notebook->cur_page->allocation);
anchor_x += notebook->cur_page->allocation.width - tab_overlap; anchor_x += notebook->cur_page->allocation.width - tab_overlap;
} }
} }
@ -4787,11 +4785,7 @@ gtk_notebook_pages_allocate (GtkNotebook *notebook,
(notebook->cur_page->pack == GTK_PACK_END && right_x > anchor_x)) (notebook->cur_page->pack == GTK_PACK_END && right_x > anchor_x))
{ {
anchor_x -= notebook->cur_page->allocation.width; anchor_x -= notebook->cur_page->allocation.width;
left_x = notebook->cur_page->allocation.x = anchor_x; left_x = notebook->cur_page->allocation.x = anchor_x;
gtk_notebook_page_allocate (notebook, notebook->cur_page,
&notebook->cur_page->allocation);
anchor_x += tab_overlap; anchor_x += tab_overlap;
} }
} }
@ -4835,9 +4829,6 @@ gtk_notebook_pages_allocate (GtkNotebook *notebook,
(notebook->cur_page->pack == GTK_PACK_END && top_y < anchor_y)) (notebook->cur_page->pack == GTK_PACK_END && top_y < anchor_y))
{ {
top_y = notebook->cur_page->allocation.y = anchor_y; top_y = notebook->cur_page->allocation.y = anchor_y;
gtk_notebook_page_allocate (notebook, notebook->cur_page,
&notebook->cur_page->allocation);
anchor_y += notebook->cur_page->allocation.height - tab_overlap; anchor_y += notebook->cur_page->allocation.height - tab_overlap;
} }
@ -4860,7 +4851,7 @@ gtk_notebook_pages_allocate (GtkNotebook *notebook,
break; break;
} }
gtk_notebook_page_allocate (notebook, page, &child_allocation); page->allocation = child_allocation;
switch (tab_pos) switch (tab_pos)
{ {
@ -4927,18 +4918,13 @@ gtk_notebook_pages_allocate (GtkNotebook *notebook,
anchor_x -= notebook->cur_page->allocation.width; anchor_x -= notebook->cur_page->allocation.width;
notebook->cur_page->allocation.x = anchor_x; notebook->cur_page->allocation.x = anchor_x;
gtk_notebook_page_allocate (notebook, notebook->cur_page,
&notebook->cur_page->allocation);
} }
break; break;
case GTK_POS_LEFT: case GTK_POS_LEFT:
case GTK_POS_RIGHT: case GTK_POS_RIGHT:
if (PAGE_TOP_Y (notebook->cur_page) > anchor_y) if (PAGE_TOP_Y (notebook->cur_page) > anchor_y)
{ notebook->cur_page->allocation.y = anchor_y;
notebook->cur_page->allocation.y = anchor_y;
gtk_notebook_page_allocate (notebook, notebook->cur_page,
&notebook->cur_page->allocation);
}
break; break;
} }
} }
@ -5035,7 +5021,7 @@ gtk_notebook_pages_allocate (GtkNotebook *notebook,
break; break;
} }
gtk_notebook_page_allocate (notebook, page, &child_allocation); page->allocation = child_allocation;
switch (tab_pos) switch (tab_pos)
{ {
@ -5102,8 +5088,6 @@ gtk_notebook_pages_allocate (GtkNotebook *notebook,
anchor_x -= notebook->cur_page->allocation.width; anchor_x -= notebook->cur_page->allocation.width;
notebook->cur_page->allocation.x = anchor_x; notebook->cur_page->allocation.x = anchor_x;
gtk_notebook_page_allocate (notebook, notebook->cur_page,
&notebook->cur_page->allocation);
} }
break; break;
case GTK_POS_LEFT: case GTK_POS_LEFT:
@ -5112,8 +5096,6 @@ gtk_notebook_pages_allocate (GtkNotebook *notebook,
{ {
anchor_y -= notebook->cur_page->allocation.height; anchor_y -= notebook->cur_page->allocation.height;
notebook->cur_page->allocation.y = anchor_y; notebook->cur_page->allocation.y = anchor_y;
gtk_notebook_page_allocate (notebook, notebook->cur_page,
&notebook->cur_page->allocation);
} }
break; break;
} }
@ -5121,13 +5103,23 @@ gtk_notebook_pages_allocate (GtkNotebook *notebook,
} }
done: done:
children = notebook->children;
while (children)
{
page = children->data;
children = children->next;
if (GTK_WIDGET_DRAWABLE (page->tab_label))
gtk_notebook_page_allocate (notebook, page);
}
gtk_notebook_redraw_tabs (notebook); gtk_notebook_redraw_tabs (notebook);
} }
static void static void
gtk_notebook_page_allocate (GtkNotebook *notebook, gtk_notebook_page_allocate (GtkNotebook *notebook,
GtkNotebookPage *page, GtkNotebookPage *page)
GtkAllocation *allocation)
{ {
GtkWidget *widget = GTK_WIDGET (notebook); GtkWidget *widget = GTK_WIDGET (notebook);
GtkAllocation child_allocation; GtkAllocation child_allocation;
@ -5147,7 +5139,6 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
xthickness = widget->style->xthickness; xthickness = widget->style->xthickness;
ythickness = widget->style->ythickness; ythickness = widget->style->ythickness;
page->allocation = *allocation;
gtk_widget_get_child_requisition (page->tab_label, &tab_requisition); gtk_widget_get_child_requisition (page->tab_label, &tab_requisition);
if (notebook->cur_page != page) if (notebook->cur_page != page)
@ -7083,10 +7074,10 @@ gtk_notebook_get_tab_detachable (GtkNotebook *notebook,
* { * {
* GtkWidget *notebook; * GtkWidget *notebook;
* GtkWidget **child; * GtkWidget **child;
* *
* notebook = gtk_drag_get_source_widget (context); * notebook = gtk_drag_get_source_widget (context);
* child = (void*) selection_data->data; * child = (void*) selection_data->data;
* *
* process_widget (*child); * process_widget (*child);
* gtk_container_remove (GTK_CONTAINER (notebook), *child); * gtk_container_remove (GTK_CONTAINER (notebook), *child);
* } * }