forked from AuroraMiddleware/gtk
define GtkCTreeNode as boxed type use GTK_CTREE_NODE_TYPE instead of
Thu Nov 26 19:11:46 1998 Lars Hamann <lars@gtk.org> * gtk/gtk-boxed.defs (GtkCTreeNode): define GtkCTreeNode as boxed type * gtk/gtkctree.c (gtk_ctree_class_init): use GTK_CTREE_NODE_TYPE instead of GTK_TYPE_POINTER in signal definitions. (patch from James Henstridge <james@daa.com.au>) Thu Nov 26 18:48:44 1998 Lars Hamann <lars@gtk.org> * gtk/gtkclist.c (set_cell_contents) * gtk/gtkctree.c (set_cell_contents): call column_auto_resize only if auto.resize == TRUE * gtk/gtknotebook.c (gtk_notebook_set_shape) (gtk_notebook_expose): don't draw tab, if show_tabs == FALSE (bug reports from Alexis Mikhailov / Dave Cole) (gtk_notebook_focus_changed) (gtk_notebook_draw_focus): draw only the focus rectangle, not the hole tab.
This commit is contained in:
parent
c7ac3835fa
commit
4ab10dc891
19
ChangeLog
19
ChangeLog
@ -1,3 +1,22 @@
|
||||
Thu Nov 26 19:11:46 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtk-boxed.defs (GtkCTreeNode): define GtkCTreeNode as boxed type
|
||||
* gtk/gtkctree.c (gtk_ctree_class_init): use GTK_CTREE_NODE_TYPE
|
||||
instead of GTK_TYPE_POINTER in signal definitions.
|
||||
(patch from James Henstridge <james@daa.com.au>)
|
||||
|
||||
Thu Nov 26 18:48:44 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.c (set_cell_contents)
|
||||
* gtk/gtkctree.c (set_cell_contents): call column_auto_resize only
|
||||
if auto.resize == TRUE
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_set_shape) (gtk_notebook_expose):
|
||||
don't draw tab, if show_tabs == FALSE
|
||||
(bug reports from Alexis Mikhailov / Dave Cole)
|
||||
(gtk_notebook_focus_changed) (gtk_notebook_draw_focus): draw only
|
||||
the focus rectangle, not the hole tab.
|
||||
|
||||
Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h:
|
||||
|
@ -1,3 +1,22 @@
|
||||
Thu Nov 26 19:11:46 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtk-boxed.defs (GtkCTreeNode): define GtkCTreeNode as boxed type
|
||||
* gtk/gtkctree.c (gtk_ctree_class_init): use GTK_CTREE_NODE_TYPE
|
||||
instead of GTK_TYPE_POINTER in signal definitions.
|
||||
(patch from James Henstridge <james@daa.com.au>)
|
||||
|
||||
Thu Nov 26 18:48:44 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.c (set_cell_contents)
|
||||
* gtk/gtkctree.c (set_cell_contents): call column_auto_resize only
|
||||
if auto.resize == TRUE
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_set_shape) (gtk_notebook_expose):
|
||||
don't draw tab, if show_tabs == FALSE
|
||||
(bug reports from Alexis Mikhailov / Dave Cole)
|
||||
(gtk_notebook_focus_changed) (gtk_notebook_draw_focus): draw only
|
||||
the focus rectangle, not the hole tab.
|
||||
|
||||
Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h:
|
||||
|
@ -1,3 +1,22 @@
|
||||
Thu Nov 26 19:11:46 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtk-boxed.defs (GtkCTreeNode): define GtkCTreeNode as boxed type
|
||||
* gtk/gtkctree.c (gtk_ctree_class_init): use GTK_CTREE_NODE_TYPE
|
||||
instead of GTK_TYPE_POINTER in signal definitions.
|
||||
(patch from James Henstridge <james@daa.com.au>)
|
||||
|
||||
Thu Nov 26 18:48:44 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.c (set_cell_contents)
|
||||
* gtk/gtkctree.c (set_cell_contents): call column_auto_resize only
|
||||
if auto.resize == TRUE
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_set_shape) (gtk_notebook_expose):
|
||||
don't draw tab, if show_tabs == FALSE
|
||||
(bug reports from Alexis Mikhailov / Dave Cole)
|
||||
(gtk_notebook_focus_changed) (gtk_notebook_draw_focus): draw only
|
||||
the focus rectangle, not the hole tab.
|
||||
|
||||
Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h:
|
||||
|
@ -1,3 +1,22 @@
|
||||
Thu Nov 26 19:11:46 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtk-boxed.defs (GtkCTreeNode): define GtkCTreeNode as boxed type
|
||||
* gtk/gtkctree.c (gtk_ctree_class_init): use GTK_CTREE_NODE_TYPE
|
||||
instead of GTK_TYPE_POINTER in signal definitions.
|
||||
(patch from James Henstridge <james@daa.com.au>)
|
||||
|
||||
Thu Nov 26 18:48:44 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.c (set_cell_contents)
|
||||
* gtk/gtkctree.c (set_cell_contents): call column_auto_resize only
|
||||
if auto.resize == TRUE
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_set_shape) (gtk_notebook_expose):
|
||||
don't draw tab, if show_tabs == FALSE
|
||||
(bug reports from Alexis Mikhailov / Dave Cole)
|
||||
(gtk_notebook_focus_changed) (gtk_notebook_draw_focus): draw only
|
||||
the focus rectangle, not the hole tab.
|
||||
|
||||
Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h:
|
||||
|
@ -1,3 +1,22 @@
|
||||
Thu Nov 26 19:11:46 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtk-boxed.defs (GtkCTreeNode): define GtkCTreeNode as boxed type
|
||||
* gtk/gtkctree.c (gtk_ctree_class_init): use GTK_CTREE_NODE_TYPE
|
||||
instead of GTK_TYPE_POINTER in signal definitions.
|
||||
(patch from James Henstridge <james@daa.com.au>)
|
||||
|
||||
Thu Nov 26 18:48:44 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.c (set_cell_contents)
|
||||
* gtk/gtkctree.c (set_cell_contents): call column_auto_resize only
|
||||
if auto.resize == TRUE
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_set_shape) (gtk_notebook_expose):
|
||||
don't draw tab, if show_tabs == FALSE
|
||||
(bug reports from Alexis Mikhailov / Dave Cole)
|
||||
(gtk_notebook_focus_changed) (gtk_notebook_draw_focus): draw only
|
||||
the focus rectangle, not the hole tab.
|
||||
|
||||
Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h:
|
||||
|
@ -1,3 +1,22 @@
|
||||
Thu Nov 26 19:11:46 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtk-boxed.defs (GtkCTreeNode): define GtkCTreeNode as boxed type
|
||||
* gtk/gtkctree.c (gtk_ctree_class_init): use GTK_CTREE_NODE_TYPE
|
||||
instead of GTK_TYPE_POINTER in signal definitions.
|
||||
(patch from James Henstridge <james@daa.com.au>)
|
||||
|
||||
Thu Nov 26 18:48:44 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.c (set_cell_contents)
|
||||
* gtk/gtkctree.c (set_cell_contents): call column_auto_resize only
|
||||
if auto.resize == TRUE
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_set_shape) (gtk_notebook_expose):
|
||||
don't draw tab, if show_tabs == FALSE
|
||||
(bug reports from Alexis Mikhailov / Dave Cole)
|
||||
(gtk_notebook_focus_changed) (gtk_notebook_draw_focus): draw only
|
||||
the focus rectangle, not the hole tab.
|
||||
|
||||
Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h:
|
||||
|
@ -1,3 +1,22 @@
|
||||
Thu Nov 26 19:11:46 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtk-boxed.defs (GtkCTreeNode): define GtkCTreeNode as boxed type
|
||||
* gtk/gtkctree.c (gtk_ctree_class_init): use GTK_CTREE_NODE_TYPE
|
||||
instead of GTK_TYPE_POINTER in signal definitions.
|
||||
(patch from James Henstridge <james@daa.com.au>)
|
||||
|
||||
Thu Nov 26 18:48:44 1998 Lars Hamann <lars@gtk.org>
|
||||
|
||||
* gtk/gtkclist.c (set_cell_contents)
|
||||
* gtk/gtkctree.c (set_cell_contents): call column_auto_resize only
|
||||
if auto.resize == TRUE
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_set_shape) (gtk_notebook_expose):
|
||||
don't draw tab, if show_tabs == FALSE
|
||||
(bug reports from Alexis Mikhailov / Dave Cole)
|
||||
(gtk_notebook_focus_changed) (gtk_notebook_draw_focus): draw only
|
||||
the focus rectangle, not the hole tab.
|
||||
|
||||
Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkclist.h:
|
||||
|
@ -20,6 +20,9 @@
|
||||
gtk_style_ref
|
||||
gtk_style_unref)
|
||||
|
||||
(define-boxed GtkCTreeNode
|
||||
)
|
||||
|
||||
;;; Gdk boxed types
|
||||
|
||||
;(define-boxed GdkPoint
|
||||
|
@ -2459,7 +2459,9 @@ set_cell_contents (GtkCList *clist,
|
||||
break;
|
||||
}
|
||||
|
||||
column_auto_resize (clist, clist_row, column, requisition.width);
|
||||
if (clist->column[column].auto_resize &&
|
||||
!GTK_CLIST_AUTO_RESIZE_BLOCKED (clist))
|
||||
column_auto_resize (clist, clist_row, column, requisition.width);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -370,21 +370,21 @@ gtk_ctree_class_init (GtkCTreeClass *klass)
|
||||
object_class->type,
|
||||
GTK_SIGNAL_OFFSET (GtkCTreeClass, tree_select_row),
|
||||
gtk_marshal_NONE__POINTER_INT,
|
||||
GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_INT);
|
||||
GTK_TYPE_NONE, 2, GTK_TYPE_CTREE_NODE, GTK_TYPE_INT);
|
||||
ctree_signals[TREE_UNSELECT_ROW] =
|
||||
gtk_signal_new ("tree_unselect_row",
|
||||
GTK_RUN_FIRST,
|
||||
object_class->type,
|
||||
GTK_SIGNAL_OFFSET (GtkCTreeClass, tree_unselect_row),
|
||||
gtk_marshal_NONE__POINTER_INT,
|
||||
GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_INT);
|
||||
GTK_TYPE_NONE, 2, GTK_TYPE_CTREE_NODE, GTK_TYPE_INT);
|
||||
ctree_signals[TREE_EXPAND] =
|
||||
gtk_signal_new ("tree_expand",
|
||||
GTK_RUN_LAST,
|
||||
object_class->type,
|
||||
GTK_SIGNAL_OFFSET (GtkCTreeClass, tree_expand),
|
||||
gtk_marshal_NONE__POINTER,
|
||||
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
||||
GTK_TYPE_NONE, 1, GTK_TYPE_CTREE_NODE);
|
||||
ctree_signals[TREE_COLLAPSE] =
|
||||
gtk_signal_new ("tree_collapse",
|
||||
GTK_RUN_LAST,
|
||||
@ -398,8 +398,8 @@ gtk_ctree_class_init (GtkCTreeClass *klass)
|
||||
object_class->type,
|
||||
GTK_SIGNAL_OFFSET (GtkCTreeClass, tree_move),
|
||||
gtk_marshal_NONE__POINTER_POINTER_POINTER,
|
||||
GTK_TYPE_NONE, 3, GTK_TYPE_POINTER, GTK_TYPE_POINTER,
|
||||
GTK_TYPE_POINTER);
|
||||
GTK_TYPE_NONE, 3, GTK_TYPE_CTREE_NODE,
|
||||
GTK_TYPE_CTREE_NODE, GTK_TYPE_CTREE_NODE);
|
||||
ctree_signals[CHANGE_FOCUS_ROW_EXPANSION] =
|
||||
gtk_signal_new ("change_focus_row_expansion",
|
||||
GTK_RUN_LAST | GTK_RUN_ACTION,
|
||||
@ -3298,7 +3298,8 @@ set_cell_contents (GtkCList *clist,
|
||||
break;
|
||||
}
|
||||
|
||||
if (visible)
|
||||
if (visible && clist->column[column].auto_resize &&
|
||||
!GTK_CLIST_AUTO_RESIZE_BLOCKED (clist))
|
||||
column_auto_resize (clist, clist_row, column, requisition.width);
|
||||
}
|
||||
|
||||
|
@ -911,10 +911,13 @@ gtk_notebook_expose (GtkWidget *widget,
|
||||
notebook = GTK_NOTEBOOK (widget);
|
||||
|
||||
gtk_notebook_paint (widget, &event->area);
|
||||
if (notebook->cur_page &&
|
||||
gtk_widget_intersect (notebook->cur_page->tab_label,
|
||||
&event->area, &child_area))
|
||||
gtk_widget_draw_focus (widget);
|
||||
if (notebook->show_tabs)
|
||||
{
|
||||
if (notebook->cur_page &&
|
||||
gtk_widget_intersect (notebook->cur_page->tab_label,
|
||||
&event->area, &child_area))
|
||||
gtk_widget_draw_focus (widget);
|
||||
}
|
||||
|
||||
child_event = *event;
|
||||
if (notebook->cur_page &&
|
||||
@ -1309,12 +1312,12 @@ gtk_notebook_draw_focus (GtkWidget *widget)
|
||||
|
||||
page = notebook->focus_tab->data;
|
||||
|
||||
area.x = widget->allocation.x;
|
||||
area.y = widget->allocation.y;
|
||||
area.width = widget->allocation.width;
|
||||
area.height = widget->allocation.height;
|
||||
area.x = page->tab_label->allocation.x - 1;
|
||||
area.y = page->tab_label->allocation.y - 1;
|
||||
area.width = page->tab_label->allocation.width + 2;
|
||||
area.height = page->tab_label->allocation.height + 2;
|
||||
|
||||
gtk_notebook_draw_tab(GTK_NOTEBOOK(widget), page, &area);
|
||||
gtk_notebook_draw_tab (GTK_NOTEBOOK (widget), page, &area);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1798,7 +1801,34 @@ gtk_notebook_focus_changed (GtkNotebook *notebook,
|
||||
g_return_if_fail (notebook != NULL);
|
||||
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
|
||||
|
||||
gtk_notebook_expose_tabs(notebook);
|
||||
if (GTK_WIDGET_DRAWABLE (notebook) && notebook->show_tabs)
|
||||
{
|
||||
GdkRectangle area;
|
||||
|
||||
if (notebook->focus_tab)
|
||||
{
|
||||
GtkNotebookPage *page;
|
||||
|
||||
page = notebook->focus_tab->data;
|
||||
|
||||
area.x = page->tab_label->allocation.x - 1;
|
||||
area.y = page->tab_label->allocation.y - 1;
|
||||
area.width = page->tab_label->allocation.width + 2;
|
||||
area.height = page->tab_label->allocation.height + 2;
|
||||
|
||||
gtk_notebook_draw_tab (notebook, page, &area);
|
||||
}
|
||||
|
||||
if (old_page)
|
||||
{
|
||||
area.x = old_page->tab_label->allocation.x - 1;
|
||||
area.y = old_page->tab_label->allocation.y - 1;
|
||||
area.width = old_page->tab_label->allocation.width + 2;
|
||||
area.height = old_page->tab_label->allocation.height + 2;
|
||||
|
||||
gtk_notebook_draw_tab (notebook, old_page, &area);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
@ -2231,8 +2261,7 @@ gtk_notebook_draw_tab (GtkNotebook *notebook,
|
||||
page_area.width, page_area.height,
|
||||
gap_side);
|
||||
if ((GTK_WIDGET_HAS_FOCUS (widget)) &&
|
||||
notebook->focus_tab && (notebook->focus_tab->data == page) &&
|
||||
(page))
|
||||
notebook->focus_tab && (notebook->focus_tab->data == page))
|
||||
{
|
||||
gtk_paint_focus (widget->style, widget->window,
|
||||
area, widget, "tab",
|
||||
@ -2417,20 +2446,24 @@ gtk_notebook_set_shape (GtkNotebook *notebook)
|
||||
}
|
||||
|
||||
/* draw the shapes of all the children */
|
||||
children = notebook->children;
|
||||
while (children)
|
||||
if (notebook->show_tabs)
|
||||
{
|
||||
page = children->data;
|
||||
if (GTK_WIDGET_MAPPED (page->tab_label))
|
||||
children = notebook->children;
|
||||
while (children)
|
||||
{
|
||||
x = page->allocation.x;
|
||||
y = page->allocation.y;
|
||||
width = page->allocation.width;
|
||||
height = page->allocation.height;
|
||||
gdk_draw_rectangle(pm, pmgc, TRUE, x, y, width, height);
|
||||
page = children->data;
|
||||
if (GTK_WIDGET_MAPPED (page->tab_label))
|
||||
{
|
||||
x = page->allocation.x;
|
||||
y = page->allocation.y;
|
||||
width = page->allocation.width;
|
||||
height = page->allocation.height;
|
||||
gdk_draw_rectangle(pm, pmgc, TRUE, x, y, width, height);
|
||||
}
|
||||
children = children->next;
|
||||
}
|
||||
children = children->next;
|
||||
}
|
||||
|
||||
/* set the mask */
|
||||
gdk_window_shape_combine_mask(widget->window, pm, 0, 0);
|
||||
gdk_pixmap_unref(pm);
|
||||
|
Loading…
Reference in New Issue
Block a user