Author: stephan
Date: 2007-02-28 12:01:15 +0000 (Wed, 28 Feb 2007)
New Revision: 25041
Modified:
squeeze/trunk/AUTHORS
squeeze/trunk/Makefile.am
squeeze/trunk/libsqueeze/archive-command.c
squeeze/trunk/libsqueeze/archive-command.h
squeeze/trunk/libsqueeze/archive-iter.c
squeeze/trunk/libsqueeze/archive-support-gnu-tar.c
squeeze/trunk/libsqueeze/archive-support-zip.c
squeeze/trunk/libsqueeze/archive.c
squeeze/trunk/libsqueeze/archive.h
squeeze/trunk/libsqueeze/libsqueeze-archive.h
squeeze/trunk/src/Makefile.am
squeeze/trunk/src/add_dialog.c
squeeze/trunk/src/add_dialog.h
squeeze/trunk/src/application.c
squeeze/trunk/src/application.h
squeeze/trunk/src/archive_store.c
squeeze/trunk/src/archive_store.h
squeeze/trunk/src/extract_dialog.c
squeeze/trunk/src/extract_dialog.h
squeeze/trunk/src/main.c
squeeze/trunk/src/main_window.c
squeeze/trunk/src/navigation_bar.c
squeeze/trunk/src/navigation_bar.h
squeeze/trunk/src/notebook.c
squeeze/trunk/src/notebook.h
squeeze/trunk/src/path_bar.c
squeeze/trunk/src/path_bar.h
squeeze/trunk/src/preferences_dialog.c
squeeze/trunk/src/preferences_dialog.h
squeeze/trunk/src/properties_dialog.c
squeeze/trunk/src/properties_dialog.h
squeeze/trunk/src/settings.c
squeeze/trunk/src/settings.h
squeeze/trunk/src/tool_bar.c
squeeze/trunk/src/tool_bar.h
squeeze/trunk/src/widget_factory.c
squeeze/trunk/src/widget_factory.h
Log:
Connected GUI to backend.
Modified: squeeze/trunk/AUTHORS
===================================================================
--- squeeze/trunk/AUTHORS 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/AUTHORS 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,5 +1,2 @@
-Lead developer:
- Stephan Arts - <[EMAIL PROTECTED]>
-
-Contributors:
- Peter de Ridder - <[EMAIL PROTECTED]>
+Stephan Arts - <[EMAIL PROTECTED]>
+Peter de Ridder - <[EMAIL PROTECTED]>
Modified: squeeze/trunk/Makefile.am
===================================================================
--- squeeze/trunk/Makefile.am 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/Makefile.am 2007-02-28 12:01:15 UTC (rev 25041)
@@ -4,7 +4,7 @@
1.8 \
dist-bzip2
-SUBDIRS = pixmaps libsqueeze tests po docs
+SUBDIRS = pixmaps libsqueeze tests po docs src
wrapperdir = $(libexecdir)/thunar-archive-plugin/
wrapper_SCRIPTS = squeeze.tap
Modified: squeeze/trunk/libsqueeze/archive-command.c
===================================================================
--- squeeze/trunk/libsqueeze/archive-command.c 2007-02-27 21:28:04 UTC (rev
25040)
+++ squeeze/trunk/libsqueeze/archive-command.c 2007-02-28 12:01:15 UTC (rev
25041)
@@ -114,7 +114,8 @@
lsq_archive_command_run(next_archive_command);
g_object_unref(next_archive_command);
}
-
+ if(archive_command->refresh)
+ lsq_archive_refreshed(archive_command->archive);
archive_command->archive = NULL;
}
}
@@ -375,3 +376,9 @@
}
return status;
}
+
+const gchar *
+lsq_archive_command_get_comment(LSQArchiveCommand *archive_command)
+{
+ return archive_command->comment;
+}
Modified: squeeze/trunk/libsqueeze/archive-command.h
===================================================================
--- squeeze/trunk/libsqueeze/archive-command.h 2007-02-27 21:28:04 UTC (rev
25040)
+++ squeeze/trunk/libsqueeze/archive-command.h 2007-02-28 12:01:15 UTC (rev
25041)
@@ -51,6 +51,7 @@
GIOChannel *ioc_out;
GIOChannel *ioc_err;
gboolean safe;
+ gboolean refresh;
GError *error;
LSQParseFunc parse_stdout;
};
@@ -85,6 +86,7 @@
gboolean lsq_archive_command_set_parse_func(LSQArchiveCommand
*archive_command,
guint fd,
LSQParseFunc func);
+const gchar *lsq_archive_command_get_comment(LSQArchiveCommand
*archive_command);
G_END_DECLS
#endif /* __LIBSQUEEZE_ARCHIVE_COMMAND_H__ */
Modified: squeeze/trunk/libsqueeze/archive-iter.c
===================================================================
--- squeeze/trunk/libsqueeze/archive-iter.c 2007-02-27 21:28:04 UTC (rev
25040)
+++ squeeze/trunk/libsqueeze/archive-iter.c 2007-02-28 12:01:15 UTC (rev
25041)
@@ -1166,7 +1166,8 @@
if(!mime || strcmp(mime, LSQ_MIME_DIRECTORY))
{
- thunar_vfs_mime_info_unref(parent->mime_info);
+ if(parent->mime_info)
+ thunar_vfs_mime_info_unref(parent->mime_info);
parent->mime_info =
thunar_vfs_mime_database_get_info(lsq_mime_database, LSQ_MIME_DIRECTORY);
}
Modified: squeeze/trunk/libsqueeze/archive-support-gnu-tar.c
===================================================================
--- squeeze/trunk/libsqueeze/archive-support-gnu-tar.c 2007-02-27 21:28:04 UTC
(rev 25040)
+++ squeeze/trunk/libsqueeze/archive-support-gnu-tar.c 2007-02-28 12:01:15 UTC
(rev 25041)
@@ -371,7 +371,32 @@
static gint
lsq_archive_support_gnu_tar_refresh(LSQArchive *archive)
{
- return 1;
+ guint i = 0;
+ LSQArchiveCommand *archive_command = NULL;
+ if(!LSQ_IS_ARCHIVE_SUPPORT_GNU_TAR(archive->support))
+ {
+ g_critical("Support is not GNU TAR");
+ return -1;
+ }
+
+ if(!lsq_archive_support_mime_supported(archive->support,
thunar_vfs_mime_info_get_name(archive->mime_info)))
+ {
+ return 1;
+ }
+ else
+ {
+ lsq_archive_clear_entry_property_types(archive);
+ i = LSQ_ARCHIVE_PROP_USER;
+
+ gchar *command_skeleton = g_strconcat(GNU_TAR_APP_NAME, " -tvvf
%1$s", NULL);
+ archive_command = lsq_archive_command_new("", archive,
command_skeleton, TRUE);
+ g_free(command_skeleton);
+ lsq_archive_command_set_parse_func(archive_command, 1,
lsq_archive_support_gnu_tar_refresh_parse_output);
+ archive_command->refresh = TRUE;
+ lsq_archive_command_run(archive_command);
+ g_object_unref(archive_command);
+ }
+ return 0;
}
gboolean
Modified: squeeze/trunk/libsqueeze/archive-support-zip.c
===================================================================
--- squeeze/trunk/libsqueeze/archive-support-zip.c 2007-02-27 21:28:04 UTC
(rev 25040)
+++ squeeze/trunk/libsqueeze/archive-support-zip.c 2007-02-28 12:01:15 UTC
(rev 25041)
@@ -349,6 +349,7 @@
}
archive_command = lsq_archive_command_new("", archive, "unzip
-lv -qq %1$s", TRUE);
lsq_archive_command_set_parse_func(archive_command, 1,
lsq_archive_support_zip_refresh_parse_output);
+ archive_command->refresh = TRUE;
lsq_archive_command_run(archive_command);
g_object_unref(archive_command);
}
Modified: squeeze/trunk/libsqueeze/archive.c
===================================================================
--- squeeze/trunk/libsqueeze/archive.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/libsqueeze/archive.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -60,6 +60,7 @@
enum
{
LSQ_ARCHIVE_SIGNAL_COMMAND_TERMINATED = 0,
+ LSQ_ARCHIVE_SIGNAL_REFRESHED,
LSQ_ARCHIVE_SIGNAL_COUNT
};
@@ -109,6 +110,16 @@
1,
G_TYPE_POINTER,
NULL);
+ lsq_archive_signals[LSQ_ARCHIVE_SIGNAL_REFRESHED] =
g_signal_new("refreshed",
+ G_TYPE_FROM_CLASS(archive_class),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0,
+ NULL);
}
static void
@@ -437,7 +448,7 @@
}
LSQArchiveCommand *
-lsq_archive_get_front_command(LSQArchive *archive)
+lsq_archive_get_front_command(const LSQArchive *archive)
{
if(archive->command_queue)
return archive->command_queue->data;
@@ -456,3 +467,39 @@
{
return thunar_vfs_mime_info_get_name(archive->mime_info);
}
+
+gboolean
+lsq_archive_can_stop(const LSQArchive *archive)
+{
+ LSQArchiveCommand *command = lsq_archive_get_front_command(archive);
+ if(command)
+ return command->safe;
+ else
+ return TRUE;
+}
+
+gboolean
+lsq_archive_stop(const LSQArchive *archive)
+{
+ LSQArchiveCommand *command = lsq_archive_get_front_command(archive);
+ if(command)
+ return lsq_archive_command_stop(command);
+ else
+ return FALSE;
+}
+
+const gchar *
+lsq_archive_get_status(const LSQArchive *archive)
+{
+ LSQArchiveCommand *command = lsq_archive_get_front_command(archive);
+ if(command)
+ return lsq_archive_command_get_comment(command);
+ else
+ return _("idle");
+}
+
+void
+lsq_archive_refreshed(const LSQArchive *archive)
+{
+ g_signal_emit(G_OBJECT(archive),
lsq_archive_signals[LSQ_ARCHIVE_SIGNAL_REFRESHED], 0, NULL);
+}
Modified: squeeze/trunk/libsqueeze/archive.h
===================================================================
--- squeeze/trunk/libsqueeze/archive.h 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/libsqueeze/archive.h 2007-02-28 12:01:15 UTC (rev 25041)
@@ -47,8 +47,10 @@
void lsq_archive_enqueue_command(LSQArchive *archive,
LSQArchiveCommand *command) G_GNUC_INTERNAL;
void lsq_archive_dequeue_command(LSQArchive *archive,
LSQArchiveCommand *command) G_GNUC_INTERNAL;
-LSQArchiveCommand *lsq_archive_get_front_command(LSQArchive *archive)
G_GNUC_INTERNAL;
+LSQArchiveCommand *lsq_archive_get_front_command(const LSQArchive *archive)
G_GNUC_INTERNAL;
+void lsq_archive_refreshed(const LSQArchive *archive)
G_GNUC_INTERNAL;
+
G_END_DECLS
#endif /* __ARCHIVE_H__ */
Modified: squeeze/trunk/libsqueeze/libsqueeze-archive.h
===================================================================
--- squeeze/trunk/libsqueeze/libsqueeze-archive.h 2007-02-27 21:28:04 UTC
(rev 25040)
+++ squeeze/trunk/libsqueeze/libsqueeze-archive.h 2007-02-28 12:01:15 UTC
(rev 25041)
@@ -51,9 +51,14 @@
GType lsq_archive_get_type(void);
-LSQArchiveIter *lsq_archive_iter_ref(LSQArchiveIter *);
-void lsq_archive_iter_unref(LSQArchiveIter *);
+LSQArchiveIter *lsq_archive_iter_ref(LSQArchiveIter *iter);
+void lsq_archive_iter_unref(LSQArchiveIter *iter);
+gboolean lsq_archive_can_stop(const LSQArchive *archive);
+gboolean lsq_archive_stop(const LSQArchive *archive);
+
+const gchar *lsq_archive_get_status(const LSQArchive *archive);
+
G_END_DECLS
#endif /* __LIBSQUEEZE_ARCHIVE_H__ */
Modified: squeeze/trunk/src/Makefile.am
===================================================================
--- squeeze/trunk/src/Makefile.am 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/Makefile.am 2007-02-28 12:01:15 UTC (rev 25041)
@@ -43,5 +43,8 @@
@GLIB_LIBS@ \
@THUNAR_VFS_LIBS@
+squeeze_LDFLAGS = -static
+
+
INCLUDES = \
-I${top_srcdir}
Modified: squeeze/trunk/src/add_dialog.c
===================================================================
--- squeeze/trunk/src/add_dialog.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/add_dialog.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
@@ -140,10 +138,8 @@
GtkWidget *
sq_add_dialog_new(LSQArchiveSupport *support)
{
- GSList *add_options;
SQAddDialog *dialog;
- GtkWidget *optionbox, *test;
- SQWidgetFactory *factory = sq_widget_factory_new();
+ GtkWidget *optionbox;
dialog = g_object_new(sq_add_dialog_get_type(),
"title", _("Add file(s) to archive"),
@@ -153,6 +149,7 @@
gtk_container_add(GTK_CONTAINER(dialog->optionframe), optionbox);
dialog->support = support;
+/*
if(support)
{
add_options = lsq_archive_support_list_properties(support,
"add");
@@ -163,6 +160,7 @@
add_options = add_options->next;
}
}
+*/
gtk_widget_set_size_request(GTK_WIDGET(dialog), 400,300);
Modified: squeeze/trunk/src/add_dialog.h
===================================================================
--- squeeze/trunk/src/add_dialog.h 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/add_dialog.h 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/application.c
===================================================================
--- squeeze/trunk/src/application.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/application.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
@@ -146,27 +144,10 @@
return window;
}
-void
-cb_sq_application_archive_status_changed(LSQArchive *archive, gpointer data)
-{
- SQApplication *app = SQ_APPLICATION(data);
-
- switch(archive->status)
- {
- case LSQ_ARCHIVESTATUS_IDLE:
- case LSQ_ARCHIVESTATUS_ERROR:
- lsq_close_archive(archive);
- case LSQ_ARCHIVESTATUS_USERBREAK:
- g_object_unref(app);
- break;
- default:
- break;
- }
-}
-
gint
sq_application_extract_archive(SQApplication *app, gchar *archive_path, gchar
*dest_path)
{
+/*
GtkWidget *dialog = NULL;
gint result = 0;
LSQArchive *lp_archive = NULL;
@@ -174,49 +155,9 @@
if(!lsq_open_archive(archive_path, &lp_archive))
{
- g_signal_connect(G_OBJECT(lp_archive), "lsq_status_changed",
G_CALLBACK(cb_sq_application_archive_status_changed), app);
- lp_support = lsq_get_support_for_mime(lp_archive->mime_info);
- if(!dest_path)
- {
- dialog = sq_extract_archive_dialog_new(lp_support,
lp_archive, FALSE);
- result = gtk_dialog_run (GTK_DIALOG (dialog) );
- if(result == GTK_RESPONSE_CANCEL || result ==
GTK_RESPONSE_DELETE_EVENT)
- {
- gtk_widget_destroy (GTK_WIDGET (dialog) );
- lsq_close_archive(lp_archive);
- }
- if(result == GTK_RESPONSE_OK)
- {
- dest_path =
gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
- if(lsq_archive_support_extract(lp_support,
lp_archive, dest_path, NULL))
- {
- GtkWidget *warning_dialog =
gtk_message_dialog_new(NULL,
-
GTK_DIALOG_DESTROY_WITH_PARENT,
-
GTK_MESSAGE_WARNING,
-
GTK_BUTTONS_CLOSE,
-
_("Squeeze cannot extract this archive type,\nthe application to support this
is missing."));
- gtk_dialog_run (GTK_DIALOG
(warning_dialog) );
- gtk_widget_destroy(warning_dialog);
- }
- g_free(dest_path);
- dest_path = NULL;
- }
- }
- else
- {
- if(lsq_archive_support_extract(lp_support, lp_archive,
dest_path, NULL))
- {
- GtkWidget *warning_dialog =
gtk_message_dialog_new(NULL,
-
GTK_DIALOG_DESTROY_WITH_PARENT,
-
GTK_MESSAGE_WARNING,
-
GTK_BUTTONS_CLOSE,
-
_("Squeeze cannot extract this archive type,\nthe application to support this
is missing."));
- gtk_dialog_run (GTK_DIALOG
(warning_dialog) );
- gtk_widget_destroy(warning_dialog);
- }
- }
}
g_object_ref(app);
+*/
return 0;
}
@@ -275,8 +216,8 @@
return 1;
}
}
- g_signal_connect(G_OBJECT(lp_archive), "lsq_status_changed",
G_CALLBACK(cb_sq_application_archive_status_changed), app);
- lp_support = lsq_get_support_for_mime(lp_archive->mime_info);
+ //g_signal_connect(G_OBJECT(lp_archive), "lsq_status_changed",
G_CALLBACK(cb_sq_application_archive_status_changed), app);
+ lp_support =
lsq_get_support_for_mimetype(lsq_archive_get_mimetype(lp_archive));
if(lsq_archive_support_add(lp_support, lp_archive, files))
{
/* FIXME: show warning dialog */
Modified: squeeze/trunk/src/application.h
===================================================================
--- squeeze/trunk/src/application.h 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/application.h 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/archive_store.c
===================================================================
--- squeeze/trunk/src/archive_store.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/archive_store.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,20 +1,18 @@
- /*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
- * 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 Library 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., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
- */
+/*
+ * 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
/* archive iter referencing needs testing */
/* TODO: archive signaling */
@@ -1277,7 +1275,7 @@
/* notify all we have a new archive and connect with the archive */
g_signal_emit(store,
sq_archive_store_signals[SQ_ARCHIVE_STORE_SIGNAL_NEW_ARCHIVE], 0, NULL);
- /* g_signal_connect(store->archive, "lsq_refreshed",
G_CALLBACK(cb_sq_archive_store_archive_refreshed), store); */
+ /* g_signal_connect(store->archive, "refreshed",
G_CALLBACK(cb_sq_archive_store_archive_refreshed), store); */
/* g_signal_connect(store->archive, "lsq_path_changed",
G_CALLBACK(cb_sq_archive_store_archive_path_changed), store); */
}
Modified: squeeze/trunk/src/archive_store.h
===================================================================
--- squeeze/trunk/src/archive_store.h 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/archive_store.h 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/extract_dialog.c
===================================================================
--- squeeze/trunk/src/extract_dialog.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/extract_dialog.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
@@ -107,10 +105,7 @@
GtkWidget *
sq_extract_archive_dialog_new(LSQArchiveSupport *support, LSQArchive *archive,
gboolean sel_option)
{
- GSList *extract_options;
- GtkWidget *test;
SQExtractArchiveDialog *dialog;
- SQWidgetFactory *factory = sq_widget_factory_new();
dialog = g_object_new(sq_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 */
@@ -121,6 +116,7 @@
gtk_container_add(GTK_CONTAINER(dialog->r_frame), r_vbox);
dialog->support = support;
+/*
if(dialog->support)
{
extract_options = lsq_archive_support_list_properties(support,
"extract");
@@ -131,6 +127,7 @@
extract_options = extract_options->next;
}
}
+*/
/* FIXME, does not work correctly when there are more dots in a
filename then the one identifying the extention */
gchar **filename_components =
g_strsplit(lsq_archive_get_filename(archive), ".", 2);
gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog),
filename_components[0]);
Modified: squeeze/trunk/src/extract_dialog.h
===================================================================
--- squeeze/trunk/src/extract_dialog.h 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/extract_dialog.h 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/main.c
===================================================================
--- squeeze/trunk/src/main.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/main.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -69,27 +69,6 @@
};
void
-sq_archive_status_changed(LSQArchive *archive, gpointer data)
-{
- if(archive->status == LSQ_ARCHIVESTATUS_IDLE)
- {
- opened_archives--;
- }
- if(opened_archives <= 0)
- gtk_main_quit();
-}
-
-void
-archive_operation_failed(LSQArchive *archive, gpointer data)
-{
-}
-
-void
-archive_initialized(LSQArchive *archive, gpointer data)
-{
-}
-
-void
cb_main_window_destroy(SQMainWindow *window, gpointer data)
{
gtk_main_quit();
Modified: squeeze/trunk/src/main_window.c
===================================================================
--- squeeze/trunk/src/main_window.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/main_window.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -103,8 +103,7 @@
cb_sq_main_window_notebook_page_removed(SQNotebook *, gpointer);
static void
cb_sq_main_window_notebook_file_activated(SQNotebook *, gchar *, gpointer);
-static void
-cb_sq_main_window_notebook_status_changed(SQNotebook *, LSQArchive *,
gpointer);
+/* static void cb_sq_main_window_notebook_status_changed(SQNotebook *,
LSQArchive *, gpointer); */
static void
sq_main_window_set_navigation(SQMainWindow *window);
@@ -459,7 +458,6 @@
g_signal_connect(G_OBJECT(window->notebook), "switch-page",
G_CALLBACK(cb_sq_main_window_notebook_page_switched), window);
g_signal_connect(G_OBJECT(window->notebook), "archive-removed",
G_CALLBACK(cb_sq_main_window_notebook_page_removed), window);
g_signal_connect(G_OBJECT(window->notebook), "file-activated",
G_CALLBACK(cb_sq_main_window_notebook_file_activated), window);
- g_signal_connect(G_OBJECT(window->notebook),
"active-archive-status-changed",
G_CALLBACK(cb_sq_main_window_notebook_status_changed), window);
/* menu item */
if(show_menubar)
@@ -593,40 +591,6 @@
static void
sq_main_window_new_action_menu(SQMainWindow *window, LSQArchiveSupport
*support, LSQArchive *archive)
{
- if(!window->menu_bar)
- return;
-
- GSList *iter, *list;
-
- gtk_container_remove(GTK_CONTAINER(window->menubar.menu_action),
window->menubar.menu_item_add);
- gtk_container_remove(GTK_CONTAINER(window->menubar.menu_action),
window->menubar.menu_item_extract);
- gtk_container_remove(GTK_CONTAINER(window->menubar.menu_action),
window->menubar.menu_item_remove);
-
- window->menubar.menu_action = gtk_menu_new();
-
gtk_menu_item_set_submenu(GTK_MENU_ITEM(window->menubar.menu_item_action),
window->menubar.menu_action);
-
- gtk_container_add(GTK_CONTAINER(window->menubar.menu_action),
window->menubar.menu_item_add);
- gtk_container_add(GTK_CONTAINER(window->menubar.menu_action),
window->menubar.menu_item_extract);
- gtk_container_add(GTK_CONTAINER(window->menubar.menu_action),
window->menubar.menu_item_remove);
-
- if(support)
- {
- iter = list =
sq_widget_factory_create_action_menu(window->widget_factory, support, archive);
- if(list)
- {
-
gtk_container_add(GTK_CONTAINER(window->menubar.menu_action),
gtk_separator_menu_item_new());
-
- do
- {
-
gtk_container_add(GTK_CONTAINER(window->menubar.menu_action), iter->data);
- }
- while((iter = iter->next));
-
- g_slist_free(list);
- }
- }
-
- gtk_widget_show_all(window->menubar.menu_action);
}
static void
@@ -651,7 +615,7 @@
if(!lsq_new_archive(archive_path, TRUE, NULL, &archive))
{
- support = lsq_get_support_for_mime(archive->mime_info);
+ support =
lsq_get_support_for_mimetype(lsq_archive_get_mimetype(archive));
sq_notebook_add_archive(SQ_NOTEBOOK(window->notebook),
archive, support, TRUE);
}
else
@@ -679,16 +643,16 @@
if(mod_type & GDK_SHIFT_MASK)
dialog = gtk_file_chooser_dialog_new(_("Open archive in new
window"),
-
GTK_WINDOW(window),
-
GTK_FILE_CHOOSER_ACTION_OPEN,
-
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-
GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL);
+ GTK_WINDOW(window),
+
GTK_FILE_CHOOSER_ACTION_OPEN,
+ GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN,
GTK_RESPONSE_OK, NULL);
else
dialog = gtk_file_chooser_dialog_new(_("Open archive"),
-
GTK_WINDOW(window),
-
GTK_FILE_CHOOSER_ACTION_OPEN,
-
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-
GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL);
+ GTK_WINDOW(window),
+
GTK_FILE_CHOOSER_ACTION_OPEN,
+ GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN,
GTK_RESPONSE_OK, NULL);
gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE);
result = gtk_dialog_run (GTK_DIALOG (dialog) );
@@ -863,7 +827,7 @@
gint result = 0;
sq_notebook_get_active_archive(SQ_NOTEBOOK(window->notebook),
&lp_archive, &lp_support);
- if(lsq_archive_support_can_stop(lp_support, lp_archive))
+ if(lsq_archive_can_stop(lp_archive))
lsq_archive_stop(lp_archive);
else
{
@@ -988,52 +952,13 @@
LSQArchiveSupport *lp_support;
sq_notebook_page_get_archive(notebook, &lp_archive, &lp_support,
page_nr);
SQMainWindow *window = SQ_MAIN_WINDOW(data);
- LSQArchiveStatus status = LSQ_ARCHIVESTATUS_IDLE;
- if(lp_archive)
- status = lsq_archive_get_status(lp_archive);
-
- if(lp_archive && (status == LSQ_ARCHIVESTATUS_IDLE || status ==
LSQ_ARCHIVESTATUS_ERROR || status == LSQ_ARCHIVESTATUS_USERBREAK))
- {
- if(window->menu_bar)
- {
-
gtk_widget_set_sensitive(GTK_WIDGET(window->menubar.menu_item_add), TRUE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->menubar.menu_item_extract), TRUE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->menubar.menu_item_remove), TRUE);
- }
-
- if(window->tool_bar)
- {
-
gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_add), TRUE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_extract), TRUE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_remove), TRUE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_stop), FALSE);
- }
- }
- else
- {
- if(window->menu_bar)
- {
-
gtk_widget_set_sensitive(GTK_WIDGET(window->menubar.menu_item_add), FALSE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->menubar.menu_item_extract), FALSE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->menubar.menu_item_remove), FALSE);
- }
-
- if(window->tool_bar)
- {
-
gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_add), FALSE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_extract), FALSE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_remove), FALSE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_stop), TRUE);
- }
- }
-
gtk_window_set_title(GTK_WINDOW(window), g_strconcat(PACKAGE_NAME, " -
", lsq_archive_get_filename(lp_archive), NULL));
sq_main_window_new_action_menu(window, lp_support, lp_archive);
guint context_id =
gtk_statusbar_get_context_id(GTK_STATUSBAR(window->statusbar), "Window
Statusbar");
- gtk_statusbar_push(GTK_STATUSBAR(window->statusbar), context_id,
lsq_archive_get_status_msg(lp_archive));
+ gtk_statusbar_push(GTK_STATUSBAR(window->statusbar), context_id,
lsq_archive_get_status(lp_archive));
}
static void
@@ -1140,7 +1065,7 @@
if(!lsq_open_archive(path, &archive))
{
- support = lsq_get_support_for_mime(archive->mime_info);
+ support =
lsq_get_support_for_mimetype(lsq_archive_get_mimetype(archive));
if(replace < 0)
sq_notebook_add_archive(SQ_NOTEBOOK(window->notebook),
archive, support, FALSE);
else
@@ -1206,34 +1131,13 @@
}
}
+/*
static void
cb_sq_main_window_notebook_status_changed(SQNotebook *notebook, LSQArchive
*archive, gpointer userdata)
{
SQMainWindow *window = SQ_MAIN_WINDOW(userdata);
- LSQArchiveStatus status = lsq_archive_get_status(archive);
-
- if((status == LSQ_ARCHIVESTATUS_IDLE) || (status ==
LSQ_ARCHIVESTATUS_USERBREAK) || (status == LSQ_ARCHIVESTATUS_ERROR))
- {
- if(window->menu_bar)
- {
-
gtk_widget_set_sensitive(window->menubar.menu_item_close, TRUE);
-
/*gtk_widget_set_sensitive(window->menubar.menu_item_properties, TRUE);*/
-
- gtk_widget_set_sensitive(window->menubar.menu_item_add,
TRUE);
-
gtk_widget_set_sensitive(window->menubar.menu_item_extract, TRUE);
-
gtk_widget_set_sensitive(window->menubar.menu_item_remove, TRUE);
- }
-
- if(window->tool_bar)
- {
-
gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_add), TRUE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_extract), TRUE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_remove), TRUE);
-
gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_stop), FALSE);
- }
- }
-
guint context_id =
gtk_statusbar_get_context_id(GTK_STATUSBAR(window->statusbar), "Window
Statusbar");
- gtk_statusbar_push(GTK_STATUSBAR(window->statusbar), context_id,
lsq_archive_get_status_msg(archive));
+ gtk_statusbar_push(GTK_STATUSBAR(window->statusbar), context_id,
lsq_archive_get_status(archive));
}
+*/
Modified: squeeze/trunk/src/navigation_bar.c
===================================================================
--- squeeze/trunk/src/navigation_bar.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/navigation_bar.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/navigation_bar.h
===================================================================
--- squeeze/trunk/src/navigation_bar.h 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/navigation_bar.h 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/notebook.c
===================================================================
--- squeeze/trunk/src/notebook.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/notebook.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
@@ -54,8 +52,6 @@
cb_notebook_close_archive(GtkButton *button, GtkWidget *child);
static void
-cb_notebook_archive_status_changed(LSQArchive *archive, SQNotebook *notebook);
-static void
cb_notebook_archive_refreshed(LSQArchive *archive, GtkTreeView *tree_view);
static void
cb_notebook_file_activated(SQArchiveStore *, gchar *, SQNotebook *);
@@ -160,13 +156,6 @@
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_STRING, NULL);
- sq_notebook_signals[SQ_NOTEBOOK_SIGNAL_ACTIVE_ARCHIVE_STATUS_CHANGED] =
g_signal_new("active-archive-status-changed",
- G_TYPE_FROM_CLASS(notebook_class),
- G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, 0,
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_OBJECT, NULL);
-
pspec = g_param_spec_boolean("multi_tab",
"",
"",
@@ -469,7 +458,8 @@
{
GtkWidget *lbl_hbox = gtk_hbox_new(FALSE, 0);
GtkWidget *label = gtk_label_new(lsq_archive_get_filename(archive));
- GtkWidget *archive_image =
gtk_image_new_from_icon_name(thunar_vfs_mime_info_lookup_icon_name(archive->mime_info,
notebook->icon_theme), GTK_ICON_SIZE_MENU);
+ GtkWidget *archive_image = gtk_image_new_from_icon_name("unknown",
GTK_ICON_SIZE_MENU);
+
/*thunar_vfs_mime_info_lookup_icon_name(lsq_archive_get_mimetype(archive),
notebook->icon_theme), GTK_ICON_SIZE_MENU);*/
GtkWidget *close_button = gtk_button_new();
GtkWidget *close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE,
GTK_ICON_SIZE_MENU);
GtkWidget *scroll_window = gtk_scrolled_window_new(NULL, NULL);
@@ -502,8 +492,7 @@
gtk_widget_show_all(tree_view);
gtk_widget_show(scroll_window);
- g_signal_connect(G_OBJECT(archive), "lsq_status_changed",
G_CALLBACK(cb_notebook_archive_status_changed), notebook);
- g_signal_connect(G_OBJECT(archive), "lsq_refreshed",
G_CALLBACK(cb_notebook_archive_refreshed), tree_view);
+ g_signal_connect(G_OBJECT(archive), "refreshed",
G_CALLBACK(cb_notebook_archive_refreshed), tree_view);
g_signal_connect(G_OBJECT(close_button), "clicked",
G_CALLBACK(cb_notebook_close_archive), scroll_window);
g_signal_connect(G_OBJECT(tree_model), "sq_file_activated",
G_CALLBACK(cb_notebook_file_activated), notebook);
@@ -536,65 +525,6 @@
}
-void
-cb_notebook_archive_status_changed(LSQArchive *archive, SQNotebook *notebook)
-{
- GtkWidget *dialog = NULL;
-
-#ifdef DEBUG
- g_debug("NOTEBOOK: Archive status changed");
-#endif /* DEBUG */
- if(lsq_archive_get_status(archive) == LSQ_ARCHIVESTATUS_ERROR)
- {
- /*
- switch(lsq_archive_get_old_status(archive))
- {
- case LSQ_ARCHIVESTATUS_REFRESH:
- dialog = gtk_message_dialog_new(NULL,
- 0,
-
GTK_MESSAGE_ERROR,
-
GTK_BUTTONS_OK,
-
_("Failed to open archive '%s'."),
-
lsq_archive_get_filename(archive));
- break;
- case LSQ_ARCHIVESTATUS_EXTRACT:
- case LSQ_ARCHIVESTATUS_PREPARE_VIEW:
- dialog = gtk_message_dialog_new(NULL,
- 0,
-
GTK_MESSAGE_ERROR,
-
GTK_BUTTONS_OK,
-
_("Failed to extract contents of archive '%s'."),
-
lsq_archive_get_filename(archive));
- break;
- default:
- break;
- }
- */
- if(dialog)
- {
- gtk_dialog_run((GtkDialog *)dialog);
- gtk_widget_destroy(dialog);
- }
- }
- /*
- if(lsq_archive_get_status(archive) == LSQ_ARCHIVESTATUS_IDLE)
- {
- switch(lsq_archive_get_old_status(archive))
- {
- case LSQ_ARCHIVESTATUS_ADD:
-
if(lsq_archive_support_refresh(archive->support, archive))
- {
- // FIXME: show warning dialog
- }
- break;
- default:break;
- }
- }
- */
- if(sq_notebook_is_active_archive(notebook, archive))
- g_signal_emit(G_OBJECT(notebook),
sq_notebook_signals[SQ_NOTEBOOK_SIGNAL_ACTIVE_ARCHIVE_STATUS_CHANGED], 0,
archive, NULL);
-}
-
static void
cb_notebook_close_archive(GtkButton *button, GtkWidget *child)
{
@@ -692,7 +622,7 @@
if(!show_only_filenames)
{
- for(x = LSQ_ARCHIVE_PROP_USER; x <
lsq_archive_n_property(archive); ++x)
+ for(x = LSQ_ARCHIVE_PROP_USER; x <
lsq_archive_n_entry_properties(archive); ++x)
{
switch(lsq_archive_get_entry_property_type(archive, x))
{
@@ -793,8 +723,7 @@
sq_archive_store_set_archive(SQ_ARCHIVE_STORE(store), archive);
sq_archive_store_set_support(SQ_ARCHIVE_STORE(store), support);
- g_signal_connect(G_OBJECT(archive), "lsq_status_changed",
G_CALLBACK(cb_notebook_archive_status_changed), notebook);
- g_signal_connect(G_OBJECT(archive), "lsq_refreshed",
G_CALLBACK(cb_notebook_archive_refreshed), treeview);
+ g_signal_connect(G_OBJECT(archive), "refreshed",
G_CALLBACK(cb_notebook_archive_refreshed), treeview);
if(lsq_archive_support_refresh(support, archive))
{
Modified: squeeze/trunk/src/notebook.h
===================================================================
--- squeeze/trunk/src/notebook.h 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/notebook.h 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/path_bar.c
===================================================================
--- squeeze/trunk/src/path_bar.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/path_bar.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/path_bar.h
===================================================================
--- squeeze/trunk/src/path_bar.h 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/path_bar.h 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/preferences_dialog.c
===================================================================
--- squeeze/trunk/src/preferences_dialog.c 2007-02-27 21:28:04 UTC (rev
25040)
+++ squeeze/trunk/src/preferences_dialog.c 2007-02-28 12:01:15 UTC (rev
25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/preferences_dialog.h
===================================================================
--- squeeze/trunk/src/preferences_dialog.h 2007-02-27 21:28:04 UTC (rev
25040)
+++ squeeze/trunk/src/preferences_dialog.h 2007-02-28 12:01:15 UTC (rev
25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/properties_dialog.c
===================================================================
--- squeeze/trunk/src/properties_dialog.c 2007-02-27 21:28:04 UTC (rev
25040)
+++ squeeze/trunk/src/properties_dialog.c 2007-02-28 12:01:15 UTC (rev
25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/properties_dialog.h
===================================================================
--- squeeze/trunk/src/properties_dialog.h 2007-02-27 21:28:04 UTC (rev
25040)
+++ squeeze/trunk/src/properties_dialog.h 2007-02-28 12:01:15 UTC (rev
25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/settings.c
===================================================================
--- squeeze/trunk/src/settings.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/settings.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
+/*
* 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
Modified: squeeze/trunk/src/settings.h
===================================================================
--- squeeze/trunk/src/settings.h 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/settings.h 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
+/*
* 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
Modified: squeeze/trunk/src/tool_bar.c
===================================================================
--- squeeze/trunk/src/tool_bar.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/tool_bar.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
@@ -319,18 +317,12 @@
LSQArchive *lp_archive = sq_archive_store_get_archive(store);
if(!lp_archive)
- gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox), FALSE);
- else
- {
- if(lsq_archive_get_status(lp_archive) != LSQ_ARCHIVESTATUS_IDLE)
- gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox),
FALSE);
- else
- gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox),
TRUE);
- }
- gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->up_button), FALSE);
- gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->home_button), FALSE);
- gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->forward_button), FALSE);
- gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->back_button), FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox), TRUE);
+
+ gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->up_button), TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->home_button), TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->forward_button), TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->back_button), TRUE);
}
static void
@@ -385,10 +377,6 @@
if(!path)
path = g_strdup("");
sq_tool_bar_refresh(tool_bar, path);
- if(bar->store->archive->status == LSQ_ARCHIVESTATUS_IDLE)
- gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox),
TRUE);
- else
- gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox),
FALSE);
g_free(path);
}
else
Modified: squeeze/trunk/src/tool_bar.h
===================================================================
--- squeeze/trunk/src/tool_bar.h 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/tool_bar.h 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
Modified: squeeze/trunk/src/widget_factory.c
===================================================================
--- squeeze/trunk/src/widget_factory.c 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/widget_factory.c 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
+/*
* 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.
Modified: squeeze/trunk/src/widget_factory.h
===================================================================
--- squeeze/trunk/src/widget_factory.h 2007-02-27 21:28:04 UTC (rev 25040)
+++ squeeze/trunk/src/widget_factory.h 2007-02-28 12:01:15 UTC (rev 25041)
@@ -1,6 +1,4 @@
/*
- * Copyright (c) 2006 Stephan Arts <[EMAIL PROTECTED]>
- *
* 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
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits