annotate src/ui_menu.c @ 1805:fccac8fde6c0

Little macro correction
author mow
date Sat, 27 Feb 2010 20:35:09 +0000
parents 956aab097ea7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
1 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
2 * (SLIK) SimpLIstic sKin functions
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
3 * (C) 2004 John Ellis
1802
956aab097ea7 added 2010 to copyright text
nadvornik
parents: 1667
diff changeset
4 * Copyright (C) 2008 - 2010 The Geeqie Team
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
11 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
12
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
13 #ifdef HAVE_CONFIG_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 # include "config.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15 #endif
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
16 #include "intl.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
17
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
18 #include <stdio.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19 #include <stdlib.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20 #include <string.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
22 #include <gtk/gtk.h>
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
24 #include "ui_menu.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
25
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28 *-----------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29 * menu items
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
30 *-----------------------------------------------------------------------------
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 113
diff changeset
31 */
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
32
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33 static void menu_item_finish(GtkWidget *menu, GtkWidget *item, GCallback func, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
35 if (func) g_signal_connect(G_OBJECT(item), "activate", func, data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
36 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
37 gtk_widget_show(item);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
38 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
39
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40 GtkWidget *menu_item_add(GtkWidget *menu, const gchar *label,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41 GCallback func, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
43 GtkWidget *item;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
44
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
45 item = gtk_menu_item_new_with_mnemonic(label);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
46 menu_item_finish(menu, item, func, data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
47
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48 return item;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 GtkWidget *menu_item_add_stock(GtkWidget *menu, const gchar *label, const gchar *stock_id,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52 GCallback func, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 GtkWidget *item;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55 GtkWidget *image;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57 item = gtk_image_menu_item_new_with_mnemonic(label);
513
985fdfebd89e Remove whitespace between function name and first parenthesis for the sake of consistency. (pass 2)
zas_
parents: 475
diff changeset
58 image = gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_MENU);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59 gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60 gtk_widget_show(image);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
61 menu_item_finish(menu, item, func, data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
62
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
63 return item;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
64 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
65
1448
89dedc61b1bd gint -> gboolean.
zas_
parents: 1437
diff changeset
66 GtkWidget *menu_item_add_sensitive(GtkWidget *menu, const gchar *label, gboolean sensitive,
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67 GCallback func, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
69 GtkWidget *item;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
70
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
71 item = menu_item_add(menu, label, func, data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
72 gtk_widget_set_sensitive(item, sensitive);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
73
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
74 return item;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
75 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
76
1448
89dedc61b1bd gint -> gboolean.
zas_
parents: 1437
diff changeset
77 GtkWidget *menu_item_add_stock_sensitive(GtkWidget *menu, const gchar *label, const gchar *stock_id, gboolean sensitive,
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
78 GCallback func, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
79 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
80 GtkWidget *item;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
81
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
82 item = menu_item_add_stock(menu, label, stock_id, func, data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
83 gtk_widget_set_sensitive(item, sensitive);
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 113
diff changeset
84
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
85 return item;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
86 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
87
1448
89dedc61b1bd gint -> gboolean.
zas_
parents: 1437
diff changeset
88 GtkWidget *menu_item_add_check(GtkWidget *menu, const gchar *label, gboolean active,
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
89 GCallback func, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
90 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
91 GtkWidget *item;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
92
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
93 item = gtk_check_menu_item_new_with_mnemonic(label);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
94 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), active);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
95 menu_item_finish(menu, item, func, data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
96
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
97 return item;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
98 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
99
1667
0806ccdfe06b simplified menu_item_add_radio usage
nadvornik
parents: 1448
diff changeset
100 GtkWidget *menu_item_add_radio(GtkWidget *menu, const gchar *label, gpointer item_data, gboolean active,
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 88
diff changeset
101 GCallback func, gpointer data)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 88
diff changeset
102 {
1667
0806ccdfe06b simplified menu_item_add_radio usage
nadvornik
parents: 1448
diff changeset
103 GtkWidget *item = menu_item_add_check(menu, label, active, func, data);
0806ccdfe06b simplified menu_item_add_radio usage
nadvornik
parents: 1448
diff changeset
104 g_object_set_data(G_OBJECT(item), "menu_item_radio_data", item_data);
0806ccdfe06b simplified menu_item_add_radio usage
nadvornik
parents: 1448
diff changeset
105 g_object_set(G_OBJECT(item), "draw-as-radio", TRUE, NULL);
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 88
diff changeset
106
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 88
diff changeset
107 return item;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 88
diff changeset
108 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 88
diff changeset
109
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
110 void menu_item_add_divider(GtkWidget *menu)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
111 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
112 GtkWidget *item = gtk_menu_item_new();
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
113 gtk_widget_set_sensitive(item, FALSE);
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 113
diff changeset
114 gtk_menu_shell_append(GTK_MENU_SHELL(menu),item);
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 113
diff changeset
115 gtk_widget_show(item);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
116 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
117
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
118 GtkWidget *menu_item_add_simple(GtkWidget *menu, const gchar *label,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
119 GCallback func, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
120 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
121 GtkWidget *item = gtk_menu_item_new_with_label(label);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
122 menu_item_finish(menu, item, func, data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
123
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
124 return item;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
125 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
126
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
127 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
128 *-----------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
129 * popup menus
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
130 *-----------------------------------------------------------------------------
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 113
diff changeset
131 */
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
132
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
133 static void popup_menu_short_lived_cb(GtkWidget *widget, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
134 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
135 /* destroy the menu */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
136 g_object_unref(G_OBJECT(data));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
137 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
138
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
139 GtkWidget *popup_menu_short_lived(void)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
140 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
141 GtkWidget *menu;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
142
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
143 menu = gtk_menu_new();
88
2099ee3f9a8d Fri Oct 27 19:45:32 2006 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
144
2099ee3f9a8d Fri Oct 27 19:45:32 2006 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
145 /* take ownership of menu */
2099ee3f9a8d Fri Oct 27 19:45:32 2006 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
146 #ifdef GTK_OBJECT_FLOATING
2099ee3f9a8d Fri Oct 27 19:45:32 2006 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
147 /* GTK+ < 2.10 */
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
148 g_object_ref(G_OBJECT(menu));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
149 gtk_object_sink(GTK_OBJECT(menu));
88
2099ee3f9a8d Fri Oct 27 19:45:32 2006 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
150 #else
2099ee3f9a8d Fri Oct 27 19:45:32 2006 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
151 /* GTK+ >= 2.10 */
2099ee3f9a8d Fri Oct 27 19:45:32 2006 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
152 g_object_ref_sink(G_OBJECT(menu));
2099ee3f9a8d Fri Oct 27 19:45:32 2006 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
153 #endif
2099ee3f9a8d Fri Oct 27 19:45:32 2006 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
154
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
155 g_signal_connect(G_OBJECT(menu), "selection_done",
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
156 G_CALLBACK(popup_menu_short_lived_cb), menu);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
157 return menu;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
158 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
159
1448
89dedc61b1bd gint -> gboolean.
zas_
parents: 1437
diff changeset
160 gboolean popup_menu_position_clamp(GtkMenu *menu, gint *x, gint *y, gint height)
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
161 {
1437
a3d3208b0c50 gint -> gboolean.
zas_
parents: 1284
diff changeset
162 gboolean adjusted = FALSE;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
163 gint w, h;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
164 gint xw, xh;
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 113
diff changeset
165
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
166 w = GTK_WIDGET(menu)->requisition.width;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
167 h = GTK_WIDGET(menu)->requisition.height;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
168 xw = gdk_screen_width();
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
169 xh = gdk_screen_height();
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
170
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
171 if (*x + w > xw)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
172 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
173 *x = xw - w;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
174 adjusted = TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
175 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
176 if (*y + h > xh)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
177 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
178 if (height)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
179 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
180 *y = MAX(0, *y - h - height);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
181 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
182 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
183 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
184 *y = xh - h;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
185 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
186 adjusted = TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
187 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
188
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
189 if (*x < 0)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
190 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
191 *x = 0;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
192 adjusted = TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
193 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
194 if (*y < 0)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
195 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
196 *y = 0;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
197 adjusted = TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
198 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
199
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
200 return adjusted;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
201 }
1055
1646720364cf Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents: 513
diff changeset
202 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */