exposurses

Check-in [4cc8e33f3c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Ignore selection of OVER/UNDER in shutter/aperture menus

Since this seems easier than trying to prevent selection.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 4cc8e33f3c9fdaff2714a8b807bf794125b0c15368eb2ac98f7c2eacd70fe3cc
User & Date: base@atomicules.co.uk 2013-09-18 12:49:36
Original User & Date: base@atomicules.co.uk 2013-09-18 12:49:37
Context
2013-09-18
12:49
Split out ITEM creation into separate func so can clean on exit

I still hadn't got things quite right from when I'd split out the menu
and window creation functions. The segfault on exit was due to the item
pointers I thought existed not actually existing.

Need to make sure they exist as expected as otherwise I can't free up
the memory, etc.

Yay, pretty much done. check-in: d39151ac51 user: base@atomicules.co.uk tags: origin/master, trunk

12:49
Ignore selection of OVER/UNDER in shutter/aperture menus

Since this seems easier than trying to prevent selection. check-in: 4cc8e33f3c user: base@atomicules.co.uk tags: origin/master, trunk

12:48
Add under/over exposure indication in to the shutter/aperture menus

Keeping the NULLs in makes array indices very confusing, but this seems
to be the right thing to do. check-in: 7312ab2b6f user: base@atomicules.co.uk tags: origin/master, trunk

Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to exposurses.c.

196
197
198
199
200
201
202
203




204
205
206
207
208
209
210
				void (*p)(char *);

				cur = current_item(*menu);
				p = item_userptr(cur);
				/* Learning notes - Don't understand this bit */
				/* Is this a function pointer? */
				p((char *)item_name(cur));
				




				switch (selection_counter) {
					case 1: { /* Exposure selected */
						selection_counter += 1;
						menu_counter += 1;
						move(LINES - 2, 0);
						clrtoeol();
						mvprintw(LINES - 2, 0, "Select ISO");







|
>
>
>
>







196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
				void (*p)(char *);

				cur = current_item(*menu);
				p = item_userptr(cur);
				/* Learning notes - Don't understand this bit */
				/* Is this a function pointer? */
				p((char *)item_name(cur));
				/* need to igore over/under if selected, probably easier than try to prevent selection */
				if (!((strcmp("OVER", shutter_sel) == 0)
						|| (strcmp("UNDER", shutter_sel) == 0) 
						|| (strcmp("OVER", aperture_sel) == 0) 
						|| (strcmp("UNDER", aperture_sel) == 0))) {
				switch (selection_counter) {
					case 1: { /* Exposure selected */
						selection_counter += 1;
						menu_counter += 1;
						move(LINES - 2, 0);
						clrtoeol();
						mvprintw(LINES - 2, 0, "Select ISO");
271
272
273
274
275
276
277









278
279
280
281
282
283
284
						move(LINES - 2, 0);
						clrtoeol();
						mvprintw(LINES - 2, 0, "Select EV");
						refresh();
					}
					break;
				}









			}
			break;
		}
		wrefresh(*win);
	}	
	/* Unpost and free all the memory taken up */
	remove_menu(exposure_items, exposure_menu, n_exposure);







>
>
>
>
>
>
>
>
>







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
						move(LINES - 2, 0);
						clrtoeol();
						mvprintw(LINES - 2, 0, "Select EV");
						refresh();
					}
					break;
				}
				}
				/* If over/under need to clear selection so know which is blank
				 * when a proper selection is made */
				if ((strcmp("OVER", shutter_sel) == 0) || (strcmp("UNDER", shutter_sel) == 0)) {
					strcpy(shutter_sel, "");
				}
				if ((strcmp("OVER", aperture_sel) == 0) || (strcmp("UNDER", aperture_sel) == 0)) {
					strcpy(aperture_sel, "");
				}
			}
			break;
		}
		wrefresh(*win);
	}	
	/* Unpost and free all the memory taken up */
	remove_menu(exposure_items, exposure_menu, n_exposure);