Commit c3e04d86 authored by Stefan Jeske's avatar Stefan Jeske

New function to wrap XSetDashes; modified gtkctree.c to use it.

	* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
	New function to wrap XSetDashes; modified gtkctree.c to use it.
parent 7d8df9e6
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
New function to wrap XSetDashes; modified gtkctree.c to use it.
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
......
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
New function to wrap XSetDashes; modified gtkctree.c to use it.
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
......
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
New function to wrap XSetDashes; modified gtkctree.c to use it.
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
......
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
New function to wrap XSetDashes; modified gtkctree.c to use it.
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
......
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
New function to wrap XSetDashes; modified gtkctree.c to use it.
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
......
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
New function to wrap XSetDashes; modified gtkctree.c to use it.
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
......
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
New function to wrap XSetDashes; modified gtkctree.c to use it.
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
......
......@@ -360,6 +360,10 @@ void gdk_gc_set_line_attributes (GdkGC *gc,
GdkLineStyle line_style,
GdkCapStyle cap_style,
GdkJoinStyle join_style);
void gdk_gc_set_dashes (GdkGC *gc,
gint dash_offset,
gchar dash_list[],
gint n);
void gdk_gc_copy (GdkGC *dst_gc,
GdkGC *src_gc);
......
......@@ -702,6 +702,22 @@ gdk_gc_set_line_attributes (GdkGC *gc,
xline_style, xcap_style, xjoin_style);
}
void
gdk_gc_set_dashes (GdkGC *gc,
gint dash_offset,
gchar dash_list[],
gint n)
{
GdkGCPrivate *private;
g_return_if_fail (gc != NULL);
g_return_if_fail (dash_list != NULL);
private = (GdkGCPrivate*) gc;
XSetDashes (private->xdisplay, private->xgc, dash_offset, dash_list, n);
}
void
gdk_gc_copy (GdkGC *dst_gc, GdkGC *src_gc)
{
......
......@@ -398,7 +398,6 @@ gtk_ctree_realize (GtkWidget *widget)
{
GtkCTree *ctree;
GdkGCValues values;
GdkGCPrivate *private;
ctree = GTK_CTREE (widget);
......@@ -419,8 +418,7 @@ gtk_ctree_realize (GtkWidget *widget)
{
gdk_gc_set_line_attributes (ctree->lines_gc, 1,
GDK_LINE_ON_OFF_DASH, None, None);
private = (GdkGCPrivate *) ctree->lines_gc;
XSetDashes (private->xdisplay, private->xgc, 0, "\1\1", 2);
gdk_gc_set_dashes (ctree->lines_gc, 0, "\1\1", 2);
}
if (ctree->reorderable)
......@@ -801,7 +799,6 @@ create_xor_gc (GtkCTree *ctree)
{
GtkCList *clist;
GdkGCValues values;
GdkGCPrivate *private;
clist = GTK_CLIST (ctree);
......@@ -814,8 +811,7 @@ create_xor_gc (GtkCTree *ctree)
GDK_GC_SUBWINDOW);
gdk_gc_set_line_attributes (ctree->xor_gc, 1, GDK_LINE_ON_OFF_DASH,
None, None);
private = (GdkGCPrivate*) ctree->xor_gc;
XSetDashes (private->xdisplay, private->xgc, 0, "\2\2", 2);
gdk_gc_set_dashes (ctree->xor_gc, 0, "\2\2", 2);
}
static void
......@@ -3675,8 +3671,6 @@ void
gtk_ctree_set_line_style (GtkCTree *ctree,
GtkCTreeLineStyle line_style)
{
GdkGCPrivate *private;
g_return_if_fail (ctree != NULL);
g_return_if_fail (GTK_IS_CTREE (ctree));
......@@ -3698,8 +3692,7 @@ gtk_ctree_set_line_style (GtkCTree *ctree,
if (GTK_WIDGET_REALIZED (ctree))
gdk_gc_set_line_attributes (ctree->lines_gc, 1,
GDK_LINE_ON_OFF_DASH, None, None);
private = (GdkGCPrivate *) ctree->lines_gc;
XSetDashes (private->xdisplay, private->xgc, 0, "\1\1", 2);
gdk_gc_set_dashes (ctree->lines_gc, 0, "\1\1", 2);
break;
case GTK_CTREE_LINES_NONE:
break;
......
......@@ -5029,25 +5029,28 @@ create_notebook (void)
GTK_SIGNAL_FUNC (gtk_notebook_next_page),
GTK_OBJECT (notebook));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
button = gtk_button_new_with_label ("prev");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gtk_notebook_prev_page),
GTK_OBJECT (notebook));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
button = gtk_button_new_with_label ("rotate");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (rotate_notebook),
notebook);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
button = gtk_button_new_with_label ("reparent");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (notebook_reparent),
notebook);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
}
if (!GTK_WIDGET_VISIBLE (window))
......
......@@ -5029,25 +5029,28 @@ create_notebook (void)
GTK_SIGNAL_FUNC (gtk_notebook_next_page),
GTK_OBJECT (notebook));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
button = gtk_button_new_with_label ("prev");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gtk_notebook_prev_page),
GTK_OBJECT (notebook));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
button = gtk_button_new_with_label ("rotate");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (rotate_notebook),
notebook);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
button = gtk_button_new_with_label ("reparent");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (notebook_reparent),
notebook);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
}
if (!GTK_WIDGET_VISIBLE (window))
......
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