Commit e75799b5 authored by Ramiro Estrugo's avatar Ramiro Estrugo
Browse files

Pavel as Ramiro. Fixed a crash in "Open in New Window".

Pavel as Ramiro.
Fixed a crash in "Open in New Window".
parent 1086c411
2000-03-02 Pavel Cisler <pavel@eazel.com> (checking in as ramiro)
Fixed a crash in "Open in New Window".
* src/ntl-window.c,h:
(nautilus_window_new): Removed the call. Creating new
windows should only be done through nautilus_app_create_window.
(nautilus_window_class_init): Added a call to add "NautilusWindow::app"
as an argument to make the app field get initialized properly.
* src/ntl-app.c:
(nautilus_app_create_window): Made it call gtk_object_new with the
right arguments to create a new window.
2000-03-02 Andy Hertzfeld <andy@eazel.com>
* libnautilus/nautilus-icon-factory.c:
......
......@@ -243,7 +243,9 @@ nautilus_app_destroy_window(GtkObject *obj, NautilusApp *app)
NautilusWindow *
nautilus_app_create_window(NautilusApp *app)
{
GtkWidget *win = gtk_widget_new(nautilus_window_get_type(), "app_id", "nautilus", NULL);
GtkWidget *win = GTK_WIDGET (gtk_object_new (nautilus_window_get_type(), "app_id", "nautilus",
"app", BONOBO_OBJECT(app), NULL));
gtk_signal_connect(GTK_OBJECT(win), "destroy", nautilus_app_destroy_window, app);
......
......@@ -302,6 +302,10 @@ nautilus_window_class_init (NautilusWindowClass *klass)
GTK_TYPE_STRING,
GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT,
ARG_APP_ID);
gtk_object_add_arg_type ("NautilusWindow::app",
GTK_TYPE_OBJECT,
GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT,
ARG_APP);
gtk_object_add_arg_type ("NautilusWindow::content_view",
GTK_TYPE_OBJECT,
GTK_ARG_READWRITE,
......
......@@ -110,7 +110,6 @@ struct _NautilusWindow {
};
GtkType nautilus_window_get_type (void);
GtkWidget *nautilus_window_new (const char *app_id, BonoboObject *app);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
......
......@@ -302,6 +302,10 @@ nautilus_window_class_init (NautilusWindowClass *klass)
GTK_TYPE_STRING,
GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT,
ARG_APP_ID);
gtk_object_add_arg_type ("NautilusWindow::app",
GTK_TYPE_OBJECT,
GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT,
ARG_APP);
gtk_object_add_arg_type ("NautilusWindow::content_view",
GTK_TYPE_OBJECT,
GTK_ARG_READWRITE,
......
......@@ -110,7 +110,6 @@ struct _NautilusWindow {
};
GtkType nautilus_window_get_type (void);
GtkWidget *nautilus_window_new (const char *app_id, BonoboObject *app);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
......
......@@ -302,6 +302,10 @@ nautilus_window_class_init (NautilusWindowClass *klass)
GTK_TYPE_STRING,
GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT,
ARG_APP_ID);
gtk_object_add_arg_type ("NautilusWindow::app",
GTK_TYPE_OBJECT,
GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT,
ARG_APP);
gtk_object_add_arg_type ("NautilusWindow::content_view",
GTK_TYPE_OBJECT,
GTK_ARG_READWRITE,
......
......@@ -110,7 +110,6 @@ struct _NautilusWindow {
};
GtkType nautilus_window_get_type (void);
GtkWidget *nautilus_window_new (const char *app_id, BonoboObject *app);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
......
......@@ -302,6 +302,10 @@ nautilus_window_class_init (NautilusWindowClass *klass)
GTK_TYPE_STRING,
GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT,
ARG_APP_ID);
gtk_object_add_arg_type ("NautilusWindow::app",
GTK_TYPE_OBJECT,
GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT,
ARG_APP);
gtk_object_add_arg_type ("NautilusWindow::content_view",
GTK_TYPE_OBJECT,
GTK_ARG_READWRITE,
......
......@@ -110,7 +110,6 @@ struct _NautilusWindow {
};
GtkType nautilus_window_get_type (void);
GtkWidget *nautilus_window_new (const char *app_id, BonoboObject *app);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
......
......@@ -243,7 +243,9 @@ nautilus_app_destroy_window(GtkObject *obj, NautilusApp *app)
NautilusWindow *
nautilus_app_create_window(NautilusApp *app)
{
GtkWidget *win = gtk_widget_new(nautilus_window_get_type(), "app_id", "nautilus", NULL);
GtkWidget *win = GTK_WIDGET (gtk_object_new (nautilus_window_get_type(), "app_id", "nautilus",
"app", BONOBO_OBJECT(app), NULL));
gtk_signal_connect(GTK_OBJECT(win), "destroy", nautilus_app_destroy_window, app);
......
......@@ -302,6 +302,10 @@ nautilus_window_class_init (NautilusWindowClass *klass)
GTK_TYPE_STRING,
GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT,
ARG_APP_ID);
gtk_object_add_arg_type ("NautilusWindow::app",
GTK_TYPE_OBJECT,
GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT,
ARG_APP);
gtk_object_add_arg_type ("NautilusWindow::content_view",
GTK_TYPE_OBJECT,
GTK_ARG_READWRITE,
......
......@@ -110,7 +110,6 @@ struct _NautilusWindow {
};
GtkType nautilus_window_get_type (void);
GtkWidget *nautilus_window_new (const char *app_id, BonoboObject *app);
void nautilus_window_close (NautilusWindow *window);
void nautilus_window_set_content_view (NautilusWindow *window,
NautilusView *content_view);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment