Author: stephan
Date: 2006-07-20 15:35:14 +0000 (Thu, 20 Jul 2006)
New Revision: 22494

Added:
   xarchiver/branches/xarchiver-psybsd/po/nl.po
Modified:
   xarchiver/branches/xarchiver-psybsd/AUTHORS
   xarchiver/branches/xarchiver-psybsd/TODO
   xarchiver/branches/xarchiver-psybsd/configure.ac
   xarchiver/branches/xarchiver-psybsd/libxarchiver/archive.c
   xarchiver/branches/xarchiver-psybsd/libxarchiver/libxarchiver.h
   xarchiver/branches/xarchiver-psybsd/po/xarchiver.pot
   xarchiver/branches/xarchiver-psybsd/src/main.c
   xarchiver/branches/xarchiver-psybsd/src/new_dialog.c
   xarchiver/branches/xarchiver-psybsd/src/new_dialog.h
   xarchiver/branches/xarchiver-psybsd/xarchiver.desktop.in
Log:
- extract-to is working for .tar(.gz/.bz2)
- dutch translation added.
- desktop file updated.
- TODO updated



Modified: xarchiver/branches/xarchiver-psybsd/AUTHORS
===================================================================
--- xarchiver/branches/xarchiver-psybsd/AUTHORS 2006-07-20 00:09:15 UTC (rev 
22493)
+++ xarchiver/branches/xarchiver-psybsd/AUTHORS 2006-07-20 15:35:14 UTC (rev 
22494)
@@ -1 +1,2 @@
 Stephan Arts     - psyBSD   - [EMAIL PROTECTED]
+Giuseppe Torelli - Colossus - <[EMAIL PROTECTED]>

Modified: xarchiver/branches/xarchiver-psybsd/TODO
===================================================================
--- xarchiver/branches/xarchiver-psybsd/TODO    2006-07-20 00:09:15 UTC (rev 
22493)
+++ xarchiver/branches/xarchiver-psybsd/TODO    2006-07-20 15:35:14 UTC (rev 
22494)
@@ -4,23 +4,32 @@
 
 Long Version:
 
-  Implement archive-type verification and 'open' support 
-  for existing archives
+  Implement archive-type verification and 'open' support for existing archives
+    - done for tar
+               tar.gz
+               tar.bz2
 
-  Write view support for gnu-tar support object.
+       Implement 'NewArchiveDialog'
 
-  Let support objects check if the program in question exists upon object 
creation.
+       Implement 'ExtractArchiveDialog'
 
   Implement transaction-options for archive-support objects
   Implement transaction-options for compression-support objects
     (use g_object_class_properties for that?)
 
+  Let support objects check if the program in question exists upon object 
creation.
+
+       add configure-options to enable / disable support-objects.
+
+  Optimize memory usage and library size (remove duplicate code)
+
   Extend testing: 
     Test Add
          Remove
          Extract
          View
-       
-  Optimize memory usage and library size (remove duplicate code)
+  
 
   See if we can avoid using /tmp when possible.
+  Write view support for gnu-tar support object.
+

Modified: xarchiver/branches/xarchiver-psybsd/configure.ac
===================================================================
--- xarchiver/branches/xarchiver-psybsd/configure.ac    2006-07-20 00:09:15 UTC 
(rev 22493)
+++ xarchiver/branches/xarchiver-psybsd/configure.ac    2006-07-20 15:35:14 UTC 
(rev 22494)
@@ -32,7 +32,7 @@
 CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
 
 dnl Check for i18n support
-XDT_I18N([])
+XDT_I18N([nl])
 
 
 XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.2.0])

Modified: xarchiver/branches/xarchiver-psybsd/libxarchiver/archive.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/libxarchiver/archive.c  2006-07-20 
00:09:15 UTC (rev 22493)
+++ xarchiver/branches/xarchiver-psybsd/libxarchiver/archive.c  2006-07-20 
15:35:14 UTC (rev 22494)
@@ -165,7 +165,8 @@
        archive->status = status;
        if(archive->oldstatus == LXA_ARCHIVESTATUS_INIT && archive->status == 
LXA_ARCHIVESTATUS_IDLE)
                g_signal_emit(G_OBJECT(archive), lxa_archive_signals[1], 0, 
archive);
-       g_signal_emit(G_OBJECT(archive), lxa_archive_signals[0], 0, archive);
+       else
+               g_signal_emit(G_OBJECT(archive), lxa_archive_signals[0], 0, 
archive);
 }
 
 gint
@@ -184,12 +185,12 @@
                                archive->tmp_file = g_strconcat(lxa_tmp_dir, 
"/xarchiver-XXXXXX" , NULL);
                                g_mkstemp(archive->tmp_file);
                        }
-                       /* since we only need the filename: we unlink it */
                        lxa_tmp_files_list = 
g_slist_prepend(lxa_tmp_files_list, archive->tmp_file);
 
                        /* Check if the archive already exists */
                        if(g_file_test(archive->path, G_FILE_TEST_EXISTS))
                        {
+                               /* since we only need the filename: we unlink 
it */
                                if(g_file_test(archive->tmp_file, 
G_FILE_TEST_EXISTS))
                                        g_unlink(archive->tmp_file);
                                compression_support->decompress(archive);
@@ -250,14 +251,18 @@
        
        archive->tmp_data = g_slist_prepend(files, destination);
 
-       lxa_archive_decompress(archive);
-       find_result = g_slist_find_custom(lxa_archive_support_list, 
&(archive->type), lookup_archive_support);
-       if(find_result)
+       if(archive->compression != LXA_COMPRESSIONTYPE_NONE)
+               lxa_archive_decompress(archive);
+       else
        {
-               archive_support = find_result->data;
-               archive_support->extract(archive);
-       } else
+               find_result = g_slist_find_custom(lxa_archive_support_list, 
&(archive->type), lookup_archive_support);
+               if(find_result)
+               {
+                       archive_support = find_result->data;
+                       archive_support->extract(archive);
+               } else
                        return 2;
+       }
        return 0;
 }
 

Modified: xarchiver/branches/xarchiver-psybsd/libxarchiver/libxarchiver.h
===================================================================
--- xarchiver/branches/xarchiver-psybsd/libxarchiver/libxarchiver.h     
2006-07-20 00:09:15 UTC (rev 22493)
+++ xarchiver/branches/xarchiver-psybsd/libxarchiver/libxarchiver.h     
2006-07-20 15:35:14 UTC (rev 22494)
@@ -72,7 +72,19 @@
 void 
 lxa_close_archive( LXAArchive *archive );
 
+/*
+ *
+ */
+GSList *
+lxa_get_supported_compression_types();
 
+/*
+ *
+ */
+GSList *
+lxa_get_supported_archive_types();
+
+
 G_END_DECLS
 
 #endif /* __LIBXARCHIVER_H__ */

