[Xfce4-commits] r24134 - in squeeze/trunk: . libsqueeze po src

Stephan Arts stephan at xfce.org
Tue Dec 19 01:14:52 CET 2006


Author: stephan
Date: 2006-12-19 00:14:52 +0000 (Tue, 19 Dec 2006)
New Revision: 24134

Modified:
   squeeze/trunk/AUTHORS
   squeeze/trunk/configure.in.in
   squeeze/trunk/libsqueeze/archive.c
   squeeze/trunk/libsqueeze/archive.h
   squeeze/trunk/po/fi.po
   squeeze/trunk/po/nl.po
   squeeze/trunk/src/main_window.c
   squeeze/trunk/src/notebook.c
   squeeze/trunk/src/notebook.h
Log:
Introducted status-messages in statusbar



Modified: squeeze/trunk/AUTHORS
===================================================================
--- squeeze/trunk/AUTHORS	2006-12-18 21:08:07 UTC (rev 24133)
+++ squeeze/trunk/AUTHORS	2006-12-19 00:14:52 UTC (rev 24134)
@@ -1,2 +1,2 @@
-Stephan Arts     - psyBSD   - <psybsd at gmail.com>
-Peter de Ridder  - cavalier - <pc.ridder at zonnet.nl>
+Stephan Arts     - <stephan at xfce.org>
+Peter de Ridder  - <peter at xfce.org>

Modified: squeeze/trunk/configure.in.in
===================================================================
--- squeeze/trunk/configure.in.in	2006-12-18 21:08:07 UTC (rev 24133)
+++ squeeze/trunk/configure.in.in	2006-12-19 00:14:52 UTC (rev 24134)
@@ -17,7 +17,7 @@
 m4_define([squeeze_version_nano], []) # Leave empty for no nano version
 m4_define([squeeze_version_build], [r at REVISION@])
 m4_define([squeeze_version_tag], [svn]) # Leave empty for releases
-m4_define([squeeze_version], [ifelse(squeeze_version_branch(), [], [squeeze_version_major().squeeze_version_minor().squeeze_version_micro()ifelse(squeeze_version_nano(), [], [], [.squeeze_version_nano()])], [squeeze_version_branch()])-ifelse(squeeze_version_tag(), [svn], [squeeze_version_tag()-squeeze_version_build()], [squeeze_version_tag()])])
+m4_define([squeeze_version], [ifelse(squeeze_version_branch(), [], [squeeze_version_major().squeeze_version_minor().squeeze_version_micro()ifelse(squeeze_version_nano(), [], [], [.squeeze_version_nano()])], [squeeze_version_branch()])ifelse(squeeze_version_tag(),[],[], [-ifelse(squeeze_version_tag(), [svn], [squeeze_version_tag()-squeeze_version_build()], [squeeze_version_tag()])])])
 
 dnl *******************************************
 dnl *** Debugging support for SVN snapshots ***

Modified: squeeze/trunk/libsqueeze/archive.c
===================================================================
--- squeeze/trunk/libsqueeze/archive.c	2006-12-18 21:08:07 UTC (rev 24133)
+++ squeeze/trunk/libsqueeze/archive.c	2006-12-19 00:14:52 UTC (rev 24134)
@@ -1320,3 +1320,45 @@
 	g_return_val_if_fail(LSQ_IS_ARCHIVE(archive), LSQ_ARCHIVESTATUS_ERROR);
 	return archive->old_status;
 }
+
+const gchar *
+lsq_archive_get_status_msg(LSQArchive *archive)
+{
+	const gchar *msg;
+	g_return_val_if_fail(LSQ_IS_ARCHIVE(archive), "");
+	switch(archive->status)
+	{
+		case LSQ_ARCHIVESTATUS_INIT:
+			msg = N_("Initializing archive");
+			break;
+		case LSQ_ARCHIVESTATUS_REFRESH:
+			msg = N_("Refreshing archive contents");
+			break;
+		case LSQ_ARCHIVESTATUS_ADD:
+			msg = N_("Adding file(s) to archive");
+			break;
+		case LSQ_ARCHIVESTATUS_EXTRACT:
+			msg = N_("Extracting file(s) from archive");
+			break;
+		case LSQ_ARCHIVESTATUS_REMOVE:
+			msg = N_("Removing file(s) from archive");
+			break;
+		case LSQ_ARCHIVESTATUS_IDLE:
+			msg = "";
+			break;
+		case LSQ_ARCHIVESTATUS_CUSTOM:
+			msg = N_("Performing an extended action");
+			break;
+		case LSQ_ARCHIVESTATUS_USERBREAK:
+			msg = "USer did stuff";
+			break;
+		case LSQ_ARCHIVESTATUS_ERROR:
+			msg = "error";
+			break;
+		default: /* Why ?! */
+			g_debug("%u\n", archive->status);
+			msg = N_("Done");
+			break;
+	}
+	return msg;
+}

Modified: squeeze/trunk/libsqueeze/archive.h
===================================================================
--- squeeze/trunk/libsqueeze/archive.h	2006-12-18 21:08:07 UTC (rev 24133)
+++ squeeze/trunk/libsqueeze/archive.h	2006-12-19 00:14:52 UTC (rev 24134)
@@ -103,6 +103,7 @@
 
 void                lsq_archive_set_status(LSQArchive *archive, LSQArchiveStatus status);
 LSQArchiveStatus    lsq_archive_get_status(LSQArchive *archive);
+const gchar *       lsq_archive_get_status_msg(LSQArchive *archive);
 LSQArchiveStatus    lsq_archive_get_old_status(LSQArchive *archive);
 const gchar *       lsq_archive_get_filename(LSQArchive *archive);
 

Modified: squeeze/trunk/po/fi.po
===================================================================
--- squeeze/trunk/po/fi.po	2006-12-18 21:08:07 UTC (rev 24133)
+++ squeeze/trunk/po/fi.po	2006-12-19 00:14:52 UTC (rev 24134)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: xarchiver 0.4.2rc2\n"
 "Report-Msgid-Bugs-To: stephan at xfce.org\n"
-"POT-Creation-Date: 2006-12-18 22:06+0100\n"
+"POT-Creation-Date: 2006-12-19 00:13+0100\n"
 "PO-Revision-Date: 2006-12-13 12:43+0200\n"
 "Last-Translator: Jari Rahkonen <jari.rahkonen at pp1.inet.fi>\n"
 "Language-Team: Finnish <translation-team-fi at lists.sourceforge.net>\n"
@@ -23,6 +23,19 @@
 msgid "Mime type"
 msgstr "MIME-tyyppi"
 
+#: ../libsqueeze/archive.c:1331
+msgid "Refreshing archive contents"
+msgstr ""
+
+#: ../libsqueeze/archive.c:1334
+#, fuzzy
+msgid "Adding file(s) to archive"
+msgstr "Lisää tiedosto(ja) arkistoon"
+
+#: ../libsqueeze/archive.c:1340
+msgid "..."
+msgstr ""
+
 #: ../libsqueeze/archive-support-gnu-tar.c:155
 #: ../libsqueeze/archive-support-zip.c:138
 msgid "Overwrite existing files"
@@ -193,23 +206,23 @@
 "%s: %s\n"
 "Kirjoittamalla %s --help saat täyden listan komentorivivalitsimista.\n"
 
-#: ../src/main_window.c:117
+#: ../src/main_window.c:120
 msgid "Internal Style"
 msgstr "Sisäinen tyyli"
 
-#: ../src/main_window.c:119
+#: ../src/main_window.c:122
 msgid "Tool Bar Style"
 msgstr "Työkalupalkkityyli"
 
-#: ../src/main_window.c:122
+#: ../src/main_window.c:125
 msgid "Path Bar Style"
 msgstr "Polkupalkkityyli"
 
-#: ../src/main_window.c:170
+#: ../src/main_window.c:173
 msgid "Navigation Style"
 msgstr "Navigointitapa"
 
-#: ../src/main_window.c:171
+#: ../src/main_window.c:174
 msgid ""
 "Style of navigation\n"
 "The style to navigate trough the archive"
@@ -218,69 +231,69 @@
 "Tapa, jolla navigoit arkistossa"
 
 #. File menu
-#: ../src/main_window.c:256
+#: ../src/main_window.c:259
 msgid "_File"
 msgstr "_Tiedosto"
 
 #. Action menu: ref all the childs
-#: ../src/main_window.c:287
+#: ../src/main_window.c:291
 msgid "_Action"
 msgstr "Toi_minto"
 
-#: ../src/main_window.c:292
+#: ../src/main_window.c:296
 msgid "_Add"
 msgstr "_Lisää"
 
-#: ../src/main_window.c:298
+#: ../src/main_window.c:302
 msgid "_Extract"
 msgstr "P_ura"
 
 #. View menu
-#: ../src/main_window.c:312
+#: ../src/main_window.c:316
 msgid "_View"
 msgstr "_Näytä"
 
 #. Help menu
-#: ../src/main_window.c:334
+#: ../src/main_window.c:338
 msgid "_Help"
 msgstr ""
 
-#: ../src/main_window.c:365
+#: ../src/main_window.c:369
 msgid "Add"
 msgstr "Lisää"
 
-#: ../src/main_window.c:369 ../src/main_window.c:844
+#: ../src/main_window.c:373 ../src/main_window.c:861
 #: ../src/extract_dialog.c:102
 msgid "Extract"
 msgstr "Pura"
 
-#: ../src/main_window.c:612
+#: ../src/main_window.c:617
 msgid "Open archive"
 msgstr "Avaa arkisto"
 
-#: ../src/main_window.c:763
+#: ../src/main_window.c:777
 msgid ""
 "Squeeze is a lightweight and flexible archive manager for the Xfce Desktop "
 "Environment"
 msgstr ""
 
-#: ../src/main_window.c:769
+#: ../src/main_window.c:783
 msgid "translator-credits"
 msgstr "Jari Rahkonen <jari.rahkonen at pp1.inet.fi>"
 
-#: ../src/main_window.c:843
+#: ../src/main_window.c:860
 msgid "Which action do you want to perform on the selected file(s)?"
 msgstr "Mitä haluat tehdä valitu(i)lle tiedosto(i)lle?"
 
-#: ../src/main_window.c:844
+#: ../src/main_window.c:861
 msgid "View"
 msgstr "Näytä"
 
-#: ../src/main_window.c:907
+#: ../src/main_window.c:924
 msgid "Failed to open file"
 msgstr "Linkin avaaminen epäonnistui"
 
-#: ../src/main_window.c:908
+#: ../src/main_window.c:925
 #, c-format
 msgid ""
 "'%s'\n"
@@ -371,12 +384,12 @@
 msgid "The amount of space between the path buttons"
 msgstr "Polkupainikkeiden välinen tyhjä tila"
 
-#: ../src/notebook.c:319
+#: ../src/notebook.c:324
 #, c-format
 msgid "Failed to open archive '%s'."
 msgstr "Arkiston \"%s\" avaaminen epäonnistui."
 
-#: ../src/notebook.c:322
+#: ../src/notebook.c:327
 #, fuzzy, c-format
 msgid "Failed to extract contents of archive '%s'."
 msgstr "Arkiston \"%s\" avaaminen epäonnistui."

Modified: squeeze/trunk/po/nl.po
===================================================================
--- squeeze/trunk/po/nl.po	2006-12-18 21:08:07 UTC (rev 24133)
+++ squeeze/trunk/po/nl.po	2006-12-19 00:14:52 UTC (rev 24134)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: Squeeze 0.0.1-svn-r24005\n"
 "Report-Msgid-Bugs-To: stephan at xfce.org\n"
-"POT-Creation-Date: 2006-12-18 22:06+0100\n"
+"POT-Creation-Date: 2006-12-19 00:13+0100\n"
 "PO-Revision-Date: 2006-11-28 22:52+0100\n"
 "Last-Translator: Stephan Arts <stephan at xfce.org>\n"
 "Language-Team: Dutch <vertaling at vrijschrift.org>\n"
@@ -24,6 +24,18 @@
 msgid "Mime type"
 msgstr "Mime type"
 
