Check for updates

* Added check for updates when starting program
  * Configurable by user
pull/2/head
David Freese 2012-03-26 17:46:24 -05:00
rodzic 0d2e7c3cd9
commit 1779db5d89
6 zmienionych plików z 48 dodań i 10 usunięć

Wyświetl plik

@ -420,6 +420,13 @@ progdefaults.NagMe=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_check_for_updates=(Fl_Check_Button *)0;
static void cb_btn_check_for_updates(Fl_Check_Button* o, void*) {
progdefaults.check_for_updates = o->value();
progdefaults.changed = true;
}
Fl_Group *tabLogServer=(Fl_Group *)0;
Fl_Input *xmllogServerAddress=(Fl_Input *)0;
@ -3804,33 +3811,43 @@ Fl_Double_Window* ConfigureDialog() {
} // Fl_Check_Button* btn_rx_lowercase
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(2, 195, 496, 171, _("Exit prompts"));
{ Fl_Group* o = new Fl_Group(2, 195, 496, 114, _("Exit prompts"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_save_config_on_exit = new Fl_Check_Button(118, 274, 329, 20, _("Prompt to save Configuration"));
{ Fl_Check_Button* o = btn_save_config_on_exit = new Fl_Check_Button(37, 261, 233, 20, _("Prompt to save Configuration"));
btn_save_config_on_exit->down_box(FL_DOWN_BOX);
btn_save_config_on_exit->callback((Fl_Callback*)cb_btn_save_config_on_exit);
o->value(progdefaults.SaveConfig);
} // Fl_Check_Button* btn_save_config_on_exit
{ Fl_Check_Button* o = btn2_save_macros_on_exit = new Fl_Check_Button(118, 300, 305, 20, _("Prompt to save macro file"));
{ Fl_Check_Button* o = btn2_save_macros_on_exit = new Fl_Check_Button(37, 287, 233, 20, _("Prompt to save macro file"));
btn2_save_macros_on_exit->tooltip(_("Write current macro set on program exit"));
btn2_save_macros_on_exit->down_box(FL_DOWN_BOX);
btn2_save_macros_on_exit->callback((Fl_Callback*)cb_btn2_save_macros_on_exit);
o->value(progdefaults.SaveMacros);
} // Fl_Check_Button* btn2_save_macros_on_exit
{ Fl_Check_Button* o = btn2NagMe = new Fl_Check_Button(118, 326, 236, 20, _("Prompt to save log"));
{ Fl_Check_Button* o = btn2NagMe = new Fl_Check_Button(279, 261, 166, 20, _("Prompt to save log"));
btn2NagMe->tooltip(_("Bug me about saving log entries"));
btn2NagMe->down_box(FL_DOWN_BOX);
btn2NagMe->callback((Fl_Callback*)cb_btn2NagMe);
o->value(progdefaults.NagMe);
} // Fl_Check_Button* btn2NagMe
{ Fl_Box* o = new Fl_Box(42, 219, 436, 47, _("Exit prompts active only when File/Exit menu item selected.\nNot active if wi\
{ Fl_Box* o = new Fl_Box(42, 211, 436, 47, _("Exit prompts active only when File/Exit menu item selected.\nNot active if wi\
ndow decoration close button pressed."));
o->box(FL_BORDER_BOX);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(2, 311, 496, 56, _("Check for updates"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_check_for_updates = new Fl_Check_Button(37, 335, 324, 20, _("Check for updates when starting program"));
btn_check_for_updates->down_box(FL_DOWN_BOX);
btn_check_for_updates->callback((Fl_Callback*)cb_btn_check_for_updates);
o->value(progdefaults.check_for_updates);
} // Fl_Check_Button* btn_check_for_updates
o->end();
} // Fl_Group* o
tabUserInterface->end();
} // Fl_Group* tabUserInterface
{ tabLogServer = new Fl_Group(0, 50, 500, 320, _("Logging"));

Wyświetl plik

@ -558,13 +558,13 @@ progdefaults.changed = true;}
}
Fl_Group {} {
label {Exit prompts} open
xywh {2 195 496 171} box ENGRAVED_FRAME align 21
xywh {2 195 496 114} box ENGRAVED_FRAME align 21
} {
Fl_Check_Button btn_save_config_on_exit {
label {Prompt to save Configuration}
callback {progdefaults.SaveConfig = o->value();
progdefaults.changed = true;}
xywh {118 274 329 20} down_box DOWN_BOX
xywh {37 261 233 20} down_box DOWN_BOX
code0 {o->value(progdefaults.SaveConfig);}
}
Fl_Check_Button btn2_save_macros_on_exit {
@ -572,7 +572,7 @@ progdefaults.changed = true;}
callback {btn_save_macros_on_exit->value(o->value());
progdefaults.SaveMacros = o->value();
progdefaults.changed = true;}
tooltip {Write current macro set on program exit} xywh {118 300 305 20} down_box DOWN_BOX
tooltip {Write current macro set on program exit} xywh {37 287 233 20} down_box DOWN_BOX
code0 {o->value(progdefaults.SaveMacros);}
}
Fl_Check_Button btn2NagMe {
@ -580,13 +580,25 @@ progdefaults.changed = true;}
callback {btnNagMe->value(o->value());
progdefaults.NagMe=o->value();
progdefaults.changed = true;}
tooltip {Bug me about saving log entries} xywh {118 326 236 20} down_box DOWN_BOX
tooltip {Bug me about saving log entries} xywh {279 261 166 20} down_box DOWN_BOX
code0 {o->value(progdefaults.NagMe);}
}
Fl_Box {} {
label {Exit prompts active only when File/Exit menu item selected.
Not active if window decoration close button pressed.}
xywh {42 219 436 47} box BORDER_BOX align 20
xywh {42 211 436 47} box BORDER_BOX align 20
}
}
Fl_Group {} {
label {Check for updates} open
xywh {2 311 496 56} box ENGRAVED_FRAME align 21
} {
Fl_Check_Button btn_check_for_updates {
label {Check for updates when starting program}
callback {progdefaults.check_for_updates = o->value();
progdefaults.changed = true;}
xywh {37 335 324 20} down_box DOWN_BOX
code0 {o->value(progdefaults.check_for_updates);}
}
}
}

Wyświetl plik

@ -73,6 +73,7 @@ extern Fl_Check_Button *btn_rx_lowercase;
extern Fl_Check_Button *btn_save_config_on_exit;
extern Fl_Check_Button *btn2_save_macros_on_exit;
extern Fl_Check_Button *btn2NagMe;
extern Fl_Check_Button *btn_check_for_updates;
extern Fl_Group *tabLogServer;
#include <FL/Fl_Input.H>
extern Fl_Input *xmllogServerAddress;

Wyświetl plik

@ -1257,6 +1257,9 @@
"Logbook server port", \
"8421") \
\
ELEM_(bool, check_for_updates, "CHECK_FOR_UPDATES", \
"Check for updates when starting program", \
false) \
/* XML-RPC/ARQ servers */ \
ELEM_(std::string, xmlrpc_address, "", "", "127.0.0.1") \
ELEM_(std::string, xmlrpc_port, "", "", "7362") \

Wyświetl plik

@ -319,4 +319,6 @@ extern void EQSL_close(void);
extern Fl_Double_Window *notify_window;
extern Fl_Double_Window *dxcc_window;
extern void cb_mnuCheckUpdate(Fl_Widget *, void *);
#endif

Wyświetl plik

@ -229,6 +229,9 @@ void delayed_startup(void *)
if (progdefaults.usepskrep)
if (!pskrep_start())
LOG_ERROR("Could not start PSK reporter: %s", pskrep_error());
if (progdefaults.check_for_updates)
cb_mnuCheckUpdate((Fl_Widget *)0, NULL);
}
int main(int argc, char ** argv)