[Xfce4-commits] r24328 - in squeeze/trunk: docs/reference/libsqueeze/tmpl src

Stephan Arts stephan at xfce.org
Tue Jan 9 12:17:22 CET 2007


Author: stephan
Date: 2007-01-09 11:17:22 +0000 (Tue, 09 Jan 2007)
New Revision: 24328

Modified:
   squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support-gnu-tar.sgml
   squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support-zip.sgml
   squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support.sgml
   squeeze/trunk/docs/reference/libsqueeze/tmpl/archive.sgml
   squeeze/trunk/docs/reference/libsqueeze/tmpl/internals.sgml
   squeeze/trunk/docs/reference/libsqueeze/tmpl/libsqueeze-unused.sgml
   squeeze/trunk/docs/reference/libsqueeze/tmpl/libsqueeze.sgml
   squeeze/trunk/docs/reference/libsqueeze/tmpl/slist.sgml
   squeeze/trunk/src/archive_store.c
   squeeze/trunk/src/main_window.c
   squeeze/trunk/src/properties_dialog.c
   squeeze/trunk/src/properties_dialog.h
Log:
set_pwd now no longer allows the user to enter a file as a folder, changed some things on properties dialog

Modified: squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support-gnu-tar.sgml
===================================================================
--- squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support-gnu-tar.sgml	2007-01-09 00:12:41 UTC (rev 24327)
+++ squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support-gnu-tar.sgml	2007-01-09 11:17:22 UTC (rev 24328)
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support-zip.sgml
===================================================================
--- squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support-zip.sgml	2007-01-09 00:12:41 UTC (rev 24327)
+++ squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support-zip.sgml	2007-01-09 11:17:22 UTC (rev 24328)
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support.sgml
===================================================================
--- squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support.sgml	2007-01-09 00:12:41 UTC (rev 24327)
+++ squeeze/trunk/docs/reference/libsqueeze/tmpl/archive-support.sgml	2007-01-09 11:17:22 UTC (rev 24328)
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: squeeze/trunk/docs/reference/libsqueeze/tmpl/archive.sgml
===================================================================
--- squeeze/trunk/docs/reference/libsqueeze/tmpl/archive.sgml	2007-01-09 00:12:41 UTC (rev 24327)
+++ squeeze/trunk/docs/reference/libsqueeze/tmpl/archive.sgml	2007-01-09 11:17:22 UTC (rev 24328)
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: squeeze/trunk/docs/reference/libsqueeze/tmpl/internals.sgml
===================================================================
--- squeeze/trunk/docs/reference/libsqueeze/tmpl/internals.sgml	2007-01-09 00:12:41 UTC (rev 24327)
+++ squeeze/trunk/docs/reference/libsqueeze/tmpl/internals.sgml	2007-01-09 11:17:22 UTC (rev 24328)
@@ -9,45 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 
-<!-- ##### FUNCTION lsq_execute ##### -->
-<para>
-
-</para>
-
- at command: 
- at archive: 
- at function: 
- at f_in: 
- at f_out: 
- at f_err: 
- at Returns: 
-
-
-<!-- ##### FUNCTION lsq_concat_filenames ##### -->
-<para>
-
-</para>
-
- at filenames: 
- at Returns: 
-
-
-<!-- ##### FUNCTION lsq_opened_archive_get_archive ##### -->
-<para>
-
-</para>
-
- at path: 
- at Returns: 
-
-

Modified: squeeze/trunk/docs/reference/libsqueeze/tmpl/libsqueeze-unused.sgml
===================================================================
--- squeeze/trunk/docs/reference/libsqueeze/tmpl/libsqueeze-unused.sgml	2007-01-09 00:12:41 UTC (rev 24327)
+++ squeeze/trunk/docs/reference/libsqueeze/tmpl/libsqueeze-unused.sgml	2007-01-09 11:17:22 UTC (rev 24328)
@@ -0,0 +1,62 @@
+<!-- ##### STRUCT LSQSList ##### -->
+<para>
+
+</para>
+
+ at entry: 
+ at next: 
+
+<!-- ##### FUNCTION lsq_concat_filenames ##### -->
+<para>
+
+</para>
+
+ at filenames: 
+ at Returns: 
+
+<!-- ##### FUNCTION lsq_execute ##### -->
+<para>
+
+</para>
+
+ at command: 
+ at archive: 
+ at function: 
+ at f_in: 
+ at f_out: 
+ at f_err: 
+ at Returns: 
+
+<!-- ##### FUNCTION lsq_opened_archive_get_archive ##### -->
+<para>
+
+</para>
+
+ at path: 
+ at Returns: 
+
+<!-- ##### FUNCTION lsq_slist_free ##### -->
+<para>
+
+</para>
+
+ at list: 
+
+<!-- ##### FUNCTION lsq_slist_insert_sorted_single ##### -->
+<para>
+
+</para>
+
+ at list: 
+ at entry: 
+ at Param3: 
+ at Returns: 
+
+<!-- ##### FUNCTION lsq_slist_length ##### -->
+<para>
+
+</para>
+
+ at list: 
+ at Returns: 
+

Modified: squeeze/trunk/docs/reference/libsqueeze/tmpl/libsqueeze.sgml
===================================================================
--- squeeze/trunk/docs/reference/libsqueeze/tmpl/libsqueeze.sgml	2007-01-09 00:12:41 UTC (rev 24327)
+++ squeeze/trunk/docs/reference/libsqueeze/tmpl/libsqueeze.sgml	2007-01-09 11:17:22 UTC (rev 24328)
@@ -9,13 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 

Modified: squeeze/trunk/docs/reference/libsqueeze/tmpl/slist.sgml
===================================================================
--- squeeze/trunk/docs/reference/libsqueeze/tmpl/slist.sgml	2007-01-09 00:12:41 UTC (rev 24327)
+++ squeeze/trunk/docs/reference/libsqueeze/tmpl/slist.sgml	2007-01-09 11:17:22 UTC (rev 24328)
@@ -9,49 +9,11 @@
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 
-<!-- ##### STRUCT LSQSList ##### -->
-<para>
-
-</para>
-
- at entry: 
- at next: 
-
-<!-- ##### FUNCTION lsq_slist_insert_sorted_single ##### -->
-<para>
-
-</para>
-
- at list: 
- at entry: 
- at Param3: 
- at Returns: 
-
-
-<!-- ##### FUNCTION lsq_slist_length ##### -->
-<para>
-
-</para>
-
- at list: 
- at Returns: 
-
-
-<!-- ##### FUNCTION lsq_slist_free ##### -->
-<para>
-
-</para>
-
- at list: 
-
-

Modified: squeeze/trunk/src/archive_store.c
===================================================================
--- squeeze/trunk/src/archive_store.c	2007-01-09 00:12:41 UTC (rev 24327)
+++ squeeze/trunk/src/archive_store.c	2007-01-09 11:17:22 UTC (rev 24328)
@@ -1276,13 +1276,15 @@
 
 	g_strfreev(buf);
 
-	sq_archive_store_append_history(store, stack);
+	if(lsq_archive_iter_is_directory(store->archive, (LSQArchiveIter *)stack->data))
+	{
+		sq_archive_store_append_history(store, stack);
 
-	/* sq_archive_store_sort(store); */
-	sq_archive_store_sort(store);
-	sq_archive_store_refresh(store);
+		sq_archive_store_sort(store);
+		sq_archive_store_refresh(store);
 
-	g_signal_emit(store, sq_archive_store_signals[SQ_ARCHIVE_STORE_SIGNAL_PWD_CHANGED], 0,NULL);
+		g_signal_emit(store, sq_archive_store_signals[SQ_ARCHIVE_STORE_SIGNAL_PWD_CHANGED], 0,NULL);
+	}
 
 	return TRUE;
 }

Modified: squeeze/trunk/src/main_window.c
===================================================================
--- squeeze/trunk/src/main_window.c	2007-01-09 00:12:41 UTC (rev 24327)
+++ squeeze/trunk/src/main_window.c	2007-01-09 11:17:22 UTC (rev 24328)
@@ -758,7 +758,7 @@
 
 	sq_notebook_get_active_archive(SQ_NOTEBOOK(window->notebook), &lp_archive, NULL);
 
-	GtkWidget *dialog = sq_properties_dialog_new(lp_archive);
+	GtkWidget *dialog = sq_properties_dialog_new(lp_archive, window->icon_theme);
 
 	gtk_dialog_run(GTK_DIALOG(dialog));
 	gtk_widget_destroy(dialog);
@@ -772,6 +772,8 @@
 	GtkWidget *dialog = sq_preferences_dialog_new();
 
 	gtk_dialog_run(GTK_DIALOG(dialog));
+
+	gtk_widget_destroy(dialog);
 }
 
 static void

