exposurses

Check-in [5f0ed62195]
Login

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

Overview
Comment:Ensure two different menus have been selected before executing
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 5f0ed621959548b8d1d9d73e3cb0f0a5a7633ccf59815a9cbc9f5cb3c3eb6db6
User & Date: base@atomicules.co.uk 2013-08-24 15:52:52
Context
2013-08-24
15:53
Whitespace changes for consistent formatting check-in: 8669035245 user: base@atomicules.co.uk tags: origin/master, trunk
15:52
Ensure two different menus have been selected before executing check-in: 5f0ed62195 user: base@atomicules.co.uk tags: origin/master, trunk
2013-08-17
19:35
Add initial left/right menu navigation not at all DRY though at the moment. check-in: 0ecf3fd90c user: base@atomicules.co.uk tags: origin/master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to exposurses.c.

63
64
65
66
67
68
69

70
71
72
73
74
75
76
...
205
206
207
208
209
210
211
212
213



214





215
216
217
218
219
220
221
222

223
224
225
226
227
228
229
	int c;
	MENU **menu;
	WINDOW **win;
	int n_iso, i;
	int n_shutter, j;
	int n_aperture, k;
    int menu_counter;

    menu_counter = 1;
    selection_counter = 0;

	/* Initialize curses */
	initscr();
	start_color();
	cbreak();
................................................................................
				break;
			case KEY_DOWN:
				menu_driver(*menu, REQ_DOWN_ITEM);
	    		break;
			case KEY_UP:
				menu_driver(*menu, REQ_UP_ITEM);
		    	break;
			case 10: /* ENTER */
			{



                selection_counter += 1;





				ITEM *cur;
				void (*p)(char *);

				cur = current_item(*menu);
				p = item_userptr(cur);
				p((char *)item_name(cur));
				pos_menu_cursor(*menu);
				break;

			}
			break;
								 
		}
		wrefresh(*win);
	}	
	/* Unpost and free all the memory taken up */







>







 







|
<
>
>
>
|
>
>
>
>
>
|
|

|
|
|
|
|
>







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
...
206
207
208
209
210
211
212
213

214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
	int c;
	MENU **menu;
	WINDOW **win;
	int n_iso, i;
	int n_shutter, j;
	int n_aperture, k;
    int menu_counter;
	int menu_sel_last;
    menu_counter = 1;
    selection_counter = 0;

	/* Initialize curses */
	initscr();
	start_color();
	cbreak();
................................................................................
				break;
			case KEY_DOWN:
				menu_driver(*menu, REQ_DOWN_ITEM);
	    		break;
			case KEY_UP:
				menu_driver(*menu, REQ_UP_ITEM);
		    	break;
			case 10: { /* ENTER */

				/* Only increment selection counter if on different menu */
				if (selection_counter == 0) {
					menu_sel_last = menu_counter;
					selection_counter += 1;
				}
				if (menu_counter != menu_sel_last)
					selection_counter += 1;
                if (selection_counter == 2) { 
                    selection_counter = 0;
                    ITEM *cur;
                    void (*p)(char *);

                    cur = current_item(*menu);
                    p = item_userptr(cur);
                    p((char *)item_name(cur));
                    pos_menu_cursor(*menu);
                    break;
                }
			}
			break;
								 
		}
		wrefresh(*win);
	}	
	/* Unpost and free all the memory taken up */