
Go to the source code of this file.
Classes | |
| struct | gtkArcLoc_t |
Defines | |
| #define | ARC_LOC_SCR_SPACING_V 10 |
| #define | ARC_LOC_SCR_SPACING_H 10 |
| #define | ARC_LOC_ITEM_BK_W 666 |
| #define | ARC_LOC_ITEM_BK_H 115 |
| #define | ARC_LOC_SCR_ITEM_PADDING_T 10 |
| #define | ARC_LOC_SCR_ITEM_PADDING_B 10 |
| #define | ARC_LOC_SCR_ITEM_PADDING_L 13 |
| #define | ARC_LOC_SCR_ITEM_PADDING_R 13 |
| #define | ARC_LOC_ITEM_LABEL_W (ARC_LOC_ITEM_BK_W - ARC_LOC_SCR_ITEM_PADDING_L - ARC_LOC_SCR_ITEM_PADDING_R) |
| #define | ARC_LOC_BTN_W 150 |
| #define | ARC_LOC_BTN_H 27 |
| #define | ARC_LOC_BTN_NUM (arcLocUndefined) |
| #define | ARC_LOC_BTN_SPACING_H ( (ARC_LOC_ITEM_LABEL_W - (ARC_LOC_BTN_W * ARC_LOC_BTN_NUM)) / (ARC_LOC_BTN_NUM - 1) ) |
Functions | |
| GtkWidget * | iLiad_archive_location_create (void) |
| void | iLiad_archive_location_set_text (void) |
| void | iLiad_archive_location_display_data (void) |
Copyright (C) 2005-2008 iRex Technologies B.V. All rights reserved.
Providing GUI interface to let users input their personalize archive location.
Definition in file iLiadArcLocScreen.h.
| #define ARC_LOC_BTN_H 27 |
Definition at line 54 of file iLiadArcLocScreen.h.
| #define ARC_LOC_BTN_NUM (arcLocUndefined) |
Definition at line 55 of file iLiadArcLocScreen.h.
| #define ARC_LOC_BTN_SPACING_H ( (ARC_LOC_ITEM_LABEL_W - (ARC_LOC_BTN_W * ARC_LOC_BTN_NUM)) / (ARC_LOC_BTN_NUM - 1) ) |
Definition at line 56 of file iLiadArcLocScreen.h.
| #define ARC_LOC_BTN_W 150 |
Definition at line 53 of file iLiadArcLocScreen.h.
| #define ARC_LOC_ITEM_BK_H 115 |
Definition at line 43 of file iLiadArcLocScreen.h.
| #define ARC_LOC_ITEM_BK_W 666 |
Definition at line 42 of file iLiadArcLocScreen.h.
| #define ARC_LOC_ITEM_LABEL_W (ARC_LOC_ITEM_BK_W - ARC_LOC_SCR_ITEM_PADDING_L - ARC_LOC_SCR_ITEM_PADDING_R) |
Definition at line 51 of file iLiadArcLocScreen.h.
| #define ARC_LOC_SCR_ITEM_PADDING_B 10 |
Definition at line 46 of file iLiadArcLocScreen.h.
| #define ARC_LOC_SCR_ITEM_PADDING_L 13 |
Definition at line 47 of file iLiadArcLocScreen.h.
| #define ARC_LOC_SCR_ITEM_PADDING_R 13 |
Definition at line 48 of file iLiadArcLocScreen.h.
| #define ARC_LOC_SCR_ITEM_PADDING_T 10 |
Definition at line 45 of file iLiadArcLocScreen.h.
| #define ARC_LOC_SCR_SPACING_H 10 |
Definition at line 40 of file iLiadArcLocScreen.h.
| #define ARC_LOC_SCR_SPACING_V 10 |
Definition at line 39 of file iLiadArcLocScreen.h.
| GtkWidget* iLiad_archive_location_create | ( | void | ) |
Definition at line 74 of file iLiadArcLocScreen.c.
00075 { 00076 int i; 00077 GtkWidget *item; 00078 GtkWidget *top_vbox; 00079 GtkWidget *vbox; 00080 GtkWidget *widget; 00081 00082 ST_LOGPRINTF("entry"); 00083 00084 // Top level vbox 00085 top_vbox = gtk_vbox_new(FALSE, ARC_LOC_SCR_SPACING_V); 00086 00087 // g_archive_settingitem 00088 item = gtk_settingitem_new(""); 00089 gtk_widget_set_size_request(item, -1, -1); 00090 gtk_box_pack_start(GTK_BOX(top_vbox), item, FALSE, FALSE, 0); 00091 g_archive_settingitem = item; 00092 00093 // vbox 00094 vbox = gtk_vbox_new(FALSE, SETTINGITEM_ITEM_SPACING); 00095 gtk_settingitem_add_details(GTK_SETTINGITEM(item), vbox); 00096 00097 // g_archive_locs[..] 00098 for (i = 0 ; i < sizeof(g_archive_locs) / sizeof(g_archive_locs[0]) ; i++) 00099 { 00100 widget = gtk_archive_location_new(&g_archive_locs[i]); 00101 gtk_box_pack_start(GTK_BOX(vbox), widget, FALSE, FALSE, 0); 00102 } 00103 00104 // g_export_settingitem 00105 item = gtk_settingitem_new(""); 00106 gtk_widget_set_size_request(item, -1, -1); 00107 gtk_box_pack_start(GTK_BOX(top_vbox), item, FALSE, FALSE, 0); 00108 g_export_settingitem = item; 00109 00110 widget = gtk_archive_location_new(&g_export_loc); 00111 gtk_settingitem_add_details(GTK_SETTINGITEM(item), widget); 00112 gtk_widget_show_all(widget); 00113 00114 // g_info_item 00115 widget = gtk_infoitem_new(FALSE); 00116 gtk_box_pack_start(GTK_BOX(top_vbox), widget, FALSE, FALSE, 0); 00117 g_info_item = widget; 00118 00119 // show widgets 00120 gtk_widget_show_all(vbox); 00121 gtk_widget_show(g_archive_settingitem); 00122 gtk_widget_show(g_export_settingitem); 00123 gtk_widget_show(top_vbox); 00124 return top_vbox; 00125 }

| void iLiad_archive_location_display_data | ( | void | ) |
Definition at line 290 of file iLiadArcLocScreen.c.
00291 { 00292 int i; 00293 arcType_e type; 00294 arcLocType_e location; 00295 GtkWidget *button; 00296 00297 ST_LOGPRINTF("entry"); 00298 00299 for (i = 0 ; i < sizeof(g_archive_locs) / sizeof(g_archive_locs[0]) ; i++) 00300 { 00301 type = g_archive_locs[i].arcType; 00302 location = iLiad_archive_location_data_get(type); 00303 00304 button = g_archive_locs[i].buttons[location]; 00305 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE); 00306 } 00307 00308 location = iLiad_export_location_data_get(); 00309 button = g_export_loc.buttons[location]; 00310 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE); 00311 }

