Implement user interface for external hotlist app details.

svn path=/trunk/netsurf/; revision=13151
This commit is contained in:
Steve Fryatt 2011-11-19 23:33:37 +00:00
parent 78181f7d4e
commit bb4a0946ba
10 changed files with 183 additions and 61 deletions

View File

@ -1263,6 +1263,7 @@ HelpInterfaceConfig11:Stellt die Standardeinstellungen wieder her.
HelpInterfaceConfig12:Klicken mit AUSWAHL schließt das Fenster ohne die Änderungen zu speichern.|MKlicken mit SPEZIAL stellt die zuletzt abgespeicherten Einstellungen wieder her.
HelpInterfaceConfig13:Klicken mit AUSWAHL speichert die Einstellungen und schließt das Fenster.|MKlicken mit SPEZIAL speichert die Einstellungen ohne das Fenster zu schließen.
HelpInterfaceConfig16:This indicates whether NetSurf will use an external hotlist client if available, in preference to the internal hotlist.
HelpInterfaceConfig18:\Tthe path to a hotlist application which will be used to display the hotlist.
HelpLanguageConfig:Konfigurationsfenster für die Spracheinstellungen
HelpLanguageConfig3:Das ist die aktuell eingestellte Sprache für die Bedienoberfläche.|MDiese Sprache wird genutzt, um NetSurf's Meldungen und die Texte der Dialogboxen und Menüs darzustellen.

View File

@ -1284,6 +1284,7 @@ HelpInterfaceConfig11:\Sreset the Interface options back to their default values
HelpInterfaceConfig12:\Sclose this \w without saving changes.|M\Areturn the interface options to the last saved configuration.
HelpInterfaceConfig13:\Ssave these settings and close the \w.|M\Asave these settings without closing the \w.
HelpInterfaceConfig16:This indicates whether NetSurf will use an external hotlist client if available, in preference to the internal hotlist.
HelpInterfaceConfig18:\Tthe path to a hotlist application which will be used to display the hotlist.
HelpLanguageConfig:\Tlanguage configuration \w
HelpLanguageConfig3:\Tcurrently selected interface language.|MThe interface language is the language used for NetSurf's messages and dialogue boxes.

View File

@ -1269,6 +1269,7 @@ HelpInterfaceConfig11:\Srevenir aux valeurs par défaut des options d'Interface.
HelpInterfaceConfig12:\Sfermer cette fenêtre sans sauver les changements|M\Arevenir aux options d'Interface précédemment sauvegardées.
HelpInterfaceConfig13:\Ssauver ces réglages et fermer la fenêtre.|M\Asauver ces réglages sans fermer la fenêtre.
HelpInterfaceConfig16:This indicates whether NetSurf will use an external hotlist client if available, in preference to the internal hotlist.
HelpInterfaceConfig18:\Tthe path to a hotlist application which will be used to display the hotlist.
HelpLanguageConfig:\Tfenêtre de configuration de langue.
HelpLanguageConfig3:\Tla langue d'interface sélectionnée actuellement.|MLa langue d'interface est la langue utilisée pour les messages et les boîtes de dialogue de Netsurf.

View File

@ -1271,6 +1271,7 @@ HelpInterfaceConfig11:\Sreset the Interface options back to their default values
HelpInterfaceConfig12:\Sclose this \w without saving changes.|M\Areturn the interface options to the last saved configuration.
HelpInterfaceConfig13:\Ssave these settings and close the \w.|M\Asave these settings without closing the \w.
HelpInterfaceConfig16:This indicates whether NetSurf will use an external hotlist client if available, in preference to the internal hotlist.
HelpInterfaceConfig18:\Tthe path to a hotlist application which will be used to display the hotlist.
HelpLanguageConfig:\Tlanguage configuration \w
HelpLanguageConfig3:\Tcurrently selected interface language.|MThe interface language is the language used for NetSurf's messages and dialogue boxes.

View File

@ -1264,6 +1264,7 @@ HelpInterfaceConfig11:\Sreset the Interface options back to their default values
HelpInterfaceConfig12:\Sclose this \w without saving changes.|M\Areturn the cache options to the last saved configuration.
HelpInterfaceConfig13:\Ssave these settings and close the \w.|M\Asave these settings without closing the \w.
HelpInterfaceConfig16:This indicates whether NetSurf will use an external hotlist client if available, in preference to the internal hotlist.
HelpInterfaceConfig18:\Tthe path to a hotlist application which will be used to display the hotlist.
HelpLanguageConfig:\Tlanguage configuration \w
HelpLanguageConfig3:\Tcurrently selected interface language.|MThe interface language is the language used for NetSurf's messages and dialogue boxes.

View File

@ -35,8 +35,10 @@
#define INTERFACE_CANCEL_BUTTON 12
#define INTERFACE_OK_BUTTON 13
#define INTERFACE_USE_EXTERNAL_HOTLIST 16
#define INTERFACE_EXTERNAL_HOTLIST_APP 18
static bool ro_gui_options_interface_click(wimp_pointer *pointer);
static void ro_gui_options_interface_default(wimp_pointer *pointer);
static bool ro_gui_options_interface_ok(wimp_w w);
@ -55,8 +57,16 @@ bool ro_gui_options_interface_initialise(wimp_w w)
option_thumbnail_iconise);
ro_gui_set_icon_selected_state(w, INTERFACE_USE_EXTERNAL_HOTLIST,
option_external_hotlists);
ro_gui_set_icon_string(w, INTERFACE_EXTERNAL_HOTLIST_APP,
(option_external_hotlist_app) ?
option_external_hotlist_app : "", false);
ro_gui_set_icon_shaded_state(w, INTERFACE_EXTERNAL_HOTLIST_APP,
!option_external_hotlists);
/* initialise all functions for a newly created window */
ro_gui_wimp_event_register_mouse_click(w,
ro_gui_options_interface_click);
ro_gui_wimp_event_register_button(w, INTERFACE_DEFAULT_BUTTON,
ro_gui_options_interface_default);
ro_gui_wimp_event_register_cancel(w, INTERFACE_CANCEL_BUTTON);
@ -68,6 +78,25 @@ bool ro_gui_options_interface_initialise(wimp_w w)
}
bool ro_gui_options_interface_click(wimp_pointer *pointer)
{
bool shaded;
switch (pointer->i) {
case INTERFACE_USE_EXTERNAL_HOTLIST:
shaded = !ro_gui_get_icon_selected_state(pointer->w,
INTERFACE_USE_EXTERNAL_HOTLIST);
ro_gui_set_icon_shaded_state(pointer->w,
INTERFACE_EXTERNAL_HOTLIST_APP, shaded);
return false;
break;
}
return false;
}
void ro_gui_options_interface_default(wimp_pointer *pointer)
{
ro_gui_set_icon_selected_state(pointer->w,
@ -82,6 +111,8 @@ void ro_gui_options_interface_default(wimp_pointer *pointer)
INTERFACE_THUMBNAIL_ICONISE_OPTION, true);
ro_gui_set_icon_selected_state(pointer->w,
INTERFACE_USE_EXTERNAL_HOTLIST, false);
ro_gui_set_icon_string(pointer->w, INTERFACE_EXTERNAL_HOTLIST_APP,
"", false);
}
bool ro_gui_options_interface_ok(wimp_w w)
@ -98,6 +129,11 @@ bool ro_gui_options_interface_ok(wimp_w w)
INTERFACE_THUMBNAIL_ICONISE_OPTION);
option_external_hotlists = ro_gui_get_icon_selected_state(w,
INTERFACE_USE_EXTERNAL_HOTLIST);
if (option_external_hotlist_app)
free(option_external_hotlist_app);
option_external_hotlist_app =
strdup(ro_gui_get_icon_string(w,
INTERFACE_EXTERNAL_HOTLIST_APP));
ro_gui_save_options();
return true;

View File

