Trivial formatting fixes to all examples, simple functional fixes to
* docs/tutorial/gtk-tut.sgml, docs/examples/*: Trivial formatting fixes to all examples, simple functional fixes to rangewidgets example.
This commit is contained in:
@ -28,12 +28,12 @@ static gint configure_event( GtkWidget *widget,
|
||||
GdkEventConfigure *event )
|
||||
{
|
||||
if (pixmap)
|
||||
g_object_unref(pixmap);
|
||||
g_object_unref (pixmap);
|
||||
|
||||
pixmap = gdk_pixmap_new(widget->window,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height,
|
||||
-1);
|
||||
pixmap = gdk_pixmap_new (widget->window,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height,
|
||||
-1);
|
||||
gdk_draw_rectangle (pixmap,
|
||||
widget->style->white_gc,
|
||||
TRUE,
|
||||
@ -48,12 +48,12 @@ static gint configure_event( GtkWidget *widget,
|
||||
static gint expose_event( GtkWidget *widget,
|
||||
GdkEventExpose *event )
|
||||
{
|
||||
gdk_draw_drawable(widget->window,
|
||||
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
|
||||
pixmap,
|
||||
event->area.x, event->area.y,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width, event->area.height);
|
||||
gdk_draw_drawable (widget->window,
|
||||
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
|
||||
pixmap,
|
||||
event->area.x, event->area.y,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width, event->area.height);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -146,16 +146,16 @@ int main( int argc,
|
||||
/* Signals used to handle backing pixmap */
|
||||
|
||||
g_signal_connect (GTK_OBJECT (drawing_area), "expose_event",
|
||||
(GtkSignalFunc) expose_event, NULL);
|
||||
g_signal_connect (GTK_OBJECT(drawing_area),"configure_event",
|
||||
(GtkSignalFunc) configure_event, NULL);
|
||||
GTK_SIGNAL_FUNC (expose_event), NULL);
|
||||
g_signal_connect (GTK_OBJECT (drawing_area),"configure_event",
|
||||
GTK_SIGNAL_FUNC (configure_event), NULL);
|
||||
|
||||
/* Event signals */
|
||||
|
||||
g_signal_connect (GTK_OBJECT (drawing_area), "motion_notify_event",
|
||||
(GtkSignalFunc) motion_notify_event, NULL);
|
||||
GTK_SIGNAL_FUNC (motion_notify_event), NULL);
|
||||
g_signal_connect (GTK_OBJECT (drawing_area), "button_press_event",
|
||||
(GtkSignalFunc) button_press_event, NULL);
|
||||
GTK_SIGNAL_FUNC (button_press_event), NULL);
|
||||
|
||||
gtk_widget_set_events (drawing_area, GDK_EXPOSURE_MASK
|
||||
| GDK_LEAVE_NOTIFY_MASK
|
||||
@ -168,8 +168,8 @@ int main( int argc,
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
|
||||
g_signal_connect_swapped (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroy),
|
||||
GTK_OBJECT (window));
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroy),
|
||||
GTK_OBJECT (window));
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
Reference in New Issue
Block a user