GConfClient *gconf;
struct units output_units;
-#define GCONF_NAME(x) "/apps/diveclog/" #x
+#define GCONF_NAME(x) "/apps/subsurface/" #x
static int sortfn(const void *_a, const void *_b)
{
* This doesn't really report anything at all. We just sort the
* dives, the GUI does the reporting
*/
-static void report_dives(void)
+void report_dives(void)
{
int i;
}
}
-static void report_error(GError* error)
+void report_error(GError* error)
{
if (error == NULL)
{
{ "FileMenuAction", GTK_STOCK_FILE, "Log", NULL, NULL, NULL},
{ "OpenFile", GTK_STOCK_OPEN, NULL, "<control>O", NULL, G_CALLBACK(file_open) },
{ "SaveFile", GTK_STOCK_SAVE, NULL, "<control>S", NULL, G_CALLBACK(file_save) },
+ { "Print", GTK_STOCK_PRINT, NULL, "<control>P", NULL, G_CALLBACK(do_print) },
{ "Import", NULL, "Import", NULL, NULL, G_CALLBACK(import_dialog) },
{ "Units", NULL, "Units", NULL, NULL, G_CALLBACK(unit_dialog) },
{ "Renumber", NULL, "Renumber", NULL, NULL, G_CALLBACK(renumber_dialog) },
<menu name=\"FileMenu\" action=\"FileMenuAction\"> \
<menuitem name=\"Open\" action=\"OpenFile\" /> \
<menuitem name=\"Save\" action=\"SaveFile\" /> \
+ <menuitem name=\"Print\" action=\"Print\" /> \
<separator name=\"Separator1\"/> \
<menuitem name=\"Import\" action=\"Import\" /> \
<separator name=\"Separator2\"/> \
return menu;
}
+static void switch_page(GtkNotebook *notebook, gint arg1, gpointer user_data)
+{
+ repaint_dive();
+}
+
int main(int argc, char **argv)
{
int i;
/* Notebook for dive info vs profile vs .. */
notebook = gtk_notebook_new();
+ g_signal_connect(notebook, "switch-page", G_CALLBACK(switch_page), NULL);
gtk_box_pack_start(GTK_BOX(info_box), notebook, TRUE, TRUE, 6);
/* Frame for dive profile */