Logo Search packages:      
Sourcecode: taxbird version File versions

interface.c

/*
 * DO NOT EDIT THIS FILE - it is generated by Glade.
 */

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>

#include <bonobo.h>
#include <gnome.h>

#include "callbacks.h"
#include "interface.h"
#include "support.h"

#define GLADE_HOOKUP_OBJECT(component,widget,name) \
  g_object_set_data_full (G_OBJECT (component), name, \
    gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)

#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
  g_object_set_data (G_OBJECT (component), name, widget)

static GnomeUIInfo mnu_file_menu_uiinfo[] =
{
  GNOMEUIINFO_MENU_NEW_ITEM (N_("_New"), NULL, on_file_new_activate, NULL),
  GNOMEUIINFO_MENU_OPEN_ITEM (on_file_open_activate, NULL),
  GNOMEUIINFO_MENU_SAVE_ITEM (on_file_save_activate, NULL),
  GNOMEUIINFO_MENU_SAVE_AS_ITEM (on_file_saveas_activate, NULL),
  GNOMEUIINFO_MENU_CLOSE_ITEM (on_file_close_activate, NULL),
  GNOMEUIINFO_SEPARATOR,
  {
    GNOME_APP_UI_ITEM, N_("S_end Data ..."),
    NULL,
    (gpointer) on_file_send_activate, NULL, NULL,
    GNOME_APP_PIXMAP_STOCK, "gtk-convert",
    0, (GdkModifierType) 0, NULL
  },
  {
    GNOME_APP_UI_ITEM, N_("Send as _Testcase ..."),
    NULL,
    (gpointer) on_file_send_testcase_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  GNOMEUIINFO_SEPARATOR,
  GNOMEUIINFO_MENU_EXIT_ITEM (on_file_quit_activate, NULL),
  GNOMEUIINFO_END
};

static GnomeUIInfo mnu_help_menu_uiinfo[] =
{
  GNOMEUIINFO_MENU_ABOUT_ITEM (on_help_about_activate, NULL),
  GNOMEUIINFO_END
};

static GnomeUIInfo menubar_uiinfo[] =
{
  GNOMEUIINFO_MENU_FILE_TREE (mnu_file_menu_uiinfo),
  GNOMEUIINFO_MENU_HELP_TREE (mnu_help_menu_uiinfo),
  GNOMEUIINFO_END
};

GtkWidget*
create_taxbird (void)
{
  GtkWidget *taxbird;
  GdkPixbuf *taxbird_icon_pixbuf;
  GtkWidget *dock;
  GtkWidget *toolbar;
  GtkIconSize tmp_toolbar_icon_size;
  GtkWidget *toolbar_new;
  GtkWidget *toolbar_open;
  GtkWidget *toolbar_save;
  GtkWidget *toolbar_separator;
  GtkWidget *tmp_image;
  GtkWidget *toolbar_send_data;
  GtkWidget *hpane;
  GtkWidget *scroll_tv_sheets;
  GtkWidget *tv_sheets;
  GtkWidget *vpane;
  GtkWidget *scroll_values;
  GtkWidget *viewport;
  GtkWidget *lblSpacer;
  GtkWidget *helptext_scroll;
  GtkWidget *helptext_viewport;
  GtkWidget *helptext;
  GtkWidget *appbar;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  taxbird = gnome_app_new ("taxbird", _("taxbird"));
  gtk_window_set_default_size (GTK_WINDOW (taxbird), 800, 480);
  gtk_window_set_destroy_with_parent (GTK_WINDOW (taxbird), TRUE);
  taxbird_icon_pixbuf = create_pixbuf ("taxbird/taxbird.xpm");
  if (taxbird_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (taxbird), taxbird_icon_pixbuf);
      gdk_pixbuf_unref (taxbird_icon_pixbuf);
    }

  dock = GNOME_APP (taxbird)->dock;
  gtk_widget_show (dock);

  gnome_app_create_menus (GNOME_APP (taxbird), menubar_uiinfo);

  toolbar = gtk_toolbar_new ();
  gtk_widget_show (toolbar);
  gnome_app_add_toolbar (GNOME_APP (taxbird), GTK_TOOLBAR (toolbar), "toolbar",
                                BONOBO_DOCK_ITEM_BEH_EXCLUSIVE,
                                BONOBO_DOCK_TOP, 1, 0, 0);
  gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_BOTH);
  tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar));

  toolbar_new = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-new");
  gtk_widget_show (toolbar_new);
  gtk_container_add (GTK_CONTAINER (toolbar), toolbar_new);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbar_new), tooltips, _("New File"), NULL);

  toolbar_open = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-open");
  gtk_widget_show (toolbar_open);
  gtk_container_add (GTK_CONTAINER (toolbar), toolbar_open);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbar_open), tooltips, _("Open File"), NULL);

  toolbar_save = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-save");
  gtk_widget_show (toolbar_save);
  gtk_container_add (GTK_CONTAINER (toolbar), toolbar_save);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbar_save), tooltips, _("Save File"), NULL);

  toolbar_separator = (GtkWidget*) gtk_separator_tool_item_new ();
  gtk_widget_show (toolbar_separator);
  gtk_container_add (GTK_CONTAINER (toolbar), toolbar_separator);

  tmp_image = gtk_image_new_from_stock ("gtk-convert", tmp_toolbar_icon_size);
  gtk_widget_show (tmp_image);
  toolbar_send_data = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Send Data"));
  gtk_widget_show (toolbar_send_data);
  gtk_container_add (GTK_CONTAINER (toolbar), toolbar_send_data);

  hpane = gtk_hpaned_new ();
  gtk_widget_show (hpane);
  gnome_app_set_contents (GNOME_APP (taxbird), hpane);
  gtk_paned_set_position (GTK_PANED (hpane), 150);

  scroll_tv_sheets = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scroll_tv_sheets);
  gtk_paned_pack1 (GTK_PANED (hpane), scroll_tv_sheets, FALSE, TRUE);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll_tv_sheets), GTK_SHADOW_IN);

  tv_sheets = gtk_tree_view_new ();
  gtk_widget_show (tv_sheets);
  gtk_container_add (GTK_CONTAINER (scroll_tv_sheets), tv_sheets);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tv_sheets), FALSE);

  vpane = gtk_vpaned_new ();
  gtk_widget_show (vpane);
  gtk_paned_pack2 (GTK_PANED (hpane), vpane, TRUE, TRUE);
  gtk_paned_set_position (GTK_PANED (vpane), 320);

  scroll_values = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scroll_values);
  gtk_paned_pack1 (GTK_PANED (vpane), scroll_values, FALSE, TRUE);

  viewport = gtk_viewport_new (NULL, NULL);
  gtk_widget_show (viewport);
  gtk_container_add (GTK_CONTAINER (scroll_values), viewport);

  lblSpacer = gtk_label_new ("");
  gtk_widget_show (lblSpacer);
  gtk_container_add (GTK_CONTAINER (viewport), lblSpacer);

  helptext_scroll = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (helptext_scroll);
  gtk_paned_pack2 (GTK_PANED (vpane), helptext_scroll, TRUE, TRUE);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (helptext_scroll), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);

  helptext_viewport = gtk_viewport_new (NULL, NULL);
  gtk_widget_show (helptext_viewport);
  gtk_container_add (GTK_CONTAINER (helptext_scroll), helptext_viewport);
  gtk_container_set_border_width (GTK_CONTAINER (helptext_viewport), 3);
  gtk_viewport_set_shadow_type (GTK_VIEWPORT (helptext_viewport), GTK_SHADOW_ETCHED_OUT);

  helptext = gtk_label_new (_("<b><i>Thank you for using Taxbird!</i></b>"));
  gtk_widget_show (helptext);
  gtk_container_add (GTK_CONTAINER (helptext_viewport), helptext);
  gtk_label_set_use_markup (GTK_LABEL (helptext), TRUE);
  gtk_label_set_line_wrap (GTK_LABEL (helptext), TRUE);
  gtk_misc_set_alignment (GTK_MISC (helptext), 0, 0);
  gtk_misc_set_padding (GTK_MISC (helptext), 2, 2);

  appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
  gtk_widget_show (appbar);
  gnome_app_set_statusbar (GNOME_APP (taxbird), appbar);

  g_signal_connect ((gpointer) taxbird, "delete_event",
                    G_CALLBACK (on_file_close_activate),
                    NULL);
  g_signal_connect ((gpointer) taxbird, "configure_event",
                    G_CALLBACK (on_taxbird_configure),
                    NULL);
  gnome_app_install_menu_hints (GNOME_APP (taxbird), menubar_uiinfo);
  g_signal_connect ((gpointer) toolbar_new, "clicked",
                    G_CALLBACK (on_file_new_activate),
                    NULL);
  g_signal_connect ((gpointer) toolbar_open, "clicked",
                    G_CALLBACK (on_file_open_activate),
                    NULL);
  g_signal_connect ((gpointer) toolbar_save, "clicked",
                    G_CALLBACK (on_file_save_activate),
                    NULL);
  g_signal_connect ((gpointer) toolbar_send_data, "clicked",
                    G_CALLBACK (on_file_send_activate),
                    NULL);
  g_signal_connect ((gpointer) tv_sheets, "cursor_changed",
                    G_CALLBACK (on_tv_sheets_cursor_changed),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (taxbird, taxbird, "taxbird");
  GLADE_HOOKUP_OBJECT (taxbird, dock, "dock");
  GLADE_HOOKUP_OBJECT (taxbird, menubar_uiinfo[0].widget, "mnu_file");
  GLADE_HOOKUP_OBJECT (taxbird, mnu_file_menu_uiinfo[0].widget, "mnu_file_new");
  GLADE_HOOKUP_OBJECT (taxbird, mnu_file_menu_uiinfo[1].widget, "mnu_file_open");
  GLADE_HOOKUP_OBJECT (taxbird, mnu_file_menu_uiinfo[2].widget, "mnu_file_save");
  GLADE_HOOKUP_OBJECT (taxbird, mnu_file_menu_uiinfo[3].widget, "mnu_file_saveas");
  GLADE_HOOKUP_OBJECT (taxbird, mnu_file_menu_uiinfo[4].widget, "mnu_file_close");
  GLADE_HOOKUP_OBJECT (taxbird, mnu_file_menu_uiinfo[5].widget, "mnu_file_separator");
  GLADE_HOOKUP_OBJECT (taxbird, mnu_file_menu_uiinfo[6].widget, "mnu_file_send");
  GLADE_HOOKUP_OBJECT (taxbird, mnu_file_menu_uiinfo[7].widget, "mnu_file_send_as_testcase");
  GLADE_HOOKUP_OBJECT (taxbird, mnu_file_menu_uiinfo[8].widget, "trennlinie1");
  GLADE_HOOKUP_OBJECT (taxbird, mnu_file_menu_uiinfo[9].widget, "mnu_file_quit");
  GLADE_HOOKUP_OBJECT (taxbird, menubar_uiinfo[1].widget, "mnu_help");
  GLADE_HOOKUP_OBJECT (taxbird, mnu_help_menu_uiinfo[0].widget, "mnu_help_about");
  GLADE_HOOKUP_OBJECT (taxbird, toolbar, "toolbar");
  GLADE_HOOKUP_OBJECT (taxbird, toolbar_new, "toolbar_new");
  GLADE_HOOKUP_OBJECT (taxbird, toolbar_open, "toolbar_open");
  GLADE_HOOKUP_OBJECT (taxbird, toolbar_save, "toolbar_save");
  GLADE_HOOKUP_OBJECT (taxbird, toolbar_separator, "toolbar_separator");
  GLADE_HOOKUP_OBJECT (taxbird, toolbar_send_data, "toolbar_send_data");
  GLADE_HOOKUP_OBJECT (taxbird, hpane, "hpane");
  GLADE_HOOKUP_OBJECT (taxbird, scroll_tv_sheets, "scroll_tv_sheets");
  GLADE_HOOKUP_OBJECT (taxbird, tv_sheets, "tv_sheets");
  GLADE_HOOKUP_OBJECT (taxbird, vpane, "vpane");
  GLADE_HOOKUP_OBJECT (taxbird, scroll_values, "scroll_values");
  GLADE_HOOKUP_OBJECT (taxbird, viewport, "viewport");
  GLADE_HOOKUP_OBJECT (taxbird, lblSpacer, "lblSpacer");
  GLADE_HOOKUP_OBJECT (taxbird, helptext_scroll, "helptext_scroll");
  GLADE_HOOKUP_OBJECT (taxbird, helptext_viewport, "helptext_viewport");
  GLADE_HOOKUP_OBJECT (taxbird, helptext, "helptext");
  GLADE_HOOKUP_OBJECT (taxbird, appbar, "appbar");
  GLADE_HOOKUP_OBJECT_NO_REF (taxbird, tooltips, "tooltips");

  return taxbird;
}

GtkWidget*
create_dlgChooseTemplate (void)
{
  GtkWidget *dlgChooseTemplate;
  GtkWidget *vboxChooseTemplateDlg;
  GtkWidget *vboxTemplates;
  GtkWidget *lblTemplateDesc;
  GtkWidget *scrwTemplates;
  GtkWidget *lstTemplates;
  GtkWidget *dialog_action_area1;
  GtkWidget *cmdCancel;
  GtkWidget *cmdOK;

  dlgChooseTemplate = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (dlgChooseTemplate), _("Choose Base Template"));
  gtk_window_set_modal (GTK_WINDOW (dlgChooseTemplate), TRUE);
  gtk_window_set_default_size (GTK_WINDOW (dlgChooseTemplate), 480, 290);
  gtk_window_set_type_hint (GTK_WINDOW (dlgChooseTemplate), GDK_WINDOW_TYPE_HINT_DIALOG);

  vboxChooseTemplateDlg = GTK_DIALOG (dlgChooseTemplate)->vbox;
  gtk_widget_show (vboxChooseTemplateDlg);

  vboxTemplates = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vboxTemplates);
  gtk_box_pack_start (GTK_BOX (vboxChooseTemplateDlg), vboxTemplates, TRUE, TRUE, 0);

  lblTemplateDesc = gtk_label_new (_("Which template do you want to use as base for the new document?"));
  gtk_widget_show (lblTemplateDesc);
  gtk_box_pack_start (GTK_BOX (vboxTemplates), lblTemplateDesc, FALSE, TRUE, 15);
  gtk_label_set_justify (GTK_LABEL (lblTemplateDesc), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (lblTemplateDesc), TRUE);

  scrwTemplates = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrwTemplates);
  gtk_box_pack_start (GTK_BOX (vboxTemplates), scrwTemplates, TRUE, TRUE, 0);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrwTemplates), GTK_SHADOW_IN);

  lstTemplates = gtk_tree_view_new ();
  gtk_widget_show (lstTemplates);
  gtk_container_add (GTK_CONTAINER (scrwTemplates), lstTemplates);

  dialog_action_area1 = GTK_DIALOG (dlgChooseTemplate)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  cmdCancel = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cmdCancel);
  gtk_dialog_add_action_widget (GTK_DIALOG (dlgChooseTemplate), cmdCancel, GTK_RESPONSE_CANCEL);
  GTK_WIDGET_SET_FLAGS (cmdCancel, GTK_CAN_DEFAULT);

  cmdOK = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (cmdOK);
  gtk_dialog_add_action_widget (GTK_DIALOG (dlgChooseTemplate), cmdOK, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (cmdOK, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) lstTemplates, "button_press_event",
                    G_CALLBACK (on_templates_button_press_event),
                    NULL);
  g_signal_connect_swapped ((gpointer) cmdCancel, "clicked",
                            G_CALLBACK (gtk_widget_destroy),
                            GTK_OBJECT (dlgChooseTemplate));
  g_signal_connect ((gpointer) cmdOK, "clicked",
                    G_CALLBACK (on_choose_template_OK_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (dlgChooseTemplate, dlgChooseTemplate, "dlgChooseTemplate");
  GLADE_HOOKUP_OBJECT_NO_REF (dlgChooseTemplate, vboxChooseTemplateDlg, "vboxChooseTemplateDlg");
  GLADE_HOOKUP_OBJECT (dlgChooseTemplate, vboxTemplates, "vboxTemplates");
  GLADE_HOOKUP_OBJECT (dlgChooseTemplate, lblTemplateDesc, "lblTemplateDesc");
  GLADE_HOOKUP_OBJECT (dlgChooseTemplate, scrwTemplates, "scrwTemplates");
  GLADE_HOOKUP_OBJECT (dlgChooseTemplate, lstTemplates, "lstTemplates");
  GLADE_HOOKUP_OBJECT_NO_REF (dlgChooseTemplate, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (dlgChooseTemplate, cmdCancel, "cmdCancel");
  GLADE_HOOKUP_OBJECT (dlgChooseTemplate, cmdOK, "cmdOK");

  gtk_widget_grab_default (cmdOK);
  return dlgChooseTemplate;
}

GtkWidget*
create_dlgChooseFile (void)
{
  GtkWidget *dlgChooseFile;
  GtkWidget *vboxChooseFile;
  GtkWidget *dialog_action_area2;
  GtkWidget *cmdCancel;
  GtkWidget *cmdOK;

  dlgChooseFile = gtk_file_chooser_dialog_new (_("taxbird - Choose File"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, NULL);
  gtk_window_set_modal (GTK_WINDOW (dlgChooseFile), TRUE);
  gtk_window_set_type_hint (GTK_WINDOW (dlgChooseFile), GDK_WINDOW_TYPE_HINT_DIALOG);

  vboxChooseFile = GTK_DIALOG (dlgChooseFile)->vbox;
  gtk_widget_show (vboxChooseFile);

  dialog_action_area2 = GTK_DIALOG (dlgChooseFile)->action_area;
  gtk_widget_show (dialog_action_area2);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END);

  cmdCancel = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cmdCancel);
  gtk_dialog_add_action_widget (GTK_DIALOG (dlgChooseFile), cmdCancel, GTK_RESPONSE_CANCEL);
  GTK_WIDGET_SET_FLAGS (cmdCancel, GTK_CAN_DEFAULT);

  cmdOK = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (cmdOK);
  gtk_dialog_add_action_widget (GTK_DIALOG (dlgChooseFile), cmdOK, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (cmdOK, GTK_CAN_DEFAULT);

  g_signal_connect_swapped ((gpointer) cmdCancel, "clicked",
                            G_CALLBACK (gtk_widget_destroy),
                            GTK_OBJECT (dlgChooseFile));
  g_signal_connect ((gpointer) cmdOK, "clicked",
                    G_CALLBACK (on_choose_file_OK_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (dlgChooseFile, dlgChooseFile, "dlgChooseFile");
  GLADE_HOOKUP_OBJECT_NO_REF (dlgChooseFile, vboxChooseFile, "vboxChooseFile");
  GLADE_HOOKUP_OBJECT_NO_REF (dlgChooseFile, dialog_action_area2, "dialog_action_area2");
  GLADE_HOOKUP_OBJECT (dlgChooseFile, cmdCancel, "cmdCancel");
  GLADE_HOOKUP_OBJECT (dlgChooseFile, cmdOK, "cmdOK");

  gtk_widget_grab_default (cmdOK);
  return dlgChooseFile;
}

GtkWidget*
create_aboutTaxBird (void)
{
  const gchar *authors[] = {
    "Stefan Siegl <stesie@brokenpipe.de>",
    NULL
  };
  const gchar *documenters[] = { NULL };
  /* TRANSLATORS: Replace this string with your names, one name per line. */
  gchar *translators = _("translator_credits");
  GdkPixbuf *aboutTaxBird_logo_pixbuf;
  GtkWidget *aboutTaxBird;

  if (!strcmp (translators, "translator_credits"))
    translators = NULL;
  aboutTaxBird_logo_pixbuf = create_pixbuf ("taxbird/taxbird-logo-3.png");
  aboutTaxBird = gnome_about_new ("taxbird", VERSION,
                        _("(C) 2004,2005,2006,2007 Stefan Siegl"),
                        _("taxbird is a geier-based tax declarations capturing and transfer tool (for Germany) "),
                        authors,
                        documenters,
                        translators,
                        aboutTaxBird_logo_pixbuf);
  gtk_container_set_border_width (GTK_CONTAINER (aboutTaxBird), 5);
  gtk_window_set_type_hint (GTK_WINDOW (aboutTaxBird), GDK_WINDOW_TYPE_HINT_DIALOG);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (aboutTaxBird, aboutTaxBird, "aboutTaxBird");

  return aboutTaxBird;
}

GtkWidget*
create_dlgExportConfirmation (void)
{
  GtkWidget *dlgExportConfirmation;
  GtkWidget *druid;
  GtkWidget *druid_page_start;
  GtkWidget *druid_page_review;
  GtkWidget *review_vbox;
  GtkWidget *scroll_htmlview;
  GtkWidget *htmlview;
  GtkWidget *druid_page_store_xml;
  GtkWidget *store_vbox;
  GtkWidget *store_table;
  GtkWidget *store;
  GtkWidget *store_label_filename;
  GtkWidget *store_fileentry;
  GtkWidget *store_entry;
  GtkWidget *druidpagestandard1;
  GtkWidget *druid_vbox4;
  GtkWidget *table1;
  GtkWidget *dsig;
  GtkWidget *label5;
  GtkWidget *dsig_fileentry;
  GtkWidget *dsig_fileentry_text;
  GtkWidget *label6;
  GtkWidget *dsig_pincode;
  GtkWidget *druid_page_send;
  GtkWidget *send_vbox;
  GtkWidget *send;
  GtkWidget *send_frame_protocol;
  GtkWidget *send_frame_align;
  GtkWidget *send_frame_table;
  GtkWidget *protocol_print_command;
  GtkWidget *blank1;
  GtkWidget *label4;
  GtkWidget *protocol_store_fileentry;
  GtkWidget *protocol_store_fileentry_text;
  GtkWidget *protocol_print;
  GtkWidget *protocol_store;
  GtkWidget *send_frame_label;
  GtkWidget *druid_page_finish;

  dlgExportConfirmation = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (dlgExportConfirmation), _("taxbird - Send Data"));
  gtk_window_set_type_hint (GTK_WINDOW (dlgExportConfirmation), GDK_WINDOW_TYPE_HINT_DIALOG);

  druid = gnome_druid_new ();
  gtk_widget_show (druid);
  gtk_container_add (GTK_CONTAINER (dlgExportConfirmation), druid);
  gtk_container_set_border_width (GTK_CONTAINER (druid), 4);

  druid_page_start = gnome_druid_page_edge_new (GNOME_EDGE_START);
  gtk_widget_show (druid_page_start);
  gnome_druid_append_page (GNOME_DRUID (druid),
                           GNOME_DRUID_PAGE (druid_page_start));
  gnome_druid_page_edge_set_title (GNOME_DRUID_PAGE_EDGE (druid_page_start), _("taxbird - Send Data Druid ..."));
  gnome_druid_page_edge_set_text (GNOME_DRUID_PAGE_EDGE (druid_page_start), _("As you probably know, Taxbird is currently somewhat in beta (or maybe even alpha-alike) state. Therefore it may happen, that generated export data is somewhat incorrect.\n\nIn order to be sure, there are no differences between the data you want to send and the data that is actually sent, you can review the collected data on the following sheet (which is the output of an XSLT transformation with stylesheets being provided by the Inland Revenue Office).\n\nIn case there are differences, click the cancel button and apply the needed changes. If there is a bug in Taxbird, please consider asking the taxbird@taxbird.de mailing list for help.\n\nPlease mind furthermore, that you need to file a declaration of participation before the inland revenue office will accept data that was sent using Taxbird."));

  druid_page_review = gnome_druid_page_standard_new ();
  gtk_widget_show_all (druid_page_review);
  gnome_druid_append_page (GNOME_DRUID (druid),
                           GNOME_DRUID_PAGE (druid_page_review));
  gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (druid_page_review), _("Please review the gathered data ..."));

  review_vbox = GNOME_DRUID_PAGE_STANDARD (druid_page_review)->vbox;
  gtk_widget_show (review_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (review_vbox), 16);

  scroll_htmlview = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scroll_htmlview);
  gtk_box_pack_start (GTK_BOX (review_vbox), scroll_htmlview, TRUE, TRUE, 0);

  htmlview = htmlview_create ("htmlview", "", "", 0, 0);
  gtk_widget_show (htmlview);
  gtk_container_add (GTK_CONTAINER (scroll_htmlview), htmlview);
  GTK_WIDGET_UNSET_FLAGS (htmlview, GTK_CAN_FOCUS);
  GTK_WIDGET_UNSET_FLAGS (htmlview, GTK_CAN_DEFAULT);

  druid_page_store_xml = gnome_druid_page_standard_new ();
  gtk_widget_show_all (druid_page_store_xml);
  gnome_druid_append_page (GNOME_DRUID (druid),
                           GNOME_DRUID_PAGE (druid_page_store_xml));
  gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (druid_page_store_xml), _("Store gathered data to XML File?"));

  store_vbox = GNOME_DRUID_PAGE_STANDARD (druid_page_store_xml)->vbox;
  gtk_widget_show (store_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (store_vbox), 16);

  store_table = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (store_table);
  gtk_box_pack_start (GTK_BOX (store_vbox), store_table, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (store_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (store_table), 10);
  gtk_table_set_col_spacings (GTK_TABLE (store_table), 6);

  store = gtk_check_button_new_with_mnemonic (_("Save exported data to a Coala-XML File?"));
  gtk_widget_show (store);
  gtk_table_attach (GTK_TABLE (store_table), store, 0, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  store_label_filename = gtk_label_new (_("Filename:"));
  gtk_widget_show (store_label_filename);
  gtk_table_attach (GTK_TABLE (store_table), store_label_filename, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (store_label_filename), 1, 0.5);

  store_fileentry = gnome_file_entry_new (NULL, _("Save Elster XML document"));
  gtk_widget_show (store_fileentry);
  gtk_table_attach (GTK_TABLE (store_table), store_fileentry, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  g_object_set (G_OBJECT (store_fileentry),
                "use_filechooser", TRUE,
                "filechooser_action", GTK_FILE_CHOOSER_ACTION_SAVE,
                NULL);

  store_entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (store_fileentry));
  gtk_widget_show (store_entry);

  druidpagestandard1 = gnome_druid_page_standard_new ();
  gtk_widget_show_all (druidpagestandard1);
  gnome_druid_append_page (GNOME_DRUID (druid),
                           GNOME_DRUID_PAGE (druidpagestandard1));
  gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (druidpagestandard1), _("Digitally Sign XML Document?"));

  druid_vbox4 = GNOME_DRUID_PAGE_STANDARD (druidpagestandard1)->vbox;
  gtk_widget_show (druid_vbox4);
  gtk_container_set_border_width (GTK_CONTAINER (druid_vbox4), 16);

  table1 = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (table1);
  gtk_box_pack_start (GTK_BOX (druid_vbox4), table1, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (table1), 5);
  gtk_table_set_row_spacings (GTK_TABLE (table1), 10);
  gtk_table_set_col_spacings (GTK_TABLE (table1), 6);

  dsig = gtk_check_button_new_with_mnemonic (_("Digitally Sign Elster XML Document"));
  gtk_widget_show (dsig);
  gtk_table_attach (GTK_TABLE (table1), dsig, 0, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label5 = gtk_label_new (_("SoftPSE-Filename:"));
  gtk_widget_show (label5);
  gtk_table_attach (GTK_TABLE (table1), label5, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5);

  dsig_fileentry = gnome_file_entry_new (NULL, _("Choose Software Certificate File"));
  gtk_widget_show (dsig_fileentry);
  gtk_table_attach (GTK_TABLE (table1), dsig_fileentry, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  g_object_set (G_OBJECT (dsig_fileentry),
                "use_filechooser", TRUE,
                "filechooser_action", GTK_FILE_CHOOSER_ACTION_OPEN,
                NULL);

  dsig_fileentry_text = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (dsig_fileentry));
  gtk_widget_show (dsig_fileentry_text);

  label6 = gtk_label_new (_("PIN-Code:"));
  gtk_widget_show (label6);
  gtk_table_attach (GTK_TABLE (table1), label6, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);

  dsig_pincode = gtk_entry_new ();
  gtk_widget_show (dsig_pincode);
  gtk_table_attach (GTK_TABLE (table1), dsig_pincode, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_entry_set_visibility (GTK_ENTRY (dsig_pincode), FALSE);

  druid_page_send = gnome_druid_page_standard_new ();
  gtk_widget_show_all (druid_page_send);
  gnome_druid_append_page (GNOME_DRUID (druid),
                           GNOME_DRUID_PAGE (druid_page_send));
  gnome_druid_page_standard_set_title (GNOME_DRUID_PAGE_STANDARD (druid_page_send), _("Send the data to the IRO?"));

  send_vbox = GNOME_DRUID_PAGE_STANDARD (druid_page_send)->vbox;
  gtk_widget_show (send_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (send_vbox), 16);

  send = gtk_check_button_new_with_mnemonic (_("Call GEIER to send the gathered data to the inland revenue office"));
  gtk_widget_show (send);
  gtk_box_pack_start (GTK_BOX (send_vbox), send, FALSE, FALSE, 0);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (send), TRUE);

  send_frame_protocol = gtk_frame_new (NULL);
  gtk_widget_show (send_frame_protocol);
  gtk_box_pack_start (GTK_BOX (send_vbox), send_frame_protocol, TRUE, TRUE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (send_frame_protocol), GTK_SHADOW_NONE);

  send_frame_align = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (send_frame_align);
  gtk_container_add (GTK_CONTAINER (send_frame_protocol), send_frame_align);
  gtk_alignment_set_padding (GTK_ALIGNMENT (send_frame_align), 0, 0, 12, 0);

  send_frame_table = gtk_table_new (4, 2, FALSE);
  gtk_widget_show (send_frame_table);
  gtk_container_add (GTK_CONTAINER (send_frame_align), send_frame_table);
  gtk_table_set_row_spacings (GTK_TABLE (send_frame_table), 6);
  gtk_table_set_col_spacings (GTK_TABLE (send_frame_table), 25);

  protocol_print_command = gtk_entry_new ();
  gtk_widget_show (protocol_print_command);
  gtk_table_attach (GTK_TABLE (send_frame_table), protocol_print_command, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_entry_set_text (GTK_ENTRY (protocol_print_command), "taxbird-print-helper");

  blank1 = gtk_label_new ("");
  gtk_widget_show (blank1);
  gtk_table_attach (GTK_TABLE (send_frame_table), blank1, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (blank1), 0, 0.5);

  label4 = gtk_label_new ("");
  gtk_widget_show (label4);
  gtk_table_attach (GTK_TABLE (send_frame_table), label4, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);

  protocol_store_fileentry = gnome_file_entry_new (NULL, NULL);
  gtk_widget_show (protocol_store_fileentry);
  gtk_table_attach (GTK_TABLE (send_frame_table), protocol_store_fileentry, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  g_object_set (G_OBJECT (protocol_store_fileentry),
                "use_filechooser", TRUE,
                "filechooser_action", GTK_FILE_CHOOSER_ACTION_SAVE,
                NULL);

  protocol_store_fileentry_text = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (protocol_store_fileentry));
  gtk_widget_show (protocol_store_fileentry_text);

  protocol_print = gtk_check_button_new_with_mnemonic (_("Print Transmission Protocol using:"));
  gtk_widget_show (protocol_print);
  gtk_table_attach (GTK_TABLE (send_frame_table), protocol_print, 0, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (protocol_print), TRUE);

  protocol_store = gtk_check_button_new_with_mnemonic (_("Store Transmission Protocol to the following file:"));
  gtk_widget_show (protocol_store);
  gtk_table_attach (GTK_TABLE (send_frame_table), protocol_store, 0, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (protocol_store), TRUE);

  send_frame_label = gtk_label_new (_("<b>Transmission Protocol ...</b>"));
  gtk_widget_show (send_frame_label);
  gtk_frame_set_label_widget (GTK_FRAME (send_frame_protocol), send_frame_label);
  gtk_label_set_use_markup (GTK_LABEL (send_frame_label), TRUE);

  druid_page_finish = gnome_druid_page_edge_new (GNOME_EDGE_FINISH);
  gtk_widget_show (druid_page_finish);
  gnome_druid_append_page (GNOME_DRUID (druid),
                           GNOME_DRUID_PAGE (druid_page_finish));
  gnome_druid_page_edge_set_title (GNOME_DRUID_PAGE_EDGE (druid_page_finish), _("taxbird - Send Data Druid ..."));
  gnome_druid_page_edge_set_text (GNOME_DRUID_PAGE_EDGE (druid_page_finish), _("Finally all data has been gathered, in order to send the data to the inland revenue office. \n\nIn order to do so now, please make sure, your internet connection is properly set up and hit the \"Apply\" button.\n\nIf you want to make any more changes to the document, hit \"Cancel\" and do so now. To change what you have selected in this druid, just hit the the button called \"Back\".\n\n\n\nThank you for using Taxbird!"));

  g_signal_connect ((gpointer) dlgExportConfirmation, "delete_event",
                    G_CALLBACK (on_export_druid_cancel),
                    NULL);
  g_signal_connect ((gpointer) druid, "cancel",
                    G_CALLBACK (on_export_druid_cancel),
                    NULL);
  g_signal_connect ((gpointer) druid_page_finish, "finish",
                    G_CALLBACK (on_export_druid_finish),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (dlgExportConfirmation, dlgExportConfirmation, "dlgExportConfirmation");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, druid, "druid");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, druid_page_start, "druid_page_start");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, druid_page_review, "druid_page_review");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, review_vbox, "review_vbox");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, scroll_htmlview, "scroll_htmlview");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, htmlview, "htmlview");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, druid_page_store_xml, "druid_page_store_xml");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, store_vbox, "store_vbox");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, store_table, "store_table");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, store, "store");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, store_label_filename, "store_label_filename");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, store_fileentry, "store_fileentry");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, store_entry, "store_entry");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, druidpagestandard1, "druidpagestandard1");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, druid_vbox4, "druid_vbox4");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, table1, "table1");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, dsig, "dsig");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, label5, "label5");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, dsig_fileentry, "dsig_fileentry");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, dsig_fileentry_text, "dsig_fileentry_text");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, label6, "label6");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, dsig_pincode, "dsig_pincode");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, druid_page_send, "druid_page_send");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, send_vbox, "send_vbox");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, send, "send");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, send_frame_protocol, "send_frame_protocol");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, send_frame_align, "send_frame_align");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, send_frame_table, "send_frame_table");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, protocol_print_command, "protocol_print_command");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, blank1, "blank1");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, label4, "label4");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, protocol_store_fileentry, "protocol_store_fileentry");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, protocol_store_fileentry_text, "protocol_store_fileentry_text");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, protocol_print, "protocol_print");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, protocol_store, "protocol_store");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, send_frame_label, "send_frame_label");
  GLADE_HOOKUP_OBJECT (dlgExportConfirmation, druid_page_finish, "druid_page_finish");

  return dlgExportConfirmation;
}


Generated by  Doxygen 1.6.0   Back to index