~ubuntu-branches/ubuntu/natty/vice/natty

« back to all changes in this revision

Viewing changes to src/arch/unix/gui/uidrive.c

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2010-02-11 18:30:16 UTC
  • mfrom: (1.1.8 upstream) (9.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100211183016-f6n8usn3tzp0u6dp
Tags: 2.2.dfsg-1
* New upstream release, C64 DTV is included so update package description
  and add it to the menu.
* Drop patch fixing build failure with gcc-4.4 , applied upstream.
* Fix some lintian problems and clean up debian/rules .

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
#include "drive.h"
32
32
#include "resources.h"
 
33
#include "uiapi.h"
33
34
#include "uidrive.h"
34
35
#include "uimenu.h"
35
36
 
36
 
 
37
37
UI_MENU_DEFINE_TOGGLE(DriveTrueEmulation)
38
38
UI_MENU_DEFINE_TOGGLE(FlashTrueFS)
39
39
UI_MENU_DEFINE_RADIO(Drive8ExtendImagePolicy)
41
41
UI_MENU_DEFINE_RADIO(Drive10ExtendImagePolicy)
42
42
UI_MENU_DEFINE_RADIO(Drive11ExtendImagePolicy)
43
43
 
44
 
 
45
44
UI_CALLBACK(uidrive_extend_policy_control)
46
45
{
47
46
    if (!CHECK_MENUS) {
49
48
    } else {
50
49
        int type;
51
50
 
52
 
        resources_get_int_sprintf("Drive%iType", &type,
53
 
                                  (int)UI_MENU_CB_PARAM + 8);
 
51
        resources_get_int_sprintf("Drive%iType", &type, vice_ptr_to_int(UI_MENU_CB_PARAM) + 8);
54
52
 
55
 
        if (drive_check_extend_policy(type))
 
53
        if (drive_check_extend_policy(type)) {
56
54
            ui_menu_set_sensitive(w, 1);
57
 
        else
 
55
        } else {
58
56
            ui_menu_set_sensitive(w, 0);
 
57
        }
59
58
    }
60
59
}
61
60
 
105
104
 
106
105
    resources_get_int("Drive8Type", &current_value);
107
106
    if (!CHECK_MENUS) {
108
 
        if (current_value != (int)UI_MENU_CB_PARAM) {
109
 
            resources_set_int("Drive8Type", (int)UI_MENU_CB_PARAM);
 
107
        if (current_value != vice_ptr_to_int(UI_MENU_CB_PARAM)) {
 
108
            resources_set_int("Drive8Type", vice_ptr_to_int(UI_MENU_CB_PARAM));
110
109
            ui_update_menus();
111
110
        }
112
111
    } else {
113
 
        ui_menu_set_tick(w, current_value == (int)UI_MENU_CB_PARAM);
114
 
        if (drive_check_type((int)UI_MENU_CB_PARAM, 0)) {
 
112
        ui_menu_set_tick(w, current_value == vice_ptr_to_int(UI_MENU_CB_PARAM));
 
113
        if (drive_check_type(vice_ptr_to_int(UI_MENU_CB_PARAM), 0)) {
115
114
            ui_menu_set_sensitive(w, 1);
116
115
        } else {
117
116
            ui_menu_set_sensitive(w, 0);
125
124
 
126
125
    resources_get_int("Drive9Type", &current_value);
127
126
    if (!CHECK_MENUS) {
128
 
        if (current_value != (int)UI_MENU_CB_PARAM) {
129
 
            resources_set_int("Drive9Type", (int)UI_MENU_CB_PARAM);
 
127
        if (current_value != vice_ptr_to_int(UI_MENU_CB_PARAM)) {
 
128
            resources_set_int("Drive9Type", vice_ptr_to_int(UI_MENU_CB_PARAM));
130
129
            ui_update_menus();
131
130
        }
132
131
    } else {
133
 
        ui_menu_set_tick(w, current_value == (int)UI_MENU_CB_PARAM);
134
 
        if (drive_check_type((int)UI_MENU_CB_PARAM, 1)) {
 
132
        ui_menu_set_tick(w, current_value == vice_ptr_to_int(UI_MENU_CB_PARAM));
 
133
        if (drive_check_type(vice_ptr_to_int(UI_MENU_CB_PARAM), 1)) {
135
134
            ui_menu_set_sensitive(w, 1);
136
135
        } else {
137
136
            ui_menu_set_sensitive(w, 0);
145
144
 
146
145
    resources_get_int("Drive10Type", &current_value);
147
146
    if (!CHECK_MENUS) {
148
 
        if (current_value != (int)UI_MENU_CB_PARAM) {
149
 
            resources_set_int("Drive10Type", (int)UI_MENU_CB_PARAM);
 
147
        if (current_value != vice_ptr_to_int(UI_MENU_CB_PARAM)) {
 
148
            resources_set_int("Drive10Type", vice_ptr_to_int(UI_MENU_CB_PARAM));
150
149
            ui_update_menus();
151
150
        }
152
151
    } else {
153
 
        ui_menu_set_tick(w, current_value == (int)UI_MENU_CB_PARAM);
154
 
        if (drive_check_type((int)UI_MENU_CB_PARAM, 2)) {
 
152
        ui_menu_set_tick(w, current_value == vice_ptr_to_int(UI_MENU_CB_PARAM));
 
153
        if (drive_check_type(vice_ptr_to_int(UI_MENU_CB_PARAM), 2)) {
155
154
            ui_menu_set_sensitive(w, 1);
156
155
        } else {
157
156
            ui_menu_set_sensitive(w, 0);
165
164
 
166
165
    resources_get_int("Drive11Type", &current_value);
167
166
    if (!CHECK_MENUS) {
168
 
        if (current_value != (int)UI_MENU_CB_PARAM) {
169
 
            resources_set_int("Drive11Type", (int)UI_MENU_CB_PARAM);
 
167
        if (current_value != vice_ptr_to_int(UI_MENU_CB_PARAM)) {
 
168
            resources_set_int("Drive11Type", vice_ptr_to_int(UI_MENU_CB_PARAM));
170
169
            ui_update_menus();
171
170
        }
172
171
    } else {
173
 
        ui_menu_set_tick(w, current_value == (int)UI_MENU_CB_PARAM);
174
 
        if (drive_check_type((int)UI_MENU_CB_PARAM, 3)) {
 
172
        ui_menu_set_tick(w, current_value == vice_ptr_to_int(UI_MENU_CB_PARAM));
 
173
        if (drive_check_type(vice_ptr_to_int(UI_MENU_CB_PARAM), 3)) {
175
174
            ui_menu_set_sensitive(w, 1);
176
175
        } else {
177
176
            ui_menu_set_sensitive(w, 0);