[PATCH]: Make file properties dialog a window



This patch makes the file properties dialog a window again.  DaveB
already pointed out that this shouldn't have been changed because we
want to be able to minimize the properties window, and we don't want to
force the window to be on top.

 - David
Index: src/file-manager/fm-properties-window.h
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-properties-window.h,v
retrieving revision 1.8
diff -u -p -r1.8 fm-properties-window.h
--- src/file-manager/fm-properties-window.h	25 Oct 2002 07:58:37 -0000	1.8
+++ src/file-manager/fm-properties-window.h	19 Nov 2002 22:17:38 -0000
@@ -28,7 +28,7 @@
 
 #include "fm-directory-view.h"
 
-#include <gtk/gtkdialog.h>
+#include <gtk/gtkwindow.h>
 #include <libnautilus-private/nautilus-file.h>
 
 typedef struct FMPropertiesWindow FMPropertiesWindow;
@@ -47,12 +47,12 @@ typedef struct FMPropertiesWindow FMProp
 typedef struct FMPropertiesWindowDetails FMPropertiesWindowDetails;
 
 struct FMPropertiesWindow {
-	GtkDialog window;
+	GtkWindow window;
 	FMPropertiesWindowDetails *details;	
 };
 
 struct FMPropertiesWindowClass {
-	GtkDialogClass parent_class;
+	GtkWindowClass parent_class;
 };
 
 typedef struct FMPropertiesWindowClass FMPropertiesWindowClass;
Index: src/file-manager/fm-properties-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-properties-window.c,v
retrieving revision 1.163
diff -u -p -r1.163 fm-properties-window.c
--- src/file-manager/fm-properties-window.c	19 Nov 2002 16:44:33 -0000	1.163
+++ src/file-manager/fm-properties-window.c	19 Nov 2002 22:17:38 -0000
@@ -179,7 +179,7 @@ static void remove_pending_file         
 static void append_bonobo_pages                   (FMPropertiesWindow *window);
 
 GNOME_CLASS_BOILERPLATE (FMPropertiesWindow, fm_properties_window,
-			 GtkDialog, GTK_TYPE_DIALOG)
+			 GtkWindow, GTK_TYPE_WINDOW);
 
 typedef struct {
 	NautilusFile *file;
@@ -2369,6 +2369,7 @@ create_properties_window (StartupData *s
 	FMPropertiesWindow *window;
 	GList *attributes;
 	GtkWidget *vbox;
+	GtkWidget *hbox;
 	GtkWidget *button;
 
 	window = FM_PROPERTIES_WINDOW (gtk_widget_new (fm_properties_window_get_type (), NULL));
@@ -2414,7 +2415,7 @@ create_properties_window (StartupData *s
 	vbox = gtk_vbox_new (FALSE, 0);
 	gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
 	gtk_widget_show (vbox);
-	gtk_container_add (GTK_CONTAINER (GTK_DIALOG(window)->vbox), 
+	gtk_container_add (GTK_CONTAINER (window),
 			   GTK_WIDGET (vbox));
 
 	/* Create the notebook tabs. */
@@ -2436,15 +2437,16 @@ create_properties_window (StartupData *s
 
 	/* append pages from available views */
 	append_bonobo_pages (window);
-	
-	/* Create buttons for action area. */
-	gtk_dialog_set_has_separator (GTK_DIALOG (window), FALSE);
-	gtk_button_box_set_layout (GTK_BUTTON_BOX (GTK_DIALOG (window)->action_area),
-				   GTK_BUTTONBOX_EDGE);
+
+	/* Create box for help and close buttons. */
+	hbox = gtk_hbutton_box_new ();
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (hbox), FALSE, TRUE, 5);
+	gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_EDGE);
 
 	button = gtk_button_new_from_stock (GTK_STOCK_HELP);
  	gtk_widget_show (button);
-	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area), GTK_WIDGET (button),
+	gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (button),
 			    FALSE, TRUE, 0);
 	g_signal_connect_object (button, "clicked",
 				 G_CALLBACK (help_button_callback),
@@ -2452,7 +2454,7 @@ create_properties_window (StartupData *s
 	
 	button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
 	gtk_widget_show (button);
-	gtk_box_pack_end (GTK_BOX (GTK_DIALOG (window)->action_area), GTK_WIDGET (button),
+	gtk_box_pack_end (GTK_BOX (hbox), GTK_WIDGET (button),
 			    FALSE, TRUE, 0);
 	g_signal_connect_swapped (button, "clicked",
 				  G_CALLBACK (gtk_widget_destroy),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]