| void iLiad_archive_location_set_text | ( | void | ) |
Definition at line 226 of file iLiadArcLocScreen.c.
00227 { 00228 int i; 00229 gtkArcLoc_t *arcLoc; 00230 GtkWidget **button_tbl; 00231 00232 ST_LOGPRINTF("entry"); 00233 00234 if (g_archive_settingitem) 00235 { 00236 gtk_settingitem_set_header_text(GTK_SETTINGITEM(g_archive_settingitem), _("Archive locations")); 00237 // news 00238 arcLoc = &g_archive_locs[arcNews]; 00239 gtk_label_set_text(GTK_LABEL(arcLoc->title), _("Newspapers")); 00240 gtk_label_set_text(GTK_LABEL(arcLoc->subTitle), _("Select a memory type for the 'NEWS' button.")); 00241 // books 00242 arcLoc = &g_archive_locs[arcBooks]; 00243 gtk_label_set_text(GTK_LABEL(arcLoc->title), _("Books")); 00244 gtk_label_set_text(GTK_LABEL(arcLoc->subTitle), _("Select a memory type for the 'BOOKS' button.")); 00245 // docs 00246 arcLoc = &g_archive_locs[arcDocs]; 00247 gtk_label_set_text(GTK_LABEL(arcLoc->title), _("Documents")); 00248 gtk_label_set_text(GTK_LABEL(arcLoc->subTitle), _("Select a memory type for the 'DOCS' button.")); 00249 // notes 00250 arcLoc = &g_archive_locs[arcNotes]; 00251 gtk_label_set_text(GTK_LABEL(arcLoc->title), _("Notes")); 00252 gtk_label_set_text(GTK_LABEL(arcLoc->subTitle), _("Select a memory type for the 'NOTES' button.")); 00253 00254 // button labels 00255 for (i = 0 ; i < sizeof(g_archive_locs) / sizeof(g_archive_locs[0]) ; i++) 00256 { 00257 button_tbl = g_archive_locs[i].buttons; 00258 gtk_button_set_label(GTK_BUTTON(button_tbl[arcLocMain]), _("Internal memory")); 00259 gtk_button_set_label(GTK_BUTTON(button_tbl[arcLocCard]), _("MMC card" )); 00260 gtk_button_set_label(GTK_BUTTON(button_tbl[arcLocUSB ]), _("USB stick" )); 00261 gtk_button_set_label(GTK_BUTTON(button_tbl[arcLocCF ]), _("CF card" )); 00262 } 00263 } 00264 00265 if (g_export_settingitem) 00266 { 00267 gtk_settingitem_set_header_text(GTK_SETTINGITEM(g_export_settingitem), _("USB Connection")); 00268 00269 // Export 00270 arcLoc = &g_export_loc; 00271 gtk_label_set_text(GTK_LABEL(arcLoc->title), _("Export via USB")); 00272 gtk_label_set_text(GTK_LABEL(arcLoc->subTitle), _("Select a memory type to be exported to the PC via the USB cable.")); 00273 00274 button_tbl = g_export_loc.buttons; 00275 gtk_button_set_label(GTK_BUTTON(button_tbl[arcLocMain]), _("Internal memory")); 00276 gtk_button_set_label(GTK_BUTTON(button_tbl[arcLocCard]), _("MMC card" )); 00277 gtk_button_set_label(GTK_BUTTON(button_tbl[arcLocUSB ]), _("USB stick" )); 00278 gtk_button_set_label(GTK_BUTTON(button_tbl[arcLocCF ]), _("CF card" )); 00279 } 00280 00281 if (g_info_item) 00282 { 00283 // info 00284 gtk_infoitem_set_text( GTK_INFOITEM(g_info_item), 00285 _("\nWhen you select a memory type for an archive key, " 00286 "the iLiad will use this as storage for newly downloaded items from iDS.") ); 00287 } 00288 }

1.5.6