[Xfce4-commits] r22926 - in xarchiver/branches/xarchiver-psybsd: . libxarchiver po src
Stephan Arts
stephan at xfce.org
Mon Aug 28 22:02:58 UTC 2006
Author: stephan
Date: 2006-08-28 22:02:57 +0000 (Mon, 28 Aug 2006)
New Revision: 22926
Modified:
xarchiver/branches/xarchiver-psybsd/TODO
xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-gnu-tar.c
xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-unrar.c
xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-unrar.h
xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support.c
xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support.h
xarchiver/branches/xarchiver-psybsd/po/nl.po
xarchiver/branches/xarchiver-psybsd/po/xarchiver.pot
xarchiver/branches/xarchiver-psybsd/src/extract_dialog.c
xarchiver/branches/xarchiver-psybsd/src/extract_dialog.h
xarchiver/branches/xarchiver-psybsd/src/main.c
Log:
Fixed .tar.bz2 'add' support
Added options to extract-dialog (need to implement it's use, options can be viewed though)
updated TODO
updated nl-translation
Modified: xarchiver/branches/xarchiver-psybsd/TODO
===================================================================
--- xarchiver/branches/xarchiver-psybsd/TODO 2006-08-28 21:46:25 UTC (rev 22925)
+++ xarchiver/branches/xarchiver-psybsd/TODO 2006-08-28 22:02:57 UTC (rev 22926)
@@ -7,15 +7,16 @@
---------------------------------------------------------------
| IMPORTANT IMPORTANT |
---------------------------------------------------------------
-
+
+-+-+-+
+ Implement extract options in extract-dialog
++-+-+-+
+
Implement View support (for all support-objects)
+-+-+-+
- Implement Rar Support object.
-
- Implement UnRar Support object. (separate ?!)
+ Implement UnRar Support object.
+-+-+-+
Comment library functions
Modified: xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-gnu-tar.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-gnu-tar.c 2006-08-28 21:46:25 UTC (rev 22925)
+++ xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-gnu-tar.c 2006-08-28 22:02:57 UTC (rev 22926)
@@ -200,7 +200,7 @@
if(!g_strcasecmp((gchar *)archive->mime, "application/x-compressed-tar"))
command = g_strconcat("gunzip -c ", archive->path, NULL);
if(!g_strcasecmp((gchar *)archive->mime, "application/x-bzip-compressed-tar"))
- command = g_strconcat("bunzip -c ", archive->path, NULL);
+ command = g_strconcat("bunzip2 -c ", archive->path, NULL);
lxa_execute(command, archive, lxa_archive_support_gnu_tar_decompress_watch, NULL, lxa_archive_support_gnu_tar_decompress_parse_output, NULL);
g_free(command);
}
@@ -307,7 +307,7 @@
if(!g_strcasecmp((gchar *)archive->mime, "application/x-compressed-tar"))
command = g_strconcat("gunzip -c ", archive->path, NULL);
if(!g_strcasecmp((gchar *)archive->mime, "application/x-bzip-compressed-tar"))
- command = g_strconcat("bunzip -c ", archive->path, NULL);
+ command = g_strconcat("bunzip2 -c ", archive->path, NULL);
lxa_execute(command, archive, lxa_archive_support_gnu_tar_decompress_watch, NULL, lxa_archive_support_gnu_tar_decompress_parse_output, NULL);
g_free(command);
} else
@@ -336,7 +336,7 @@
if(!g_strcasecmp((gchar *)archive->mime, "application/x-compressed-tar"))
command = g_strconcat("gzip -c ", archive->tmp_file, NULL);
if(!g_strcasecmp((gchar *)archive->mime, "application/x-bzip-compressed-tar"))
- command = g_strconcat("bzip -c ", archive->tmp_file, NULL);
+ command = g_strconcat("bzip2 -c ", archive->tmp_file, NULL);
lxa_execute(command, archive, NULL, NULL, lxa_archive_support_gnu_tar_compress_parse_output, NULL);
}
Modified: xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-unrar.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-unrar.c 2006-08-28 21:46:25 UTC (rev 22925)
+++ xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-unrar.c 2006-08-28 22:02:57 UTC (rev 22926)
@@ -33,13 +33,6 @@
void
lxa_archive_support_unrar_class_init(LXAArchiveSupportUnrarClass *supportclass);
-gint
-lxa_archive_support_unrar_add(LXAArchive *archive, GSList *filenames);
-gint
-lxa_archive_support_unrar_extract(LXAArchive *archive, gchar *dest_path, GSList *filenames);
-gint
-lxa_archive_support_unrar_remove(LXAArchive *archive, GSList *filenames);
-
GType
lxa_archive_support_unrar_get_type ()
{
@@ -74,7 +67,6 @@
lxa_archive_support_add_mime(archive_support, "application/x-rar");
- archive_support->add = lxa_archive_support_unrar_add;
archive_support->extract = lxa_archive_support_unrar_extract;
archive_support->remove = lxa_archive_support_unrar_remove;
}
@@ -103,34 +95,7 @@
return LXA_ARCHIVE_SUPPORT(support);
}
-gint
-lxa_archive_support_unrar_add(LXAArchive *archive, GSList *filenames)
-{
- if(!LXA_IS_ARCHIVE_SUPPORT_UNRAR(archive->support))
- {
- g_critical("Support is not unrar");
- return -1;
- }
- if(!lxa_archive_support_mime_supported(archive->support, archive->mime))
- {
- return 1;
- }
- else
- {
- gchar *command = NULL;
- gchar *files = lxa_concat_filenames(filenames);
- if(!g_strcasecmp((gchar *)archive->mime, "application/x-rar"))
- {
- /* TODO: Fix commandline issues
- command = g_strconcat("unrar ", archive->path, " ", files, NULL);
- */
- lxa_execute(command, archive, NULL, NULL, NULL, NULL);
- }
- }
- return 0;
-}
-
gint
lxa_archive_support_unrar_extract(LXAArchive *archive, gchar *dest_path, GSList *filenames)
{
Modified: xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-unrar.h
===================================================================
--- xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-unrar.h 2006-08-28 21:46:25 UTC (rev 22925)
+++ xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-unrar.h 2006-08-28 22:02:57 UTC (rev 22926)
@@ -58,7 +58,6 @@
GType lxa_archive_support_unrar_get_type(void);
LXAArchiveSupport * lxa_archive_support_unrar_new();
-gint lxa_archive_support_unrar_add(LXAArchive *, GSList *);
gint lxa_archive_support_unrar_extract(LXAArchive *, gchar *, GSList *);
gint lxa_archive_support_unrar_remove(LXAArchive *, GSList *);
Modified: xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support.c 2006-08-28 21:46:25 UTC (rev 22925)
+++ xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support.c 2006-08-28 22:02:57 UTC (rev 22926)
@@ -216,3 +216,20 @@
g_critical("REMOVE NOT IMPLEMENTED BY SUPPORT OBJECT '%s'", support->id);
return -1;
}
+
+GSList *
+lxa_archive_support_list_properties(LXAArchiveSupport *support, gchar *prefix)
+{
+ guint _nprops, i;
+ GObjectClass *support_class = G_OBJECT_GET_CLASS(support);
+ GParamSpec **pspecs = g_object_class_list_properties(support_class, &_nprops);
+ GSList *pspec_list = NULL;
+
+ for(i = 0; i < _nprops; i++)
+ {
+ if(!strncmp(prefix, g_param_spec_get_name(pspecs[i]), strlen(prefix)))
+ {
+ pspec_list = g_slist_prepend(pspec_list, pspecs[i]);
+ }
+ }
+}
Modified: xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support.h
===================================================================
--- xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support.h 2006-08-28 21:46:25 UTC (rev 22925)
+++ xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support.h 2006-08-28 22:02:57 UTC (rev 22926)
@@ -85,6 +85,8 @@
gint lxa_archive_support_extract(LXAArchiveSupport *, LXAArchive *, gchar *, GSList *);
gint lxa_archive_support_remove(LXAArchiveSupport *, LXAArchive *, GSList *);
+GSList * lxa_archive_support_list_properties(LXAArchiveSupport *, gchar *);
+
G_END_DECLS
#endif /* __LIBXARCHIVER_ARCHIVE_SUPPORT_H__ */
Modified: xarchiver/branches/xarchiver-psybsd/po/nl.po
===================================================================
--- xarchiver/branches/xarchiver-psybsd/po/nl.po 2006-08-28 21:46:25 UTC (rev 22925)
+++ xarchiver/branches/xarchiver-psybsd/po/nl.po 2006-08-28 22:02:57 UTC (rev 22926)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: xarchiver 0.3.9psybsd\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-08-25 07:21+0200\n"
+"POT-Creation-Date: 2006-08-29 00:00+0200\n"
"PO-Revision-Date: 2006-07-20 16:36+0200\n"
"Last-Translator: Stephan Arts <psybsd at gmail.com>\n"
"Language-Team: Dutch <vertaling at vrijschrift.org>\n"
@@ -56,12 +56,18 @@
"Probeer xarchiver --help om een volledige lijst te zien met beschikbare "
"opties.\n"
-#: ../src/main.c:175
+#.
+#. * Could not create archive (mime type unsupported)
+#.
+#: ../src/main.c:185
msgid "Could not create archive, MIME-type unsupported"
msgstr "Kan archief niet maken, MIME-type wordt niet ondersteund"
-#. Could not open archive (mime type not supported or file did not exsit)
-#: ../src/main.c:190
+#.
+#. * Could not open archive (mime type not supported or file did not exist)
+#. * Should be a more specific error message.
+#.
+#: ../src/main.c:202
msgid "Could not open archive, MIME-type unsupported or file did not exist"
msgstr ""
"Kan archief niet openen, MIME-type wordt niet ondersteund of bestand bestaat "
@@ -71,12 +77,28 @@
msgid "Create new archive"
msgstr "Maak nieuw archief"
-#: ../src/extract_dialog.c:78 ../src/main_window_menu_bar.c:117
+#: ../src/extract_dialog.c:69
+msgid "<b>Extract files:</b>"
+msgstr "<b> Bestanden uitpakken:</b>"
+
+#: ../src/extract_dialog.c:70
+msgid "<b>Options:</b>"
+msgstr "<b>Opties:</b>"
+
+#: ../src/extract_dialog.c:80
+msgid "All files"
+msgstr "Alle bestanden"
+
+#: ../src/extract_dialog.c:81
+msgid "Selected files"
+msgstr "Geselecteerde bestanden"
+
+#: ../src/extract_dialog.c:93 ../src/main_window_menu_bar.c:117
#: ../src/main_window_tool_bar.c:87
msgid "Extract"
msgstr "Uitpakken"
-#: ../src/extract_dialog.c:87
+#: ../src/extract_dialog.c:105
msgid "Extract archive"
msgstr "Archief uitpakken"
Modified: xarchiver/branches/xarchiver-psybsd/po/xarchiver.pot
===================================================================
--- xarchiver/branches/xarchiver-psybsd/po/xarchiver.pot 2006-08-28 21:46:25 UTC (rev 22925)
+++ xarchiver/branches/xarchiver-psybsd/po/xarchiver.pot 2006-08-28 22:02:57 UTC (rev 22926)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-08-25 07:21+0200\n"
+"POT-Creation-Date: 2006-08-29 00:00+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -53,12 +53,18 @@
"Try xarchiver --help to see a full list of available command line options.\n"
msgstr ""
-#: ../src/main.c:175
+#.
+#. * Could not create archive (mime type unsupported)
+#.
+#: ../src/main.c:185
msgid "Could not create archive, MIME-type unsupported"
msgstr ""
-#. Could not open archive (mime type not supported or file did not exsit)
-#: ../src/main.c:190
+#.
+#. * Could not open archive (mime type not supported or file did not exist)
+#. * Should be a more specific error message.
+#.
+#: ../src/main.c:202
msgid "Could not open archive, MIME-type unsupported or file did not exist"
msgstr ""
@@ -66,12 +72,28 @@
msgid "Create new archive"
msgstr ""
-#: ../src/extract_dialog.c:78 ../src/main_window_menu_bar.c:117
+#: ../src/extract_dialog.c:69
+msgid "<b>Extract files:</b>"
+msgstr ""
+
+#: ../src/extract_dialog.c:70
+msgid "<b>Options:</b>"
+msgstr ""
+
+#: ../src/extract_dialog.c:80
+msgid "All files"
+msgstr ""
+
+#: ../src/extract_dialog.c:81
+msgid "Selected files"
+msgstr ""
+
+#: ../src/extract_dialog.c:93 ../src/main_window_menu_bar.c:117
#: ../src/main_window_tool_bar.c:87
msgid "Extract"
msgstr ""
-#: ../src/extract_dialog.c:87
+#: ../src/extract_dialog.c:105
msgid "Extract archive"
msgstr ""
Modified: xarchiver/branches/xarchiver-psybsd/src/extract_dialog.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/extract_dialog.c 2006-08-28 21:46:25 UTC (rev 22925)
+++ xarchiver/branches/xarchiver-psybsd/src/extract_dialog.c 2006-08-28 22:02:57 UTC (rev 22926)
@@ -15,6 +15,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+ /*
+ TODO: Fix props
+ */
#include <config.h>
#include <glib.h>
@@ -22,23 +25,12 @@
#include <libxarchiver/libxarchiver.h>
#include "extract_dialog.h"
-enum
-{
- XA_EXTRACT_ARCHIVE_DIALOG_ARCHIVE = 1
-};
-
static void
xa_extract_archive_dialog_class_init(XAExtractArchiveDialogClass *archive_class);
static void
xa_extract_archive_dialog_init(XAExtractArchiveDialog *archive);
-void
-xa_extract_archive_dialog_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-
-void
-xa_extract_archive_dialog_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-
GType
xa_extract_archive_dialog_get_type ()
{
@@ -73,18 +65,71 @@
static void
xa_extract_archive_dialog_init(XAExtractArchiveDialog *dialog)
{
+ GtkWidget *hbox = gtk_hbox_new(TRUE, 5);
+ GtkWidget *l_label = gtk_label_new(_("<b>Extract files:</b>"));
+ GtkWidget *r_label = gtk_label_new(_("<b>Options:</b>"));
+ gtk_label_set_use_markup(GTK_LABEL(l_label), TRUE);
+ gtk_label_set_use_markup(GTK_LABEL(r_label), TRUE);
+
+ GtkWidget *l_vbox = gtk_vbox_new(FALSE, 0);
+
+ dialog->l_frame = gtk_frame_new( NULL );
+ gtk_frame_set_label_widget(GTK_FRAME(dialog->l_frame), l_label);
+ gtk_box_pack_start(GTK_BOX(hbox), dialog->l_frame, TRUE, TRUE, 0);
+ gtk_container_add(GTK_CONTAINER(dialog->l_frame), l_vbox);
+ dialog->all_files_radio = gtk_radio_button_new_with_mnemonic (NULL, _("All files"));
+ dialog->sel_files_radio = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON(dialog->all_files_radio), _("Selected files"));
+
+ gtk_box_pack_start(GTK_BOX(l_vbox), dialog->all_files_radio, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(l_vbox), dialog->sel_files_radio, FALSE, FALSE, 0);
+
+ dialog->r_frame = gtk_frame_new( NULL );
+ gtk_frame_set_label_widget(GTK_FRAME(dialog->r_frame), r_label);
+ gtk_box_pack_start(GTK_BOX(hbox), dialog->r_frame, TRUE, TRUE, 0);
+
+ gtk_box_pack_end(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, FALSE, 0);
gtk_dialog_add_buttons(GTK_DIALOG(dialog),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
_("Extract"), GTK_RESPONSE_OK,
NULL);
+ gtk_widget_show_all(hbox);
}
GtkWidget *
-xa_extract_archive_dialog_new(LXAArchive *archive)
+xa_extract_archive_dialog_new(LXAArchiveSupport *support, LXAArchive *archive, gboolean sel_option)
{
- GtkWidget *dialog;
+ GSList *extract_options;
+ GtkWidget *test;
+ XAExtractArchiveDialog *dialog;
dialog = g_object_new(xa_extract_archive_dialog_get_type(), "title", _("Extract archive"), "action", GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER, "do-overwrite-confirmation", TRUE, NULL);
+/* Handle 'extract selected files' option */
+ gtk_widget_set_sensitive(dialog->sel_files_radio, sel_option);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->sel_files_radio), sel_option);
- return dialog;
+ GtkWidget *r_vbox = gtk_vbox_new(FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(dialog->r_frame), r_vbox);
+
+ dialog->support = support;
+ if(dialog->support)
+ {
+ extract_options = lxa_archive_support_list_properties(support, "extract");
+ while(extract_options)
+ {
+ switch(G_PARAM_SPEC(extract_options->data)->value_type)
+ {
+ case (G_TYPE_BOOLEAN):
+ test = gtk_check_button_new_with_label(g_param_spec_get_nick(G_PARAM_SPEC(extract_options->data)));
+ gtk_box_pack_start(GTK_BOX(r_vbox), test, FALSE, FALSE, 0);
+ break;
+ case (G_TYPE_STRING):
+ test = gtk_label_new(g_param_spec_get_nick(G_PARAM_SPEC(extract_options->data)));
+ gtk_box_pack_start(GTK_BOX(r_vbox), test, FALSE, FALSE, 0);
+ break;
+ }
+ extract_options = extract_options->next;
+ }
+ }
+ gtk_widget_show_all(r_vbox);
+ return GTK_WIDGET(dialog);
}
Modified: xarchiver/branches/xarchiver-psybsd/src/extract_dialog.h
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/extract_dialog.h 2006-08-28 21:46:25 UTC (rev 22925)
+++ xarchiver/branches/xarchiver-psybsd/src/extract_dialog.h 2006-08-28 22:02:57 UTC (rev 22926)
@@ -43,7 +43,12 @@
struct _XAExtractArchiveDialog
{
GtkFileChooserDialog parent;
+ GtkWidget *l_frame;
+ GtkWidget *r_frame;
+ GtkWidget *all_files_radio;
+ GtkWidget *sel_files_radio;
LXAArchive *archive;
+ LXAArchiveSupport *support;
};
typedef struct _XAExtractArchiveDialogClass XAExtractArchiveDialogClass;
@@ -53,7 +58,7 @@
GtkFileChooserDialogClass parent_class;
};
-GtkWidget *xa_extract_archive_dialog_new();
+GtkWidget *xa_extract_archive_dialog_new(LXAArchiveSupport *, LXAArchive *, gboolean);
G_END_DECLS
#endif /* __XARCHIVER_EXTRACT_ARCHIVE_DIALOG_H__ */
Modified: xarchiver/branches/xarchiver-psybsd/src/main.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/main.c 2006-08-28 21:46:25 UTC (rev 22925)
+++ xarchiver/branches/xarchiver-psybsd/src/main.c 2006-08-28 22:02:57 UTC (rev 22926)
@@ -131,18 +131,6 @@
{
return 1;
}
- if(!extract_archive_path)
- {
- dialog = xa_extract_archive_dialog_new();
- result = gtk_dialog_run (GTK_DIALOG (dialog) );
- if(result == GTK_RESPONSE_CANCEL || result == GTK_RESPONSE_DELETE_EVENT)
- {
- gtk_widget_destroy (GTK_WIDGET (dialog) );
- return 2;
- }
- extract_archive_path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
- gtk_widget_destroy (GTK_WIDGET (dialog) );
- }
for(i = 1; i < argc; i++)
{
if(!lxa_open_archive(argv[i], &lpArchive))
@@ -150,7 +138,26 @@
g_signal_connect(G_OBJECT(lpArchive), "lxa_status_changed", G_CALLBACK(xa_archive_status_changed), NULL);
opened_archives++;
lpSupport = lxa_get_support_for_mime(lpArchive->mime);
- lxa_archive_support_extract(lpSupport, lpArchive, extract_archive_path, NULL);
+ if(!extract_archive_path)
+ {
+ dialog = xa_extract_archive_dialog_new(lpSupport, lpArchive, FALSE);
+ result = gtk_dialog_run (GTK_DIALOG (dialog) );
+ if(result == GTK_RESPONSE_CANCEL || result == GTK_RESPONSE_DELETE_EVENT)
+ {
+ gtk_widget_destroy (GTK_WIDGET (dialog) );
+ lxa_close_archive(lpArchive);
+ opened_archives--;
+ }
+ if(result == GTK_RESPONSE_OK)
+ {
+ extract_archive_path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+ lxa_archive_support_extract(lpSupport, lpArchive, extract_archive_path, NULL);
+ g_free(extract_archive_path);
+ extract_archive_path = NULL;
+ }
+ }
+ else
+ lxa_archive_support_extract(lpSupport, lpArchive, extract_archive_path, NULL);
}
}
}
@@ -172,11 +179,13 @@
}
if(lxa_new_archive(add_archive_path, TRUE, NULL, &lpArchive))
{
+ /*
+ * Could not create archive (mime type unsupported)
+ */
dialog = gtk_message_dialog_new (NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Could not create archive, MIME-type unsupported"));
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
gtk_dialog_run (GTK_DIALOG (dialog) );
gtk_widget_destroy (GTK_WIDGET (dialog) );
- /* Could not create archive (mime type unsupported) */
return 1;
}
else
@@ -186,7 +195,10 @@
{
if(lxa_open_archive(add_archive_path, &lpArchive))
{
- /* Could not open archive (mime type not supported or file did not exsit)*/
+ /*
+ * Could not open archive (mime type not supported or file did not exist)
+ * Should be a more specific error message.
+ */
dialog = gtk_message_dialog_new (NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Could not open archive, MIME-type unsupported or file did not exist"));
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
gtk_dialog_run (GTK_DIALOG (dialog) );
@@ -210,9 +222,12 @@
{
/* Show main window */
main_window = xa_main_window_new();
+ gtk_widget_set_size_request(main_window, 400, 300);
gtk_widget_show_all(main_window);
g_signal_connect(G_OBJECT(main_window), "destroy", gtk_main_quit, NULL);
- }
+ } else
+ if(!opened_archives)
+ return 0;
gtk_main();
More information about the Xfce4-commits
mailing list