+#: ../libsqueeze/archive.c:1331
+msgid "Refreshing archive contents"
+msgstr "Inhoud van archief vernieuwen"
+
+#: ../libsqueeze/archive.c:1334
+msgid "Adding file(s) to archive"
+msgstr "Bestand(en) aan het toevoegen aan archief"
+
+#: ../libsqueeze/archive.c:1340
+msgid "..."
+msgstr "..."
+
 #: ../libsqueeze/archive-support-gnu-tar.c:155
 #: ../libsqueeze/archive-support-zip.c:138
 msgid "Overwrite existing files"
@@ -194,23 +206,23 @@
 "%s: %s\n"
 "Probeer %s --help voor een volledige lijst van mogelijke opties.\n"
 
-#: ../src/main_window.c:117
+#: ../src/main_window.c:120
 msgid "Internal Style"
 msgstr "Interne Stijl"
 
-#: ../src/main_window.c:119
+#: ../src/main_window.c:122
 msgid "Tool Bar Style"
 msgstr "Werkbalk Stijl"
 
-#: ../src/main_window.c:122
+#: ../src/main_window.c:125
 msgid "Path Bar Style"
 msgstr "Padbalk Stijl"
 
-#: ../src/main_window.c:170
+#: ../src/main_window.c:173
 msgid "Navigation Style"
 msgstr "Navigatie Stijl"
 
-#: ../src/main_window.c:171
+#: ../src/main_window.c:174
 msgid ""
 "Style of navigation\n"
 "The style to navigate trough the archive"
@@ -219,47 +231,47 @@
 "De stijl om te navigeren door het archief"
 
 #. File menu
-#: ../src/main_window.c:256
+#: ../src/main_window.c:259
 msgid "_File"
 msgstr "_Bestand"
 
 #. Action menu: ref all the childs
-#: ../src/main_window.c:287
+#: ../src/main_window.c:291
 msgid "_Action"
 msgstr "_Actie"
 
-#: ../src/main_window.c:292
+#: ../src/main_window.c:296
 msgid "_Add"
 msgstr "_Toevoegen"
 
-#: ../src/main_window.c:298
+#: ../src/main_window.c:302
 msgid "_Extract"
 msgstr "_Uitpakken"
 
 #. View menu
-#: ../src/main_window.c:312
+#: ../src/main_window.c:316
 msgid "_View"
 msgstr "B_eeld"
 
 #. Help menu
-#: ../src/main_window.c:334
+#: ../src/main_window.c:338
 msgid "_Help"
 msgstr "_Help"
 
-#: ../src/main_window.c:365
+#: ../src/main_window.c:369
 msgid "Add"
 msgstr "Toevoegen"
 
-#: ../src/main_window.c:369 ../src/main_window.c:844
+#: ../src/main_window.c:373 ../src/main_window.c:861
 #: ../src/extract_dialog.c:102
 msgid "Extract"
 msgstr "Uitpakken"
 
-#: ../src/main_window.c:612
+#: ../src/main_window.c:617
 msgid "Open archive"
 msgstr "Archief openen"
 
-#: ../src/main_window.c:763
+#: ../src/main_window.c:777
 msgid ""
 "Squeeze is a lightweight and flexible archive manager for the Xfce Desktop "
 "Environment"
@@ -267,23 +279,23 @@
 "Squeeze is een lightgewicht en flexibele archief beheerder voor de Xfce "
 "Bureaublad omgeving"
 
-#: ../src/main_window.c:769
+#: ../src/main_window.c:783
 msgid "translator-credits"
 msgstr "Stephan Arts <stephan at xfce.org>"
 
-#: ../src/main_window.c:843
+#: ../src/main_window.c:860
 msgid "Which action do you want to perform on the selected file(s)?"
 msgstr "Welke actie wil je uitvoeren op de geselecteerde bestand(en)?"
 
-#: ../src/main_window.c:844
+#: ../src/main_window.c:861
 msgid "View"
 msgstr "Weergeven"
 
-#: ../src/main_window.c:907
+#: ../src/main_window.c:924
 msgid "Failed to open file"
 msgstr "Kan bestand niet openen"
 
-#: ../src/main_window.c:908
+#: ../src/main_window.c:925
 #, c-format
 msgid ""
 "'%s'\n"
