/*
  Cloned Xunzip
  Copyright (C) 1999 Tero Koskinen

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
*/

#include <stdio.h>
#include <config.h>

#include <string>
/*
#include <list> */

#include <glib.h>
#include <gnome.h>

#include "zip_wrapper.h"

#ifndef TK_APP_HH
#define TK_APP_HH

class App {
public:
	App(int read_config_file=1);
	~App();

	GtkWidget *app;
	GtkWidget *list;
	GtkWidget *filesel;
	GtkWidget *bar;

	int width;
	int height;

	int saveSize;
	int saveSizeTmp;
	//  int lowercaseFiles;
	//  int lowercaseFilesTmp;

	int readConfig;

	std::string tmpdir;

	GtkWidget *pBtn1;

	int selectedFile;
	int oneFile;

	void read_config(void);
	void write_config(void);

	ZipFile *zip;

	GtkWidget *dialog;
	GtkWidget *dialog_entry;
	GtkWidget *dialog_lcase_names_button;

private:
};

// void delete_dir(const char *dir);
void clear_list(App *app);
void add_to_list_current(gpointer data,gpointer user_data);
void add_to_list(App *app);
void list_errors(GSList *errors);
// char *parse_program(const char *data);
void create_view_dialog(App *app);
int open_file(const char *file,App *app);
void show_message(const char *msg);
void show_error(const char *msg,const char *file);
void show_error(const char *msg);
void destroy_file_selection(App *app);

#endif
