[Xfce4-commits] r24164 - in squeeze/trunk: . src

Stephan Arts stephan at xfce.org
Fri Dec 22 08:40:13 CET 2006


Author: stephan
Date: 2006-12-22 07:40:13 +0000 (Fri, 22 Dec 2006)
New Revision: 24164

Added:
   squeeze/trunk/src/properties_dialog.c
   squeeze/trunk/src/properties_dialog.h
Modified:
   squeeze/trunk/AUTHORS
   squeeze/trunk/src/Makefile.am
   squeeze/trunk/src/main_window.c
Log:
added properties dialog

Modified: squeeze/trunk/AUTHORS
===================================================================
--- squeeze/trunk/AUTHORS	2006-12-22 02:26:59 UTC (rev 24163)
+++ squeeze/trunk/AUTHORS	2006-12-22 07:40:13 UTC (rev 24164)
@@ -1,2 +1,5 @@
+Lead developer:
 Stephan Arts     - <stephan at xfce.org>
+
+Contributor:
 Peter de Ridder  - <peter at xfce.org>

Modified: squeeze/trunk/src/Makefile.am
===================================================================
--- squeeze/trunk/src/Makefile.am	2006-12-22 02:26:59 UTC (rev 24163)
+++ squeeze/trunk/src/Makefile.am	2006-12-22 07:40:13 UTC (rev 24164)
@@ -24,6 +24,7 @@
 	settings.c settings.h \
 	archive_store.c archive_store.h \
 	preferences_dialog.c preferences_dialog.h \
+	properties_dialog.c properties_dialog.h \
 	new_dialog.c new_dialog.h \
 	add_dialog.c add_dialog.h \
 	extract_dialog.c extract_dialog.h \

Modified: squeeze/trunk/src/main_window.c
===================================================================
--- squeeze/trunk/src/main_window.c	2006-12-22 02:26:59 UTC (rev 24163)
+++ squeeze/trunk/src/main_window.c	2006-12-22 07:40:13 UTC (rev 24164)
@@ -62,6 +62,7 @@
 #include "extract_dialog.h"
 #include "add_dialog.h"
 #include "preferences_dialog.h"
+#include "properties_dialog.h"
 
 #include "main.h"
 
@@ -216,8 +217,8 @@
 
 	sq_settings_save(window->settings);
 
-	if(window->navigationbar)
-		gtk_widget_destroy(GTK_WIDGET(window->navigationbar));
+	//if(window->navigationbar)
+	//	gtk_widget_destroy(GTK_WIDGET(window->navigationbar));
 
 	g_object_unref(G_OBJECT(window->app));
 }
@@ -753,7 +754,14 @@
 static void 
 cb_sq_main_properties(GtkWidget *widget, gpointer userdata)
 {
+	SQMainWindow *window = SQ_MAIN_WINDOW(userdata);
+	LSQArchive *lp_archive = NULL;
 
+	sq_notebook_get_active_archive(SQ_NOTEBOOK(window->notebook), &lp_archive, NULL);
+
+	GtkWidget *dialog = sq_properties_dialog_new(lp_archive);
+
+	gtk_dialog_run(GTK_DIALOG(dialog));
 }
 
 
@@ -763,13 +771,13 @@
 {
 	GtkWidget *dialog = sq_preferences_dialog_new();
 
-	gtk_widget_show_all(dialog);
+	gtk_dialog_run(GTK_DIALOG(dialog));
 }
 
 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>", "Based on Xarchiver, written by Giuseppe Torelli", NULL};
