3 #include <lttv/gtkmultivpaned.h>
5 #include <lttv/mainWindow.h>
6 #include <lttv/gtkTraceSet.h>
8 static void gtk_multi_vpaned_class_init (GtkMultiVPanedClass
*klass
);
9 static void gtk_multi_vpaned_init (GtkMultiVPaned
*multi_vpaned
);
12 static void gtk_multi_vpaned_size_request (GtkWidget
*widget
,
13 GtkRequisition
*requisition
);
14 static void gtk_multi_vpaned_size_allocate (GtkWidget
*widget
,
15 GtkAllocation
*allocation
);
17 void gtk_multi_vpaned_scroll_value_changed (GtkRange
*range
, gpointer multi_vpaned
);
20 gtk_multi_vpaned_get_type (void)
22 static GType multi_vpaned_type
= 0;
24 if (!multi_vpaned_type
)
26 static const GTypeInfo multi_vpaned_info
=
28 sizeof (GtkMultiVPanedClass
),
30 NULL
, /* base_finalize */
31 (GClassInitFunc
) gtk_multi_vpaned_class_init
,
32 NULL
, /* class_finalize */
33 NULL
, /* class_data */
34 sizeof (GtkMultiVPaned
),
36 (GInstanceInitFunc
) gtk_multi_vpaned_init
,
37 NULL
, /* value_table */
40 multi_vpaned_type
= g_type_register_static (GTK_TYPE_PANED
, "GtkMultiVPaned",
41 &multi_vpaned_info
, 0);
44 return multi_vpaned_type
;
48 gtk_multi_vpaned_class_init (GtkMultiVPanedClass
*class)
50 GtkWidgetClass
*widget_class
;
52 widget_class
= (GtkWidgetClass
*) class;
54 widget_class
->size_request
= gtk_multi_vpaned_size_request
;
55 widget_class
->size_allocate
= gtk_multi_vpaned_size_allocate
;
59 gtk_multi_vpaned_init (GtkMultiVPaned
* multi_vpaned
)
63 GTK_WIDGET_SET_FLAGS (multi_vpaned
, GTK_NO_WINDOW
);
64 gtk_widget_set_redraw_on_allocate (GTK_WIDGET (multi_vpaned
), FALSE
);
66 multi_vpaned
->first_pane
= NULL
;
67 multi_vpaned
->last_pane
= NULL
;
68 multi_vpaned
->focused_pane
= NULL
;
69 multi_vpaned
->iter
= NULL
;
70 multi_vpaned
->num_children
= 0;
72 multi_vpaned
->vbox
= NULL
;
73 // multi_vpaned->scrollWindow = NULL;
74 // multi_vpaned->viewport = NULL;
75 multi_vpaned
->hscrollbar
= NULL
;
79 GtkWidget
* gtk_multi_vpaned_new ()
81 return GTK_WIDGET (g_object_new (gtk_multi_vpaned_get_type (), NULL
));
84 GtkWidget
* gtk_multi_vpaned_get_widget(GtkMultiVPaned
* multi_vpaned
)
86 if(multi_vpaned
->focused_pane
== NULL
)return NULL
;
87 return (GtkWidget
*)multi_vpaned
->focused_pane
->child2
;
90 GtkWidget
* gtk_multi_vpaned_get_first_widget(GtkMultiVPaned
* multi_vpaned
)
92 if(multi_vpaned
->first_pane
== NULL
)return NULL
;
93 multi_vpaned
->iter
= multi_vpaned
->first_pane
;
94 return multi_vpaned
->first_pane
->child2
;
97 GtkWidget
* gtk_multi_vpaned_get_next_widget(GtkMultiVPaned
* multi_vpaned
)
99 if(multi_vpaned
->iter
!= multi_vpaned
->last_pane
){
100 multi_vpaned
->iter
= (GtkPaned
*)multi_vpaned
->iter
->child1
;
101 return multi_vpaned
->iter
->child2
;
107 void gtk_multi_vpaned_set_data(GtkMultiVPaned
* multi_vpaned
,char * key
, gpointer value
)
109 g_object_set_data(G_OBJECT(multi_vpaned
->focused_pane
), key
, value
);
112 gpointer
gtk_multi_vpaned_get_data(GtkMultiVPaned
* multi_vpaned
,char * key
)
114 if(multi_vpaned
->focused_pane
== NULL
)return NULL
;
115 return g_object_get_data(G_OBJECT(multi_vpaned
->focused_pane
), key
);
118 void gtk_multi_vpaned_set_focus (GtkWidget
* widget
, gpointer user_data
)
120 GtkMultiVPaned
* multi_vpaned
= (GtkMultiVPaned
*) widget
;
122 if(!multi_vpaned
->first_pane
) return;
125 pane
= multi_vpaned
->first_pane
;
127 if((GtkWidget
*)pane
== (GtkWidget
*)user_data
){
128 multi_vpaned
->focused_pane
= pane
;
131 if(pane
== multi_vpaned
->last_pane
){
132 multi_vpaned
->focused_pane
= NULL
;
135 pane
= (GtkPaned
*)pane
->child1
;
139 void gtk_multi_vpaned_set_adjust(GtkMultiVPaned
* multi_vpaned
, gboolean first_time
)
141 TimeWindow time_window
;
142 TimeInterval
*time_span
;
146 get_time_window(multi_vpaned
->mw
,&time_window
);
148 time_span
= LTTV_TRACESET_CONTEXT(multi_vpaned
->mw
->current_tab
->traceset_info
->
149 traceset_context
)->Time_Span
;
151 multi_vpaned
->hadjust
->lower
= ltt_time_to_double(time_span
->startTime
) *
152 NANOSECONDS_PER_SECOND
;
153 multi_vpaned
->hadjust
->value
= multi_vpaned
->hadjust
->lower
;
154 multi_vpaned
->hadjust
->upper
= ltt_time_to_double(time_span
->endTime
) *
155 NANOSECONDS_PER_SECOND
;
158 /* Page increment of whole visible area */
159 if(multi_vpaned
->hadjust
== NULL
){
160 g_warning("Insert a viewer first");
164 start
= ltt_time_to_double(time_window
.start_time
) * NANOSECONDS_PER_SECOND
;
165 tmp
= multi_vpaned
->hadjust
->upper
- multi_vpaned
->hadjust
->lower
;
167 multi_vpaned
->hadjust
->page_increment
= ltt_time_to_double(
168 time_window
.time_width
) * NANOSECONDS_PER_SECOND
;
170 if(multi_vpaned
->hadjust
->page_increment
>= tmp
- range
)
171 multi_vpaned
->hadjust
->value
= multi_vpaned
->hadjust
->lower
;
172 if(start
+ multi_vpaned
->hadjust
->page_increment
>= multi_vpaned
->hadjust
->upper
- range
)
173 multi_vpaned
->hadjust
->value
= start
;
175 /* page_size to the whole visible area will take care that the
176 * scroll value + the shown area will never be more than what is
178 multi_vpaned
->hadjust
->page_size
= multi_vpaned
->hadjust
->page_increment
;
179 multi_vpaned
->hadjust
->step_increment
= multi_vpaned
->hadjust
->page_increment
/ 10;
181 gtk_adjustment_changed (multi_vpaned
->hadjust
);
184 void gtk_multi_vpaned_widget_add(GtkMultiVPaned
* multi_vpaned
, GtkWidget
* widget1
)
189 g_return_if_fail(GTK_IS_MULTI_VPANED(multi_vpaned
));
190 g_object_ref(G_OBJECT(widget1
));
193 if(!multi_vpaned
->first_pane
){
194 multi_vpaned
->first_pane
= (GtkPaned
*)gtk_vpaned_new();
195 multi_vpaned
->last_pane
= multi_vpaned
->first_pane
;
197 multi_vpaned
->hscrollbar
= gtk_hscrollbar_new (NULL
);
198 gtk_widget_show(multi_vpaned
->hscrollbar
);
200 multi_vpaned
->hadjust
= gtk_range_get_adjustment(GTK_RANGE(multi_vpaned
->hscrollbar
));
201 gtk_multi_vpaned_set_adjust(multi_vpaned
, TRUE
);
203 gtk_range_set_update_policy (GTK_RANGE(multi_vpaned
->hscrollbar
),
204 GTK_UPDATE_DISCONTINUOUS
);
205 g_signal_connect(G_OBJECT(multi_vpaned
->hscrollbar
), "value-changed",
206 G_CALLBACK(gtk_multi_vpaned_scroll_value_changed
), multi_vpaned
);
208 multi_vpaned
->vbox
= gtk_vbox_new(FALSE
,0);
209 gtk_widget_show(multi_vpaned
->vbox
);
211 // multi_vpaned->viewport = gtk_viewport_new (NULL,NULL);
212 // gtk_widget_show(multi_vpaned->viewport);
214 // gtk_container_add(GTK_CONTAINER(multi_vpaned->viewport), (GtkWidget*)multi_vpaned->vbox);
215 gtk_box_pack_end(GTK_BOX(multi_vpaned
->vbox
),(GtkWidget
*)multi_vpaned
->hscrollbar
,FALSE
,FALSE
,0);
216 gtk_box_pack_end(GTK_BOX(multi_vpaned
->vbox
),(GtkWidget
*)multi_vpaned
->first_pane
,TRUE
,TRUE
,0);
218 // multi_vpaned->scrollWindow = gtk_scrolled_window_new (NULL, NULL);
219 // gtk_widget_show(multi_vpaned->scrollWindow);
220 // gtk_container_add (GTK_CONTAINER (multi_vpaned->scrollWindow), (GtkWidget*)multi_vpaned->viewport);
221 // gtk_paned_pack1(GTK_PANED(multi_vpaned), (GtkWidget*)multi_vpaned->scrollWindow,FALSE, TRUE);
223 gtk_paned_pack1(GTK_PANED(multi_vpaned
), (GtkWidget
*)multi_vpaned
->vbox
,FALSE
, TRUE
);
225 tmpPane
= multi_vpaned
->last_pane
;
226 multi_vpaned
->last_pane
= (GtkPaned
*)gtk_vpaned_new();
227 gtk_paned_pack1 (tmpPane
,(GtkWidget
*)multi_vpaned
->last_pane
, FALSE
,TRUE
);
229 gtk_widget_show((GtkWidget
*)multi_vpaned
->last_pane
);
231 gtk_paned_pack2 (multi_vpaned
->last_pane
,widget1
, TRUE
, TRUE
);
232 multi_vpaned
->focused_pane
= multi_vpaned
->last_pane
;
233 multi_vpaned
->num_children
++;
237 void gtk_multi_vpaned_widget_delete(GtkMultiVPaned
* multi_vpaned
)
239 GtkPaned
* tmp
, *prev
, *next
;
241 if(!multi_vpaned
->focused_pane
) return;
243 tmp
= (GtkPaned
*)multi_vpaned
->focused_pane
->child2
; //widget in vpaned
244 g_object_unref(G_OBJECT(tmp
));
246 if(multi_vpaned
->focused_pane
== multi_vpaned
->first_pane
&&
247 multi_vpaned
->focused_pane
== multi_vpaned
->last_pane
){
248 // gtk_container_remove(GTK_CONTAINER(multi_vpaned),(GtkWidget*)multi_vpaned->scrollWindow);
249 gtk_container_remove(GTK_CONTAINER(multi_vpaned
),(GtkWidget
*)multi_vpaned
->vbox
);
250 multi_vpaned
->first_pane
= NULL
;
251 multi_vpaned
->last_pane
= NULL
;
252 multi_vpaned
->focused_pane
= NULL
;
253 }else if(multi_vpaned
->focused_pane
== multi_vpaned
->first_pane
&&
254 multi_vpaned
->focused_pane
!= multi_vpaned
->last_pane
){
255 next
= (GtkPaned
*)multi_vpaned
->first_pane
->child1
;
256 g_object_ref(G_OBJECT(next
));
257 gtk_container_remove(GTK_CONTAINER(multi_vpaned
->first_pane
),(GtkWidget
*)next
);
258 gtk_container_remove(GTK_CONTAINER(multi_vpaned
->vbox
),(GtkWidget
*)multi_vpaned
->first_pane
);
259 multi_vpaned
->first_pane
= next
;
260 gtk_box_pack_end(GTK_BOX(multi_vpaned
->vbox
),(GtkWidget
*)multi_vpaned
->first_pane
,TRUE
,TRUE
,0);
261 multi_vpaned
->focused_pane
= multi_vpaned
->first_pane
;
262 g_object_unref(G_OBJECT(next
));
263 }else if(multi_vpaned
->focused_pane
!= multi_vpaned
->first_pane
&&
264 multi_vpaned
->focused_pane
== multi_vpaned
->last_pane
){
265 tmp
= multi_vpaned
->last_pane
;
266 multi_vpaned
->last_pane
= (GtkPaned
*)gtk_widget_get_parent((GtkWidget
*)multi_vpaned
->last_pane
);
267 multi_vpaned
->focused_pane
= multi_vpaned
->last_pane
;
268 gtk_container_remove(GTK_CONTAINER(multi_vpaned
->last_pane
),(GtkWidget
*)tmp
);
270 tmp
= multi_vpaned
->focused_pane
;
271 prev
= (GtkPaned
*)gtk_widget_get_parent((GtkWidget
*)tmp
);
272 next
= (GtkPaned
*)tmp
->child1
;
273 g_object_ref(G_OBJECT(next
));
274 gtk_container_remove(GTK_CONTAINER(multi_vpaned
->focused_pane
),(GtkWidget
*)next
);
275 gtk_container_remove(GTK_CONTAINER(prev
),(GtkWidget
*)multi_vpaned
->focused_pane
);
276 gtk_paned_pack1(prev
, (GtkWidget
*)next
, FALSE
, TRUE
);
277 multi_vpaned
->focused_pane
= next
;
278 g_object_unref(G_OBJECT(next
));
281 multi_vpaned
->num_children
--;
285 void gtk_multi_vpaned_widget_move_up(GtkMultiVPaned
* multi_vpaned
)
287 GtkWidget
* upWidget
, *downWidget
;
288 GtkPaned
* prev
,*next
, *prevPrev
;
290 if(multi_vpaned
->last_pane
== multi_vpaned
->focused_pane
) return;
293 prev
= (GtkPaned
*)multi_vpaned
->focused_pane
->child1
;
294 g_object_ref(G_OBJECT(prev
));
295 gtk_container_remove(GTK_CONTAINER(multi_vpaned
->focused_pane
),(GtkWidget
*)prev
);
297 if(prev
== multi_vpaned
->last_pane
){
299 multi_vpaned
->last_pane
= multi_vpaned
->focused_pane
;
301 prevPrev
= (GtkPaned
*)prev
->child1
;
302 g_object_ref(G_OBJECT(prevPrev
));
303 gtk_container_remove(GTK_CONTAINER(prev
),(GtkWidget
*)prevPrev
);
306 g_object_ref(G_OBJECT(multi_vpaned
->focused_pane
));
307 if(multi_vpaned
->first_pane
== multi_vpaned
->focused_pane
){
308 gtk_container_remove(GTK_CONTAINER(multi_vpaned
->vbox
),(GtkWidget
*)multi_vpaned
->focused_pane
);
309 gtk_box_pack_end(GTK_BOX(multi_vpaned
->vbox
),(GtkWidget
*)prev
,TRUE
,TRUE
,0);
310 multi_vpaned
->first_pane
= prev
;
312 next
= (GtkPaned
*)gtk_widget_get_parent((GtkWidget
*)multi_vpaned
->focused_pane
);
313 gtk_container_remove(GTK_CONTAINER(next
),(GtkWidget
*)multi_vpaned
->focused_pane
);
314 gtk_paned_pack1(GTK_PANED(next
), (GtkWidget
*)prev
, FALSE
,TRUE
);
316 gtk_paned_pack1(GTK_PANED(prev
),(GtkWidget
*)multi_vpaned
->focused_pane
, FALSE
,TRUE
);
318 gtk_paned_pack1(GTK_PANED(multi_vpaned
->focused_pane
),(GtkWidget
*)prevPrev
, FALSE
,TRUE
);
320 g_object_unref(G_OBJECT(prev
));
321 if(prevPrev
) g_object_unref(G_OBJECT(prevPrev
));
322 g_object_unref(G_OBJECT(multi_vpaned
->focused_pane
));
326 void gtk_multi_vpaned_widget_move_down(GtkMultiVPaned
* multi_vpaned
)
328 GtkWidget
* upWidget
, *downWidget
;
329 GtkPaned
* prev
,*next
, *nextNext
;
331 if(multi_vpaned
->first_pane
== multi_vpaned
->focused_pane
) return;
334 next
= (GtkPaned
*)gtk_widget_get_parent((GtkWidget
*)multi_vpaned
->focused_pane
);
335 g_object_ref(G_OBJECT(next
));
337 if(multi_vpaned
->last_pane
== multi_vpaned
->focused_pane
){
339 multi_vpaned
->last_pane
= next
;
341 prev
= (GtkPaned
*)multi_vpaned
->focused_pane
->child1
;
342 g_object_ref(G_OBJECT(prev
));
343 gtk_container_remove(GTK_CONTAINER(multi_vpaned
->focused_pane
),(GtkWidget
*)prev
);
346 g_object_ref(G_OBJECT(multi_vpaned
->focused_pane
));
347 gtk_container_remove(GTK_CONTAINER(next
),(GtkWidget
*)multi_vpaned
->focused_pane
);
349 if(next
== multi_vpaned
->first_pane
){
350 multi_vpaned
->first_pane
= multi_vpaned
->focused_pane
;
351 gtk_container_remove(GTK_CONTAINER(multi_vpaned
->vbox
),(GtkWidget
*)next
);
352 gtk_box_pack_end(GTK_BOX(multi_vpaned
->vbox
),(GtkWidget
*)multi_vpaned
->focused_pane
,TRUE
,TRUE
,0);
354 nextNext
= (GtkPaned
*)gtk_widget_get_parent((GtkWidget
*)next
);
355 gtk_container_remove(GTK_CONTAINER(nextNext
),(GtkWidget
*)next
);
356 gtk_paned_pack1(nextNext
, (GtkWidget
*)multi_vpaned
->focused_pane
, FALSE
, TRUE
);
358 gtk_paned_pack1(multi_vpaned
->focused_pane
,(GtkWidget
*)next
, FALSE
,TRUE
);
360 gtk_paned_pack1(next
,(GtkWidget
*)prev
, FALSE
,TRUE
);
362 if(prev
)g_object_unref(G_OBJECT(prev
));
363 g_object_unref(G_OBJECT(next
));
364 g_object_unref(G_OBJECT(multi_vpaned
->focused_pane
));
367 void gtk_multi_vpaned_scroll_value_changed(GtkRange
*range
, gpointer multi_vpaned_arg
)
369 TimeWindow time_window
;
370 TimeInterval
*time_span
;
372 GtkMultiVPaned
* multi_vpaned
= (GtkMultiVPaned
*)multi_vpaned_arg
;
373 gdouble value
= gtk_range_get_value(range
);
374 gdouble upper
, lower
, ratio
;
376 time_window
= multi_vpaned
->mw
->current_tab
->time_window
;
378 time_span
= LTTV_TRACESET_CONTEXT(multi_vpaned
->mw
->current_tab
->traceset_info
->
379 traceset_context
)->Time_Span
;
380 lower
= multi_vpaned
->hadjust
->lower
;
381 upper
= multi_vpaned
->hadjust
->upper
;
382 ratio
= (value
- lower
) / (upper
- lower
);
384 time
= ltt_time_sub(time_span
->endTime
, time_span
->startTime
);
385 time
= ltt_time_mul(time
, (float)ratio
);
386 time
= ltt_time_add(time_span
->startTime
, time
);
388 time_window
.start_time
= time
;
390 time
= ltt_time_sub(time_span
->endTime
, time
);
391 if(ltt_time_compare(time
,time_window
.time_width
) < 0){
392 time_window
.time_width
= time
;
394 set_time_window(multi_vpaned
->mw
, &time_window
);
399 gtk_multi_vpaned_size_request (GtkWidget
*widget
,
400 GtkRequisition
*requisition
)
402 GtkPaned
*paned
= GTK_PANED (widget
);
403 GtkRequisition child_requisition
;
405 requisition
->width
= 0;
406 requisition
->height
= 0;
408 if (paned
->child1
&& GTK_WIDGET_VISIBLE (paned
->child1
))
410 gtk_widget_size_request (paned
->child1
, &child_requisition
);
412 requisition
->height
= child_requisition
.height
;
413 requisition
->width
= child_requisition
.width
;
416 if (paned
->child2
&& GTK_WIDGET_VISIBLE (paned
->child2
))
418 gtk_widget_size_request (paned
->child2
, &child_requisition
);
420 requisition
->width
= MAX (requisition
->width
, child_requisition
.width
);
421 requisition
->height
+= child_requisition
.height
;
424 requisition
->height
+= GTK_CONTAINER (paned
)->border_width
* 2;
425 requisition
->width
+= GTK_CONTAINER (paned
)->border_width
* 2;
427 if (paned
->child1
&& GTK_WIDGET_VISIBLE (paned
->child1
) &&
428 paned
->child2
&& GTK_WIDGET_VISIBLE (paned
->child2
))
432 gtk_widget_style_get (widget
, "handle_size", &handle_size
, NULL
);
433 requisition
->height
+= handle_size
;
439 gtk_multi_vpaned_size_allocate (GtkWidget
*widget
,
440 GtkAllocation
*allocation
)
442 GtkPaned
*paned
= GTK_PANED (widget
);
443 gint border_width
= GTK_CONTAINER (paned
)->border_width
;
445 widget
->allocation
= *allocation
;
447 if (paned
->child1
&& GTK_WIDGET_VISIBLE (paned
->child1
) &&
448 paned
->child2
&& GTK_WIDGET_VISIBLE (paned
->child2
))
450 GtkRequisition child1_requisition
;
451 GtkRequisition child2_requisition
;
452 GtkAllocation child1_allocation
;
453 GtkAllocation child2_allocation
;
456 gtk_widget_style_get (widget
, "handle_size", &handle_size
, NULL
);
458 gtk_widget_get_child_requisition (paned
->child1
, &child1_requisition
);
459 gtk_widget_get_child_requisition (paned
->child2
, &child2_requisition
);
461 gtk_paned_compute_position (paned
,
462 MAX (1, widget
->allocation
.height
465 child1_requisition
.height
,
466 child2_requisition
.height
);
468 paned
->handle_pos
.x
= widget
->allocation
.x
+ border_width
;
469 paned
->handle_pos
.y
= widget
->allocation
.y
+ paned
->child1_size
+ border_width
;
470 paned
->handle_pos
.width
= MAX (1, (gint
) widget
->allocation
.width
- 2 * border_width
);
471 paned
->handle_pos
.height
= handle_size
;
473 if (GTK_WIDGET_REALIZED (widget
))
475 if (GTK_WIDGET_MAPPED (widget
))
476 gdk_window_show (paned
->handle
);
477 gdk_window_move_resize (paned
->handle
,
480 paned
->handle_pos
.width
,
484 child1_allocation
.width
= child2_allocation
.width
= MAX (1, (gint
) allocation
->width
- border_width
* 2);
485 child1_allocation
.height
= MAX (1, paned
->child1_size
);
486 child1_allocation
.x
= child2_allocation
.x
= widget
->allocation
.x
+ border_width
;
487 child1_allocation
.y
= widget
->allocation
.y
+ border_width
;
489 child2_allocation
.y
= child1_allocation
.y
+ paned
->child1_size
+ paned
->handle_pos
.height
;
490 child2_allocation
.height
= MAX (1, widget
->allocation
.y
+ widget
->allocation
.height
- child2_allocation
.y
- border_width
);
492 if (GTK_WIDGET_MAPPED (widget
) &&
493 paned
->child1
->allocation
.height
< child1_allocation
.height
)
495 gtk_widget_size_allocate (paned
->child2
, &child2_allocation
);
496 gtk_widget_size_allocate (paned
->child1
, &child1_allocation
);
500 gtk_widget_size_allocate (paned
->child1
, &child1_allocation
);
501 gtk_widget_size_allocate (paned
->child2
, &child2_allocation
);
506 GtkAllocation child_allocation
;
508 if (GTK_WIDGET_REALIZED (widget
))
509 gdk_window_hide (paned
->handle
);
512 gtk_widget_set_child_visible (paned
->child1
, TRUE
);
514 gtk_widget_set_child_visible (paned
->child2
, TRUE
);
516 child_allocation
.x
= widget
->allocation
.x
+ border_width
;
517 child_allocation
.y
= widget
->allocation
.y
+ border_width
;
518 child_allocation
.width
= MAX (1, allocation
->width
- 2 * border_width
);
519 child_allocation
.height
= MAX (1, allocation
->height
- 2 * border_width
);
521 if (paned
->child1
&& GTK_WIDGET_VISIBLE (paned
->child1
))
522 gtk_widget_size_allocate (paned
->child1
, &child_allocation
);
523 else if (paned
->child2
&& GTK_WIDGET_VISIBLE (paned
->child2
))
524 gtk_widget_size_allocate (paned
->child2
, &child_allocation
);