Mercurial > geeqie
comparison src/ui_menu.c @ 442:4b2d7f9af171
Big whitespaces cleanup:
- drop whitespaces at end of lines
- convert eight spaces to tab at start of lines
- drop spurious spaces mixed with tabs
- remove empty lines at end of files
author | zas_ |
---|---|
date | Sun, 20 Apr 2008 13:04:57 +0000 |
parents | 55166d93498d |
children | ddabc4873a3f |
comparison
equal
deleted
inserted
replaced
441:08eb7137cd94 | 442:4b2d7f9af171 |
---|---|
25 | 25 |
26 /* | 26 /* |
27 *----------------------------------------------------------------------------- | 27 *----------------------------------------------------------------------------- |
28 * menu items | 28 * menu items |
29 *----------------------------------------------------------------------------- | 29 *----------------------------------------------------------------------------- |
30 */ | 30 */ |
31 | 31 |
32 static void menu_item_finish(GtkWidget *menu, GtkWidget *item, GCallback func, gpointer data) | 32 static void menu_item_finish(GtkWidget *menu, GtkWidget *item, GCallback func, gpointer data) |
33 { | 33 { |
34 if (func) g_signal_connect(G_OBJECT(item), "activate", func, data); | 34 if (func) g_signal_connect(G_OBJECT(item), "activate", func, data); |
35 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); | 35 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); |
78 { | 78 { |
79 GtkWidget *item; | 79 GtkWidget *item; |
80 | 80 |
81 item = menu_item_add_stock(menu, label, stock_id, func, data); | 81 item = menu_item_add_stock(menu, label, stock_id, func, data); |
82 gtk_widget_set_sensitive(item, sensitive); | 82 gtk_widget_set_sensitive(item, sensitive); |
83 | 83 |
84 return item; | 84 return item; |
85 } | 85 } |
86 | 86 |
87 GtkWidget *menu_item_add_check(GtkWidget *menu, const gchar *label, gint active, | 87 GtkWidget *menu_item_add_check(GtkWidget *menu, const gchar *label, gint active, |
88 GCallback func, gpointer data) | 88 GCallback func, gpointer data) |
114 | 114 |
115 void menu_item_add_divider(GtkWidget *menu) | 115 void menu_item_add_divider(GtkWidget *menu) |
116 { | 116 { |
117 GtkWidget *item = gtk_menu_item_new(); | 117 GtkWidget *item = gtk_menu_item_new(); |
118 gtk_widget_set_sensitive(item, FALSE); | 118 gtk_widget_set_sensitive(item, FALSE); |
119 gtk_menu_shell_append(GTK_MENU_SHELL(menu),item); | 119 gtk_menu_shell_append(GTK_MENU_SHELL(menu),item); |
120 gtk_widget_show(item); | 120 gtk_widget_show(item); |
121 } | 121 } |
122 | 122 |
123 GtkWidget *menu_item_add_simple(GtkWidget *menu, const gchar *label, | 123 GtkWidget *menu_item_add_simple(GtkWidget *menu, const gchar *label, |
124 GCallback func, gpointer data) | 124 GCallback func, gpointer data) |
125 { | 125 { |
131 | 131 |
132 /* | 132 /* |
133 *----------------------------------------------------------------------------- | 133 *----------------------------------------------------------------------------- |
134 * popup menus | 134 * popup menus |
135 *----------------------------------------------------------------------------- | 135 *----------------------------------------------------------------------------- |
136 */ | 136 */ |
137 | 137 |
138 static void popup_menu_short_lived_cb(GtkWidget *widget, gpointer data) | 138 static void popup_menu_short_lived_cb(GtkWidget *widget, gpointer data) |
139 { | 139 { |
140 /* destroy the menu */ | 140 /* destroy the menu */ |
141 g_object_unref(G_OBJECT(data)); | 141 g_object_unref(G_OBJECT(data)); |
165 gint popup_menu_position_clamp(GtkMenu *menu, gint *x, gint *y, gint height) | 165 gint popup_menu_position_clamp(GtkMenu *menu, gint *x, gint *y, gint height) |
166 { | 166 { |
167 gint adjusted = FALSE; | 167 gint adjusted = FALSE; |
168 gint w, h; | 168 gint w, h; |
169 gint xw, xh; | 169 gint xw, xh; |
170 | 170 |
171 w = GTK_WIDGET(menu)->requisition.width; | 171 w = GTK_WIDGET(menu)->requisition.width; |
172 h = GTK_WIDGET(menu)->requisition.height; | 172 h = GTK_WIDGET(menu)->requisition.height; |
173 xw = gdk_screen_width(); | 173 xw = gdk_screen_width(); |
174 xh = gdk_screen_height(); | 174 xh = gdk_screen_height(); |
175 | 175 |