extractor-gtk-cvslog Mailing List for Obscure-Extractor-GTK (Page 5)
Extract files from unusual archive formats
Brought to you by:
someone-guy
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(8) |
Sep
(19) |
Oct
(1) |
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
(19) |
Mar
(6) |
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(31) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <som...@us...> - 2007-08-30 10:56:31
|
Revision: 25
http://extractor-gtk.svn.sourceforge.net/extractor-gtk/?rev=25&view=rev
Author: someone-guy
Date: 2007-08-30 03:56:28 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Some refactoring
Modified Paths:
--------------
trunk/extractor/generic.c
Modified: trunk/extractor/generic.c
===================================================================
--- trunk/extractor/generic.c 2007-08-30 10:56:22 UTC (rev 24)
+++ trunk/extractor/generic.c 2007-08-30 10:56:28 UTC (rev 25)
@@ -17,6 +17,15 @@
return 0;
}
+static void add_entry(file_t **list, int cnt, char *ext) {
+ file_t *l = *list;
+ l = realloc(l, (cnt + 2) * sizeof(file_t));
+ memset(&l[cnt + 1], 0, sizeof(file_t));
+ l[cnt].name = malloc(50);
+ snprintf(l[cnt].name, 50, "%i.%s", cnt, ext);
+ *list = l;
+}
+
static file_t *get_list(FILE *in) {
register uint32_t t = 0;
int cnt = 0;
@@ -26,23 +35,17 @@
t = t << 8 | fgetc(in);
switch (t) {
case TAG('R', 'I', 'F', 'F'):
- list = realloc(list, (cnt + 2) * sizeof(file_t));
- memset(&list[cnt + 1], 0, sizeof(file_t));
+ add_entry(&list, cnt, "riff");
list[cnt].start = ftell(in) - 4;
list[cnt].len = read_le32(in);
- list[cnt].name = malloc(50);
- snprintf(list[cnt].name, 50, "%i.riff", cnt);
cnt++;
break;
}
switch (t & 0xffff) {
case TAG(' ', ' ', 'B', 'M') & 0xffff:
- list = realloc(list, (cnt + 2) * sizeof(file_t));
- memset(&list[cnt + 1], 0, sizeof(file_t));
+ add_entry(&list, cnt, "bmp");
list[cnt].start = ftell(in) - 2;
list[cnt].len = read_le32(in);
- list[cnt].name = malloc(50);
- snprintf(list[cnt].name, 50, "%i.bmp", cnt);
cnt++;
break;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <som...@us...> - 2007-08-01 02:44:21
|
Revision: 23
http://extractor-gtk.svn.sourceforge.net/extractor-gtk/?rev=23&view=rev
Author: someone-guy
Date: 2007-07-31 19:44:18 -0700 (Tue, 31 Jul 2007)
Log Message:
-----------
Support for Wing Commander IV .tre files
Modified Paths:
--------------
trunk/extractor/Makefile
trunk/extractor/extractor.c
trunk/extractor/formats.h
Added Paths:
-----------
trunk/extractor/xtre.c
Modified: trunk/extractor/Makefile
===================================================================
--- trunk/extractor/Makefile 2007-08-01 02:36:56 UTC (rev 22)
+++ trunk/extractor/Makefile 2007-08-01 02:44:18 UTC (rev 23)
@@ -3,6 +3,7 @@
MODULES=nwn.c \
homeworld2.c \
bloodrayne.c \
+ xtre.c \
generic.c \
all: extractor
Modified: trunk/extractor/extractor.c
===================================================================
--- trunk/extractor/extractor.c 2007-08-01 02:36:56 UTC (rev 22)
+++ trunk/extractor/extractor.c 2007-08-01 02:44:18 UTC (rev 23)
@@ -21,6 +21,7 @@
&nwn_fmt,
&homeworld2_fmt,
&bloodrayne_fmt,
+ &xtre_fmt,
&generic_fmt,
NULL
};
Modified: trunk/extractor/formats.h
===================================================================
--- trunk/extractor/formats.h 2007-08-01 02:36:56 UTC (rev 22)
+++ trunk/extractor/formats.h 2007-08-01 02:44:18 UTC (rev 23)
@@ -24,6 +24,7 @@
extern fmt_desc_t nwn_fmt;
extern fmt_desc_t homeworld2_fmt;
extern fmt_desc_t bloodrayne_fmt;
+extern fmt_desc_t xtre_fmt;
extern fmt_desc_t generic_fmt;
#endif
Added: trunk/extractor/xtre.c
===================================================================
--- trunk/extractor/xtre.c (rev 0)
+++ trunk/extractor/xtre.c 2007-08-01 02:44:18 UTC (rev 23)
@@ -0,0 +1,77 @@
+/**
+ * \file xtre.c
+ * \brief routines for handling the Wing Commander IV archive files
+ *
+ * Copyright (C) 2007 Reimar Döffinger
+ * License: GPL v2 (see LICENSE file)
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <inttypes.h>
+#include "formats.h"
+#include "helpers.h"
+
+//! check for xtre archive
+static int check_file(FILE *in) {
+ char sig[5] = {0};
+ rewind(in);
+ fread(sig, 4, 1, in);
+ return (strcmp(sig, "XTRE") == 0);
+}
+
+static file_t *get_list(FILE *in) {
+ file_t *list;
+ uint32_t count, tblpos, tblend;
+ int i;
+ fseek(in, 0x10, SEEK_SET);
+ tblpos = read_le32(in);
+ tblend = read_le32(in);
+ if (tblend < tblpos) count = 0;
+ else count = (tblend - tblpos) / 8;
+ list = calloc(count + 1, sizeof(file_t));
+ for (i = 0; i < count; i++) {
+ uint32_t sig;
+ char *formatstr;
+ fseek(in, tblpos + 8 * i, SEEK_SET);
+ list[i].start = read_le32(in);
+ list[i].len = read_le32(in);
+ fseek(in, list[i].start, SEEK_SET);
+ sig = read_be32(in);
+ switch (sig) {
+ case TAG('R', 'I', 'F', 'F'):
+ fseek(in, 4, SEEK_CUR);
+ sig = read_be32(in);
+ switch (sig) {
+ case TAG('W', 'A', 'V', 'E'):
+ formatstr = "%i.wav";
+ break;
+ case TAG('A', 'V', 'I', ' '):
+ formatstr = "%i.avi";
+ break;
+ default:
+ formatstr = "%i.riff";
+ }
+ break;
+ case TAG('F', 'O', 'R', 'M'):
+ formatstr = "%i.frm";
+ break;
+ default:
+ formatstr = "%i.bin";
+ }
+ list[i].name = malloc(50);
+ snprintf(list[i].name, 50, formatstr, i);
+ }
+ return list;
+}
+
+fmt_desc_t xtre_fmt = {
+ "Wing Commander IV",
+ "Wing Commander IV (*.tre)",
+ "*.tre",
+ check_file,
+ get_list,
+ default_free_list,
+ default_extract_file,
+};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <som...@us...> - 2007-08-01 02:37:00
|
Revision: 22
http://extractor-gtk.svn.sourceforge.net/extractor-gtk/?rev=22&view=rev
Author: someone-guy
Date: 2007-07-31 19:36:56 -0700 (Tue, 31 Jul 2007)
Log Message:
-----------
Add read_be32 function
Modified Paths:
--------------
trunk/extractor/helpers.c
trunk/extractor/helpers.h
Modified: trunk/extractor/helpers.c
===================================================================
--- trunk/extractor/helpers.c 2007-08-01 02:08:45 UTC (rev 21)
+++ trunk/extractor/helpers.c 2007-08-01 02:36:56 UTC (rev 22)
@@ -37,6 +37,13 @@
return (t[3] << 8 | t[2]) << 16 | (t[1] << 8 | t[0]);
}
+//! read a 32 bit big-endian value from file
+uint32_t read_be32(FILE *f) {
+ unsigned char t[4];
+ fread(t, 4, 1, f);
+ return (t[0] << 8 | t[1]) << 16 | (t[2] << 8 | t[3]);
+}
+
//! read a 16 bit little-endian value from file
uint16_t read_le16(FILE *f) {
unsigned char t[2];
Modified: trunk/extractor/helpers.h
===================================================================
--- trunk/extractor/helpers.h 2007-08-01 02:08:45 UTC (rev 21)
+++ trunk/extractor/helpers.h 2007-08-01 02:36:56 UTC (rev 22)
@@ -3,6 +3,7 @@
char *read_cstring(FILE *f);
uint16_t read_le16(FILE *f);
uint32_t read_le32(FILE *f);
+uint32_t read_be32(FILE *f);
int fcopy(FILE *in, FILE *out, int len);
#define TAG(a, b, c, d) ((uint32_t)(a << 8 | b) << 16 | (c << 8 | d))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <som...@us...> - 2007-08-01 02:08:46
|
Revision: 21
http://extractor-gtk.svn.sourceforge.net/extractor-gtk/?rev=21&view=rev
Author: someone-guy
Date: 2007-07-31 19:08:45 -0700 (Tue, 31 Jul 2007)
Log Message:
-----------
More missed casts
Modified Paths:
--------------
trunk/extractor/generic.c
trunk/extractor/homeworld2.c
trunk/extractor/nwn.c
Modified: trunk/extractor/generic.c
===================================================================
--- trunk/extractor/generic.c 2007-08-01 02:03:02 UTC (rev 20)
+++ trunk/extractor/generic.c 2007-08-01 02:08:45 UTC (rev 21)
@@ -26,7 +26,7 @@
t = t << 8 | fgetc(in);
switch (t) {
case TAG('R', 'I', 'F', 'F'):
- list = (file_t *)realloc(list, (cnt + 2) * sizeof(file_t));
+ list = realloc(list, (cnt + 2) * sizeof(file_t));
memset(&list[cnt + 1], 0, sizeof(file_t));
list[cnt].start = ftell(in) - 4;
list[cnt].len = read_le32(in);
@@ -37,7 +37,7 @@
}
switch (t & 0xffff) {
case TAG(' ', ' ', 'B', 'M') & 0xffff:
- list = (file_t *)realloc(list, (cnt + 2) * sizeof(file_t));
+ list = realloc(list, (cnt + 2) * sizeof(file_t));
memset(&list[cnt + 1], 0, sizeof(file_t));
list[cnt].start = ftell(in) - 2;
list[cnt].len = read_le32(in);
Modified: trunk/extractor/homeworld2.c
===================================================================
--- trunk/extractor/homeworld2.c 2007-08-01 02:03:02 UTC (rev 20)
+++ trunk/extractor/homeworld2.c 2007-08-01 02:08:45 UTC (rev 21)
@@ -55,7 +55,7 @@
for (j = start_index; j < end_index; j++)
pathmap[j] = paths[i];
}
- list = (file_t *)calloc(count + 1, sizeof(file_t));
+ list = calloc(count + 1, sizeof(file_t));
for (i = 0; i < count; i++) {
char *name;
uint32_t name_string_pos;
Modified: trunk/extractor/nwn.c
===================================================================
--- trunk/extractor/nwn.c 2007-08-01 02:03:02 UTC (rev 20)
+++ trunk/extractor/nwn.c 2007-08-01 02:08:45 UTC (rev 21)
@@ -30,7 +30,7 @@
read_le32(in); // offset for module description
namepos = read_le32(in);
tblpos = read_le32(in);
- list = (file_t *)calloc(count + 1, sizeof(file_t));
+ list = calloc(count + 1, sizeof(file_t));
for (i = 0; i < count; i++) {
uint32_t type_id;
fseek(in, namepos + 24 * i, SEEK_SET);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <som...@us...> - 2007-08-01 02:03:04
|
Revision: 20
http://extractor-gtk.svn.sourceforge.net/extractor-gtk/?rev=20&view=rev
Author: someone-guy
Date: 2007-07-31 19:03:02 -0700 (Tue, 31 Jul 2007)
Log Message:
-----------
get rid of some useless casts
Modified Paths:
--------------
trunk/extractor/bloodrayne.c
trunk/extractor/extractor.c
trunk/extractor/generic.c
trunk/extractor/helpers.c
trunk/extractor/homeworld2.c
Modified: trunk/extractor/bloodrayne.c
===================================================================
--- trunk/extractor/bloodrayne.c 2006-09-20 19:10:48 UTC (rev 19)
+++ trunk/extractor/bloodrayne.c 2007-08-01 02:03:02 UTC (rev 20)
@@ -30,7 +30,7 @@
fseek(in, 0x108, SEEK_SET);
tblpos = read_le32(in);
namepos = tblpos + 20 * count;
- list = (file_t *)calloc(count + 1, sizeof(file_t));
+ list = calloc(count + 1, sizeof(file_t));
for (i = 0; i < count; i++) {
int nameoff;
fseek(in, tblpos + 20 * i, SEEK_SET);
Modified: trunk/extractor/extractor.c
===================================================================
--- trunk/extractor/extractor.c 2006-09-20 19:10:48 UTC (rev 19)
+++ trunk/extractor/extractor.c 2007-08-01 02:03:02 UTC (rev 20)
@@ -69,7 +69,7 @@
file_t *file;
FILE *out;
gtk_tree_model_get(model, iter, PTR_COL, &file, -1);
- fname = (char *)malloc(strlen(data) + strlen(file->name) + 2);
+ fname = malloc(strlen(data) + strlen(file->name) + 2);
strcpy(fname, data);
strcat(fname, "/");
strcat(fname, file->name);
Modified: trunk/extractor/generic.c
===================================================================
--- trunk/extractor/generic.c 2006-09-20 19:10:48 UTC (rev 19)
+++ trunk/extractor/generic.c 2007-08-01 02:03:02 UTC (rev 20)
@@ -20,7 +20,7 @@
static file_t *get_list(FILE *in) {
register uint32_t t = 0;
int cnt = 0;
- file_t *list = (file_t *)calloc(1, sizeof(file_t));
+ file_t *list = calloc(1, sizeof(file_t));
rewind(in);
while (!feof(in)) {
t = t << 8 | fgetc(in);
@@ -30,7 +30,7 @@
memset(&list[cnt + 1], 0, sizeof(file_t));
list[cnt].start = ftell(in) - 4;
list[cnt].len = read_le32(in);
- list[cnt].name = (char *)malloc(50);
+ list[cnt].name = malloc(50);
snprintf(list[cnt].name, 50, "%i.riff", cnt);
cnt++;
break;
@@ -41,7 +41,7 @@
memset(&list[cnt + 1], 0, sizeof(file_t));
list[cnt].start = ftell(in) - 2;
list[cnt].len = read_le32(in);
- list[cnt].name = (char *)malloc(50);
+ list[cnt].name = malloc(50);
snprintf(list[cnt].name, 50, "%i.bmp", cnt);
cnt++;
break;
Modified: trunk/extractor/helpers.c
===================================================================
--- trunk/extractor/helpers.c 2006-09-20 19:10:48 UTC (rev 19)
+++ trunk/extractor/helpers.c 2007-08-01 02:03:02 UTC (rev 20)
@@ -18,7 +18,7 @@
* \return pointer to string, must be freed by caller
*/
char *read_cstring(FILE *f) {
- char *name = (char *)malloc(DEF_CSTR_SIZE);
+ char *name = malloc(DEF_CSTR_SIZE);
int size = DEF_CSTR_SIZE, used = 0;
while ((name[used++] = fgetc(f))) {
if (used == size) {
Modified: trunk/extractor/homeworld2.c
===================================================================
--- trunk/extractor/homeworld2.c 2006-09-20 19:10:48 UTC (rev 19)
+++ trunk/extractor/homeworld2.c 2007-08-01 02:03:02 UTC (rev 20)
@@ -38,8 +38,8 @@
tblpos = read_le32(in) + 0xb4;
count = read_le16(in);
namepos = read_le32(in) + 0xb4;
- pathmap = (char **)calloc(count, sizeof(char *));
- paths = (char **)calloc(pathcount, sizeof(char *));
+ pathmap = calloc(count, sizeof(char *));
+ paths = calloc(pathcount, sizeof(char *));
for (i = 0; i < pathcount; i++) {
int j;
uint32_t path_string_pos;
@@ -70,7 +70,7 @@
if (!pathmap[i])
list[i].name = name;
else {
- list[i].name = (char *)malloc(strlen(pathmap[i]) + strlen(name) + 2);
+ list[i].name = malloc(strlen(pathmap[i]) + strlen(name) + 2);
strcpy(list[i].name, pathmap[i]);
strcat(list[i].name, "\\");
strcat(list[i].name, name);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <som...@us...> - 2006-09-20 19:10:54
|
Revision: 19
http://svn.sourceforge.net/extractor-gtk/?rev=19&view=rev
Author: someone-guy
Date: 2006-09-20 12:10:48 -0700 (Wed, 20 Sep 2006)
Log Message:
-----------
Remove now obsolete .cvsignore
Removed Paths:
-------------
trunk/extractor/.cvsignore
Deleted: trunk/extractor/.cvsignore
===================================================================
--- trunk/extractor/.cvsignore 2006-09-20 19:09:22 UTC (rev 18)
+++ trunk/extractor/.cvsignore 2006-09-20 19:10:48 UTC (rev 19)
@@ -1 +0,0 @@
-*.o extractor
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <som...@us...> - 2006-09-20 19:09:29
|
Revision: 18
http://svn.sourceforge.net/extractor-gtk/?rev=18&view=rev
Author: someone-guy
Date: 2006-09-20 12:09:22 -0700 (Wed, 20 Sep 2006)
Log Message:
-----------
Make bmp detection actually work for generic file type
Modified Paths:
--------------
trunk/extractor/generic.c
Modified: trunk/extractor/generic.c
===================================================================
--- trunk/extractor/generic.c 2006-03-28 12:31:19 UTC (rev 17)
+++ trunk/extractor/generic.c 2006-09-20 19:09:22 UTC (rev 18)
@@ -43,6 +43,7 @@
list[cnt].len = read_le32(in);
list[cnt].name = (char *)malloc(50);
snprintf(list[cnt].name, 50, "%i.bmp", cnt);
+ cnt++;
break;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Reimar Döf. <som...@us...> - 2005-12-19 19:21:58
|
Update of /cvsroot/extractor-gtk/extractor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27759 Modified Files: extractor.c Log Message: Make file list sortable and add description labels for buttons Index: extractor.c =================================================================== RCS file: /cvsroot/extractor-gtk/extractor/extractor.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** extractor.c 18 Dec 2005 14:10:38 -0000 1.3 --- extractor.c 19 Dec 2005 19:21:42 -0000 1.4 *************** *** 169,174 **** --- 169,177 ---- GtkWidget *scrollwin; GtkWidget *treeview; + GtkWidget *lbl; GtkTreeViewColumn *column; GtkCellRenderer *renderer; + GtkTreeModel *sort; + int row = 0, col = 0; gtk_disable_setlocale(); *************** *** 183,186 **** --- 186,231 ---- gtk_container_add(GTK_CONTAINER(window), table); + scrollwin = gtk_scrolled_window_new(NULL, NULL); + gtk_table_attach(GTK_TABLE(table), scrollwin, col, col + 3, row, row + 1, + (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), + (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0); + ftree = gtk_tree_store_new(N_COLS, coltypes[0], coltypes[1], coltypes[2], + coltypes[3]); + sort = gtk_tree_model_sort_new_with_model(GTK_TREE_MODEL(ftree)); + treeview = gtk_tree_view_new_with_model(sort); + gtk_tree_view_set_enable_search(GTK_TREE_VIEW(treeview), TRUE); + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Filename"), renderer, + "text", FNAME_COL, NULL); + gtk_tree_view_column_set_sort_column_id(column, FNAME_COL); + gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Size"), renderer, + "text", SIZE_COL, NULL); + gtk_tree_view_column_set_sort_column_id(column, SIZE_COL); + gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); + renderer = gtk_cell_renderer_toggle_new(); + column = gtk_tree_view_column_new_with_attributes(_("Compressed"), renderer, + "active", COMPR_COL, NULL); + gtk_tree_view_column_set_sort_column_id(column, COMPR_COL); + gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); + gtk_container_add(GTK_CONTAINER(scrollwin), treeview); + + row++; + col = 0; + lbl = gtk_label_new(_("Archive Filename")); + gtk_table_attach(GTK_TABLE(table), lbl, col, col + 1, row, row + 1, + (GtkAttachOptions)(GTK_FILL), + (GtkAttachOptions)(0), 5, 0); + col++; + lbl = gtk_label_new(_("Output Directory")); + gtk_table_attach(GTK_TABLE(table), lbl, col, col + 1, row, row + 1, + (GtkAttachOptions)(GTK_FILL), + (GtkAttachOptions)(0), 5, 0); + + row++; + col = 0; file_button = gtk_file_chooser_button_new(_("open"), GTK_FILE_CHOOSER_ACTION_OPEN); *************** *** 199,242 **** g_signal_connect(G_OBJECT(file_button), "selection-changed", G_CALLBACK(file_select), NULL); ! gtk_table_attach(GTK_TABLE(table), file_button, 0, 1, 1, 2, (GtkAttachOptions)(GTK_FILL), ! (GtkAttachOptions)(0), 0, 0); dir_button = gtk_file_chooser_button_new(_("select"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); ! gtk_table_attach(GTK_TABLE(table), dir_button, 1, 2, 1, 2, (GtkAttachOptions)(GTK_FILL), ! (GtkAttachOptions)(0), 0, 0); ! button = gtk_button_new_with_mnemonic(_("extract")); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(extract_selected), NULL); ! gtk_table_attach(GTK_TABLE(table), button, 2, 3, 1, 2, (GtkAttachOptions)(GTK_FILL), ! (GtkAttachOptions)(0), 0, 0); ! ! scrollwin = gtk_scrolled_window_new(NULL, NULL); ! gtk_table_attach(GTK_TABLE(table), scrollwin, 0, 3, 0, 1, ! (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), ! (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0); ! ftree = gtk_tree_store_new(N_COLS, coltypes[0], coltypes[1], coltypes[2], ! coltypes[3]); ! treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(ftree)); ! renderer = gtk_cell_renderer_text_new(); ! column = gtk_tree_view_column_new_with_attributes(_("Filename"), renderer, ! "text", FNAME_COL, NULL); ! gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); ! renderer = gtk_cell_renderer_text_new(); ! column = gtk_tree_view_column_new_with_attributes(_("Size"), renderer, ! "text", SIZE_COL, NULL); ! gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); ! renderer = gtk_cell_renderer_toggle_new(); ! column = gtk_tree_view_column_new_with_attributes(_("Compressed"), renderer, ! "active", COMPR_COL, NULL); ! gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); ! selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); ! gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); ! gtk_container_add(GTK_CONTAINER(scrollwin), treeview); gtk_widget_show_all(window); gtk_main(); --- 244,267 ---- g_signal_connect(G_OBJECT(file_button), "selection-changed", G_CALLBACK(file_select), NULL); ! gtk_table_attach(GTK_TABLE(table), file_button, col, col + 1, row, row + 1, (GtkAttachOptions)(GTK_FILL), ! (GtkAttachOptions)(0), 5, 0); + col++; dir_button = gtk_file_chooser_button_new(_("select"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); ! gtk_table_attach(GTK_TABLE(table), dir_button, col, col + 1, row, row + 1, (GtkAttachOptions)(GTK_FILL), ! (GtkAttachOptions)(0), 5, 0); ! col++; ! button = gtk_button_new_with_mnemonic(_("extract selected")); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(extract_selected), NULL); ! gtk_table_attach(GTK_TABLE(table), button, col, col + 1, row, row + 1, (GtkAttachOptions)(GTK_FILL), ! (GtkAttachOptions)(0), 5, 0); + gtk_window_set_default_size(GTK_WINDOW(window), -1, 400); gtk_widget_show_all(window); gtk_main(); |
|
From: Reimar Döf. <som...@us...> - 2005-12-19 19:20:21
|
Update of /cvsroot/extractor-gtk/extractor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27346 Modified Files: helpers.c Log Message: Fix incorrect NUL-termination Index: helpers.c =================================================================== RCS file: /cvsroot/extractor-gtk/extractor/helpers.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** helpers.c 12 Dec 2005 17:45:01 -0000 1.2 --- helpers.c 19 Dec 2005 19:20:12 -0000 1.3 *************** *** 21,25 **** } } ! name[used] = 0; return name; } --- 21,25 ---- } } ! name[used - 1] = 0; return name; } |
|
From: Reimar Döf. <som...@us...> - 2005-12-18 14:10:48
|
Update of /cvsroot/extractor-gtk/extractor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31068 Modified Files: extractor.c Log Message: quit when closing main window Index: extractor.c =================================================================== RCS file: /cvsroot/extractor-gtk/extractor/extractor.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** extractor.c 12 Dec 2005 17:50:20 -0000 1.2 --- extractor.c 18 Dec 2005 14:10:38 -0000 1.3 *************** *** 155,158 **** --- 155,164 ---- } + static gboolean delete_event(GtkWidget *widget, GdkEvent *event, + gpointer data) { + gtk_main_quit(); + return FALSE; + } + int main(int argc, char *argv[]) { int i; *************** *** 171,174 **** --- 177,182 ---- window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), _("extractor")); + g_signal_connect(G_OBJECT(window), "delete_event", + G_CALLBACK(delete_event), NULL); table = gtk_table_new(3, 3, FALSE); |