Modified: squeeze/trunk/src/properties_dialog.c
===================================================================
--- squeeze/trunk/src/properties_dialog.c	2007-01-09 00:12:41 UTC (rev 24327)
+++ squeeze/trunk/src/properties_dialog.c	2007-01-09 11:17:22 UTC (rev 24328)
@@ -66,16 +66,38 @@
 static void
 sq_properties_dialog_init(SQPropertiesDialog *dialog)
 {
-	GtkWidget *tree_view = gtk_tree_view_new();
+	GtkWidget *box;
+	GtkWidget *label;
 
-	gtk_container_add(GTK_CONTAINER(((GtkDialog *)dialog)->vbox), tree_view);
+	dialog->table = (GtkTable *)gtk_table_new(2, 2, FALSE);
+
+	gtk_table_set_col_spacings (dialog->table, 12);
+	gtk_container_set_border_width(GTK_CONTAINER(dialog->table), 6);
+	gtk_container_add(GTK_CONTAINER(((GtkDialog *)dialog)->vbox), GTK_WIDGET(dialog->table));
+	gtk_widget_show (GTK_WIDGET(dialog->table));
+
+	box = gtk_hbox_new(6, FALSE);
+	gtk_table_attach (dialog->table, box, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 3);
+	gtk_widget_show (box);
+
+	dialog->icon_image = gtk_image_new();
+	gtk_box_pack_start (GTK_BOX (box), dialog->icon_image, FALSE, TRUE, 0);
+	gtk_widget_show (dialog->icon_image);
+
+	label = gtk_label_new(_("Name:"));
+	gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE, 0);
+	gtk_widget_show (label);
+
+
+
+
 	gtk_dialog_add_buttons(GTK_DIALOG(dialog),
 	    GTK_STOCK_CLOSE, GTK_RESPONSE_OK,
 			NULL);
 }
 
 GtkWidget *
-sq_properties_dialog_new(LSQArchive *archive)
+sq_properties_dialog_new(LSQArchive *archive, GtkIconTheme *icon_theme)
 {
 	GtkWidget *dialog;
 
@@ -85,13 +107,8 @@
 
 	gtk_widget_set_size_request(GTK_WIDGET(dialog), 150, 200);
 
-	sq_properties_dialog_add_archive_property_str((SQPropertiesDialog *)dialog, _("Filename"), lsq_archive_get_filename(archive));
+	GdkPixbuf *icon = gtk_icon_theme_load_icon(icon_theme, thunar_vfs_mime_info_lookup_icon_name(archive->mime_info, icon_theme), 48, 0, NULL);
+	gtk_image_set_from_pixbuf(GTK_IMAGE(((SQPropertiesDialog *)dialog)->icon_image), icon);
 
 	return dialog;
 }
-
-void
-sq_properties_dialog_add_archive_property_str(SQPropertiesDialog *dialog, const gchar *prop_name, const gchar *prop_value)
-{
-
-}

Modified: squeeze/trunk/src/properties_dialog.h
===================================================================
--- squeeze/trunk/src/properties_dialog.h	2007-01-09 00:12:41 UTC (rev 24327)
+++ squeeze/trunk/src/properties_dialog.h	2007-01-09 11:17:22 UTC (rev 24328)
@@ -16,8 +16,13 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#ifndef __SQRCHIVER_PROPERTIES_DIALOG_H__
-#define __SQRCHIVER_PROPERTIES_DIALOG_H__
+/*
+ * The archive properties dialog is written to resemble the thunar file-
+ * properties dialog  written by Benedict Meurer for the Thunar file manager.
+ */
+
+#ifndef __SQ_PROPERTIES_DIALOG_H__
+#define __SQ_PROPERTIES_DIALOG_H__
 G_BEGIN_DECLS
 
 #define SQ_PROPERTIES_DIALOG(obj)         ( \
@@ -43,6 +48,8 @@
 struct _SQPropertiesDialog
 {
 	GtkDialog parent;
+	GtkTable  *table;
+	GtkWidget *icon_image;
 };
 
 typedef struct _SQPropertiesDialogClass SQPropertiesDialogClass;
@@ -52,7 +59,7 @@
 	GtkDialogClass parent;
 };
 
-GtkWidget *sq_properties_dialog_new(LSQArchive *);
+GtkWidget *sq_properties_dialog_new(LSQArchive *, GtkIconTheme *);
 void sq_properties_dialog_add_archive_property_str(SQPropertiesDialog *, const gchar *prop_name, const gchar *prop_value);
 
 G_END_DECLS



More information about the Xfce4-commits mailing list