[patch]: Bugzilla bug 95836
- From: Dennis Cranston <dennis_cranston yahoo com>
- To: nautilus-list gnome org
- Subject: [patch]: Bugzilla bug 95836
- Date: Thu, 17 Oct 2002 09:37:28 -0700 (PDT)
I am attaching a proposed patch to resolve
http://bugzilla.gnome.org/show_bug.cgi?id=95836.
Thanks,
Dennis
__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5555
diff -u -p -r1.5555 ChangeLog
--- ChangeLog 16 Oct 2002 20:21:56 -0000 1.5555
+++ ChangeLog 17 Oct 2002 05:18:09 -0000
@@ -1,3 +1,8 @@
+2002-10-16 Dennis Cranston <dennis_cranston yahoo com>
+
+ * src/file-manager/fm-properties-window.c:
+ Properties dialog fixes for #95836.
+
2002-10-16 Alex Duggan <aldug astrolinux com>
* configure.in
require gnome-desktop >= 2.1.0 (fixes #95979)
Index: src/file-manager/fm-properties-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-properties-window.c,v
retrieving revision 1.157
diff -u -p -r1.157 fm-properties-window.c
--- src/file-manager/fm-properties-window.c 4 Oct 2002 16:05:55 -0000 1.157
+++ src/file-manager/fm-properties-window.c 17 Oct 2002 05:18:25 -0000
@@ -38,6 +38,7 @@
#include <eel/eel-wrap-table.h>
#include <gtk/gtkalignment.h>
#include <gtk/gtkcheckbutton.h>
+#include <gtk/gtkmessagedialog.h>
#include <gtk/gtkdnd.h>
#include <gtk/gtkentry.h>
#include <gtk/gtkfilesel.h>
@@ -68,6 +69,7 @@
#include <libnautilus-private/nautilus-link.h>
#include <libnautilus-private/nautilus-metadata.h>
#include <libnautilus-private/nautilus-undo-signal-handlers.h>
+#include <libnautilus-private/egg-screen-help.h>
#include <libnautilus/nautilus-undo.h>
#include <string.h>
@@ -2152,6 +2154,33 @@ startup_data_free (StartupData *data)
g_free (data);
}
+static void
+help_button_callback (GtkWidget *widget, GtkWidget *property_window)
+{
+ GError *error = NULL;
+ GtkWidget *dialog;
+
+ egg_screen_help_display_desktop (
+ gtk_window_get_screen (GTK_WINDOW (property_window)),
+ NULL, "user-guide", "wgosnautilus.xml", "gosnautilus-51", &error);
+
+ if (error) {
+ dialog = gtk_message_dialog_new (GTK_WINDOW (property_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("There was an error displaying help: \n%s"),
+ error->message);
+
+ g_signal_connect (G_OBJECT (dialog),
+ "response", G_CALLBACK (gtk_widget_destroy),
+ NULL);
+ gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+ gtk_widget_show (dialog);
+ g_error_free (error);
+ }
+}
+
static FMPropertiesWindow *
create_properties_window (StartupData *startup_data)
{
@@ -2168,6 +2197,8 @@ create_properties_window (StartupData *s
gtk_container_set_border_width (GTK_CONTAINER (window), GNOME_PAD);
gtk_window_set_wmclass (GTK_WINDOW (window), "file_properties", "Nautilus");
+ gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DIALOG);
+ gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (GTK_WIDGET (startup_data->directory_view)));
@@ -2229,13 +2260,22 @@ create_properties_window (StartupData *s
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (hbox),
FALSE, TRUE, 5);
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox),
- GTK_BUTTONBOX_END);
+ GTK_BUTTONBOX_EDGE);
- /* Create close button. */
- button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
+ /* Create help button. */
+ button = gtk_button_new_from_stock (GTK_STOCK_HELP);
gtk_widget_show (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),
+ window, 0);
+
+ /* Create close button. */
+ button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
+ gtk_widget_show (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),
window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]