Added: xarchiver/branches/xarchiver-psybsd/po/nl.po
===================================================================
--- xarchiver/branches/xarchiver-psybsd/po/nl.po                                
(rev 0)
+++ xarchiver/branches/xarchiver-psybsd/po/nl.po        2006-07-20 15:35:14 UTC 
(rev 22494)
@@ -0,0 +1,77 @@
+# Dutch translations for xarchiver package.
+# Copyright (C) 2006 THE xarchiver'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the xarchiver package.
+# Stephan Arts <[EMAIL PROTECTED]>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xarchiver 0.3.9psybsd\n"
+"Report-Msgid-Bugs-To: [EMAIL PROTECTED]"
+"POT-Creation-Date: 2006-07-20 16:36+0200\n"
+"PO-Revision-Date: 2006-07-20 16:36+0200\n"
+"Last-Translator: Stephan Arts <[EMAIL PROTECTED]>\n"
+"Language-Team: Dutch <[EMAIL PROTECTED]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ASCII\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../src/main.c:53
+msgid "Extract the archive to the specified folder and quits."
+msgstr "Pak archief uit naar map en sluit af"
+
+#: ../src/main.c:54
+msgid "[destination path]"
+msgstr "[bestemmings map]"
+
+#: ../src/main.c:57
+msgid "Extract the archive by asking the destination folder and quits."
+msgstr ""
+
+#: ../src/main.c:61
+msgid "Add files to the specified archive and quits."
+msgstr ""
+
+#: ../src/main.c:62
+msgid "[archive path] [file1] [file2] ... [fileN]"
+msgstr "[archief map] [bestand1] [bestand2] ... [bestandN]"
+
+#: ../src/main.c:71
+msgid "Ask for the archive to be created, add files to it and quits."
+msgstr ""
+
+#: ../src/main.c:72
+msgid "[file1] [file2] ... [fileN]"
+msgstr "[bestand1] [bestand2] ... [bestandN]"
+
+#: ../src/main.c:114
+#, c-format
+msgid "Could not add file(s) to archive '%s'"
+msgstr "Kan bestand(en) niet toevoegen aan archief '%s'"
+
+#: ../src/main.c:117 ../src/main.c:203
+#, c-format
+msgid "Could not extract archive '%s'"
+msgstr "Kan archief '%s' niet uitpakken"
+
+#: ../src/main.c:120
+#, c-format
+msgid "Could not remove file(s) from archive '%s'"
+msgstr "Kon bestand(en) niet verwijderen uit archief '%s'"
+
+#: ../src/main.c:143
+#, c-format
+msgid "File '%s' does not exist: ABORTING"
+msgstr "Bestand '%s' bestaat niet"
+
+#: ../src/main.c:174
+msgid "[archive name]"
+msgstr "[archief naam]"
+
+#: ../src/main.c:215
+msgid "You should provide at least one file to add\n"
+msgstr "U moet ten minste een bestand toevoegen\n"
+
+#: ../src/new_dialog.c:67
+msgid "Create archive"
+msgstr "Maak archief"

Modified: xarchiver/branches/xarchiver-psybsd/po/xarchiver.pot
===================================================================
--- xarchiver/branches/xarchiver-psybsd/po/xarchiver.pot        2006-07-20 
00:09:15 UTC (rev 22493)
+++ xarchiver/branches/xarchiver-psybsd/po/xarchiver.pot        2006-07-20 
15:35:14 UTC (rev 22494)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: [EMAIL PROTECTED]"
-"POT-Creation-Date: 2006-06-28 14:52+0200\n"
+"POT-Creation-Date: 2006-07-20 16:36+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <[EMAIL PROTECTED]>\n"
 "Language-Team: LANGUAGE <[EMAIL PROTECTED]>\n"
@@ -16,46 +16,62 @@
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../src/main.c:46 ../src/main.c:47 ../src/main.c:48 ../src/main.c:49
-msgid "a"
+#: ../src/main.c:53
+msgid "Extract the archive to the specified folder and quits."
 msgstr ""
 
-#: ../src/main.c:47
-msgid "FILENAME"
+#: ../src/main.c:54
+msgid "[destination path]"
 msgstr ""
 
-#: ../src/main.c:49
-msgid "PATH"
+#: ../src/main.c:57
+msgid "Extract the archive by asking the destination folder and quits."
 msgstr ""
 
 #: ../src/main.c:61
-msgid "Operation complete"
+msgid "Add files to the specified archive and quits."
 msgstr ""
 
+#: ../src/main.c:62
+msgid "[archive path] [file1] [file2] ... [fileN]"
+msgstr ""
+
+#: ../src/main.c:71
+msgid "Ask for the archive to be created, add files to it and quits."
+msgstr ""
+
 #: ../src/main.c:72
+msgid "[file1] [file2] ... [fileN]"
+msgstr ""
+
+#: ../src/main.c:114
 #, c-format
 msgid "Could not add file(s) to archive '%s'"
 msgstr ""
 
-#: ../src/main.c:75 ../src/main.c:141
+#: ../src/main.c:117 ../src/main.c:203
 #, c-format
 msgid "Could not extract archive '%s'"
 msgstr ""
 
-#: ../src/main.c:78
+#: ../src/main.c:120
 #, c-format
 msgid "Could not remove file(s) from archive '%s'"
 msgstr ""
 
