~ubuntu-branches/ubuntu/feisty/xarchiver/feisty

« back to all changes in this revision

Viewing changes to src/callbacks.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2006-03-12 09:45:00 UTC
  • Revision ID: james.westby@ubuntu.com-20060312094500-e1m5oxiyro0xfj3a
Tags: upstream-0.3.1
ImportĀ upstreamĀ versionĀ 0.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Xarchiver
 
3
 *
 
4
 *  Copyright (C) 2005 Giuseppe Torelli - Colossus
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
 
19
 */
 
20
 
 
21
#ifndef CALLBACK_H
 
22
#define CALLBACK_H
 
23
 
 
24
#include <gtk/gtk.h>
 
25
#include <errno.h>
 
26
#include <sys/wait.h>
 
27
#include <stdlib.h>
 
28
#include <string.h>
 
29
#include "zip.h"
 
30
#include "rar.h"
 
31
#include "bzip2.h"
 
32
#include "gzip.h"
 
33
 
 
34
enum {inactive,add,delete,extract} action;
 
35
int response, CurrentArchiveType;
 
36
int input_fd , output_fd,error_fd,child_pid, x, child_status;
 
37
gboolean archive_error , done , bz_gz , PasswordProtectedArchive;
 
38
gulong compressor_pid;
 
39
GtkWidget *dialog , *textview, *textview1, *scrollwin, *vbox, *OutputWindow , *File_Selector , *extract_window, *pwd_window, *password_entry , *repeat_password, *view_window;
 
40
GtkTextBuffer *textbuf , *viewtextbuf;
 
41
GtkTextIter enditer , start, end;
 
42
GtkTextIter viewenditer, viewstart, viewend;
 
43
GtkListStore *liststore;
 
44
GtkTreeIter iter;
 
45
GtkCellRenderer *renderer;
 
46
GtkTreeViewColumn *column;
 
47
gchar *path , *title , *password, *ComboArchiveType;
 
48
gchar *extract_path;
 
49
GtkTreeModel *model;
 
50
GString *names;
 
51
 
 
52
struct File_Chooser_Data
 
53
{
 
54
    GtkListStore *ls;
 
55
    GtkTreeView *tv;
 
56
    GtkFileChooser *fc;
 
57
};
 
58
 
 
59
void on_new1_activate (GtkMenuItem *menuitem, gpointer user_data);
 
60
void on_open1_activate (GtkMenuItem *menuitem, gpointer user_data );
 
61
void on_quit1_activate (GtkMenuItem *menuitem, gpointer user_data);
 
62
void on_delete1_activate (GtkMenuItem *menuitem, gpointer user_data);
 
63
void on_about1_activate (GtkMenuItem *menuitem, gpointer user_data);
 
64
void on_options1_activate (GtkMenuItem *menuitem, gpointer user_data);
 
65
void on_extract1_activate ( GtkMenuItem *menuitem, gpointer user_data);
 
66
void Show_pwd_Window ( GtkMenuItem *menuitem, gpointer user_data);
 
67
void View_File_Window ( GtkMenuItem *menuitem , gpointer user_data);
 
68
void on_add_files_activate ( GtkMenuItem *menuitem, gpointer user_data );
 
69
void on_New_button_clicked (GtkToolButton   *toolbutton, gpointer user_data);
 
70
void Activate_buttons();
 
71
 
 
72
char *Show_File_Dialog (int dummy , gpointer title);
 
73
GSList *Add_File_Dialog ( gchar *mode );
 
74
GIOChannel *SetIOChannel (gint fd, GIOCondition cond, GIOFunc func, gpointer data);
 
75
GIOChannel *SetIOChannelEncondingNULL (gint fd, GIOCondition cond, GIOFunc func, gpointer data);
 
76
int ShowGtkMessageDialog ( GtkWindow *window, int mode,int type,int button, gchar *message);
 
77
gulong SpawnAsyncProcess (const gchar *command , gboolean ExitStatusFlag , gboolean input );
 
78
int DetectArchiveType ( gchar *path );
 
79
void RemoveColumnsListStore ();
 
80
void EmptyTextBuffer ();
 
81
void CreateListStore ( int nc, gchar *columns_names[] , GType columns_types[]);
 
82
void ShowShellOutput ();
 
83
GChildWatchFunc *ViewFileFromArchive (GPid pid , gint status , GString *data);
 
84
gboolean isTar ( FILE *ptr );
 
85
void ConcatenateFileNames (GtkTreeModel *model, GtkTreePath *treepath, GtkTreeIter *iter, GString *data);
 
86
void ConcatenateFileNames2 (gchar *filename , GString *data);
 
87
void ExtractAddDelete ( gchar *command );
 
88
gboolean GenOutput (GIOChannel *ioc, GIOCondition cond, gpointer data);
 
89
gboolean GenError (GIOChannel *ioc, GIOCondition cond, gpointer data);
 
90
gboolean DetectPasswordProtectedArchive ( int type , FILE *dummy_ptr , unsigned char magic[6]);
 
91
gchar *EscapeBadChars ( gchar *path );
 
92
int is_escaped_char(char c);
 
93
gchar *StripPathFromFilename ( gchar *name );
 
94
gchar *JoinPathArchiveName ( const gchar * , gchar * );
 
95
char *eat_spaces (char *line);
 
96
char *get_last_field (char *line,int last_field);
 
97
char **split_line (char *line,int n_fields);
 
98
void OffDeleteandViewButtons();
 
99
void OffTooltipPadlock();
 
100
gchar *ChooseCommandtoExecute ( gboolean full_path );
 
101
int CountCharacter ( gchar *string , int chr );
 
102
gchar *RemoveBackSlashes ( gchar *name);
 
103
void Update_StatusBar (gchar *msg);
 
104
void WaitExitStatus ( GPid child_pid , gchar *temp_file );
 
105
#endif
 
106