@@ -374,12 +386,12 @@
 msgid "The amount of space between the path buttons"
 msgstr "De ruimte tussen de pad knoppen"
 
-#: ../src/notebook.c:319
+#: ../src/notebook.c:324
 #, c-format
 msgid "Failed to open archive '%s'."
 msgstr "Kan archief '%s' niet openen."
 
-#: ../src/notebook.c:322
+#: ../src/notebook.c:327
 #, c-format
 msgid "Failed to extract contents of archive '%s'."
 msgstr "Het uitpakken van de inhoud van archief '%s' is mislukt."

Modified: squeeze/trunk/src/main_window.c
===================================================================
--- squeeze/trunk/src/main_window.c	2006-12-18 21:08:07 UTC (rev 24133)
+++ squeeze/trunk/src/main_window.c	2006-12-19 00:14:52 UTC (rev 24134)
@@ -92,6 +92,7 @@
 
 static void cb_sq_main_close_window(GtkWidget *widget, gpointer userdata);
 
+static void cb_sq_main_properties(GtkWidget *widget, gpointer userdata);
 static void cb_sq_main_preferences(GtkWidget *widget, gpointer userdata);
 
 static void cb_sq_main_about(GtkWidget *widget, gpointer userdata);
@@ -102,6 +103,8 @@
 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
 sq_main_window_set_navigation(SQMainWindow *window);
@@ -281,6 +284,7 @@
 
 		g_signal_connect(G_OBJECT(window->menubar.menu_item_new), "activate", G_CALLBACK(cb_sq_main_new_archive), window);
 		g_signal_connect(G_OBJECT(window->menubar.menu_item_open), "activate", G_CALLBACK(cb_sq_main_open_archive), window);
+		g_signal_connect(G_OBJECT(window->menubar.menu_item_properties), "activate", G_CALLBACK(cb_sq_main_properties), window);
 		g_signal_connect(G_OBJECT(window->menubar.menu_item_close), "activate", G_CALLBACK(cb_sq_main_close_archive), window);
 		g_signal_connect(G_OBJECT(window->menubar.menu_item_quit), "activate", G_CALLBACK(cb_sq_main_close_window), window);
 		/* Action menu: ref all the childs*/
@@ -426,7 +430,8 @@
 	window->notebook = sq_notebook_new(window->navigationbar, use_tabs, window->accel_group);
 	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), "sq_file_activated", G_CALLBACK(cb_sq_main_window_notebook_file_activated), 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);
 /* Statusbar */
 
 	window->statusbar = gtk_statusbar_new();
@@ -742,8 +747,17 @@
 static void
 cb_sq_main_stop_archive(GtkWidget *widget, gpointer userdata)
 {
+
 }
 
+static void 
+cb_sq_main_properties(GtkWidget *widget, gpointer userdata)
+{
+
+}
+
+
+
 static void
 cb_sq_main_preferences(GtkWidget *widget, gpointer userdata)
 {
@@ -755,7 +769,7 @@
 static void
 cb_sq_main_about(GtkWidget *widget, gpointer userdata)
 {
-	const gchar *authors[] = {"Stephan Arts <stephan at xfce.org>","Peter de Ridder <peter at xfce.org>", NULL};
+	const gchar *authors[] = {"Stephan Arts <stephan at xfce.org>","Peter de Ridder <peter at xfce.org>", "Based on Xarchiver, written by Giuseppe Torelli", NULL};
 	GtkWidget *about_dialog = gtk_about_dialog_new();
 
 	gtk_about_dialog_set_name((GtkAboutDialog *)about_dialog, PACKAGE_NAME);
@@ -810,6 +824,9 @@
 	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));
 }
 
 static void
@@ -951,3 +968,12 @@
 		gtk_widget_show_all((GtkWidget *)nav_bar);
 	}	
 }
+
+static void
+cb_sq_main_window_notebook_status_changed(SQNotebook *notebook, LSQArchive *archive, gpointer userdata)
+{
+	SQMainWindow *window = SQ_MAIN_WINDOW(userdata);
+
+	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));
+}