-#: ../src/main.c:115
+#: ../src/main.c:143
+#, c-format
+msgid "File '%s' does not exist: ABORTING"
+msgstr ""
+
+#: ../src/main.c:174
 msgid "[archive name]"
 msgstr ""
 
-#: ../src/main.c:153
+#: ../src/main.c:215
 msgid "You should provide at least one file to add\n"
 msgstr ""
 
-#: ../src/main.c:169
-#, c-format
-msgid "File '%s' does not exist: ABORTING"
+#: ../src/new_dialog.c:67
+msgid "Create archive"
 msgstr ""

Modified: xarchiver/branches/xarchiver-psybsd/src/main.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/main.c      2006-07-20 00:09:15 UTC 
(rev 22493)
+++ xarchiver/branches/xarchiver-psybsd/src/main.c      2006-07-20 15:35:14 UTC 
(rev 22494)
@@ -34,6 +34,7 @@
 gchar *extract_archive_path = NULL;
 
 gboolean add_archive  = FALSE;
+
 gchar *add_archive_path = NULL;
 
 gchar **_argv;
@@ -48,10 +49,28 @@
  */
 static GOptionEntry entries[] =
 {
-       { "add",        'd', 0, G_OPTION_ARG_NONE,   &add_archive,          
N_("a"), NULL},
-       { "add-to",     'a', 0, G_OPTION_ARG_STRING, &add_archive_path,     
N_("a"), N_("FILENAME")},
-       { "extract",    'f', 0, G_OPTION_ARG_NONE,   &extract_archive,      
N_("a"), NULL },
-       { "extract-to", 'e', 0, G_OPTION_ARG_STRING, &extract_archive_path, 
N_("a"), N_("PATH")},
+       {       "extract-to", 'x', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING, 
&extract_archive_path,
+               N_("Extract the archive to the specified folder and quits."),
+               N_("[destination path]")
+       },
+       {       "extract", 'e', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, 
&extract_archive,
+               N_("Extract the archive by asking the destination folder and 
quits."),
+               NULL
+       },
+       {       "add-to", 'd', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING, 
&add_archive_path,
+               N_("Add files to the specified archive and quits."),
+               N_("[archive path] [file1] [file2] ... [fileN]")
+       },
+       /*
+       {       "add", 'a', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, 
&add_archive,
+               N_("Add files to the specified archive by asking their 
filenames and quits."),
+               NULL
+       },
+       */
+       {       "new", 'n', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, 
&new_archive,
+               N_("Ask for the archive to be created, add files to it and 
quits."),
+               N_("[file1] [file2] ... [fileN]")
+       },
        { NULL }
 };
 
@@ -63,34 +82,12 @@
        switch(archive->status)
        {
                case(LXA_ARCHIVESTATUS_IDLE):
-                       if(archive->oldstatus != LXA_ARCHIVESTATUS_INIT)
-                       {
-                               msg_string = _("Operation complete");
-                               dialog = gtk_message_dialog_new 
(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_INFO,GTK_BUTTONS_OK,msg_string, 
archive->path);
-                               gtk_dialog_set_default_response (GTK_DIALOG 
(dialog), GTK_RESPONSE_YES);
-                               gtk_dialog_run (GTK_DIALOG (dialog) );
-                               gtk_widget_destroy (GTK_WIDGET (dialog) );
+                       if(add_archive || extract_archive || 
extract_archive_path || add_archive_path)
                                opened_archives--;
-                       }
                        break;
                case(LXA_ARCHIVESTATUS_ERROR):
-                       switch(archive->oldstatus)
-                       {
-                               case(LXA_ARCHIVESTATUS_ADD):
-                                       msg_string = _("Could not add file(s) 
to archive '%s'");
-                                       break;
-                               case(LXA_ARCHIVESTATUS_EXTRACT):
-                                       msg_string = _("Could not extract 
archive '%s'");
-                                       break;
-                               case(LXA_ARCHIVESTATUS_REMOVE):
-                                       msg_string = _("Could not remove 
file(s) from archive '%s'");
-                                       break;
-                       }
-                       dialog = gtk_message_dialog_new 
(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,msg_string, 
archive->path);
-                       gtk_dialog_set_default_response (GTK_DIALOG (dialog), 
GTK_RESPONSE_YES);
-                       gtk_dialog_run (GTK_DIALOG (dialog) );
-                       gtk_widget_destroy (GTK_WIDGET (dialog) );
-                       opened_archives--;
+                       if(add_archive || extract_archive || 
extract_archive_path || add_archive_path)
+                               opened_archives--;
                        break;
                case(LXA_ARCHIVESTATUS_ADD):
                        break;
@@ -100,7 +97,7 @@
                case(LXA_ARCHIVESTATUS_VIEW):
                        break;
        }
-       if(!opened_archives)
+       if(opened_archives <= 0)
        {
                gtk_main_quit();
        }
@@ -109,8 +106,24 @@
 void
 archive_operation_failed(LXAArchive *archive, gpointer data)
 {
-
-
+       GtkWidget *dialog;
+       gchar *msg_string;
+       switch(archive->status)
+       {
+               case(LXA_ARCHIVESTATUS_ADD):
+                       msg_string = _("Could not add file(s) to archive '%s'");
+                       break;
+               case(LXA_ARCHIVESTATUS_EXTRACT):
+                       msg_string = _("Could not extract archive '%s'");
+                       break;
+               case(LXA_ARCHIVESTATUS_REMOVE):
+                       msg_string = _("Could not remove file(s) from archive 
'%s'");
+                       break;
+       }
+       dialog = gtk_message_dialog_new 
(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,msg_string, 
archive->path);
+       gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
+       gtk_dialog_run (GTK_DIALOG (dialog) );
+       gtk_widget_destroy (GTK_WIDGET (dialog) );
 }
 
 void
@@ -147,6 +160,7 @@
        GError *cli_error = NULL;
        GtkWidget *dialog;
        LXAArchive *xa_archive = NULL;
+       gint result = 0;
        gint i = 0;
        GSList *files = NULL;
        
@@ -183,7 +197,6 @@
                                g_signal_connect(G_OBJECT(xa_archive), 
"lxa_status_changed", G_CALLBACK(archive_status_changed), NULL);
                                g_signal_connect(G_OBJECT(xa_archive), 
"lxa_init_complete", G_CALLBACK(archive_initialized), NULL);
                                g_signal_connect(G_OBJECT(xa_archive), 
"lxa_operation_failure",  G_CALLBACK(archive_operation_failed), NULL);
-                               lxa_archive_extract(xa_archive, files, 
extract_archive_path);
                        }
                        else
                        {
@@ -195,7 +208,7 @@
                }
        }
 
-       if(add_archive_path || add_archive)
+       if(add_archive_path || new_archive)
        {
                if(argc < 2)
                {
@@ -203,20 +216,28 @@
                        gtk_dialog_set_default_response (GTK_DIALOG (dialog), 
GTK_RESPONSE_YES);
                        gtk_dialog_run (GTK_DIALOG (dialog) );
                        gtk_widget_destroy (GTK_WIDGET (dialog) );
+                       return 1;
                }
-               if(add_archive_path)
+               if(add_archive_path && !lxa_open_archive(add_archive_path, 
&xa_archive, G_CALLBACK(archive_initialized)))
                {
-                       if(!lxa_open_archive(add_archive_path, &xa_archive, 
G_CALLBACK(archive_initialized)))
+                       g_signal_connect(G_OBJECT(xa_archive), 
"lxa_status_changed", G_CALLBACK(archive_status_changed), NULL);
+                       g_signal_connect(G_OBJECT(xa_archive), 
"lxa_init_complete", G_CALLBACK(archive_initialized), NULL);
+                       g_signal_connect(G_OBJECT(xa_archive), 
"lxa_operation_failure",  G_CALLBACK(archive_operation_failed), NULL);
+                       opened_archives++;
+               }
+               else /* No file-name provided, a new archive has to be created: 
*/
+               {
+                       /* TODO: Show new archive dialog */
+                       dialog = xa_new_archive_dialog_new();
+                       result = gtk_dialog_run (GTK_DIALOG (dialog) );
+                       gtk_widget_destroy (GTK_WIDGET (dialog) );
+                       if(result == GTK_RESPONSE_CANCEL)
+                               return 2;
+                       if(result == GTK_RESPONSE_OK)
                        {
-                               g_signal_connect(G_OBJECT(xa_archive), 
"lxa_status_changed", G_CALLBACK(archive_status_changed), NULL);
-                               g_signal_connect(G_OBJECT(xa_archive), 
"lxa_init_complete", G_CALLBACK(archive_initialized), NULL);
-                               g_signal_connect(G_OBJECT(xa_archive), 
"lxa_operation_failure",  G_CALLBACK(archive_operation_failed), NULL);
-                               opened_archives++;
+                               /* do crazy stuff */
+                               return 0;
                        }
-                       else
-                       {
-                               /* TODO: create new archive */
-                       }
                }
        }
 

Modified: xarchiver/branches/xarchiver-psybsd/src/new_dialog.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/new_dialog.c        2006-07-20 
00:09:15 UTC (rev 22493)
+++ xarchiver/branches/xarchiver-psybsd/src/new_dialog.c        2006-07-20 
15:35:14 UTC (rev 22494)
@@ -22,56 +22,60 @@
 #include "new_dialog.h"
 
 static void
-xa_new_dialog_class_init(XANewDialogClass *archive_class);
+xa_new_archive_dialog_class_init(XANewArchiveDialogClass *archive_class);
 
 static void
-xa_new_dialog_init(XANewDialog *archive);
+xa_new_archive_dialog_init(XANewArchiveDialog *archive);
 
 static void
-xa_new_dialog_finalize(GObject *object);
+xa_new_archive_dialog_finalize(GObject *object);
 
 GType
-xa_new_dialog_get_type ()
+xa_new_archive_dialog_get_type ()
 {
-       static GType xa_new_dialog_type = 0;
+       static GType xa_new_archive_dialog_type = 0;
 
-       if (!xa_new_dialog_type)
+       if (!xa_new_archive_dialog_type)
        {
-               static const GTypeInfo xa_new_dialog_info = 
+               static const GTypeInfo xa_new_archive_dialog_info = 
                {
-                       sizeof (XANewDialogClass),
+                       sizeof (XANewArchiveDialogClass),
                        (GBaseInitFunc) NULL,
                        (GBaseFinalizeFunc) NULL,
-                       (GClassInitFunc) xa_new_dialog_class_init,
+                       (GClassInitFunc) xa_new_archive_dialog_class_init,
                        (GClassFinalizeFunc) NULL,
                        NULL,
-                       sizeof (XANewDialog),
+                       sizeof (XANewArchiveDialog),
                        0,
-                       (GInstanceInitFunc) xa_new_dialog_init,
+                       (GInstanceInitFunc) xa_new_archive_dialog_init,
                        NULL
                };
 
-               xa_new_dialog_type = g_type_register_static (GTK_TYPE_DIALOG, 
"XANewDialog", &xa_new_dialog_info, 0);
+               xa_new_archive_dialog_type = g_type_register_static 
(GTK_TYPE_DIALOG, "XANewArchiveDialog", &xa_new_archive_dialog_info, 0);
        }
-       return xa_new_dialog_type;
+       return xa_new_archive_dialog_type;
 }
 
 static void
-xa_new_dialog_class_init(XANewDialogClass *archive_class)
+xa_new_archive_dialog_class_init(XANewArchiveDialogClass *dialog_class)
 {
-
 }
 
 static void
-xa_new_dialog_init(XANewDialog *archive)
+xa_new_archive_dialog_init(XANewArchiveDialog *dialog)
 {
+       gtk_window_set_title(GTK_WINDOW(dialog), _("Create archive"));
+       gtk_dialog_add_buttons(GTK_DIALOG(dialog), 
+                       GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                       GTK_STOCK_NEW, GTK_RESPONSE_OK,
+                       NULL);
        
 }
 
 GtkWidget *
-xa_new_dialog_new()
+xa_new_archive_dialog_new()
 {
        GtkWidget *dialog;
-       dialog = g_object_new(xa_new_dialog_get_type(), NULL);
+       dialog = g_object_new(xa_new_archive_dialog_get_type(), NULL);
        return dialog;
 }

Modified: xarchiver/branches/xarchiver-psybsd/src/new_dialog.h
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/new_dialog.h        2006-07-20 
00:09:15 UTC (rev 22493)
+++ xarchiver/branches/xarchiver-psybsd/src/new_dialog.h        2006-07-20 
15:35:14 UTC (rev 22494)
@@ -16,43 +16,43 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#ifndef __XARCHIVER_NEW_DIALOG_H__
-#define __XARCHIVER_NEW_DIALOG_H__
+#ifndef __XARCHIVER_NEW_ARCHIVE_DIALOG_H__
+#define __XARCHIVER_NEW_ARCHIVE_DIALOG_H__
 G_BEGIN_DECLS
 
-#define XA_NEW_DIALOG(obj)         ( \
+#define XA_NEW_ARCHIVE_DIALOG(obj)         ( \
                G_TYPE_CHECK_INSTANCE_CAST ((obj),    \
-                       xa_new_dialog_get_type(),      \
-                       XANewDialog))
+                       xa_new_archive_dialog_get_type(),      \
+                       XANewArchiveDialog))
 
-#define XA_IS_NEW_DIALOG(obj)      ( \
+#define XA_IS_NEW_ARCHIVE_DIALOG(obj)      ( \
                G_TYPE_CHECK_INSTANCE_TYPE ((obj),    \
-                       xa_new_dialog_get_type()))
+                       xa_new_archive_dialog_get_type()))
 
