~ubuntu-branches/ubuntu/lucid/gtk+2.0/lucid-proposed

« back to all changes in this revision

Viewing changes to gtk/gtkhandlebox.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-03-11 18:28:01 UTC
  • mfrom: (1.11.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100311182801-wqr2drmus369zy6r
Tags: 2.19.7-0ubuntu1
* New upstream version
  - Bug fixes:
  611707 Move documentation from templates to inline comments
  69872 GTK_WIDGET_SET_FLAGS should be deprecated
  612066 empathy hangs when clicked on information about contact...
         (lp: #532947)
  557420 Some compose sequences don't work anymore...
  569042 gailbooleancell does not seem to attend to changes...
  600992 File chooser reference counting issues
  610905 gtk_drag_source_set need instrospection hint
  611051 Search Entry Clear Icon not accessible
  611217 Incorrect translator comment
  611317 Document targets in drag and drop
  611319 gtk_window_set_transient_for undocumented NULL value for parent
  611658 Update documentation for gtkvscrollbar
  611662 Update documentation for gtkvseparator
  611686 focus_in/focus_out in gailtreeview.c should return FALSE...
  611831 Move documentation to inline comments: GtkVBox
  612119 Do not scroll when middle pasting
  - Translation updates
* debian/patches/071_no_offscreen_widgets_grabbing.patch,
  debian/patches/091_bugzilla_tooltip_refresh.patch:
  - new version update
  - increased the alpha value for tooltips to 85%
* debian/rules:
  - updated the shlibs

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
static void
260
260
gtk_handle_box_init (GtkHandleBox *handle_box)
261
261
{
262
 
  GTK_WIDGET_UNSET_FLAGS (handle_box, GTK_NO_WINDOW);
 
262
  gtk_widget_set_has_window (GTK_WIDGET (handle_box), TRUE);
263
263
 
264
264
  handle_box->bin_window = NULL;
265
265
  handle_box->float_window = NULL;
348
348
  GtkBin *bin;
349
349
  GtkHandleBox *hb;
350
350
 
351
 
  GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
 
351
  gtk_widget_set_mapped (widget, TRUE);
352
352
 
353
353
  bin = GTK_BIN (widget);
354
354
  hb = GTK_HANDLE_BOX (widget);
355
355
 
356
356
  if (bin->child &&
357
 
      GTK_WIDGET_VISIBLE (bin->child) &&
358
 
      !GTK_WIDGET_MAPPED (bin->child))
 
357
      gtk_widget_get_visible (bin->child) &&
 
358
      !gtk_widget_get_mapped (bin->child))
359
359
    gtk_widget_map (bin->child);
360
360
 
361
361
  if (hb->child_detached && !hb->float_window_mapped)
373
373
{
374
374
  GtkHandleBox *hb;
375
375
 
376
 
  GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
 
376
  gtk_widget_set_mapped (widget, FALSE);
377
377
 
378
378
  hb = GTK_HANDLE_BOX (widget);
379
379
 
394
394
 
395
395
  hb = GTK_HANDLE_BOX (widget);
396
396
 
397
 
  GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
 
397
  gtk_widget_set_realized (widget, TRUE);
398
398
 
399
399
  attributes.x = widget->allocation.x;
400
400
  attributes.y = widget->allocation.y;
450
450
  gdk_window_set_type_hint (hb->float_window, GDK_WINDOW_TYPE_HINT_TOOLBAR);
451
451
  
452
452
  widget->style = gtk_style_attach (widget->style, widget->window);
453
 
  gtk_style_set_background (widget->style, widget->window, GTK_WIDGET_STATE (hb));
454
 
  gtk_style_set_background (widget->style, hb->bin_window, GTK_WIDGET_STATE (hb));
455
 
  gtk_style_set_background (widget->style, hb->float_window, GTK_WIDGET_STATE (hb));
 
453
  gtk_style_set_background (widget->style, widget->window, gtk_widget_get_state (widget));
 
454
  gtk_style_set_background (widget->style, hb->bin_window, gtk_widget_get_state (widget));
 
455
  gtk_style_set_background (widget->style, hb->float_window, gtk_widget_get_state (widget));
456
456
  gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
457
457
}
458
458
 
477
477
{
478
478
  GtkHandleBox *hb = GTK_HANDLE_BOX (widget);
479
479
 
480
 
  if (GTK_WIDGET_REALIZED (widget) &&
 
480
  if (gtk_widget_get_realized (widget) &&
481
481
      gtk_widget_get_has_window (widget))
482
482
    {
483
483
      gtk_style_set_background (widget->style, widget->window,
612
612
      
613
613
  widget->allocation = *allocation;
614
614
 
615
 
  if (GTK_WIDGET_REALIZED (hb))
 
615
  if (gtk_widget_get_realized (widget))
616
616
    gdk_window_move_resize (widget->window,
617
617
                            widget->allocation.x,
618
618
                            widget->allocation.y,
620
620
                            widget->allocation.height);
621
621
 
622
622
 
623
 
  if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
 
623
  if (bin->child && gtk_widget_get_visible (bin->child))
624
624
    {
625
625
      GtkAllocation child_allocation;
626
626
      guint border_width;
651
651
          else
652
652
            float_height += DRAG_HANDLE_SIZE;
653
653
 
654
 
          if (GTK_WIDGET_REALIZED (hb))
 
654
          if (gtk_widget_get_realized (widget))
655
655
            {
656
656
              gdk_window_resize (hb->float_window,
657
657
                                 float_width,
674
674
          else
675
675
            child_allocation.height -= DRAG_HANDLE_SIZE;
676
676
          
677
 
          if (GTK_WIDGET_REALIZED (hb))
 
677
          if (gtk_widget_get_realized (widget))
678
678
            gdk_window_move_resize (hb->bin_window,
679
679
                                    0,
680
680
                                    0,
716
716
    }
717
717
  gtk_paint_shadow (widget->style,
718
718
                    widget->window,
719
 
                    GTK_WIDGET_STATE (widget),
 
719
                    gtk_widget_get_state (widget),
720
720
                    GTK_SHADOW_ETCHED_IN,
721
721
                    NULL, widget, "handle",
722
722
                    x,
727
727
       handle_position == GTK_POS_RIGHT)
728
728
     gtk_paint_hline (widget->style,
729
729
                      widget->window,
730
 
                      GTK_WIDGET_STATE (widget),
 
730
                      gtk_widget_get_state (widget),
731
731
                      NULL, widget, "handlebox",
732
732
                      handle_position == GTK_POS_LEFT ? DRAG_HANDLE_SIZE : 0,
733
733
                      handle_position == GTK_POS_LEFT ? widget->allocation.width : widget->allocation.width - DRAG_HANDLE_SIZE,
735
735
   else
736
736
     gtk_paint_vline (widget->style,
737
737
                      widget->window,
738
 
                      GTK_WIDGET_STATE (widget),
 
738
                      gtk_widget_get_state (widget),
739
739
                      NULL, widget, "handlebox",
740
740
                      handle_position == GTK_POS_TOP ? DRAG_HANDLE_SIZE : 0,
741
741
                      handle_position == GTK_POS_TOP ? widget->allocation.height : widget->allocation.height - DRAG_HANDLE_SIZE,
890
890
  if (!event)
891
891
    gtk_paint_box (widget->style,
892
892
                   hb->bin_window,
893
 
                   GTK_WIDGET_STATE (widget),
 
893
                   gtk_widget_get_state (widget),
894
894
                   hb->shadow_type,
895
895
                   area, widget, "handlebox_bin",
896
896
                   0, 0, -1, -1);
897
897
  else
898
898
   gtk_paint_box (widget->style,
899
899
                  hb->bin_window,
900
 
                  GTK_WIDGET_STATE (widget),
 
900
                  gtk_widget_get_state (widget),
901
901
                  hb->shadow_type,
902
902
                  &event->area, widget, "handlebox_bin",
903
903
                  0, 0, -1, -1);
951
951
                         event ? &event->area : area,
952
952
                         handle_orientation);
953
953
 
954
 
  if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
 
954
  if (bin->child && gtk_widget_get_visible (bin->child))
955
955
    GTK_WIDGET_CLASS (gtk_handle_box_parent_class)->expose_event (widget, event);
956
956
}
957
957
 
961
961
{
962
962
  GtkHandleBox *hb;
963
963
 
964
 
  if (GTK_WIDGET_DRAWABLE (widget))
 
964
  if (gtk_widget_is_drawable (widget))
965
965
    {
966
966
      hb = GTK_HANDLE_BOX (widget);
967
967
 
1394
1394
  if (hb->child_detached)
1395
1395
    {
1396
1396
      hb->child_detached = FALSE;
1397
 
      if (GTK_WIDGET_REALIZED (hb))
 
1397
      if (gtk_widget_get_realized (widget))
1398
1398
        {
1399
1399
          gdk_window_hide (hb->float_window);
1400
1400
          gdk_window_reparent (hb->bin_window, widget->window, 0, 0);