Modified: squeeze/trunk/src/notebook.c
===================================================================
--- squeeze/trunk/src/notebook.c	2006-12-18 21:08:07 UTC (rev 24133)
+++ squeeze/trunk/src/notebook.c	2006-12-19 00:14:52 UTC (rev 24134)
@@ -63,7 +63,7 @@
 	SQ_NOTEBOOK_MULTI_TAB = 1
 };
 
-static gint sq_notebook_signals[4];
+static gint sq_notebook_signals[5];
 
 GType
 sq_notebook_get_type ()
@@ -126,20 +126,25 @@
 			g_cclosure_marshal_VOID__VOID,
 			G_TYPE_NONE, 0, NULL);
 
-	sq_notebook_signals[3] = g_signal_new("sq_file_activated",
+	sq_notebook_signals[3] = g_signal_new("file-activated",
 			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_STRING, NULL);
 
+	sq_notebook_signals[4] = 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_STRING, NULL);
+
 	pspec = g_param_spec_boolean("multi_tab",
 		"",
 		"",
 		TRUE,
-		G_PARAM_READWRITE);
-	g_object_class_install_property(object_class, SQ_NOTEBOOK_MULTI_TAB, pspec);
-
+		G_PARAM_READWRITE); g_object_class_install_property(object_class, SQ_NOTEBOOK_MULTI_TAB, pspec); 
 }
 
 static void
@@ -338,8 +343,9 @@
 				break;
 			default:break;
 		}
-
 	}
+	if(sq_notebook_is_active_archive(notebook, archive))
+		g_signal_emit(G_OBJECT(notebook), sq_notebook_signals[4], 0, archive, NULL);
 }
 
 static void
@@ -477,22 +483,31 @@
 	g_signal_emit(G_OBJECT(notebook), sq_notebook_signals[3], 0, path, NULL);
 }
 
-
-void
-sq_notebook_get_active_archive(SQNotebook *notebook, LSQArchive **lp_archive, LSQArchiveSupport **lp_support)
+gboolean
+sq_notebook_is_active_archive(SQNotebook *notebook, LSQArchive *archive)
 {
 	gint n = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook));
 
 	GtkWidget *scrolledwindow = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), n);
+	if(!scrolledwindow)
+		return FALSE;
 	GtkWidget *treeview = gtk_bin_get_child(GTK_BIN(scrolledwindow));
 	GtkTreeModel *archive_store = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview));
 
-	if(lp_archive)
-		(*lp_archive) = sq_archive_store_get_archive(SQ_ARCHIVE_STORE(archive_store));
-	if(lp_support)
-		(*lp_support) = sq_archive_store_get_support(SQ_ARCHIVE_STORE(archive_store));
+	LSQArchive * lp_archive = sq_archive_store_get_archive(SQ_ARCHIVE_STORE(archive_store));
+	if(lp_archive == archive)
+		return TRUE;
+	return FALSE;
 }
 
+void
+sq_notebook_get_active_archive(SQNotebook *notebook, LSQArchive **lp_archive, LSQArchiveSupport **lp_support)
+{
+	gint n = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook));
+		
+	sq_notebook_page_get_archive(notebook, lp_archive, lp_support, n);
+}
+
 GtkWidget *
 sq_notebook_get_active_child(SQNotebook *notebook)
 {

Modified: squeeze/trunk/src/notebook.h
===================================================================
--- squeeze/trunk/src/notebook.h	2006-12-18 21:08:07 UTC (rev 24133)
+++ squeeze/trunk/src/notebook.h	2006-12-19 00:14:52 UTC (rev 24134)
@@ -73,6 +73,7 @@
 void        sq_notebook_page_get_archive(SQNotebook *, LSQArchive **, LSQArchiveSupport **, gint n);
 void        sq_notebook_set_icon_theme(SQNotebook *, GtkIconTheme *);
 void        sq_notebook_get_active_archive(SQNotebook *, LSQArchive **, LSQArchiveSupport **);
+gboolean    sq_notebook_is_active_archive(SQNotebook *, LSQArchive *);
 GtkWidget  *sq_notebook_get_active_child(SQNotebook *notebook);
 gboolean    sq_notebook_get_multi_tab(SQNotebook *notebook);
 void        sq_notebook_close_active_archive(SQNotebook *);



More information about the Xfce4-commits mailing list