diff options
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkbutton.c | 12 | ||||
-rw-r--r-- | gtk/gtkclist.c | 14 | ||||
-rw-r--r-- | gtk/gtkframe.c | 8 | ||||
-rw-r--r-- | gtk/gtkhandlebox.c | 4 | ||||
-rw-r--r-- | gtk/gtkhbox.c | 6 | ||||
-rw-r--r-- | gtk/gtkhpaned.c | 4 | ||||
-rw-r--r-- | gtk/gtklist.c | 2 | ||||
-rw-r--r-- | gtk/gtkmenu.c | 2 | ||||
-rw-r--r-- | gtk/gtkmenubar.c | 2 | ||||
-rw-r--r-- | gtk/gtkmenuitem.c | 4 | ||||
-rw-r--r-- | gtk/gtknotebook.c | 20 | ||||
-rw-r--r-- | gtk/gtkscrolledwindow.c | 16 | ||||
-rw-r--r-- | gtk/gtktable.c | 8 | ||||
-rw-r--r-- | gtk/gtktree.c | 2 | ||||
-rw-r--r-- | gtk/gtktreeitem.c | 4 | ||||
-rw-r--r-- | gtk/gtkvbox.c | 6 | ||||
-rw-r--r-- | gtk/gtkviewport.c | 4 | ||||
-rw-r--r-- | gtk/gtkvpaned.c | 4 |
18 files changed, 61 insertions, 61 deletions
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 28e2a57bbb..44475d64fe 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -471,9 +471,9 @@ gtk_button_size_allocate (GtkWidget *widget, child_allocation.x = (CHILD_SPACING + GTK_WIDGET (widget)->style->klass->xthickness); child_allocation.y = (CHILD_SPACING + GTK_WIDGET (widget)->style->klass->ythickness); - child_allocation.width = MAX (1, widget->allocation.width - child_allocation.x * 2 - + child_allocation.width = MAX (1, (gint)widget->allocation.width - child_allocation.x * 2 - border_width * 2); - child_allocation.height = MAX (1, widget->allocation.height - child_allocation.y * 2 - + child_allocation.height = MAX (1, (gint)widget->allocation.height - child_allocation.y * 2 - border_width * 2); if (GTK_WIDGET_CAN_DEFAULT (button)) @@ -482,10 +482,10 @@ gtk_button_size_allocate (GtkWidget *widget, DEFAULT_LEFT_POS); child_allocation.y += (GTK_WIDGET (widget)->style->klass->ythickness + DEFAULT_TOP_POS); - child_allocation.width = MAX (1, child_allocation.width - - (GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING)); - child_allocation.height = MAX (1, child_allocation.height - - (GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING)); + child_allocation.width = MAX (1, (gint)child_allocation.width - + (gint)(GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING)); + child_allocation.height = MAX (1, (gint)child_allocation.height - + (gint)(GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING)); } gtk_widget_size_allocate (GTK_BIN (button)->child, &child_allocation); diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c index ab6acb6a56..0a0e176d5e 100644 --- a/gtk/gtkclist.c +++ b/gtk/gtkclist.c @@ -5367,9 +5367,9 @@ gtk_clist_size_allocate (GtkWidget *widget, * border width */ clist->internal_allocation.x = 0; clist->internal_allocation.y = 0; - clist->internal_allocation.width = MAX (1, allocation->width - + clist->internal_allocation.width = MAX (1, (gint)allocation->width - border_width * 2); - clist->internal_allocation.height = MAX (1, allocation->height - + clist->internal_allocation.height = MAX (1, (gint)allocation->height - border_width * 2); /* allocate clist window assuming no scrollbars */ @@ -5378,11 +5378,11 @@ gtk_clist_size_allocate (GtkWidget *widget, clist_allocation.y = (clist->internal_allocation.y + widget->style->klass->ythickness + clist->column_title_area.height); - clist_allocation.width = MAX (1, clist->internal_allocation.width - - (2 * widget->style->klass->xthickness)); - clist_allocation.height = MAX (1, clist->internal_allocation.height - - (2 * widget->style->klass->ythickness) - - clist->column_title_area.height); + clist_allocation.width = MAX (1, (gint)clist->internal_allocation.width - + (2 * (gint)widget->style->klass->xthickness)); + clist_allocation.height = MAX (1, (gint)clist->internal_allocation.height - + (2 * (gint)widget->style->klass->ythickness) - + (gint)clist->column_title_area.height); clist->clist_window_width = clist_allocation.width; clist->clist_window_height = clist_allocation.height; diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index 5831382da6..789d158deb 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -497,13 +497,13 @@ gtk_frame_size_allocate (GtkWidget *widget, { child_allocation.x = (GTK_CONTAINER (frame)->border_width + GTK_WIDGET (frame)->style->klass->xthickness); - child_allocation.width = MAX(0, allocation->width - child_allocation.x * 2); + child_allocation.width = MAX(1, (gint)allocation->width - child_allocation.x * 2); child_allocation.y = (GTK_CONTAINER (frame)->border_width + MAX (frame->label_height, GTK_WIDGET (frame)->style->klass->ythickness)); - child_allocation.height = MAX (1, (allocation->height - child_allocation.y - - GTK_CONTAINER (frame)->border_width - - GTK_WIDGET (frame)->style->klass->ythickness)); + child_allocation.height = MAX (1, ((gint)allocation->height - child_allocation.y - + (gint)GTK_CONTAINER (frame)->border_width - + (gint)GTK_WIDGET (frame)->style->klass->ythickness)); child_allocation.x += allocation->x; child_allocation.y += allocation->y; diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c index e39be04d48..de0f01250b 100644 --- a/gtk/gtkhandlebox.c +++ b/gtk/gtkhandlebox.c @@ -575,8 +575,8 @@ gtk_handle_box_size_allocate (GtkWidget *widget, } else { - child_allocation.width = MAX (1, widget->allocation.width - 2 * border_width); - child_allocation.height = MAX (1, widget->allocation.height - 2 * border_width); + child_allocation.width = MAX (1, (gint)widget->allocation.width - 2 * border_width); + child_allocation.height = MAX (1, (gint)widget->allocation.height - 2 * border_width); if (hb->handle_position == GTK_POS_LEFT || hb->handle_position == GTK_POS_RIGHT) diff --git a/gtk/gtkhbox.c b/gtk/gtkhbox.c index 6c3db74849..0c10550b82 100644 --- a/gtk/gtkhbox.c +++ b/gtk/gtkhbox.c @@ -200,7 +200,7 @@ gtk_hbox_size_allocate (GtkWidget *widget, x = allocation->x + GTK_CONTAINER (box)->border_width; child_allocation.y = allocation->y + GTK_CONTAINER (box)->border_width; - child_allocation.height = MAX (1, allocation->height - GTK_CONTAINER (box)->border_width * 2); + child_allocation.height = MAX (1, (gint)allocation->height - (gint)GTK_CONTAINER (box)->border_width * 2); children = box->children; while (children) @@ -238,7 +238,7 @@ gtk_hbox_size_allocate (GtkWidget *widget, if (child->fill) { - child_allocation.width = MAX (1, child_width - child->padding * 2); + child_allocation.width = MAX (1, (gint)child_width - (gint)child->padding * 2); child_allocation.x = x + child->padding; } else @@ -291,7 +291,7 @@ gtk_hbox_size_allocate (GtkWidget *widget, if (child->fill) { - child_allocation.width = MAX (1, child_width - child->padding * 2); + child_allocation.width = MAX (1, (gint)child_width - (gint)child->padding * 2); child_allocation.x = x + child->padding - child_width; } else diff --git a/gtk/gtkhpaned.c b/gtk/gtkhpaned.c index 6aabc424ed..333ed76ab8 100644 --- a/gtk/gtkhpaned.c +++ b/gtk/gtkhpaned.c @@ -174,7 +174,7 @@ gtk_hpaned_size_allocate (GtkWidget *widget, paned->groove_rectangle.height); } - child1_allocation.height = child2_allocation.height = MAX (1, allocation->height - border_width * 2); + child1_allocation.height = child2_allocation.height = MAX (1, (gint)allocation->height - border_width * 2); child1_allocation.width = paned->child1_size; child1_allocation.x = border_width; child1_allocation.y = child2_allocation.y = border_width; @@ -186,7 +186,7 @@ gtk_hpaned_size_allocate (GtkWidget *widget, paned->groove_rectangle.height = allocation->height; child2_allocation.x = paned->groove_rectangle.x + paned->gutter_size / 2 + 1; - child2_allocation.width = MAX (1, allocation->width + child2_allocation.width = MAX (1, (gint)allocation->width - child2_allocation.x - border_width); /* Now allocate the childen, making sure, when resizing not to diff --git a/gtk/gtklist.c b/gtk/gtklist.c index 45527aa94a..0a2f0c3a7b 100644 --- a/gtk/gtklist.c +++ b/gtk/gtklist.c @@ -368,7 +368,7 @@ gtk_list_size_allocate (GtkWidget *widget, { child_allocation.x = GTK_CONTAINER (list)->border_width; child_allocation.y = GTK_CONTAINER (list)->border_width; - child_allocation.width = MAX (1, allocation->width - + child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2); children = list->children; diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index c603279b58..d3fcb3c715 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -766,7 +766,7 @@ gtk_menu_size_allocate (GtkWidget *widget, widget->style->klass->xthickness); child_allocation.y = (GTK_CONTAINER (menu)->border_width + widget->style->klass->ythickness); - child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2); + child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2); children = menu_shell->children; while (children) diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c index e79e9ebe17..bf75e395f4 100644 --- a/gtk/gtkmenubar.c +++ b/gtk/gtkmenubar.c @@ -293,7 +293,7 @@ gtk_menu_bar_size_allocate (GtkWidget *widget, child_allocation.y = (GTK_CONTAINER (menu_bar)->border_width + widget->style->klass->ythickness + BORDER_SPACING); - child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2); + child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2); children = menu_shell->children; while (children) diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index 4b506e0157..3241a1a768 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -386,8 +386,8 @@ gtk_menu_item_size_allocate (GtkWidget *widget, BORDER_SPACING); child_allocation.y = (GTK_CONTAINER (widget)->border_width + widget->style->klass->ythickness); - child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2); - child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2); + child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2); + child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2); child_allocation.x += GTK_MENU_ITEM (widget)->toggle_size; child_allocation.width -= GTK_MENU_ITEM (widget)->toggle_size; if (menu_item->submenu && menu_item->show_submenu_indicator) diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 1432ea976d..eea6d90a3b 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -823,17 +823,17 @@ gtk_notebook_size_allocate (GtkWidget *widget, { child_allocation.x = GTK_CONTAINER (widget)->border_width; child_allocation.y = GTK_CONTAINER (widget)->border_width; - child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2); - child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2); + child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2); + child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2); if (notebook->show_tabs || notebook->show_border) { child_allocation.x += widget->style->klass->xthickness; child_allocation.y += widget->style->klass->ythickness; - child_allocation.width = MAX (1, child_allocation.width - - widget->style->klass->xthickness * 2); - child_allocation.height = MAX (1, child_allocation.height - - widget->style->klass->ythickness * 2); + child_allocation.width = MAX (1, (gint)child_allocation.width - + (gint) widget->style->klass->xthickness * 2); + child_allocation.height = MAX (1, (gint)child_allocation.height - + (gint) widget->style->klass->ythickness * 2); if (notebook->show_tabs && notebook->children && notebook->cur_page) { @@ -843,15 +843,15 @@ gtk_notebook_size_allocate (GtkWidget *widget, child_allocation.y += notebook->cur_page->requisition.height; case GTK_POS_BOTTOM: child_allocation.height = - MAX (1, child_allocation.height - - notebook->cur_page->requisition.height); + MAX (1, (gint)child_allocation.height - + (gint)notebook->cur_page->requisition.height); break; case GTK_POS_LEFT: child_allocation.x += notebook->cur_page->requisition.width; case GTK_POS_RIGHT: child_allocation.width = - MAX (1, child_allocation.width - - notebook->cur_page->requisition.width); + MAX (1, (gint)child_allocation.width - + (gint)notebook->cur_page->requisition.width); break; } } diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index 760964c520..d994449a46 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -676,8 +676,8 @@ gtk_scrolled_window_relative_allocation (GtkWidget *widget, allocation->x = GTK_CONTAINER (widget)->border_width; allocation->y = GTK_CONTAINER (widget)->border_width; - allocation->width = MAX (1, widget->allocation.width - allocation->x * 2); - allocation->height = MAX (1, widget->allocation.height - allocation->y * 2); + allocation->width = MAX (1, (gint)widget->allocation.width - allocation->x * 2); + allocation->height = MAX (1, (gint)widget->allocation.height - allocation->y * 2); if (scrolled_window->vscrollbar_visible) { @@ -686,9 +686,9 @@ gtk_scrolled_window_relative_allocation (GtkWidget *widget, allocation->x += (scrolled_window->vscrollbar->requisition.width + SCROLLBAR_SPACING (scrolled_window)); - allocation->width = MAX (1, allocation->width - - (scrolled_window->vscrollbar->requisition.width + - SCROLLBAR_SPACING (scrolled_window))); + allocation->width = MAX (1, (gint)allocation->width - + ((gint)scrolled_window->vscrollbar->requisition.width + + (gint)SCROLLBAR_SPACING (scrolled_window))); } if (scrolled_window->hscrollbar_visible) { @@ -697,9 +697,9 @@ gtk_scrolled_window_relative_allocation (GtkWidget *widget, allocation->y += (scrolled_window->hscrollbar->requisition.height + SCROLLBAR_SPACING (scrolled_window)); - allocation->height = MAX (1, allocation->height - - (scrolled_window->hscrollbar->requisition.height + - SCROLLBAR_SPACING (scrolled_window))); + allocation->height = MAX (1, (gint)allocation->height - + ((gint)scrolled_window->hscrollbar->requisition.height + + (gint)SCROLLBAR_SPACING (scrolled_window))); } } diff --git a/gtk/gtktable.c b/gtk/gtktable.c index d47fe498f9..f3e5aca30d 100644 --- a/gtk/gtktable.c +++ b/gtk/gtktable.c @@ -1348,7 +1348,7 @@ gtk_table_size_allocate_pass1 (GtkTable *table) if (table->cols[col].shrink) { extra = width / nshrink; - table->cols[col].allocation = MAX (1, table->cols[col].allocation - extra); + table->cols[col].allocation = MAX (1, (gint)table->cols[col].allocation - extra); width -= extra; nshrink -= 1; @@ -1426,7 +1426,7 @@ gtk_table_size_allocate_pass1 (GtkTable *table) if (table->rows[row].shrink) { extra = height / nshrink; - table->rows[row].allocation = MAX (1, table->rows[row].allocation - extra); + table->rows[row].allocation = MAX (1, (gint)table->rows[row].allocation - extra); height -= extra; nshrink -= 1; @@ -1487,7 +1487,7 @@ gtk_table_size_allocate_pass2 (GtkTable *table) if (child->xfill) { - allocation.width = MAX (1, max_width - child->xpadding * 2); + allocation.width = MAX (1, max_width - (gint)child->xpadding * 2); allocation.x = x + (max_width - allocation.width) / 2; } else @@ -1498,7 +1498,7 @@ gtk_table_size_allocate_pass2 (GtkTable *table) if (child->yfill) { - allocation.height = MAX (1, max_height - child->ypadding * 2); + allocation.height = MAX (1, max_height - (gint)child->ypadding * 2); allocation.y = y + (max_height - allocation.height) / 2; } else diff --git a/gtk/gtktree.c b/gtk/gtktree.c index e94c35fdff..058006ecd7 100644 --- a/gtk/gtktree.c +++ b/gtk/gtktree.c @@ -928,7 +928,7 @@ gtk_tree_size_allocate (GtkWidget *widget, { child_allocation.x = GTK_CONTAINER (tree)->border_width; child_allocation.y = GTK_CONTAINER (tree)->border_width; - child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2); + child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2); children = tree->children; diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c index 53bb5e58a6..8e99d59a59 100644 --- a/gtk/gtktreeitem.c +++ b/gtk/gtktreeitem.c @@ -551,11 +551,11 @@ gtk_tree_item_size_allocate (GtkWidget *widget, gtk_widget_size_allocate (item->pixmaps_box, &child_allocation); child_allocation.y = GTK_CONTAINER (widget)->border_width; - child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2); + child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2); child_allocation.x += item->pixmaps_box->requisition.width+DEFAULT_DELTA; child_allocation.width = - MAX (1, allocation->width - (child_allocation.x + border_width)); + MAX (1, (gint)allocation->width - ((gint)child_allocation.x + border_width)); gtk_widget_size_allocate (bin->child, &child_allocation); } diff --git a/gtk/gtkvbox.c b/gtk/gtkvbox.c index 486b89706f..cd48869cce 100644 --- a/gtk/gtkvbox.c +++ b/gtk/gtkvbox.c @@ -200,7 +200,7 @@ gtk_vbox_size_allocate (GtkWidget *widget, y = allocation->y + GTK_CONTAINER (box)->border_width; child_allocation.x = allocation->x + GTK_CONTAINER (box)->border_width; - child_allocation.width = MAX (1, allocation->width - GTK_CONTAINER (box)->border_width * 2); + child_allocation.width = MAX (1, (gint)allocation->width - (gint)GTK_CONTAINER (box)->border_width * 2); children = box->children; while (children) @@ -238,7 +238,7 @@ gtk_vbox_size_allocate (GtkWidget *widget, if (child->fill) { - child_allocation.height = MAX (1, child_height - child->padding * 2); + child_allocation.height = MAX (1, child_height - (gint)child->padding * 2); child_allocation.y = y + child->padding; } else @@ -291,7 +291,7 @@ gtk_vbox_size_allocate (GtkWidget *widget, if (child->fill) { - child_allocation.height = MAX (1, child_height - child->padding * 2); + child_allocation.height = MAX (1, child_height - (gint)child->padding * 2); child_allocation.y = y + child->padding - child_height; } else diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 0edc3a3b70..86769f1c9f 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -449,8 +449,8 @@ gtk_viewport_realize (GtkWidget *widget) attributes.y = 0; } - attributes.width = MAX (1, widget->allocation.width - attributes.x * 2 - border_width * 2); - attributes.height = MAX (1, widget->allocation.height - attributes.y * 2 - border_width * 2); + attributes.width = MAX (1, (gint)widget->allocation.width - attributes.x * 2 - border_width * 2); + attributes.height = MAX (1, (gint)widget->allocation.height - attributes.y * 2 - border_width * 2); attributes.event_mask = 0; viewport->view_window = gdk_window_new (widget->window, &attributes, attributes_mask); diff --git a/gtk/gtkvpaned.c b/gtk/gtkvpaned.c index ecbe7ca346..ff5f25f0ac 100644 --- a/gtk/gtkvpaned.c +++ b/gtk/gtkvpaned.c @@ -174,7 +174,7 @@ gtk_vpaned_size_allocate (GtkWidget *widget, paned->groove_rectangle.height); } - child1_allocation.width = child2_allocation.width = MAX (1, allocation->width - border_width * 2); + child1_allocation.width = child2_allocation.width = MAX (1, (gint)allocation->width - border_width * 2); child1_allocation.height = paned->child1_size; child1_allocation.x = child2_allocation.x = border_width; child1_allocation.y = border_width; @@ -186,7 +186,7 @@ gtk_vpaned_size_allocate (GtkWidget *widget, paned->groove_rectangle.width = allocation->width; child2_allocation.y = paned->groove_rectangle.y + paned->gutter_size / 2 + 1; - child2_allocation.height = MAX (1, allocation->height + child2_allocation.height = MAX (1, (gint)allocation->height - child2_allocation.y - border_width); /* Now allocate the childen, making sure, when resizing not to |