@ -2860,7 +2860,7 @@ wimp_window {
wimp_window {
template_name:"con_inter"
visible:1094,218,1838,918
visible:1094,146,1838,918
xscroll:0
yscroll:0
next:wimp_TOP
@ -2873,7 +2873,7 @@ wimp_window {
scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
highlight_bg:wimp_COLOUR_CREAM
extra_flags:
extent:0,-700,744,0
extent:0,-772,744,0
title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | 0x27000000
work_flags:
sprite_area:&1
@ -2991,7 +2991,7 @@ wimp_window {
text_and_sprite.validation:"Soptoff,opton"
}
wimp_icon {
extent:24,-668,188,-616
extent:24,-740,188,-688
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -3001,7 +3001,7 @@ wimp_window {
text.validation:"R5,3"
}
wimp_icon {
extent:360,-668,524,-616
extent:360,-740,524,-688
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -3011,7 +3011,7 @@ wimp_window {
text.validation:"R5,3"
}
wimp_icon {
extent:540,-676,724,-608
extent:540,-748,724,-680
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -3021,7 +3021,7 @@ wimp_window {
text.validation:"R6,3"
}
wimp_icon {
extent:16,-588,728,-492
extent:16,-660,728,-492
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -3050,6 +3050,26 @@ wimp_window {
text_and_sprite.size:*
text_and_sprite.validation:"Soptoff,opton"
}
wimp_icon {
extent:28,-640,232,-588
icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
text.text:"Hotlist path"
text.size:*
text.validation:""
}
wimp_icon {
extent:232,-640,708,-588
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_WHITE
text.text:"Writable icon"
text.size:256
text.validation:"Pptr_write;Kta"
}
}
wimp_window {

View File

@ -833,7 +833,7 @@ wimp_window {
wimp_window {
template_name:"con_inter"
visible:2320,508,3164,1220
visible:2320,436,3164,1220
xscroll:0
yscroll:0
next:wimp_TOP
@ -846,7 +846,7 @@ wimp_window {
scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
highlight_bg:wimp_COLOUR_CREAM
extra_flags:
extent:0,-712,844,0
extent:0,-784,844,0
title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | 0x27000000
work_flags:
sprite_area:&1
@ -964,7 +964,7 @@ wimp_window {
text_and_sprite.validation:"Soptoff,opton"
}
wimp_icon {
extent:24,-676,188,-624
extent:24,-748,188,-696
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -974,7 +974,7 @@ wimp_window {
text.validation:"R5,3"
}
wimp_icon {
extent:456,-676,620,-624
extent:456,-748,620,-696
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -984,7 +984,7 @@ wimp_window {
text.validation:"R5,3"
}
wimp_icon {
extent:636,-684,820,-616
extent:636,-756,820,-688
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -994,7 +994,7 @@ wimp_window {
text.validation:"R6,3"
}
wimp_icon {
extent:16,-592,820,-496
extent:16,-664,820,-496
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -1023,6 +1023,26 @@ wimp_window {
text_and_sprite.size:*
text_and_sprite.validation:"Soptoff,opton"
}
wimp_icon {
extent:28,-644,232,-592
icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
text.text:"Hotlist path"
text.size:*
text.validation:""
}
wimp_icon {
extent:232,-644,800,-592
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_WHITE
text.text:"Writable icon"
text.size:256
text.validation:"Pptr_write;Kta"
}
}
wimp_window {

View File

@ -3482,7 +3482,7 @@ wimp_window {
wimp_window {
template_name:"con_inter"
visible:264,362,1008,1066
visible:264,290,1008,1066
xscroll:0
yscroll:0
next:wimp_TOP
@ -3495,7 +3495,7 @@ wimp_window {
scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
highlight_bg:wimp_COLOUR_CREAM
extra_flags:
extent:0,-772,744,0
extent:0,-844,744,0
title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | 0x27000000
work_flags:
sprite_area:&1
@ -3613,7 +3613,7 @@ wimp_window {
text_and_sprite.validation:"Soptoff,opton"
}
wimp_icon {
extent:24,-672,188,-620
extent:24,-744,188,-692
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -3623,7 +3623,7 @@ wimp_window {
text.validation:"R5,3"
}
wimp_icon {
extent:360,-672,524,-620
extent:360,-744,524,-692
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -3633,7 +3633,7 @@ wimp_window {
text.validation:"R5,3"
}
wimp_icon {
extent:540,-680,724,-612
extent:540,-752,724,-684
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -3643,7 +3643,7 @@ wimp_window {
text.validation:"R6,3"
}
wimp_icon {
extent:16,-588,728,-492
extent:16,-660,728,-492
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -3672,6 +3672,27 @@ wimp_window {
text_and_sprite.size:*
text_and_sprite.validation:"Soptoff,opton"
}
wimp_icon {
extent:28,-640,232,-588
icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
text.text:"Hotlist path"
text.size:*
text.validation:""
}
wimp_icon {
extent:232,-640,708,-588
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_WHITE
text.text:"Writable icon"
text.size:256
text.validation:"Pptr_write;Kta"
}
}
wimp_window {

View File

@ -833,7 +833,7 @@ wimp_window {
wimp_window {
template_name:"con_inter"
visible:1212,764,1956,1472
visible:1212,692,1956,1472
xscroll:0
yscroll:0
next:wimp_TOP
@ -846,7 +846,7 @@ wimp_window {
scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
highlight_bg:wimp_COLOUR_CREAM
extra_flags:
extent:0,-708,744,0
extent:0,-780,744,0
title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | 0x27000000
work_flags:
sprite_area:&1
@ -964,7 +964,7 @@ wimp_window {
text_and_sprite.validation:"Soptoff,opton"
}
wimp_icon {
extent:24,-676,188,-624
extent:24,-748,188,-696
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -974,7 +974,7 @@ wimp_window {
text.validation:"R5,3"
}
wimp_icon {
extent:360,-676,524,-624
extent:360,-748,524,-696
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -984,7 +984,7 @@ wimp_window {
text.validation:"R5,3"
}
wimp_icon {
extent:540,-684,724,-616
extent:540,-756,724,-688
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -994,7 +994,7 @@ wimp_window {
text.validation:"R6,3"
}
wimp_icon {
extent:16,-592,728,-496
extent:16,-664,728,-496
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
@ -1023,6 +1023,26 @@ wimp_window {
text_and_sprite.size:*
text_and_sprite.validation:"Soptoff,opton"
}
wimp_icon {
extent:28,-640,232,-588
icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
text.text:"Hotlist path"
text.size:*
text.validation:""
}
wimp_icon {
extent:232,-640,708,-588
icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_WHITE
text.text:"Writable icon"
text.size:256
text.validation:"Pptr_write;Kta"
}
}
wimp_window {