Revision: 1072
http://geeqie.svn.sourceforge.net/geeqie/?rev=1072&view=rev
Author: zas_
Date: 2008-08-21 22:36:20 +0000 (Thu, 21 Aug 2008)
Log Message:
-----------
Indentation fix.
Modified Paths:
--------------
trunk/src/dnd.c
Modified: trunk/src/dnd.c
===================================================================
--- trunk/src/dnd.c 2008-08-20 22:26:34 UTC (rev 1071)
+++ trunk/src/dnd.c 2008-08-21 22:36:20 UTC (rev 1072)
@@ -98,71 +98,71 @@
void dnd_set_drag_icon(GtkWidget *widget, GdkDragContext *context, GdkPixbuf
*pixbuf, gint items)
{
- GdkPixmap *pixmap;
- GdkBitmap *mask;
- GdkPixbuf *dest;
- gint w, h;
- gint sw, sh;
- PangoLayout *layout = NULL;
- gint x, y;
+ GdkPixmap *pixmap;
+ GdkBitmap *mask;
+ GdkPixbuf *dest;
+ gint w, h;
+ gint sw, sh;
+ PangoLayout *layout = NULL;
+ gint x, y;
- x = y = 0;
+ x = y = 0;
- sw = gdk_pixbuf_get_width(pixbuf);
- sh = gdk_pixbuf_get_height(pixbuf);
+ sw = gdk_pixbuf_get_width(pixbuf);
+ sh = gdk_pixbuf_get_height(pixbuf);
- if (sw <= DND_ICON_SIZE && sh <= DND_ICON_SIZE)
- {
- w = sw;
- h = sh;
- }
- else if (sw < sh)
- {
- w = sw * DND_ICON_SIZE / sh;
- h = DND_ICON_SIZE;
- }
- else
- {
- w = DND_ICON_SIZE;
- h = sh * DND_ICON_SIZE / sw;
- }
+ if (sw <= DND_ICON_SIZE && sh <= DND_ICON_SIZE)
+ {
+ w = sw;
+ h = sh;
+ }
+ else if (sw < sh)
+ {
+ w = sw * DND_ICON_SIZE / sh;
+ h = DND_ICON_SIZE;
+ }
+ else
+ {
+ w = DND_ICON_SIZE;
+ h = sh * DND_ICON_SIZE / sw;
+ }
- dest = gdk_pixbuf_scale_simple(pixbuf, w, h,
GDK_INTERP_BILINEAR);
- pixbuf_draw_border(dest, w, h);
+ dest = gdk_pixbuf_scale_simple(pixbuf, w, h, GDK_INTERP_BILINEAR);
+ pixbuf_draw_border(dest, w, h);
- if (items > 1)
- {
- gchar *buf;
- gint lw,lh;
+ if (items > 1)
+ {
+ gchar *buf;
+ gint lw,lh;
- layout = gtk_widget_create_pango_layout(widget, NULL);
- buf = g_strdup_printf("<small> %d </small>", items);
- pango_layout_set_markup(layout, buf, -1);
- g_free(buf);
+ layout = gtk_widget_create_pango_layout(widget, NULL);
+ buf = g_strdup_printf("<small> %d </small>", items);
+ pango_layout_set_markup(layout, buf, -1);
+ g_free(buf);
- pango_layout_get_pixel_size(layout, &lw, &lh);
+ pango_layout_get_pixel_size(layout, &lw, &lh);
- x = MAX(0, w - lw);
- y = MAX(0, h - lh);
- lw = CLAMP(lw, 0, w - x - 1);
- lh = CLAMP(lh, 0, h - y - 1);
+ x = MAX(0, w - lw);
+ y = MAX(0, h - lh);
+ lw = CLAMP(lw, 0, w - x - 1);
+ lh = CLAMP(lh, 0, h - y - 1);
- pixbuf_draw_rect(dest, x, y, lw, lh, 128);
- }
+ pixbuf_draw_rect(dest, x, y, lw, lh, 128);
+ }
- gdk_pixbuf_render_pixmap_and_mask(dest, &pixmap, &mask, 128);
- g_object_unref(dest);
+ gdk_pixbuf_render_pixmap_and_mask(dest, &pixmap, &mask, 128);
+ g_object_unref(dest);
- if (layout)
- {
- gdk_draw_layout(pixmap, widget->style->black_gc, x+1,
y+1, layout);
- gdk_draw_layout(pixmap, widget->style->white_gc, x, y,
layout);
+ if (layout)
+ {
+ gdk_draw_layout(pixmap, widget->style->black_gc, x+1, y+1,
layout);
+ gdk_draw_layout(pixmap, widget->style->white_gc, x, y, layout);
- g_object_unref(G_OBJECT(layout));
- }
+ g_object_unref(G_OBJECT(layout));
+ }
- gtk_drag_set_icon_pixmap(context,
gtk_widget_get_colormap(widget), pixmap, mask, -8, -6);
+ gtk_drag_set_icon_pixmap(context, gtk_widget_get_colormap(widget),
pixmap, mask, -8, -6);
- g_object_unref(pixmap);
- if (mask) g_object_unref(mask);
+ g_object_unref(pixmap);
+ if (mask) g_object_unref(mask);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn