~bratsche/ubuntu/maverick/gtk+2.0/menu-activation-fix

« back to all changes in this revision

Viewing changes to gdk/gdkpixbuf-drawable.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-07-22 21:41:30 UTC
  • mfrom: (1.11.7 upstream) (72.1.16 experimental)
  • Revision ID: james.westby@ubuntu.com-20100722214130-5uzyvpb9g4m0ts2c
Tags: 2.21.5-1ubuntu1
* Merge with Debian experimental, Ubuntu changes:
* debian/control.in:
  - Add introspection build-depends
  - Add Vcs-Bzr link
  - Add gir1.0-gtk-2.0 package
  - libgtk2.0-dev replaces gir-repository-dev
  - Conflict with appmenu-gtk (<< 0.1.3) to prevent menu proxy breakage
* debian/rules:
  - Build with --enable-introspection
  - Add gir1.0-gtk-2.0 package to BINARY_ARCH_PKGS
  - Add dh_girepository call
  - Disable devhelp files
* debian/dh_gtkmodules.in:
  - Remove obsolete script content
* debian/libgtk2.0-0.symbols:
  - Add Ubuntu specific symbols
* debian/libgtk2.0-dev.install.in:
  - Add gir files
* debian/libgtk2.0-doc.install.in
  - Disable devhelp files
* debian/gir1.0-gtk-2.0.install.in
  - Introspection package
* debian/patches/043_menu_proxy.patch
  - Add GtkMenuProxy support for remoting menus.
* debian/patches/062_dnd_menubar.patch:
  - Allow click on menubars for dnd
* debian/patches/063_treeview_almost_fixed.patch:
  - Add an ubuntu-almost-fixed-height-mode property, (required for
    software-center)
* debian/patches/071_no_offscreen_widgets_grabbing.patch:
  - Don't let offscreen widgets do grabbing
* debian/patches/072_indicator_menu_update.patch:
  - change by Cody Russell to send an update event on menu changes,
    should make the bluetooth indicator refresh correctly
* debian/patches/091_bugzilla_tooltip_refresh.patch:
  - Upstream bugzilla change to have better looking tooltips the gtk theme
    need to set "new-tooltip-style" to use those
* debian/watch:
  - Watch for unstable versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "config.h"
26
26
#include <stdio.h>
27
27
#include <string.h>
 
28
#include <gdk-pixbuf/gdk-pixbuf.h>
 
29
 
28
30
#include "gdkcolor.h"
29
31
#include "gdkimage.h"
30
32
#include "gdkvisual.h"
31
33
#include "gdkwindow.h"
32
34
#include "gdkpixbuf.h"
33
35
#include "gdkpixmap.h"
34
 
#include "gdk-pixbuf-private.h"
35
36
#include "gdkinternals.h"
36
37
#include "gdkalias.h"
37
38
 
1230
1231
    g_return_val_if_fail (dest_x == 0 && dest_y == 0, NULL);
1231
1232
  else
1232
1233
    {
1233
 
      g_return_val_if_fail (dest->colorspace == GDK_COLORSPACE_RGB, NULL);
1234
 
      g_return_val_if_fail (dest->n_channels == 3 || dest->n_channels == 4, NULL);
1235
 
      g_return_val_if_fail (dest->bits_per_sample == 8, NULL);
 
1234
      g_return_val_if_fail (gdk_pixbuf_get_colorspace (dest) == GDK_COLORSPACE_RGB, NULL);
 
1235
      g_return_val_if_fail (gdk_pixbuf_get_n_channels (dest) == 3 ||
 
1236
                            gdk_pixbuf_get_n_channels (dest) == 4, NULL);
 
1237
      g_return_val_if_fail (gdk_pixbuf_get_bits_per_sample (dest) == 8, NULL);
1236
1238
    }
1237
1239
 
1238
1240
  if (cmap == NULL)
1281
1283
  if (dest)
1282
1284
    {
1283
1285
      g_return_val_if_fail (dest_x >= 0 && dest_y >= 0, NULL);
1284
 
      g_return_val_if_fail (dest_x + width <= dest->width, NULL);
1285
 
      g_return_val_if_fail (dest_y + height <= dest->height, NULL);
 
1286
      g_return_val_if_fail (dest_x + width <= gdk_pixbuf_get_width (dest), NULL);
 
1287
      g_return_val_if_fail (dest_y + height <= gdk_pixbuf_get_height (dest), NULL);
1286
1288
    }
1287
1289
 
1288
1290
  for (y0 = 0; y0 < height; y0 += GDK_SCRATCH_IMAGE_HEIGHT)
1348
1350
    g_return_val_if_fail (dest_x == 0 && dest_y == 0, NULL);
1349
1351
  else
1350
1352
    {
1351
 
      g_return_val_if_fail (dest->colorspace == GDK_COLORSPACE_RGB, NULL);
1352
 
      g_return_val_if_fail (dest->n_channels == 3 || dest->n_channels == 4, NULL);
1353
 
      g_return_val_if_fail (dest->bits_per_sample == 8, NULL);
 
1353
      g_return_val_if_fail (gdk_pixbuf_get_colorspace (dest) == GDK_COLORSPACE_RGB, NULL);
 
1354
      g_return_val_if_fail (gdk_pixbuf_get_n_channels (dest) == 3 ||
 
1355
                            gdk_pixbuf_get_n_channels (dest) == 4, NULL);
 
1356
      g_return_val_if_fail (gdk_pixbuf_get_bits_per_sample (dest) == 8, NULL);
1354
1357
    }
1355
1358
 
1356
1359
  if (cmap == NULL)
1380
1383
  if (dest)
1381
1384
    {
1382
1385
      g_return_val_if_fail (dest_x >= 0 && dest_y >= 0, NULL);
1383
 
      g_return_val_if_fail (dest_x + width <= dest->width, NULL);
1384
 
      g_return_val_if_fail (dest_y + height <= dest->height, NULL);
 
1386
      g_return_val_if_fail (dest_x + width <= gdk_pixbuf_get_width (dest), NULL);
 
1387
      g_return_val_if_fail (dest_y + height <= gdk_pixbuf_get_height (dest), NULL);
1385
1388
    }
1386
1389
 
1387
1390
  /* Create the pixbuf if needed */
1392
1395
        return NULL;
1393
1396
    }
1394
1397
 
1395
 
  alpha = dest->has_alpha;
1396
 
  rowstride = dest->rowstride;
 
1398
  alpha = gdk_pixbuf_get_has_alpha (dest);
 
1399
  rowstride = gdk_pixbuf_get_rowstride (dest);
1397
1400
  bpp = alpha ? 4 : 3;
1398
1401
 
1399
1402
  /* we offset into the image data based on the position we are
1400
1403
   * retrieving from
1401
1404
   */
1402
 
  rgbconvert (src, dest->pixels +
 
1405
  rgbconvert (src, gdk_pixbuf_get_pixels (dest) +
1403
1406
              (dest_y * rowstride) + (dest_x * bpp),
1404
1407
              rowstride,
1405
1408
              alpha,