+	const gchar *authors[] = {"Lead developer:", "Stephan Arts <stephan at xfce.org>","Contributor:","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);

Added: squeeze/trunk/src/properties_dialog.c
===================================================================
--- squeeze/trunk/src/properties_dialog.c	                        (rev 0)
+++ squeeze/trunk/src/properties_dialog.c	2006-12-22 07:40:13 UTC (rev 24164)
@@ -0,0 +1,86 @@
+/*
+ *  Copyright (c) 2006 Stephan Arts <stephan at xfce.org>
+ *
+ *  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.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <libsqueeze/libsqueeze.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#ifdef HAVE_THUNAR_VFS
+#define EXO_API_SUBJECT_TO_CHANGE
+#include <thunar-vfs/thunar-vfs.h>
+#else
+#include <gettext.h>
+#endif
+
+#include "properties_dialog.h"
+
+static void
+sq_properties_dialog_class_init(SQPropertiesDialogClass *archive_class);
+
+static void
+sq_properties_dialog_init(SQPropertiesDialog *archive);
+
+GType
+sq_properties_dialog_get_type ()
+{
+	static GType sq_properties_dialog_type = 0;
+
+ 	if (!sq_properties_dialog_type)
+	{
+ 		static const GTypeInfo sq_properties_dialog_info = 
+		{
+			sizeof (SQPropertiesDialogClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) sq_properties_dialog_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,
+			sizeof (SQPropertiesDialog),
+			0,
+			(GInstanceInitFunc) sq_properties_dialog_init,
+			NULL
+		};
+
+		sq_properties_dialog_type = g_type_register_static (GTK_TYPE_DIALOG, "SQPropertiesDialog", &sq_properties_dialog_info, 0);
+	}
+	return sq_properties_dialog_type;
+}
+
+static void
+sq_properties_dialog_class_init(SQPropertiesDialogClass *dialog_class)
+{
+}
+
+static void
+sq_properties_dialog_init(SQPropertiesDialog *dialog)
+{
+}
+
+GtkWidget *
+sq_properties_dialog_new(LSQArchive *archive)
+{
+	GtkWidget *dialog;
+
+	dialog = g_object_new(sq_properties_dialog_get_type(),
+			"title", _("Properties"),
+			NULL);
+
+	return dialog;
+}

Added: squeeze/trunk/src/properties_dialog.h
===================================================================
--- squeeze/trunk/src/properties_dialog.h	                        (rev 0)
+++ squeeze/trunk/src/properties_dialog.h	2006-12-22 07:40:13 UTC (rev 24164)
@@ -0,0 +1,58 @@
+/*
+ *  Copyright (c) 2006 Stephan Arts <stephan at xfce.org>
+ *
+ *  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.
+ */
+
+#ifndef __SQRCHIVER_PROPERTIES_DIALOG_H__
+#define __SQRCHIVER_PROPERTIES_DIALOG_H__
+G_BEGIN_DECLS
+
+#define SQ_PROPERTIES_DIALOG(obj)         ( \
+		G_TYPE_CHECK_INSTANCE_CAST ((obj),    \
+			sq_properties_dialog_get_type(),      \
+			SQPropertiesDialog))
+
+#define SQ_IS_PROPERTIES_DIALOG(obj)      ( \
+		G_TYPE_CHECK_INSTANCE_TYPE ((obj),    \
+			sq_properties_dialog_get_type()))
+
+#define SQ_PROPERTIES_DIALOG_CLASS(class) ( \
+		G_TYPE_CHECK_CLASS_CAST ((class),     \
+			sq_properties_dialog_get_type(),      \
+			SQPropertiesDialogClass))
+
+#define SQ_IS_PROPERTIES_DIALOG_CLASS(class) ( \
+		G_TYPE_CHECK_CLASS_TYPE ((class),        \
+			sq_properties_dialog_get_type()))
+
+typedef struct _SQPropertiesDialog SQPropertiesDialog;
+
+struct _SQPropertiesDialog
+{
+	GtkDialog parent;
+};
+
+typedef struct _SQPropertiesDialogClass SQPropertiesDialogClass;
+
+struct _SQPropertiesDialogClass
+{
+	GtkDialogClass parent;
+};
+
+GtkWidget *sq_properties_dialog_new(LSQArchive *);
+
+G_END_DECLS
+#endif /* __SQRCHIVER_PROPERTIES_DIALOG_H__ */



More information about the Xfce4-commits mailing list