-#define XA_NEW_DIALOG_CLASS(class) ( \
+#define XA_NEW_ARCHIVE_DIALOG_CLASS(class) ( \
                G_TYPE_CHECK_CLASS_CAST ((class),     \
-                       xa_new_dialog_get_type(),      \
-                       XANewDialogClass))
+                       xa_new_archive_dialog_get_type(),      \
+                       XANewArchiveDialogClass))
 
-#define XA_IS_NEW_DIALOG_CLASS(class) ( \
+#define XA_IS_NEW_ARCHIVE_DIALOG_CLASS(class) ( \
                G_TYPE_CHECK_CLASS_TYPE ((class),        \
-                       xa_new_dialog_get_type()))
+                       xa_new_archive_dialog_get_type()))
 
-typedef struct _XANewDialog XANewDialog;
+typedef struct _XANewArchiveDialog XANewArchiveDialog;
 
-struct _XANewDialog
+struct _XANewArchiveDialog
 {
        GtkDialog parent;
 };
 
-typedef struct _XANewDialogClass XANewDialogClass;
+typedef struct _XANewArchiveDialogClass XANewArchiveDialogClass;
 
-struct _XANewDialogClass
+struct _XANewArchiveDialogClass
 {
        GtkDialogClass parent;
 };
 
-GtkWidget *xa_new_dialog_new();
+GtkWidget *xa_new_archive_dialog_new();
 
 G_END_DECLS
-#endif /* __XARCHIVER_NEW_DIALOG_H__ */
+#endif /* __XARCHIVER_NEW_ARCHIVE_DIALOG_H__ */

Modified: xarchiver/branches/xarchiver-psybsd/xarchiver.desktop.in
===================================================================
--- xarchiver/branches/xarchiver-psybsd/xarchiver.desktop.in    2006-07-20 
00:09:15 UTC (rev 22493)
+++ xarchiver/branches/xarchiver-psybsd/xarchiver.desktop.in    2006-07-20 
15:35:14 UTC (rev 22494)
@@ -11,4 +11,4 @@
 X-MultipleArgs=false
 Categories=GTK;Application;Utility;
 StartupNotify=true
-MimeType=application/x-arj;application/arj;application/x-bzip;application/x-bzip-compressed-tar;application/x-gzip;application/x-rar;application/x-rar-compressed;application/x-tar;application/x-zip;application/x-zip-compressed;application/zip;multipart/x-zip;application/x-7z-compressed;
+MimeType=application/x-gzip;application/x-bzip2;application/x-tar;application/x-compressed-tar;

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to