comparison gtk/dw.c @ 493:84e471a4ec7e

Don't warn in dw_box_pack_*() for groupboxes.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 24 Nov 2003 18:53:07 +0000
parents fafd37119db4
children edcf9ec12f8c
comparison
equal deleted inserted replaced
492:9354c460d76b 493:84e471a4ec7e
6388 * pad: Number of pixels of padding around the item. 6388 * pad: Number of pixels of padding around the item.
6389 */ 6389 */
6390 void dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad) 6390 void dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad)
6391 { 6391 {
6392 int warn = FALSE, _locked_by_me = FALSE; 6392 int warn = FALSE, _locked_by_me = FALSE;
6393 GtkWidget *tmp; 6393 GtkWidget *tmp, *tmpitem;
6394 6394
6395 if(!box) 6395 if(!box)
6396 return; 6396 return;
6397 6397
6398 /* 6398 /*
6414 { 6414 {
6415 item = gtk_label_new(""); 6415 item = gtk_label_new("");
6416 gtk_widget_show(item); 6416 gtk_widget_show(item);
6417 } 6417 }
6418 6418
6419 tmpitem = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(item), "_dw_boxhandle");
6420
6419 if(GTK_IS_TABLE(box)) 6421 if(GTK_IS_TABLE(box))
6420 { 6422 {
6421 int boxcount = (int)gtk_object_get_data(GTK_OBJECT(box), "_dw_boxcount"); 6423 int boxcount = (int)gtk_object_get_data(GTK_OBJECT(box), "_dw_boxcount");
6422 int boxtype = (int)gtk_object_get_data(GTK_OBJECT(box), "_dw_boxtype"); 6424 int boxtype = (int)gtk_object_get_data(GTK_OBJECT(box), "_dw_boxtype");
6423 6425
6424 /* If the item being packed is a box, then we use it's padding 6426 /* If the item being packed is a box, then we use it's padding
6425 * instead of the padding specified on the pack line, this is 6427 * instead of the padding specified on the pack line, this is
6426 * due to a bug in the OS/2 and Win32 renderer and a limitation 6428 * due to a bug in the OS/2 and Win32 renderer and a limitation
6427 * of the GtkTable class. 6429 * of the GtkTable class.
6428 */ 6430 */
6429 if(GTK_IS_TABLE(item)) 6431 if(GTK_IS_TABLE(item) || (tmpitem && GTK_IS_TABLE(tmpitem)))
6430 { 6432 {
6431 GtkWidget *eventbox = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(item), "_dw_eventbox"); 6433 GtkWidget *eventbox = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(item), "_dw_eventbox");
6432 6434
6433 if(eventbox) 6435 if(eventbox)
6434 { 6436 {
6467 } 6469 }
6468 else 6470 else
6469 { 6471 {
6470 GtkWidget *vbox = gtk_vbox_new(FALSE, 0); 6472 GtkWidget *vbox = gtk_vbox_new(FALSE, 0);
6471 6473
6472 if(GTK_IS_TABLE(item)) 6474 if(GTK_IS_TABLE(item) || (tmpitem && GTK_IS_TABLE(tmpitem)))
6473 { 6475 {
6474 GtkWidget *eventbox = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(item), "_dw_eventbox"); 6476 GtkWidget *eventbox = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(item), "_dw_eventbox");
6475 6477
6476 if(eventbox) 6478 if(eventbox)
6477 { 6479 {
7579 * pad: Number of pixels of padding around the item. 7581 * pad: Number of pixels of padding around the item.
7580 */ 7582 */
7581 void dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad) 7583 void dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad)
7582 { 7584 {
7583 int warn = FALSE, _locked_by_me = FALSE; 7585 int warn = FALSE, _locked_by_me = FALSE;
7584 GtkWidget *tmp; 7586 GtkWidget *tmp, *tmpitem;
7585 7587
7586 if(!box) 7588 if(!box)
7587 return; 7589 return;
7588 7590
7589 /* 7591 /*
7605 { 7607 {
7606 item = gtk_label_new(""); 7608 item = gtk_label_new("");
7607 gtk_widget_show(item); 7609 gtk_widget_show(item);
7608 } 7610 }
7609 7611
7612 tmpitem = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(item), "_dw_boxhandle");
7613
7610 if(GTK_IS_TABLE(box)) 7614 if(GTK_IS_TABLE(box))
7611 { 7615 {
7612 int boxcount = (int)gtk_object_get_data(GTK_OBJECT(box), "_dw_boxcount"); 7616 int boxcount = (int)gtk_object_get_data(GTK_OBJECT(box), "_dw_boxcount");
7613 int boxtype = (int)gtk_object_get_data(GTK_OBJECT(box), "_dw_boxtype"); 7617 int boxtype = (int)gtk_object_get_data(GTK_OBJECT(box), "_dw_boxtype");
7614 int x, y; 7618 int x, y;
7616 /* If the item being packed is a box, then we use it's padding 7620 /* If the item being packed is a box, then we use it's padding
7617 * instead of the padding specified on the pack line, this is 7621 * instead of the padding specified on the pack line, this is
7618 * due to a bug in the OS/2 and Win32 renderer and a limitation 7622 * due to a bug in the OS/2 and Win32 renderer and a limitation
7619 * of the GtkTable class. 7623 * of the GtkTable class.
7620 */ 7624 */
7621 if(GTK_IS_TABLE(item)) 7625 if(GTK_IS_TABLE(item) || (tmpitem && GTK_IS_TABLE(tmpitem)))
7622 { 7626 {
7623 GtkWidget *eventbox = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(item), "_dw_eventbox"); 7627 GtkWidget *eventbox = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(item), "_dw_eventbox");
7624 7628
7625 if(eventbox) 7629 if(eventbox)
7626 { 7630 {
7667 } 7671 }
7668 else 7672 else
7669 { 7673 {
7670 GtkWidget *vbox = gtk_vbox_new(FALSE, 0); 7674 GtkWidget *vbox = gtk_vbox_new(FALSE, 0);
7671 7675
7672 if(GTK_IS_TABLE(item)) 7676 if(GTK_IS_TABLE(item) || (tmpitem && GTK_IS_TABLE(tmpitem)))
7673 { 7677 {
7674 GtkWidget *eventbox = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(item), "_dw_eventbox"); 7678 GtkWidget *eventbox = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(item), "_dw_eventbox");
7675 7679
7676 if(eventbox) 7680 if(eventbox)
7677 { 7681 {
7887 7891
7888 if(text) 7892 if(text)
7889 { 7893 {
7890 temp = malloc(strlen(text) + strlen(folder) + 3); 7894 temp = malloc(strlen(text) + strlen(folder) + 3);
7891 strcpy(temp, text); 7895 strcpy(temp, text);
7892 if(strcmp(text, "/")) 7896 if(strcmp(text, "/"))
7893 strcat(temp, "/"); 7897 strcat(temp, "/");
7894 strcat(temp, folder); 7898 strcat(temp, folder);
7895 free(folder); 7899 free(folder);
7896 folder = temp; 7900 folder = temp;
7897 } 7901 }