mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-24 18:25:50 +00:00
Lots of files. Another GtkObject -> GObject pass.
* Lots of files. Another GtkObject -> GObject pass.
This commit is contained in:
parent
5fb5bf3739
commit
52b329b137
|
@ -1,3 +1,8 @@
|
||||||
|
2001-11-06 Darin Adler <darin@bentspoon.com>
|
||||||
|
|
||||||
|
* Lots of files.
|
||||||
|
Another GtkObject -> GObject pass.
|
||||||
|
|
||||||
2001-11-06 Darin Adler <darin@bentspoon.com>
|
2001-11-06 Darin Adler <darin@bentspoon.com>
|
||||||
|
|
||||||
Did some fixes based on a patch Michael sent me.
|
Did some fixes based on a patch Michael sent me.
|
||||||
|
|
|
@ -459,7 +459,7 @@ bonobo_stream_vfs_new_internal (GnomeVFSHandle *handle)
|
||||||
CORBA_exception_init (&ev);
|
CORBA_exception_init (&ev);
|
||||||
|
|
||||||
if (CORBA_Object_is_nil (corba_stream, &ev)){
|
if (CORBA_Object_is_nil (corba_stream, &ev)){
|
||||||
gtk_object_unref (GTK_OBJECT (stream_vfs));
|
g_object_unref (G_OBJECT (stream_vfs));
|
||||||
CORBA_exception_free (&ev);
|
CORBA_exception_free (&ev);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,7 +157,7 @@ nautilus_adapter_control_embed_strategy_new (Bonobo_Control control,
|
||||||
CORBA_Environment ev;
|
CORBA_Environment ev;
|
||||||
|
|
||||||
strategy = NAUTILUS_ADAPTER_CONTROL_EMBED_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_CONTROL_EMBED_STRATEGY, NULL));
|
strategy = NAUTILUS_ADAPTER_CONTROL_EMBED_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_CONTROL_EMBED_STRATEGY, NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (strategy));
|
g_object_ref (G_OBJECT (strategy));
|
||||||
gtk_object_sink (GTK_OBJECT (strategy));
|
gtk_object_sink (GTK_OBJECT (strategy));
|
||||||
|
|
||||||
strategy->details->control_frame = bonobo_control_frame_new (ui_container);
|
strategy->details->control_frame = bonobo_control_frame_new (ui_container);
|
||||||
|
@ -167,7 +167,7 @@ nautilus_adapter_control_embed_strategy_new (Bonobo_Control control,
|
||||||
strategy->details->widget = bonobo_control_frame_get_widget (strategy->details->control_frame);
|
strategy->details->widget = bonobo_control_frame_get_widget (strategy->details->control_frame);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (strategy->details->control_frame),
|
g_signal_connect (G_OBJECT (strategy->details->control_frame),
|
||||||
"activate_uri", GTK_SIGNAL_FUNC (activate_uri_callback), strategy);
|
"activate_uri", G_CALLBACK (activate_uri_callback), strategy);
|
||||||
|
|
||||||
CORBA_exception_init (&ev);
|
CORBA_exception_init (&ev);
|
||||||
corba_zoomable = Bonobo_Unknown_queryInterface (control,
|
corba_zoomable = Bonobo_Unknown_queryInterface (control,
|
||||||
|
|
|
@ -169,7 +169,7 @@ nautilus_adapter_embeddable_embed_strategy_new (Bonobo_Embeddable embeddable,
|
||||||
CORBA_Environment ev;
|
CORBA_Environment ev;
|
||||||
|
|
||||||
strategy = NAUTILUS_ADAPTER_EMBEDDABLE_EMBED_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_EMBEDDABLE_EMBED_STRATEGY, NULL));
|
strategy = NAUTILUS_ADAPTER_EMBEDDABLE_EMBED_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_EMBEDDABLE_EMBED_STRATEGY, NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (strategy));
|
g_object_ref (G_OBJECT (strategy));
|
||||||
gtk_object_sink (GTK_OBJECT (strategy));
|
gtk_object_sink (GTK_OBJECT (strategy));
|
||||||
|
|
||||||
embeddable_wrapper = bonobo_object_client_from_corba
|
embeddable_wrapper = bonobo_object_client_from_corba
|
||||||
|
@ -204,7 +204,7 @@ nautilus_adapter_embeddable_embed_strategy_new (Bonobo_Embeddable embeddable,
|
||||||
bonobo_view_frame_set_covered (strategy->details->view_frame, FALSE);
|
bonobo_view_frame_set_covered (strategy->details->view_frame, FALSE);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (strategy->details->view_frame),
|
g_signal_connect (G_OBJECT (strategy->details->view_frame),
|
||||||
"activate_uri", GTK_SIGNAL_FUNC (activate_uri_callback), strategy);
|
"activate_uri", G_CALLBACK (activate_uri_callback), strategy);
|
||||||
|
|
||||||
gtk_widget_show (strategy->details->client_widget);
|
gtk_widget_show (strategy->details->client_widget);
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ nautilus_adapter_embed_strategy_class_init (NautilusAdapterEmbedStrategyClass *k
|
||||||
G_STRUCT_OFFSET (NautilusAdapterEmbedStrategyClass, activate),
|
G_STRUCT_OFFSET (NautilusAdapterEmbedStrategyClass, activate),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
GTK_TYPE_POINTER, 0);
|
G_TYPE_POINTER, 0);
|
||||||
signals[DEACTIVATE] =
|
signals[DEACTIVATE] =
|
||||||
g_signal_new ("deactivate",
|
g_signal_new ("deactivate",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
|
|
@ -169,7 +169,7 @@ nautilus_adapter_embeddable_embed_strategy_new (Bonobo_Embeddable embeddable,
|
||||||
CORBA_Environment ev;
|
CORBA_Environment ev;
|
||||||
|
|
||||||
strategy = NAUTILUS_ADAPTER_EMBEDDABLE_EMBED_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_EMBEDDABLE_EMBED_STRATEGY, NULL));
|
strategy = NAUTILUS_ADAPTER_EMBEDDABLE_EMBED_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_EMBEDDABLE_EMBED_STRATEGY, NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (strategy));
|
g_object_ref (G_OBJECT (strategy));
|
||||||
gtk_object_sink (GTK_OBJECT (strategy));
|
gtk_object_sink (GTK_OBJECT (strategy));
|
||||||
|
|
||||||
embeddable_wrapper = bonobo_object_client_from_corba
|
embeddable_wrapper = bonobo_object_client_from_corba
|
||||||
|
@ -204,7 +204,7 @@ nautilus_adapter_embeddable_embed_strategy_new (Bonobo_Embeddable embeddable,
|
||||||
bonobo_view_frame_set_covered (strategy->details->view_frame, FALSE);
|
bonobo_view_frame_set_covered (strategy->details->view_frame, FALSE);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (strategy->details->view_frame),
|
g_signal_connect (G_OBJECT (strategy->details->view_frame),
|
||||||
"activate_uri", GTK_SIGNAL_FUNC (activate_uri_callback), strategy);
|
"activate_uri", G_CALLBACK (activate_uri_callback), strategy);
|
||||||
|
|
||||||
gtk_widget_show (strategy->details->client_widget);
|
gtk_widget_show (strategy->details->client_widget);
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ impl_Nautilus_ComponentAdapterFactory__create (NautilusAdapterFactoryServer *bon
|
||||||
POA_Nautilus_ComponentAdapterFactory__init ((PortableServer_Servant) servant, ev);
|
POA_Nautilus_ComponentAdapterFactory__init ((PortableServer_Servant) servant, ev);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (bonobo_object), "destroy",
|
g_signal_connect (G_OBJECT (bonobo_object), "destroy",
|
||||||
GTK_SIGNAL_FUNC (impl_Nautilus_ComponentAdapterFactory__destroy), servant);
|
G_CALLBACK (impl_Nautilus_ComponentAdapterFactory__destroy), servant);
|
||||||
|
|
||||||
servant->bonobo_object = bonobo_object;
|
servant->bonobo_object = bonobo_object;
|
||||||
return bonobo_object_activate_servant (BONOBO_OBJECT (bonobo_object), servant);
|
return bonobo_object_activate_servant (BONOBO_OBJECT (bonobo_object), servant);
|
||||||
|
|
|
@ -106,7 +106,7 @@ nautilus_adapter_file_load_strategy_new (Bonobo_PersistFile persist_file)
|
||||||
NautilusAdapterFileLoadStrategy *strategy;
|
NautilusAdapterFileLoadStrategy *strategy;
|
||||||
|
|
||||||
strategy = NAUTILUS_ADAPTER_FILE_LOAD_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_FILE_LOAD_STRATEGY, NULL));
|
strategy = NAUTILUS_ADAPTER_FILE_LOAD_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_FILE_LOAD_STRATEGY, NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (strategy));
|
g_object_ref (G_OBJECT (strategy));
|
||||||
gtk_object_sink (GTK_OBJECT (strategy));
|
gtk_object_sink (GTK_OBJECT (strategy));
|
||||||
|
|
||||||
strategy->details->persist_file = persist_file;
|
strategy->details->persist_file = persist_file;
|
||||||
|
@ -126,7 +126,7 @@ nautilus_adapter_file_load_strategy_load_location (NautilusAdapterLoadStrategy *
|
||||||
|
|
||||||
strategy = NAUTILUS_ADAPTER_FILE_LOAD_STRATEGY (abstract_strategy);
|
strategy = NAUTILUS_ADAPTER_FILE_LOAD_STRATEGY (abstract_strategy);
|
||||||
|
|
||||||
gtk_object_ref (GTK_OBJECT (strategy));
|
g_object_ref (G_OBJECT (strategy));
|
||||||
|
|
||||||
CORBA_exception_init (&ev);
|
CORBA_exception_init (&ev);
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ nautilus_adapter_file_load_strategy_load_location (NautilusAdapterLoadStrategy *
|
||||||
nautilus_adapter_load_strategy_report_load_failed (abstract_strategy);
|
nautilus_adapter_load_strategy_report_load_failed (abstract_strategy);
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (strategy));
|
g_object_unref (G_OBJECT (strategy));
|
||||||
|
|
||||||
CORBA_exception_free (&ev);
|
CORBA_exception_free (&ev);
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ nautilus_adapter_load_strategy_class_init (NautilusAdapterLoadStrategyClass *kla
|
||||||
G_STRUCT_OFFSET (NautilusAdapterLoadStrategyClass, report_load_progress),
|
G_STRUCT_OFFSET (NautilusAdapterLoadStrategyClass, report_load_progress),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
eel_marshal_VOID__DOUBLE,
|
eel_marshal_VOID__DOUBLE,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_DOUBLE);
|
G_TYPE_NONE, 1, G_TYPE_DOUBLE);
|
||||||
signals[REPORT_LOAD_COMPLETE] =
|
signals[REPORT_LOAD_COMPLETE] =
|
||||||
g_signal_new ("report_load_complete",
|
g_signal_new ("report_load_complete",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
|
|
@ -119,7 +119,7 @@ nautilus_adapter_progressive_load_strategy_new (Bonobo_ProgressiveDataSink prog
|
||||||
CORBA_exception_init (&ev);
|
CORBA_exception_init (&ev);
|
||||||
|
|
||||||
strategy = NAUTILUS_ADAPTER_PROGRESSIVE_LOAD_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_PROGRESSIVE_LOAD_STRATEGY, NULL));
|
strategy = NAUTILUS_ADAPTER_PROGRESSIVE_LOAD_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_PROGRESSIVE_LOAD_STRATEGY, NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (strategy));
|
g_object_ref (G_OBJECT (strategy));
|
||||||
gtk_object_sink (GTK_OBJECT (strategy));
|
gtk_object_sink (GTK_OBJECT (strategy));
|
||||||
|
|
||||||
strategy->details->progressive_data_sink = progressive_data_sink;
|
strategy->details->progressive_data_sink = progressive_data_sink;
|
||||||
|
@ -188,7 +188,7 @@ stop_loading (NautilusAdapterProgressiveLoadStrategy *strategy,
|
||||||
nautilus_adapter_load_strategy_report_load_complete (NAUTILUS_ADAPTER_LOAD_STRATEGY (strategy));
|
nautilus_adapter_load_strategy_report_load_complete (NAUTILUS_ADAPTER_LOAD_STRATEGY (strategy));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gtk_object_unref (GTK_OBJECT (strategy));
|
g_object_unref (G_OBJECT (strategy));
|
||||||
gnome_vfs_close (handle);
|
gnome_vfs_close (handle);
|
||||||
CORBA_free (iobuf);
|
CORBA_free (iobuf);
|
||||||
CORBA_exception_free (ev);
|
CORBA_exception_free (ev);
|
||||||
|
@ -241,7 +241,7 @@ nautilus_adapter_progressive_load_strategy_load_location (NautilusAdapterLoadStr
|
||||||
|
|
||||||
strategy->details->no_report_stop = FALSE;
|
strategy->details->no_report_stop = FALSE;
|
||||||
|
|
||||||
gtk_object_ref (GTK_OBJECT (strategy));
|
g_object_ref (G_OBJECT (strategy));
|
||||||
|
|
||||||
strategy->details->loading = TRUE;
|
strategy->details->loading = TRUE;
|
||||||
strategy->details->stop = FALSE;
|
strategy->details->stop = FALSE;
|
||||||
|
@ -256,7 +256,7 @@ nautilus_adapter_progressive_load_strategy_load_location (NautilusAdapterLoadStr
|
||||||
|
|
||||||
if (gnome_vfs_open (&handle, uri, GNOME_VFS_OPEN_READ) != GNOME_VFS_OK) {
|
if (gnome_vfs_open (&handle, uri, GNOME_VFS_OPEN_READ) != GNOME_VFS_OK) {
|
||||||
nautilus_adapter_load_strategy_report_load_failed (abstract_strategy);
|
nautilus_adapter_load_strategy_report_load_failed (abstract_strategy);
|
||||||
gtk_object_unref (GTK_OBJECT (strategy));
|
g_object_unref (G_OBJECT (strategy));
|
||||||
CORBA_exception_free (&ev);
|
CORBA_exception_free (&ev);
|
||||||
declare_done_loading (strategy);
|
declare_done_loading (strategy);
|
||||||
return;
|
return;
|
||||||
|
@ -271,7 +271,7 @@ nautilus_adapter_progressive_load_strategy_load_location (NautilusAdapterLoadStr
|
||||||
|
|
||||||
if (strategy->details->stop) {
|
if (strategy->details->stop) {
|
||||||
nautilus_adapter_load_strategy_report_load_complete (abstract_strategy);
|
nautilus_adapter_load_strategy_report_load_complete (abstract_strategy);
|
||||||
gtk_object_unref (GTK_OBJECT (strategy));
|
g_object_unref (G_OBJECT (strategy));
|
||||||
CORBA_exception_free (&ev);
|
CORBA_exception_free (&ev);
|
||||||
declare_done_loading (strategy);
|
declare_done_loading (strategy);
|
||||||
return;
|
return;
|
||||||
|
@ -312,7 +312,7 @@ nautilus_adapter_progressive_load_strategy_load_location (NautilusAdapterLoadStr
|
||||||
if (ev._major == CORBA_NO_EXCEPTION) {
|
if (ev._major == CORBA_NO_EXCEPTION) {
|
||||||
Bonobo_ProgressiveDataSink_end (strategy->details->progressive_data_sink, &ev);
|
Bonobo_ProgressiveDataSink_end (strategy->details->progressive_data_sink, &ev);
|
||||||
nautilus_adapter_load_strategy_report_load_complete (abstract_strategy);
|
nautilus_adapter_load_strategy_report_load_complete (abstract_strategy);
|
||||||
gtk_object_unref (GTK_OBJECT (strategy));
|
g_object_unref (G_OBJECT (strategy));
|
||||||
gnome_vfs_close (handle);
|
gnome_vfs_close (handle);
|
||||||
CORBA_free (iobuf);
|
CORBA_free (iobuf);
|
||||||
CORBA_exception_free (&ev);
|
CORBA_exception_free (&ev);
|
||||||
|
|
|
@ -103,7 +103,7 @@ nautilus_adapter_stream_load_strategy_new (Bonobo_PersistStream persist_stream)
|
||||||
NautilusAdapterStreamLoadStrategy *strategy;
|
NautilusAdapterStreamLoadStrategy *strategy;
|
||||||
|
|
||||||
strategy = NAUTILUS_ADAPTER_STREAM_LOAD_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_STREAM_LOAD_STRATEGY, NULL));
|
strategy = NAUTILUS_ADAPTER_STREAM_LOAD_STRATEGY (g_object_new (NAUTILUS_TYPE_ADAPTER_STREAM_LOAD_STRATEGY, NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (strategy));
|
g_object_ref (G_OBJECT (strategy));
|
||||||
gtk_object_sink (GTK_OBJECT (strategy));
|
gtk_object_sink (GTK_OBJECT (strategy));
|
||||||
|
|
||||||
strategy->details->persist_stream = persist_stream;
|
strategy->details->persist_stream = persist_stream;
|
||||||
|
@ -121,7 +121,7 @@ nautilus_adapter_stream_load_strategy_load_location (NautilusAdapterLoadStrategy
|
||||||
CORBA_Environment ev;
|
CORBA_Environment ev;
|
||||||
|
|
||||||
strategy = NAUTILUS_ADAPTER_STREAM_LOAD_STRATEGY (abstract_strategy);
|
strategy = NAUTILUS_ADAPTER_STREAM_LOAD_STRATEGY (abstract_strategy);
|
||||||
gtk_object_ref (GTK_OBJECT (strategy));
|
g_object_ref (G_OBJECT (strategy));
|
||||||
|
|
||||||
CORBA_exception_init (&ev);
|
CORBA_exception_init (&ev);
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ nautilus_adapter_stream_load_strategy_load_location (NautilusAdapterLoadStrategy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (strategy));
|
g_object_unref (G_OBJECT (strategy));
|
||||||
|
|
||||||
CORBA_exception_free (&ev);
|
CORBA_exception_free (&ev);
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ static void
|
||||||
nautilus_adapter_init (NautilusAdapter *adapter)
|
nautilus_adapter_init (NautilusAdapter *adapter)
|
||||||
{
|
{
|
||||||
adapter->details = g_new0 (NautilusAdapterDetails, 1);
|
adapter->details = g_new0 (NautilusAdapterDetails, 1);
|
||||||
gtk_object_ref (GTK_OBJECT (adapter));
|
g_object_ref (G_OBJECT (adapter));
|
||||||
gtk_object_sink (GTK_OBJECT (adapter));
|
gtk_object_sink (GTK_OBJECT (adapter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,11 +120,11 @@ nautilus_adapter_destroy (GtkObject *object)
|
||||||
|
|
||||||
if (adapter->details->load_strategy != NULL) {
|
if (adapter->details->load_strategy != NULL) {
|
||||||
nautilus_adapter_load_strategy_stop_loading (adapter->details->load_strategy);
|
nautilus_adapter_load_strategy_stop_loading (adapter->details->load_strategy);
|
||||||
gtk_object_unref (GTK_OBJECT (adapter->details->load_strategy));
|
g_object_unref (G_OBJECT (adapter->details->load_strategy));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (adapter->details->embed_strategy != NULL) {
|
if (adapter->details->embed_strategy != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (adapter->details->embed_strategy));
|
g_object_unref (G_OBJECT (adapter->details->embed_strategy));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (adapter->details);
|
g_free (adapter->details);
|
||||||
|
@ -160,7 +160,7 @@ nautilus_adapter_new (Bonobo_Unknown component)
|
||||||
/* Get the class to handle embedding this kind of component. */
|
/* Get the class to handle embedding this kind of component. */
|
||||||
adapter->details->embed_strategy = nautilus_adapter_embed_strategy_get (component);
|
adapter->details->embed_strategy = nautilus_adapter_embed_strategy_get (component);
|
||||||
if (adapter->details->embed_strategy == NULL) {
|
if (adapter->details->embed_strategy == NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (adapter));
|
g_object_unref (G_OBJECT (adapter));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ nautilus_adapter_new (Bonobo_Unknown component)
|
||||||
bonobo_object_add_interface (BONOBO_OBJECT (control), zoomable);
|
bonobo_object_add_interface (BONOBO_OBJECT (control), zoomable);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (control), "activate",
|
g_signal_connect (G_OBJECT (control), "activate",
|
||||||
GTK_SIGNAL_FUNC (nautilus_adapter_activate_callback),
|
G_CALLBACK (nautilus_adapter_activate_callback),
|
||||||
adapter);
|
adapter);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (adapter->details->embed_strategy), "open_location",
|
g_signal_connect (G_OBJECT (adapter->details->embed_strategy), "open_location",
|
||||||
|
@ -180,7 +180,7 @@ nautilus_adapter_new (Bonobo_Unknown component)
|
||||||
/* Get the class to handle loading this kind of component. */
|
/* Get the class to handle loading this kind of component. */
|
||||||
adapter->details->load_strategy = nautilus_adapter_load_strategy_get (component);
|
adapter->details->load_strategy = nautilus_adapter_load_strategy_get (component);
|
||||||
if (adapter->details->load_strategy == NULL) {
|
if (adapter->details->load_strategy == NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (adapter));
|
g_object_unref (G_OBJECT (adapter));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ nautilus_hardware_view_init (NautilusHardwareView *hardware_view)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (hardware_view->details->nautilus_view),
|
g_signal_connect (G_OBJECT (hardware_view->details->nautilus_view),
|
||||||
"load_location",
|
"load_location",
|
||||||
GTK_SIGNAL_FUNC (hardware_view_load_location_callback),
|
G_CALLBACK (hardware_view_load_location_callback),
|
||||||
hardware_view);
|
hardware_view);
|
||||||
|
|
||||||
hardware_view->details->form = NULL;
|
hardware_view->details->form = NULL;
|
||||||
|
|
|
@ -2235,11 +2235,11 @@ make_index_display_page(HyperbolaNavigationIndex *hni)
|
||||||
gtk_container_add(GTK_CONTAINER(hni->specific_rbutton),GTK_WIDGET(underlined_label));
|
gtk_container_add(GTK_CONTAINER(hni->specific_rbutton),GTK_WIDGET(underlined_label));
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (hni->contents_rbutton), "toggled",
|
g_signal_connect (G_OBJECT (hni->contents_rbutton), "toggled",
|
||||||
GTK_SIGNAL_FUNC(show_indexes_for_contents_selection_button),
|
G_CALLBACK(show_indexes_for_contents_selection_button),
|
||||||
hni);
|
hni);
|
||||||
g_signal_connect (G_OBJECT (hni->all_rbutton), "toggled",
|
g_signal_connect (G_OBJECT (hni->all_rbutton), "toggled",
|
||||||
GTK_SIGNAL_FUNC(show_indexes_for_all_docs_button), hni);
|
G_CALLBACK(show_indexes_for_all_docs_button), hni);
|
||||||
g_signal_connect (G_OBJECT (hni->specific_rbutton), "toggled", GTK_SIGNAL_FUNC(show_indexes_for_specific_docs_button), hni);
|
g_signal_connect (G_OBJECT (hni->specific_rbutton), "toggled", G_CALLBACK(show_indexes_for_specific_docs_button), hni);
|
||||||
gtk_box_pack_start(GTK_BOX(top_vbox), hni->contents_rbutton, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(top_vbox), hni->contents_rbutton, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start(GTK_BOX(top_vbox), hni->all_rbutton, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(top_vbox), hni->all_rbutton, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start(GTK_BOX(top_hbox),hni->specific_rbutton,TRUE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(top_hbox),hni->specific_rbutton,TRUE, TRUE, 0);
|
||||||
|
@ -2264,7 +2264,7 @@ make_index_display_page(HyperbolaNavigationIndex *hni)
|
||||||
hni->all_terms_rbutton = gtk_radio_button_new(NULL);
|
hni->all_terms_rbutton = gtk_radio_button_new(NULL);
|
||||||
gtk_container_add(GTK_CONTAINER(hni->all_terms_rbutton),GTK_WIDGET(underlined_label));
|
gtk_container_add(GTK_CONTAINER(hni->all_terms_rbutton),GTK_WIDGET(underlined_label));
|
||||||
g_signal_connect (G_OBJECT (hni->all_terms_rbutton), "toggled",
|
g_signal_connect (G_OBJECT (hni->all_terms_rbutton), "toggled",
|
||||||
GTK_SIGNAL_FUNC(show_index_for_all_terms), hni);
|
G_CALLBACK(show_index_for_all_terms), hni);
|
||||||
gtk_box_pack_start(GTK_BOX(mid_vbox), hni->all_terms_rbutton,FALSE,FALSE,0);
|
gtk_box_pack_start(GTK_BOX(mid_vbox), hni->all_terms_rbutton,FALSE,FALSE,0);
|
||||||
radio_group = gtk_radio_button_group(GTK_RADIO_BUTTON(hni->all_terms_rbutton));
|
radio_group = gtk_radio_button_group(GTK_RADIO_BUTTON(hni->all_terms_rbutton));
|
||||||
underlined_label = gtk_label_new("");
|
underlined_label = gtk_label_new("");
|
||||||
|
@ -2274,7 +2274,7 @@ make_index_display_page(HyperbolaNavigationIndex *hni)
|
||||||
hni->specific_terms_rbutton = gtk_radio_button_new( radio_group);
|
hni->specific_terms_rbutton = gtk_radio_button_new( radio_group);
|
||||||
gtk_container_add(GTK_CONTAINER(hni->specific_terms_rbutton),GTK_WIDGET(underlined_label));
|
gtk_container_add(GTK_CONTAINER(hni->specific_terms_rbutton),GTK_WIDGET(underlined_label));
|
||||||
g_signal_connect (G_OBJECT (hni->specific_terms_rbutton), "toggled",
|
g_signal_connect (G_OBJECT (hni->specific_terms_rbutton), "toggled",
|
||||||
GTK_SIGNAL_FUNC(show_index_for_selected_terms), hni);
|
G_CALLBACK(show_index_for_selected_terms), hni);
|
||||||
gtk_box_pack_start(GTK_BOX(mid_vbox), hni->specific_terms_rbutton, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(mid_vbox), hni->specific_terms_rbutton, FALSE, FALSE, 0);
|
||||||
|
|
||||||
hni->ent = gtk_entry_new();
|
hni->ent = gtk_entry_new();
|
||||||
|
|
|
@ -178,7 +178,7 @@ update_history (NautilusHistoryView *view,
|
||||||
pixbuf = bonobo_ui_util_xml_to_pixbuf (item->icon);
|
pixbuf = bonobo_ui_util_xml_to_pixbuf (item->icon);
|
||||||
install_icon (list, new_row, pixbuf);
|
install_icon (list, new_row, pixbuf);
|
||||||
if (pixbuf != NULL) {
|
if (pixbuf != NULL) {
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_clist_columns_autosize (list);
|
gtk_clist_columns_autosize (list);
|
||||||
|
@ -297,7 +297,7 @@ nautilus_history_view_init (NautilusHistoryView *view)
|
||||||
|
|
||||||
nautilus_view_construct (NAUTILUS_VIEW (view), window);
|
nautilus_view_construct (NAUTILUS_VIEW (view), window);
|
||||||
|
|
||||||
gtk_object_ref (GTK_OBJECT (list));
|
g_object_ref (G_OBJECT (list));
|
||||||
view->list = list;
|
view->list = list;
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (list),
|
g_signal_connect (G_OBJECT (list),
|
||||||
|
@ -326,7 +326,7 @@ nautilus_history_view_destroy (GtkObject *object)
|
||||||
*view->external_destroyed_flag = TRUE;
|
*view->external_destroyed_flag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (view->list));
|
g_object_unref (G_OBJECT (view->list));
|
||||||
|
|
||||||
EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
|
EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,17 +81,17 @@ release_pixbuf (bonobo_object_data_t *bod)
|
||||||
g_return_if_fail (bod != NULL);
|
g_return_if_fail (bod != NULL);
|
||||||
|
|
||||||
if (bod->pixbuf != NULL) {
|
if (bod->pixbuf != NULL) {
|
||||||
gdk_pixbuf_unref (bod->pixbuf);
|
g_object_unref (G_OBJECT (bod->pixbuf));
|
||||||
}
|
}
|
||||||
bod->pixbuf = NULL;
|
bod->pixbuf = NULL;
|
||||||
|
|
||||||
if (bod->zoomed != NULL) {
|
if (bod->zoomed != NULL) {
|
||||||
gdk_pixbuf_unref (bod->zoomed);
|
g_object_unref (G_OBJECT (bod->zoomed));
|
||||||
}
|
}
|
||||||
bod->zoomed = NULL;
|
bod->zoomed = NULL;
|
||||||
|
|
||||||
if (bod->scaled != NULL) {
|
if (bod->scaled != NULL) {
|
||||||
gdk_pixbuf_unref (bod->scaled);
|
g_object_unref (G_OBJECT (bod->scaled));
|
||||||
}
|
}
|
||||||
bod->scaled = NULL;
|
bod->scaled = NULL;
|
||||||
}
|
}
|
||||||
|
@ -409,7 +409,7 @@ rezoom_control (bonobo_object_data_t *bod, float new_zoom_level)
|
||||||
new_height = old_height * new_zoom_level;
|
new_height = old_height * new_zoom_level;
|
||||||
|
|
||||||
if (bod->zoomed)
|
if (bod->zoomed)
|
||||||
gdk_pixbuf_unref (bod->zoomed);
|
g_object_unref (G_OBJECT (bod->zoomed));
|
||||||
|
|
||||||
if (new_width >= 1 && new_height >= 1) {
|
if (new_width >= 1 && new_height >= 1) {
|
||||||
bod->zoomed = gdk_pixbuf_scale_simple (pixbuf, new_width,
|
bod->zoomed = gdk_pixbuf_scale_simple (pixbuf, new_width,
|
||||||
|
@ -484,7 +484,7 @@ load_image_from_stream (BonoboPersistStream *ps, Bonobo_Stream stream,
|
||||||
Bonobo_Stream_read (stream, LOAD_BUFFER_SIZE, &buffer, ev);
|
Bonobo_Stream_read (stream, LOAD_BUFFER_SIZE, &buffer, ev);
|
||||||
if (ev->_major != CORBA_NO_EXCEPTION) {
|
if (ev->_major != CORBA_NO_EXCEPTION) {
|
||||||
gdk_pixbuf_loader_close (loader);
|
gdk_pixbuf_loader_close (loader);
|
||||||
gtk_object_unref (GTK_OBJECT (loader));
|
g_object_unref (G_OBJECT (loader));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ load_image_from_stream (BonoboPersistStream *ps, Bonobo_Stream stream,
|
||||||
ex_Bonobo_Persist_WrongDataType, NULL);
|
ex_Bonobo_Persist_WrongDataType, NULL);
|
||||||
}
|
}
|
||||||
gdk_pixbuf_loader_close (loader);
|
gdk_pixbuf_loader_close (loader);
|
||||||
gtk_object_unref (GTK_OBJECT (loader));
|
g_object_unref (G_OBJECT (loader));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -509,9 +509,9 @@ load_image_from_stream (BonoboPersistStream *ps, Bonobo_Stream stream,
|
||||||
|
|
||||||
if (bod->pixbuf == NULL) {
|
if (bod->pixbuf == NULL) {
|
||||||
CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Bonobo_Persist_WrongDataType, NULL);
|
CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Bonobo_Persist_WrongDataType, NULL);
|
||||||
gtk_object_unref (GTK_OBJECT (loader));
|
g_object_unref (G_OBJECT (loader));
|
||||||
} else {
|
} else {
|
||||||
gdk_pixbuf_ref (bod->pixbuf);
|
g_object_ref (G_OBJECT (bod->pixbuf));
|
||||||
|
|
||||||
/* Restore current zoomed pixbuf cache. */
|
/* Restore current zoomed pixbuf cache. */
|
||||||
if (bod->zoom_level != 1.0) {
|
if (bod->zoom_level != 1.0) {
|
||||||
|
@ -559,7 +559,7 @@ control_size_allocate_callback (GtkWidget *drawing_area, GtkAllocation *allocati
|
||||||
if (allocation->width == gdk_pixbuf_get_width (buf) &&
|
if (allocation->width == gdk_pixbuf_get_width (buf) &&
|
||||||
allocation->height == gdk_pixbuf_get_height (buf)) {
|
allocation->height == gdk_pixbuf_get_height (buf)) {
|
||||||
if (bod->scaled != NULL) {
|
if (bod->scaled != NULL) {
|
||||||
gdk_pixbuf_unref (bod->scaled);
|
g_object_unref (G_OBJECT (bod->scaled));
|
||||||
bod->scaled = NULL;
|
bod->scaled = NULL;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -572,7 +572,7 @@ control_size_allocate_callback (GtkWidget *drawing_area, GtkAllocation *allocati
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
bod->scaled = NULL;
|
bod->scaled = NULL;
|
||||||
gdk_pixbuf_unref (control_buf);
|
g_object_unref (G_OBJECT (control_buf));
|
||||||
control_buf = NULL;
|
control_buf = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -667,7 +667,7 @@ control_factory_common (GtkWidget *scrolled_window)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (bod->drawing_area),
|
g_signal_connect (G_OBJECT (bod->drawing_area),
|
||||||
"expose_event",
|
"expose_event",
|
||||||
GTK_SIGNAL_FUNC (drawing_area_exposed), bod);
|
G_CALLBACK (drawing_area_exposed), bod);
|
||||||
|
|
||||||
if (scrolled_window) {
|
if (scrolled_window) {
|
||||||
bod->root = scrolled_window;
|
bod->root = scrolled_window;
|
||||||
|
@ -690,20 +690,20 @@ control_factory_common (GtkWidget *scrolled_window)
|
||||||
gtk_widget_ref (bod->drawing_area);
|
gtk_widget_ref (bod->drawing_area);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (bod->control), "destroy",
|
g_signal_connect (G_OBJECT (bod->control), "destroy",
|
||||||
GTK_SIGNAL_FUNC (control_destroy_callback), bod);
|
G_CALLBACK (control_destroy_callback), bod);
|
||||||
|
|
||||||
bod->zoomable = bonobo_zoomable_new ();
|
bod->zoomable = bonobo_zoomable_new ();
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (bod->zoomable), "set_zoom_level",
|
g_signal_connect (G_OBJECT (bod->zoomable), "set_zoom_level",
|
||||||
GTK_SIGNAL_FUNC (zoomable_set_zoom_level_callback), bod);
|
G_CALLBACK (zoomable_set_zoom_level_callback), bod);
|
||||||
g_signal_connect (G_OBJECT (bod->zoomable), "zoom_in",
|
g_signal_connect (G_OBJECT (bod->zoomable), "zoom_in",
|
||||||
GTK_SIGNAL_FUNC (zoomable_zoom_in_callback), bod);
|
G_CALLBACK (zoomable_zoom_in_callback), bod);
|
||||||
g_signal_connect (G_OBJECT (bod->zoomable), "zoom_out",
|
g_signal_connect (G_OBJECT (bod->zoomable), "zoom_out",
|
||||||
GTK_SIGNAL_FUNC (zoomable_zoom_out_callback), bod);
|
G_CALLBACK (zoomable_zoom_out_callback), bod);
|
||||||
g_signal_connect (G_OBJECT (bod->zoomable), "zoom_to_fit",
|
g_signal_connect (G_OBJECT (bod->zoomable), "zoom_to_fit",
|
||||||
GTK_SIGNAL_FUNC (zoomable_zoom_to_fit_callback), bod);
|
G_CALLBACK (zoomable_zoom_to_fit_callback), bod);
|
||||||
g_signal_connect (G_OBJECT (bod->zoomable), "zoom_to_default",
|
g_signal_connect (G_OBJECT (bod->zoomable), "zoom_to_default",
|
||||||
GTK_SIGNAL_FUNC (zoomable_zoom_to_default_callback), bod);
|
G_CALLBACK (zoomable_zoom_to_default_callback), bod);
|
||||||
|
|
||||||
bod->zoom_level = 1.0;
|
bod->zoom_level = 1.0;
|
||||||
bonobo_zoomable_set_parameters_full (bod->zoomable,
|
bonobo_zoomable_set_parameters_full (bod->zoomable,
|
||||||
|
@ -720,7 +720,7 @@ control_factory_common (GtkWidget *scrolled_window)
|
||||||
BONOBO_OBJECT (bod->zoomable));
|
BONOBO_OBJECT (bod->zoomable));
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (bod->control), "activate",
|
g_signal_connect (G_OBJECT (bod->control), "activate",
|
||||||
GTK_SIGNAL_FUNC (control_activate_callback), bod);
|
G_CALLBACK (control_activate_callback), bod);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Interface Bonobo::PersistStream
|
* Interface Bonobo::PersistStream
|
||||||
|
@ -744,7 +744,7 @@ scaled_control_factory (void)
|
||||||
bod = control_factory_common (NULL);
|
bod = control_factory_common (NULL);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (bod->drawing_area), "size_allocate",
|
g_signal_connect (G_OBJECT (bod->drawing_area), "size_allocate",
|
||||||
GTK_SIGNAL_FUNC (control_size_allocate_callback), bod);
|
G_CALLBACK (control_size_allocate_callback), bod);
|
||||||
|
|
||||||
return bod;
|
return bod;
|
||||||
}
|
}
|
||||||
|
@ -764,11 +764,11 @@ scrollable_control_factory (void)
|
||||||
bod = control_factory_common (scroll);
|
bod = control_factory_common (scroll);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (bod->drawing_area), "size_allocate",
|
g_signal_connect (G_OBJECT (bod->drawing_area), "size_allocate",
|
||||||
GTK_SIGNAL_FUNC (scrolled_control_size_allocate_callback),
|
G_CALLBACK (scrolled_control_size_allocate_callback),
|
||||||
bod);
|
bod);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (bod->scrolled_window), "size_allocate",
|
g_signal_connect (G_OBJECT (bod->scrolled_window), "size_allocate",
|
||||||
GTK_SIGNAL_FUNC (scrolled_window_size_allocate_callback),
|
G_CALLBACK (scrolled_window_size_allocate_callback),
|
||||||
bod);
|
bod);
|
||||||
|
|
||||||
return bod;
|
return bod;
|
||||||
|
|
|
@ -79,7 +79,7 @@ nautilus_content_loser_init (NautilusContentLoser *view)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->nautilus_view),
|
g_signal_connect (G_OBJECT (view->details->nautilus_view),
|
||||||
"load_location",
|
"load_location",
|
||||||
GTK_SIGNAL_FUNC (loser_load_location_callback),
|
G_CALLBACK (loser_load_location_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
/* Get notified when our bonobo control is activated so we
|
/* Get notified when our bonobo control is activated so we
|
||||||
|
|
|
@ -81,7 +81,7 @@ nautilus_sidebar_loser_init (NautilusSidebarLoser *view)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->nautilus_view),
|
g_signal_connect (G_OBJECT (view->details->nautilus_view),
|
||||||
"load_location",
|
"load_location",
|
||||||
GTK_SIGNAL_FUNC (loser_load_location_callback),
|
G_CALLBACK (loser_load_location_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -324,57 +324,57 @@ nautilus_mozilla_content_view_init (NautilusMozillaContentView *view)
|
||||||
/* Add callbacks to the beast */
|
/* Add callbacks to the beast */
|
||||||
g_signal_connect (G_OBJECT (view->details->mozilla),
|
g_signal_connect (G_OBJECT (view->details->mozilla),
|
||||||
"realize",
|
"realize",
|
||||||
GTK_SIGNAL_FUNC (mozilla_realize_callback),
|
G_CALLBACK (mozilla_realize_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->mozilla),
|
g_signal_connect (G_OBJECT (view->details->mozilla),
|
||||||
"title",
|
"title",
|
||||||
GTK_SIGNAL_FUNC (mozilla_title_changed_callback),
|
G_CALLBACK (mozilla_title_changed_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->mozilla),
|
g_signal_connect (G_OBJECT (view->details->mozilla),
|
||||||
"location",
|
"location",
|
||||||
GTK_SIGNAL_FUNC (mozilla_location_callback),
|
G_CALLBACK (mozilla_location_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->mozilla),
|
g_signal_connect (G_OBJECT (view->details->mozilla),
|
||||||
"net_state",
|
"net_state",
|
||||||
GTK_SIGNAL_FUNC (mozilla_net_state_callback),
|
G_CALLBACK (mozilla_net_state_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->mozilla),
|
g_signal_connect (G_OBJECT (view->details->mozilla),
|
||||||
"net_start",
|
"net_start",
|
||||||
GTK_SIGNAL_FUNC (mozilla_net_start_callback),
|
G_CALLBACK (mozilla_net_start_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->mozilla),
|
g_signal_connect (G_OBJECT (view->details->mozilla),
|
||||||
"net_stop",
|
"net_stop",
|
||||||
GTK_SIGNAL_FUNC (mozilla_net_stop_callback),
|
G_CALLBACK (mozilla_net_stop_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->mozilla),
|
g_signal_connect (G_OBJECT (view->details->mozilla),
|
||||||
"link_message",
|
"link_message",
|
||||||
GTK_SIGNAL_FUNC (mozilla_link_message_callback),
|
G_CALLBACK (mozilla_link_message_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->mozilla),
|
g_signal_connect (G_OBJECT (view->details->mozilla),
|
||||||
"progress",
|
"progress",
|
||||||
GTK_SIGNAL_FUNC (mozilla_progress_callback),
|
G_CALLBACK (mozilla_progress_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->mozilla),
|
g_signal_connect (G_OBJECT (view->details->mozilla),
|
||||||
"dom_key_press",
|
"dom_key_press",
|
||||||
GTK_SIGNAL_FUNC (mozilla_dom_key_press_callback),
|
G_CALLBACK (mozilla_dom_key_press_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->mozilla),
|
g_signal_connect (G_OBJECT (view->details->mozilla),
|
||||||
"dom_mouse_click",
|
"dom_mouse_click",
|
||||||
GTK_SIGNAL_FUNC (mozilla_dom_mouse_click_callback),
|
G_CALLBACK (mozilla_dom_mouse_click_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->mozilla),
|
g_signal_connect (G_OBJECT (view->details->mozilla),
|
||||||
"new_window",
|
"new_window",
|
||||||
GTK_SIGNAL_FUNC (mozilla_new_window_callback),
|
G_CALLBACK (mozilla_new_window_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
|
|
||||||
|
@ -386,7 +386,7 @@ nautilus_mozilla_content_view_init (NautilusMozillaContentView *view)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->nautilus_view),
|
g_signal_connect (G_OBJECT (view->details->nautilus_view),
|
||||||
"load_location",
|
"load_location",
|
||||||
GTK_SIGNAL_FUNC (view_load_location_callback),
|
G_CALLBACK (view_load_location_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
/* Connect to the active signal of the view to merge our menus */
|
/* Connect to the active signal of the view to merge our menus */
|
||||||
|
@ -874,16 +874,16 @@ mozilla_new_window_callback (GtkMozEmbed *mozilla, GtkMozEmbed **new_mozilla, gu
|
||||||
|
|
||||||
/* set up all the signals that we care about for chrome windows. */
|
/* set up all the signals that we care about for chrome windows. */
|
||||||
g_signal_connect (G_OBJECT (chrome->mozilla), "visibility",
|
g_signal_connect (G_OBJECT (chrome->mozilla), "visibility",
|
||||||
GTK_SIGNAL_FUNC (mozilla_chrome_visibility_callback),
|
G_CALLBACK (mozilla_chrome_visibility_callback),
|
||||||
chrome);
|
chrome);
|
||||||
g_signal_connect (G_OBJECT (chrome->mozilla), "destroy_browser",
|
g_signal_connect (G_OBJECT (chrome->mozilla), "destroy_browser",
|
||||||
GTK_SIGNAL_FUNC (mozilla_chrome_destroy_brsr_callback),
|
G_CALLBACK (mozilla_chrome_destroy_brsr_callback),
|
||||||
chrome);
|
chrome);
|
||||||
g_signal_connect (G_OBJECT (chrome->mozilla), "size_to",
|
g_signal_connect (G_OBJECT (chrome->mozilla), "size_to",
|
||||||
GTK_SIGNAL_FUNC (mozilla_chrome_size_to_callback),
|
G_CALLBACK (mozilla_chrome_size_to_callback),
|
||||||
chrome);
|
chrome);
|
||||||
g_signal_connect (G_OBJECT (chrome->mozilla), "title",
|
g_signal_connect (G_OBJECT (chrome->mozilla), "title",
|
||||||
GTK_SIGNAL_FUNC (mozilla_chrome_title_callback),
|
G_CALLBACK (mozilla_chrome_title_callback),
|
||||||
chrome);
|
chrome);
|
||||||
|
|
||||||
/* and realize the widgets */
|
/* and realize the widgets */
|
||||||
|
|
|
@ -220,7 +220,7 @@ static void streaming_save_browse_cb(GtkWidget * w, gpointer data)
|
||||||
{
|
{
|
||||||
streaming_save_dirbrowser = xmms_create_dir_browser(_("Select the directory where you want to store the MPEG streams:"),
|
streaming_save_dirbrowser = xmms_create_dir_browser(_("Select the directory where you want to store the MPEG streams:"),
|
||||||
mpg123_cfg.save_http_path, GTK_SELECTION_SINGLE, streaming_save_dirbrowser_cb);
|
mpg123_cfg.save_http_path, GTK_SELECTION_SINGLE, streaming_save_dirbrowser_cb);
|
||||||
gtk_signal_connect(GTK_OBJECT(streaming_save_dirbrowser), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &streaming_save_dirbrowser);
|
gtk_signal_connect(GTK_OBJECT(streaming_save_dirbrowser), "destroy", G_CALLBACK(gtk_widget_destroyed), &streaming_save_dirbrowser);
|
||||||
gtk_window_set_transient_for(GTK_WINDOW(streaming_save_dirbrowser), GTK_WINDOW(mpg123_configurewin));
|
gtk_window_set_transient_for(GTK_WINDOW(streaming_save_dirbrowser), GTK_WINDOW(mpg123_configurewin));
|
||||||
gtk_widget_show(streaming_save_dirbrowser);
|
gtk_widget_show(streaming_save_dirbrowser);
|
||||||
}
|
}
|
||||||
|
@ -275,8 +275,8 @@ void mpg123_configure(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mpg123_configurewin = gtk_window_new(GTK_WINDOW_DIALOG);
|
mpg123_configurewin = gtk_window_new(GTK_WINDOW_DIALOG);
|
||||||
gtk_signal_connect(GTK_OBJECT(mpg123_configurewin), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &mpg123_configurewin);
|
gtk_signal_connect(GTK_OBJECT(mpg123_configurewin), "destroy", G_CALLBACK(gtk_widget_destroyed), &mpg123_configurewin);
|
||||||
gtk_signal_connect(GTK_OBJECT(mpg123_configurewin), "destroy", GTK_SIGNAL_FUNC(configure_destroy), &mpg123_configurewin);
|
gtk_signal_connect(GTK_OBJECT(mpg123_configurewin), "destroy", G_CALLBACK(configure_destroy), &mpg123_configurewin);
|
||||||
gtk_window_set_title(GTK_WINDOW(mpg123_configurewin), _("MPG123 Configuration"));
|
gtk_window_set_title(GTK_WINDOW(mpg123_configurewin), _("MPG123 Configuration"));
|
||||||
gtk_window_set_wmclass(GTK_WINDOW(mpg123_configurewin), "mpg123_configuration", "Nautilus");
|
gtk_window_set_wmclass(GTK_WINDOW(mpg123_configurewin), "mpg123_configuration", "Nautilus");
|
||||||
gtk_window_set_policy(GTK_WINDOW(mpg123_configurewin), FALSE, FALSE, FALSE);
|
gtk_window_set_policy(GTK_WINDOW(mpg123_configurewin), FALSE, FALSE, FALSE);
|
||||||
|
@ -430,14 +430,14 @@ void mpg123_configure(void)
|
||||||
if (mpg123_cfg.use_3dnow == 0)
|
if (mpg123_cfg.use_3dnow == 0)
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(auto_select), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(auto_select), TRUE);
|
||||||
gtk_box_pack_start(GTK_BOX(decoder_vbox), auto_select, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(decoder_vbox), auto_select, FALSE, FALSE, 0);
|
||||||
gtk_signal_connect(GTK_OBJECT(auto_select), "clicked", GTK_SIGNAL_FUNC(auto_select_cb), NULL);
|
gtk_signal_connect(GTK_OBJECT(auto_select), "clicked", G_CALLBACK(auto_select_cb), NULL);
|
||||||
gtk_widget_show(auto_select);
|
gtk_widget_show(auto_select);
|
||||||
|
|
||||||
decoder_3dnow = gtk_radio_button_new_with_label(NULL, _("use 3DNow! optimized decoder"));
|
decoder_3dnow = gtk_radio_button_new_with_label(NULL, _("use 3DNow! optimized decoder"));
|
||||||
if (((support_3dnow() == TRUE) && mpg123_cfg.use_3dnow != 2) || (mpg123_cfg.use_3dnow == 1))
|
if (((support_3dnow() == TRUE) && mpg123_cfg.use_3dnow != 2) || (mpg123_cfg.use_3dnow == 1))
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decoder_3dnow), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decoder_3dnow), TRUE);
|
||||||
gtk_box_pack_start(GTK_BOX(decoder_vbox), decoder_3dnow, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(decoder_vbox), decoder_3dnow, FALSE, FALSE, 0);
|
||||||
gtk_signal_connect(GTK_OBJECT(decoder_3dnow), "clicked", GTK_SIGNAL_FUNC(use_3dnow_cb), NULL);
|
gtk_signal_connect(GTK_OBJECT(decoder_3dnow), "clicked", G_CALLBACK(use_3dnow_cb), NULL);
|
||||||
gtk_widget_show(decoder_3dnow);
|
gtk_widget_show(decoder_3dnow);
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(auto_select)) == TRUE)
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(auto_select)) == TRUE)
|
||||||
gtk_widget_set_sensitive(decoder_3dnow, FALSE);
|
gtk_widget_set_sensitive(decoder_3dnow, FALSE);
|
||||||
|
@ -446,7 +446,7 @@ void mpg123_configure(void)
|
||||||
if (((support_3dnow() == FALSE) && mpg123_cfg.use_3dnow != 1) || (mpg123_cfg.use_3dnow == 2))
|
if (((support_3dnow() == FALSE) && mpg123_cfg.use_3dnow != 1) || (mpg123_cfg.use_3dnow == 2))
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decoder_fpu), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decoder_fpu), TRUE);
|
||||||
gtk_box_pack_start(GTK_BOX(decoder_vbox), decoder_fpu, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(decoder_vbox), decoder_fpu, FALSE, FALSE, 0);
|
||||||
gtk_signal_connect(GTK_OBJECT(decoder_fpu), "clicked", GTK_SIGNAL_FUNC(use_fpu_cb), NULL);
|
gtk_signal_connect(GTK_OBJECT(decoder_fpu), "clicked", G_CALLBACK(use_fpu_cb), NULL);
|
||||||
gtk_widget_show(decoder_fpu);
|
gtk_widget_show(decoder_fpu);
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(auto_select)) == TRUE)
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(auto_select)) == TRUE)
|
||||||
gtk_widget_set_sensitive(decoder_fpu, FALSE);
|
gtk_widget_set_sensitive(decoder_fpu, FALSE);
|
||||||
|
@ -527,7 +527,7 @@ void mpg123_configure(void)
|
||||||
|
|
||||||
streaming_proxy_use = gtk_check_button_new_with_label(_("Use proxy"));
|
streaming_proxy_use = gtk_check_button_new_with_label(_("Use proxy"));
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_proxy_use), mpg123_cfg.use_proxy);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_proxy_use), mpg123_cfg.use_proxy);
|
||||||
gtk_signal_connect(GTK_OBJECT(streaming_proxy_use), "clicked", GTK_SIGNAL_FUNC(proxy_use_cb), NULL);
|
gtk_signal_connect(GTK_OBJECT(streaming_proxy_use), "clicked", G_CALLBACK(proxy_use_cb), NULL);
|
||||||
gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_use, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_use, FALSE, FALSE, 0);
|
||||||
gtk_widget_show(streaming_proxy_use);
|
gtk_widget_show(streaming_proxy_use);
|
||||||
|
|
||||||
|
@ -561,7 +561,7 @@ void mpg123_configure(void)
|
||||||
streaming_proxy_auth_use = gtk_check_button_new_with_label(_("Use authentication"));
|
streaming_proxy_auth_use = gtk_check_button_new_with_label(_("Use authentication"));
|
||||||
gtk_widget_set_sensitive(streaming_proxy_auth_use, mpg123_cfg.use_proxy);
|
gtk_widget_set_sensitive(streaming_proxy_auth_use, mpg123_cfg.use_proxy);
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_proxy_auth_use), mpg123_cfg.proxy_use_auth);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_proxy_auth_use), mpg123_cfg.proxy_use_auth);
|
||||||
gtk_signal_connect(GTK_OBJECT(streaming_proxy_auth_use), "clicked", GTK_SIGNAL_FUNC(proxy_auth_use_cb), NULL);
|
gtk_signal_connect(GTK_OBJECT(streaming_proxy_auth_use), "clicked", G_CALLBACK(proxy_auth_use_cb), NULL);
|
||||||
gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_auth_use, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(streaming_proxy_vbox), streaming_proxy_auth_use, FALSE, FALSE, 0);
|
||||||
gtk_widget_show(streaming_proxy_auth_use);
|
gtk_widget_show(streaming_proxy_auth_use);
|
||||||
|
|
||||||
|
@ -608,7 +608,7 @@ void mpg123_configure(void)
|
||||||
|
|
||||||
streaming_save_use = gtk_check_button_new_with_label(_("Save stream to disk"));
|
streaming_save_use = gtk_check_button_new_with_label(_("Save stream to disk"));
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_save_use), mpg123_cfg.save_http_stream);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(streaming_save_use), mpg123_cfg.save_http_stream);
|
||||||
gtk_signal_connect(GTK_OBJECT(streaming_save_use), "clicked", GTK_SIGNAL_FUNC(streaming_save_use_cb), NULL);
|
gtk_signal_connect(GTK_OBJECT(streaming_save_use), "clicked", G_CALLBACK(streaming_save_use_cb), NULL);
|
||||||
gtk_box_pack_start(GTK_BOX(streaming_save_vbox), streaming_save_use, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(streaming_save_vbox), streaming_save_use, FALSE, FALSE, 0);
|
||||||
gtk_widget_show(streaming_save_use);
|
gtk_widget_show(streaming_save_use);
|
||||||
|
|
||||||
|
@ -626,7 +626,7 @@ void mpg123_configure(void)
|
||||||
gtk_widget_show(streaming_save_entry);
|
gtk_widget_show(streaming_save_entry);
|
||||||
|
|
||||||
streaming_save_browse = gtk_button_new_with_label(_("Browse"));
|
streaming_save_browse = gtk_button_new_with_label(_("Browse"));
|
||||||
gtk_signal_connect(GTK_OBJECT(streaming_save_browse), "clicked", GTK_SIGNAL_FUNC(streaming_save_browse_cb), NULL);
|
gtk_signal_connect(GTK_OBJECT(streaming_save_browse), "clicked", G_CALLBACK(streaming_save_browse_cb), NULL);
|
||||||
gtk_box_pack_start(GTK_BOX(streaming_save_hbox), streaming_save_browse, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(streaming_save_hbox), streaming_save_browse, FALSE, FALSE, 0);
|
||||||
gtk_widget_show(streaming_save_browse);
|
gtk_widget_show(streaming_save_browse);
|
||||||
|
|
||||||
|
@ -718,14 +718,14 @@ void mpg123_configure(void)
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
|
||||||
|
|
||||||
ok = gtk_button_new_with_label(_("Ok"));
|
ok = gtk_button_new_with_label(_("Ok"));
|
||||||
gtk_signal_connect(GTK_OBJECT(ok), "clicked", GTK_SIGNAL_FUNC(mpg123_configurewin_ok), NULL);
|
gtk_signal_connect(GTK_OBJECT(ok), "clicked", G_CALLBACK(mpg123_configurewin_ok), NULL);
|
||||||
GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT);
|
GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT);
|
||||||
gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0);
|
||||||
gtk_widget_show(ok);
|
gtk_widget_show(ok);
|
||||||
gtk_widget_grab_default(ok);
|
gtk_widget_grab_default(ok);
|
||||||
|
|
||||||
cancel = gtk_button_new_with_label(_("Cancel"));
|
cancel = gtk_button_new_with_label(_("Cancel"));
|
||||||
gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(mpg123_configurewin));
|
gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(mpg123_configurewin));
|
||||||
GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT);
|
GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT);
|
||||||
gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0);
|
||||||
gtk_widget_show(cancel);
|
gtk_widget_show(cancel);
|
||||||
|
|
|
@ -219,7 +219,7 @@ void mpg123_file_info_box(char *filename)
|
||||||
|
|
||||||
window = gtk_window_new(GTK_WINDOW_DIALOG);
|
window = gtk_window_new(GTK_WINDOW_DIALOG);
|
||||||
gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE);
|
gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE);
|
||||||
gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &window);
|
gtk_signal_connect(GTK_OBJECT(window), "destroy", G_CALLBACK(gtk_widget_destroyed), &window);
|
||||||
gtk_container_set_border_width(GTK_CONTAINER(window), 10);
|
gtk_container_set_border_width(GTK_CONTAINER(window), 10);
|
||||||
|
|
||||||
vbox = gtk_vbox_new(FALSE, 10);
|
vbox = gtk_vbox_new(FALSE, 10);
|
||||||
|
@ -306,18 +306,18 @@ void mpg123_file_info_box(char *filename)
|
||||||
gtk_box_pack_start(GTK_BOX(left_vbox), bbox, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(left_vbox), bbox, FALSE, FALSE, 0);
|
||||||
|
|
||||||
save = gtk_button_new_with_label(_("Save"));
|
save = gtk_button_new_with_label(_("Save"));
|
||||||
gtk_signal_connect(GTK_OBJECT(save), "clicked", GTK_SIGNAL_FUNC(save_cb), NULL);
|
gtk_signal_connect(GTK_OBJECT(save), "clicked", G_CALLBACK(save_cb), NULL);
|
||||||
GTK_WIDGET_SET_FLAGS(save, GTK_CAN_DEFAULT);
|
GTK_WIDGET_SET_FLAGS(save, GTK_CAN_DEFAULT);
|
||||||
gtk_box_pack_start(GTK_BOX(bbox), save, TRUE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(bbox), save, TRUE, TRUE, 0);
|
||||||
gtk_widget_grab_default(save);
|
gtk_widget_grab_default(save);
|
||||||
|
|
||||||
remove_id3 = gtk_button_new_with_label(_("Remove ID3"));
|
remove_id3 = gtk_button_new_with_label(_("Remove ID3"));
|
||||||
gtk_signal_connect(GTK_OBJECT(remove_id3), "clicked", GTK_SIGNAL_FUNC(remove_id3_cb), NULL);
|
gtk_signal_connect(GTK_OBJECT(remove_id3), "clicked", G_CALLBACK(remove_id3_cb), NULL);
|
||||||
GTK_WIDGET_SET_FLAGS(remove_id3, GTK_CAN_DEFAULT);
|
GTK_WIDGET_SET_FLAGS(remove_id3, GTK_CAN_DEFAULT);
|
||||||
gtk_box_pack_start(GTK_BOX(bbox), remove_id3, TRUE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(bbox), remove_id3, TRUE, TRUE, 0);
|
||||||
|
|
||||||
cancel = gtk_button_new_with_label(_("Cancel"));
|
cancel = gtk_button_new_with_label(_("Cancel"));
|
||||||
gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(window));
|
gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(window));
|
||||||
GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT);
|
GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT);
|
||||||
gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
|
|
@ -341,7 +341,7 @@ nautilus_music_view_init (NautilusMusicView *music_view)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (music_view->details->song_list),
|
g_signal_connect (G_OBJECT (music_view->details->song_list),
|
||||||
"get_cell_text",
|
"get_cell_text",
|
||||||
GTK_SIGNAL_FUNC (get_cell_text),
|
G_CALLBACK (get_cell_text),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
font_name = eel_preferences_get (NAUTILUS_PREFERENCES_LIST_VIEW_FONT);
|
font_name = eel_preferences_get (NAUTILUS_PREFERENCES_LIST_VIEW_FONT);
|
||||||
|
@ -1581,11 +1581,11 @@ add_play_controls (NautilusMusicView *music_view)
|
||||||
music_view->details->playtime_bar = gtk_hscale_new (GTK_ADJUSTMENT (music_view->details->playtime_adjustment));
|
music_view->details->playtime_bar = gtk_hscale_new (GTK_ADJUSTMENT (music_view->details->playtime_adjustment));
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (music_view->details->playtime_bar), "button_press_event",
|
g_signal_connect (G_OBJECT (music_view->details->playtime_bar), "button_press_event",
|
||||||
GTK_SIGNAL_FUNC (slider_press_callback), music_view);
|
G_CALLBACK (slider_press_callback), music_view);
|
||||||
g_signal_connect (G_OBJECT (music_view->details->playtime_bar), "button_release_event",
|
g_signal_connect (G_OBJECT (music_view->details->playtime_bar), "button_release_event",
|
||||||
GTK_SIGNAL_FUNC (slider_release_callback), music_view);
|
G_CALLBACK (slider_release_callback), music_view);
|
||||||
g_signal_connect (G_OBJECT (music_view->details->playtime_bar), "motion_notify_event",
|
g_signal_connect (G_OBJECT (music_view->details->playtime_bar), "motion_notify_event",
|
||||||
GTK_SIGNAL_FUNC (slider_moved_callback), music_view);
|
G_CALLBACK (slider_moved_callback), music_view);
|
||||||
|
|
||||||
gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), music_view->details->playtime_bar,
|
gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), music_view->details->playtime_bar,
|
||||||
_("Drag to seek within track"), NULL);
|
_("Drag to seek within track"), NULL);
|
||||||
|
@ -1616,7 +1616,7 @@ add_play_controls (NautilusMusicView *music_view)
|
||||||
music_view->details->previous_track_button = gtk_button_new ();
|
music_view->details->previous_track_button = gtk_button_new ();
|
||||||
gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), music_view->details->previous_track_button, _("Previous"), NULL);
|
gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), music_view->details->previous_track_button, _("Previous"), NULL);
|
||||||
gtk_container_add (GTK_CONTAINER (music_view->details->previous_track_button), box);
|
gtk_container_add (GTK_CONTAINER (music_view->details->previous_track_button), box);
|
||||||
g_signal_connect (G_OBJECT (music_view->details->previous_track_button), "clicked", GTK_SIGNAL_FUNC (prev_button_callback), music_view);
|
g_signal_connect (G_OBJECT (music_view->details->previous_track_button), "clicked", G_CALLBACK (prev_button_callback), music_view);
|
||||||
gtk_widget_set_sensitive (music_view->details->previous_track_button, TRUE);
|
gtk_widget_set_sensitive (music_view->details->previous_track_button, TRUE);
|
||||||
gtk_button_set_relief (GTK_BUTTON (music_view->details->previous_track_button), GTK_RELIEF_NORMAL);
|
gtk_button_set_relief (GTK_BUTTON (music_view->details->previous_track_button), GTK_RELIEF_NORMAL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), music_view->details->previous_track_button, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), music_view->details->previous_track_button, FALSE, FALSE, 0);
|
||||||
|
@ -1632,7 +1632,7 @@ add_play_controls (NautilusMusicView *music_view)
|
||||||
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NORMAL);
|
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NORMAL);
|
||||||
gtk_container_add (GTK_CONTAINER (button), box);
|
gtk_container_add (GTK_CONTAINER (button), box);
|
||||||
gtk_widget_set_sensitive (button, TRUE);
|
gtk_widget_set_sensitive (button, TRUE);
|
||||||
g_signal_connect (G_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (play_button_callback), music_view);
|
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (play_button_callback), music_view);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
|
|
||||||
|
@ -1648,7 +1648,7 @@ add_play_controls (NautilusMusicView *music_view)
|
||||||
gtk_widget_set_sensitive (music_view->details->pause_button, TRUE);
|
gtk_widget_set_sensitive (music_view->details->pause_button, TRUE);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (music_view->details->pause_button), "clicked",
|
g_signal_connect (G_OBJECT (music_view->details->pause_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC(pause_button_callback), music_view);
|
G_CALLBACK(pause_button_callback), music_view);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), music_view->details->pause_button, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), music_view->details->pause_button, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (music_view->details->pause_button);
|
gtk_widget_show (music_view->details->pause_button);
|
||||||
|
|
||||||
|
@ -1662,7 +1662,7 @@ add_play_controls (NautilusMusicView *music_view)
|
||||||
gtk_widget_set_sensitive (music_view->details->stop_button, TRUE);
|
gtk_widget_set_sensitive (music_view->details->stop_button, TRUE);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (music_view->details->stop_button), "clicked",
|
g_signal_connect (G_OBJECT (music_view->details->stop_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC (stop_button_callback), music_view);
|
G_CALLBACK (stop_button_callback), music_view);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), music_view->details->stop_button, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), music_view->details->stop_button, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (music_view->details->stop_button);
|
gtk_widget_show (music_view->details->stop_button);
|
||||||
|
|
||||||
|
@ -1676,7 +1676,7 @@ add_play_controls (NautilusMusicView *music_view)
|
||||||
gtk_widget_set_sensitive (music_view->details->next_track_button, TRUE);
|
gtk_widget_set_sensitive (music_view->details->next_track_button, TRUE);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (music_view->details->next_track_button), "clicked",
|
g_signal_connect (G_OBJECT (music_view->details->next_track_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC (next_button_callback), music_view);
|
G_CALLBACK (next_button_callback), music_view);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), music_view->details->next_track_button, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), music_view->details->next_track_button, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (music_view->details->next_track_button);
|
gtk_widget_show (music_view->details->next_track_button);
|
||||||
|
|
||||||
|
@ -1704,10 +1704,10 @@ nautilus_music_view_set_album_image (NautilusMusicView *music_view, const char *
|
||||||
|
|
||||||
if (pixbuf != NULL) {
|
if (pixbuf != NULL) {
|
||||||
scaled_pixbuf = eel_gdk_pixbuf_scale_down_to_fit (pixbuf, SCALED_IMAGE_WIDTH, SCALED_IMAGE_HEIGHT);
|
scaled_pixbuf = eel_gdk_pixbuf_scale_down_to_fit (pixbuf, SCALED_IMAGE_WIDTH, SCALED_IMAGE_HEIGHT);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
|
|
||||||
gdk_pixbuf_render_pixmap_and_mask (scaled_pixbuf, &pixmap, &mask, EEL_STANDARD_ALPHA_THRESHHOLD);
|
gdk_pixbuf_render_pixmap_and_mask (scaled_pixbuf, &pixmap, &mask, EEL_STANDARD_ALPHA_THRESHHOLD);
|
||||||
gdk_pixbuf_unref (scaled_pixbuf);
|
g_object_unref (G_OBJECT (scaled_pixbuf));
|
||||||
|
|
||||||
if (music_view->details->album_image == NULL) {
|
if (music_view->details->album_image == NULL) {
|
||||||
music_view->details->album_image = gtk_pixmap_new (pixmap, mask);
|
music_view->details->album_image = gtk_pixmap_new (pixmap, mask);
|
||||||
|
|
|
@ -303,11 +303,11 @@ do_destroy (GtkObject *obj, News *news)
|
||||||
g_free (news->uri);
|
g_free (news->uri);
|
||||||
|
|
||||||
if (news->font) {
|
if (news->font) {
|
||||||
gtk_object_unref (GTK_OBJECT (news->font));
|
g_object_unref (G_OBJECT (news->font));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (news->bold_font) {
|
if (news->bold_font) {
|
||||||
gtk_object_unref (GTK_OBJECT (news->bold_font));
|
g_object_unref (G_OBJECT (news->bold_font));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (news->timer_task != 0) {
|
if (news->timer_task != 0) {
|
||||||
|
@ -321,27 +321,27 @@ do_destroy (GtkObject *obj, News *news)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (news->closed_triangle != NULL) {
|
if (news->closed_triangle != NULL) {
|
||||||
gdk_pixbuf_unref (news->closed_triangle);
|
g_object_unref (G_OBJECT (news->closed_triangle));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (news->closed_triangle_changed != NULL) {
|
if (news->closed_triangle_changed != NULL) {
|
||||||
gdk_pixbuf_unref (news->closed_triangle_changed);
|
g_object_unref (G_OBJECT (news->closed_triangle_changed));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (news->open_triangle != NULL) {
|
if (news->open_triangle != NULL) {
|
||||||
gdk_pixbuf_unref (news->open_triangle);
|
g_object_unref (G_OBJECT (news->open_triangle));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (news->open_triangle_changed != NULL) {
|
if (news->open_triangle_changed != NULL) {
|
||||||
gdk_pixbuf_unref (news->open_triangle_changed);
|
g_object_unref (G_OBJECT (news->open_triangle_changed));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (news->bullet != NULL) {
|
if (news->bullet != NULL) {
|
||||||
gdk_pixbuf_unref (news->bullet);
|
g_object_unref (G_OBJECT (news->bullet));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (news->changed_bullet != NULL) {
|
if (news->changed_bullet != NULL) {
|
||||||
gdk_pixbuf_unref (news->changed_bullet);
|
g_object_unref (G_OBJECT (news->changed_bullet));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* free all the channel data */
|
/* free all the channel data */
|
||||||
|
@ -430,7 +430,7 @@ draw_triangle (GdkPixbuf *pixbuf, RSSChannelData *channel_data, int v_offset)
|
||||||
pixbuf_composite (mapped_image, pixbuf, 2, triangle_position, 255);
|
pixbuf_composite (mapped_image, pixbuf, 2, triangle_position, 255);
|
||||||
|
|
||||||
if (mapped_image != triangle) {
|
if (mapped_image != triangle) {
|
||||||
gdk_pixbuf_unref (mapped_image);
|
g_object_unref (G_OBJECT (mapped_image));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@ draw_rss_logo_image (RSSChannelData *channel_data,
|
||||||
}
|
}
|
||||||
pixbuf_composite (mapped_image, pixbuf, LOGO_LEFT_OFFSET, v_offset, 255);
|
pixbuf_composite (mapped_image, pixbuf, LOGO_LEFT_OFFSET, v_offset, 255);
|
||||||
if (mapped_image != channel_data->logo_image) {
|
if (mapped_image != channel_data->logo_image) {
|
||||||
gdk_pixbuf_unref (mapped_image);
|
g_object_unref (G_OBJECT (mapped_image));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
v_offset += logo_height + 2;
|
v_offset += logo_height + 2;
|
||||||
|
@ -632,7 +632,7 @@ draw_rss_items (RSSChannelData *channel_data,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (smooth_text_layout));
|
g_object_unref (G_OBJECT (smooth_text_layout));
|
||||||
|
|
||||||
item_data->item_end_y = item_data->item_start_y + text_dimensions.height;
|
item_data->item_end_y = item_data->item_start_y + text_dimensions.height;
|
||||||
v_offset += text_dimensions.height + 4;
|
v_offset += text_dimensions.height + 4;
|
||||||
|
@ -725,7 +725,7 @@ static gint
|
||||||
nautilus_news_configure_event (GtkWidget *widget, GdkEventConfigure *event, News *news_data )
|
nautilus_news_configure_event (GtkWidget *widget, GdkEventConfigure *event, News *news_data )
|
||||||
{
|
{
|
||||||
if (news_data->pixbuf != NULL) {
|
if (news_data->pixbuf != NULL) {
|
||||||
gdk_pixbuf_unref (news_data->pixbuf);
|
g_object_unref (G_OBJECT (news_data->pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
news_data->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
|
news_data->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
|
||||||
|
@ -975,7 +975,7 @@ free_channel (RSSChannelData *channel_data)
|
||||||
g_free (channel_data->title);
|
g_free (channel_data->title);
|
||||||
|
|
||||||
if (channel_data->logo_image != NULL) {
|
if (channel_data->logo_image != NULL) {
|
||||||
gdk_pixbuf_unref (channel_data->logo_image);
|
g_object_unref (G_OBJECT (channel_data->logo_image));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (channel_data->load_file_handle != NULL) {
|
if (channel_data->load_file_handle != NULL) {
|
||||||
|
@ -1127,12 +1127,12 @@ rss_logo_callback (GnomeVFSResult error, GdkPixbuf *pixbuf, gpointer callback_d
|
||||||
channel_data->load_image_handle = NULL;
|
channel_data->load_image_handle = NULL;
|
||||||
|
|
||||||
if (channel_data->logo_image) {
|
if (channel_data->logo_image) {
|
||||||
gdk_pixbuf_unref (channel_data->logo_image);
|
g_object_unref (G_OBJECT (channel_data->logo_image));
|
||||||
channel_data->logo_image = NULL;
|
channel_data->logo_image = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pixbuf != NULL) {
|
if (pixbuf != NULL) {
|
||||||
gdk_pixbuf_ref (pixbuf);
|
g_object_ref (G_OBJECT (pixbuf));
|
||||||
pixbuf = eel_gdk_pixbuf_scale_down_to_fit (pixbuf, 192, 40);
|
pixbuf = eel_gdk_pixbuf_scale_down_to_fit (pixbuf, 192, 40);
|
||||||
channel_data->logo_image = pixbuf;
|
channel_data->logo_image = pixbuf;
|
||||||
queue_update_size_and_redraw (channel_data->owner);
|
queue_update_size_and_redraw (channel_data->owner);
|
||||||
|
@ -1739,7 +1739,7 @@ static void
|
||||||
load_xpm_image (GdkPixbuf** image_result, const char** image_name)
|
load_xpm_image (GdkPixbuf** image_result, const char** image_name)
|
||||||
{
|
{
|
||||||
if (*image_result != NULL) {
|
if (*image_result != NULL) {
|
||||||
gdk_pixbuf_unref (*image_result);
|
g_object_unref (G_OBJECT (*image_result));
|
||||||
}
|
}
|
||||||
*image_result = gdk_pixbuf_new_from_xpm_data (image_name);
|
*image_result = gdk_pixbuf_new_from_xpm_data (image_name);
|
||||||
}
|
}
|
||||||
|
@ -1756,7 +1756,7 @@ nautilus_news_load_images (News *news_data)
|
||||||
load_xpm_image (&news_data->open_triangle_changed, (const char**) open_triangle_changed_xpm);
|
load_xpm_image (&news_data->open_triangle_changed, (const char**) open_triangle_changed_xpm);
|
||||||
|
|
||||||
if (news_data->bullet != NULL) {
|
if (news_data->bullet != NULL) {
|
||||||
gdk_pixbuf_unref (news_data->bullet);
|
g_object_unref (G_OBJECT (news_data->bullet));
|
||||||
}
|
}
|
||||||
|
|
||||||
news_bullet_path = nautilus_theme_get_image_path ("news_bullet.png");
|
news_bullet_path = nautilus_theme_get_image_path ("news_bullet.png");
|
||||||
|
@ -1766,7 +1766,7 @@ nautilus_news_load_images (News *news_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (news_data->changed_bullet != NULL) {
|
if (news_data->changed_bullet != NULL) {
|
||||||
gdk_pixbuf_unref (news_data->changed_bullet);
|
g_object_unref (G_OBJECT (news_data->changed_bullet));
|
||||||
}
|
}
|
||||||
|
|
||||||
news_bullet_path = nautilus_theme_get_image_path ("changed_bullet.png");
|
news_bullet_path = nautilus_theme_get_image_path ("changed_bullet.png");
|
||||||
|
@ -2049,7 +2049,7 @@ check_button_toggled_callback (GtkToggleButton *toggle_button, gpointer user_dat
|
||||||
RSSChannelData *channel_data;
|
RSSChannelData *channel_data;
|
||||||
|
|
||||||
news_data = (News*) user_data;
|
news_data = (News*) user_data;
|
||||||
channel_name = gtk_object_get_data (GTK_OBJECT (toggle_button), "channel_name");
|
channel_name = g_object_get_data (G_OBJECT (toggle_button), "channel_name");
|
||||||
|
|
||||||
channel_data = get_channel_from_name (news_data, channel_name);
|
channel_data = get_channel_from_name (news_data, channel_name);
|
||||||
if (channel_data != NULL) {
|
if (channel_data != NULL) {
|
||||||
|
@ -2085,7 +2085,7 @@ determine_sort_position (GtkWidget *container, const char *name)
|
||||||
index = 0;
|
index = 0;
|
||||||
current_item = checkboxes;
|
current_item = checkboxes;
|
||||||
while (current_item != NULL) {
|
while (current_item != NULL) {
|
||||||
current_name = gtk_object_get_data (GTK_OBJECT (current_item->data), "channel_name");
|
current_name = g_object_get_data (G_OBJECT (current_item->data), "channel_name");
|
||||||
|
|
||||||
if (eel_strcasecmp (current_name, name) > 0) {
|
if (eel_strcasecmp (current_name, name) > 0) {
|
||||||
g_list_free (checkboxes);
|
g_list_free (checkboxes);
|
||||||
|
@ -2112,7 +2112,7 @@ add_channel_entry (News *news_data, const char *channel_name, int index, gboolea
|
||||||
gtk_box_pack_start (GTK_BOX (news_data->checkbox_list), check_button, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (news_data->checkbox_list), check_button, FALSE, FALSE, 0);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (check_button), "toggled",
|
g_signal_connect (G_OBJECT (check_button), "toggled",
|
||||||
GTK_SIGNAL_FUNC (check_button_toggled_callback),
|
G_CALLBACK (check_button_toggled_callback),
|
||||||
news_data);
|
news_data);
|
||||||
|
|
||||||
/* reorder newly added button so it's sorted by it's name */
|
/* reorder newly added button so it's sorted by it's name */
|
||||||
|
@ -2127,7 +2127,7 @@ add_channel_entry (News *news_data, const char *channel_name, int index, gboolea
|
||||||
|
|
||||||
/* set up user data to use in toggle handler */
|
/* set up user data to use in toggle handler */
|
||||||
gtk_object_set_user_data (GTK_OBJECT (check_button), news_data);
|
gtk_object_set_user_data (GTK_OBJECT (check_button), news_data);
|
||||||
gtk_object_set_data_full (GTK_OBJECT (check_button),
|
g_object_set_data (G_OBJECT (check_button),
|
||||||
"channel_name",
|
"channel_name",
|
||||||
g_strdup (channel_name),
|
g_strdup (channel_name),
|
||||||
(GtkDestroyNotify) g_free);
|
(GtkDestroyNotify) g_free);
|
||||||
|
@ -2254,7 +2254,7 @@ make_remove_widgets (News *news, GtkWidget *container)
|
||||||
gtk_clist_set_auto_sort (GTK_CLIST (news->remove_site_list), TRUE);
|
gtk_clist_set_auto_sort (GTK_CLIST (news->remove_site_list), TRUE);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (news->remove_site_list), "select_row",
|
g_signal_connect (G_OBJECT (news->remove_site_list), "select_row",
|
||||||
GTK_SIGNAL_FUNC (select_row_in_remove_list), news);
|
G_CALLBACK (select_row_in_remove_list), news);
|
||||||
|
|
||||||
scrolled_window = GTK_SCROLLED_WINDOW (gtk_scrolled_window_new (NULL, NULL));
|
scrolled_window = GTK_SCROLLED_WINDOW (gtk_scrolled_window_new (NULL, NULL));
|
||||||
gtk_scrolled_window_set_policy (scrolled_window, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
gtk_scrolled_window_set_policy (scrolled_window, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||||
|
|
|
@ -194,7 +194,7 @@ done_with_file (Notes *notes)
|
||||||
if (notes->file != NULL) {
|
if (notes->file != NULL) {
|
||||||
nautilus_file_monitor_remove (notes->file, notes);
|
nautilus_file_monitor_remove (notes->file, notes);
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (notes->file),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (notes->file),
|
||||||
GTK_SIGNAL_FUNC (load_note_text_from_metadata),
|
G_CALLBACK (load_note_text_from_metadata),
|
||||||
notes);
|
notes);
|
||||||
nautilus_file_unref (notes->file);
|
nautilus_file_unref (notes->file);
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,7 @@ notes_load_metainfo (Notes *notes)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (notes->file),
|
g_signal_connect (G_OBJECT (notes->file),
|
||||||
"changed",
|
"changed",
|
||||||
GTK_SIGNAL_FUNC (load_note_text_from_metadata),
|
G_CALLBACK (load_note_text_from_metadata),
|
||||||
notes);
|
notes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -377,10 +377,10 @@ make_notes_view (const char *iid, gpointer callback_data)
|
||||||
eel_background_set_color (background, NOTES_DEFAULT_BACKGROUND_COLOR);
|
eel_background_set_color (background, NOTES_DEFAULT_BACKGROUND_COLOR);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (notes->note_text_field), "focus_out_event",
|
g_signal_connect (G_OBJECT (notes->note_text_field), "focus_out_event",
|
||||||
GTK_SIGNAL_FUNC (on_text_field_focus_out_event),
|
G_CALLBACK (on_text_field_focus_out_event),
|
||||||
notes);
|
notes);
|
||||||
g_signal_connect (G_OBJECT (notes->note_text_field), "changed",
|
g_signal_connect (G_OBJECT (notes->note_text_field), "changed",
|
||||||
GTK_SIGNAL_FUNC (on_changed),
|
G_CALLBACK (on_changed),
|
||||||
notes);
|
notes);
|
||||||
|
|
||||||
gtk_widget_show_all (vbox);
|
gtk_widget_show_all (vbox);
|
||||||
|
|
|
@ -160,13 +160,13 @@ nautilus_text_view_init (NautilusTextView *text_view)
|
||||||
text_view->details->zoom_index = 3;
|
text_view->details->zoom_index = 3;
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (text_view->details->zoomable), "set_zoom_level",
|
g_signal_connect (G_OBJECT (text_view->details->zoomable), "set_zoom_level",
|
||||||
GTK_SIGNAL_FUNC (zoomable_set_zoom_level_callback), text_view);
|
G_CALLBACK (zoomable_set_zoom_level_callback), text_view);
|
||||||
g_signal_connect (G_OBJECT (text_view->details->zoomable), "zoom_in",
|
g_signal_connect (G_OBJECT (text_view->details->zoomable), "zoom_in",
|
||||||
GTK_SIGNAL_FUNC (zoomable_zoom_in_callback), text_view);
|
G_CALLBACK (zoomable_zoom_in_callback), text_view);
|
||||||
g_signal_connect (G_OBJECT (text_view->details->zoomable), "zoom_out",
|
g_signal_connect (G_OBJECT (text_view->details->zoomable), "zoom_out",
|
||||||
GTK_SIGNAL_FUNC (zoomable_zoom_out_callback), text_view);
|
G_CALLBACK (zoomable_zoom_out_callback), text_view);
|
||||||
g_signal_connect (G_OBJECT (text_view->details->zoomable), "zoom_to_fit",
|
g_signal_connect (G_OBJECT (text_view->details->zoomable), "zoom_to_fit",
|
||||||
GTK_SIGNAL_FUNC (zoomable_zoom_to_fit_callback), text_view);
|
G_CALLBACK (zoomable_zoom_to_fit_callback), text_view);
|
||||||
|
|
||||||
bonobo_zoomable_set_parameters_full (text_view->details->zoomable,
|
bonobo_zoomable_set_parameters_full (text_view->details->zoomable,
|
||||||
1.0, .25, 4.0, TRUE, TRUE, FALSE,
|
1.0, .25, 4.0, TRUE, TRUE, FALSE,
|
||||||
|
@ -195,11 +195,11 @@ nautilus_text_view_init (NautilusTextView *text_view)
|
||||||
/* add signal handlers to the text field to enable/disable the service menu items */
|
/* add signal handlers to the text field to enable/disable the service menu items */
|
||||||
gtk_signal_connect_after (GTK_OBJECT (text_view->details->text_display),
|
gtk_signal_connect_after (GTK_OBJECT (text_view->details->text_display),
|
||||||
"button_release_event",
|
"button_release_event",
|
||||||
GTK_SIGNAL_FUNC (update_service_menu_items),
|
G_CALLBACK (update_service_menu_items),
|
||||||
text_view);
|
text_view);
|
||||||
gtk_signal_connect_after (GTK_OBJECT (text_view->details->text_display),
|
gtk_signal_connect_after (GTK_OBJECT (text_view->details->text_display),
|
||||||
"key_press_event",
|
"key_press_event",
|
||||||
GTK_SIGNAL_FUNC (update_service_menu_items),
|
G_CALLBACK (update_service_menu_items),
|
||||||
text_view);
|
text_view);
|
||||||
|
|
||||||
/* set the font of the text object */
|
/* set the font of the text object */
|
||||||
|
|
|
@ -238,7 +238,7 @@ get_throbber_dimensions (NautilusThrobber *throbber, int *throbber_width, int* t
|
||||||
/* loop through all the installed images, taking the union */
|
/* loop through all the installed images, taking the union */
|
||||||
current_entry = throbber->details->image_list;
|
current_entry = throbber->details->image_list;
|
||||||
while (current_entry != NULL) {
|
while (current_entry != NULL) {
|
||||||
pixbuf = (GdkPixbuf*) current_entry->data;
|
pixbuf = GDK_PIXBUF (current_entry->data);
|
||||||
pixbuf_width = gdk_pixbuf_get_width (pixbuf);
|
pixbuf_width = gdk_pixbuf_get_width (pixbuf);
|
||||||
pixbuf_height = gdk_pixbuf_get_height (pixbuf);
|
pixbuf_height = gdk_pixbuf_get_height (pixbuf);
|
||||||
|
|
||||||
|
@ -361,7 +361,7 @@ select_throbber_image (NautilusThrobber *throbber)
|
||||||
GList *element;
|
GList *element;
|
||||||
|
|
||||||
if (throbber->details->timer_task == 0) {
|
if (throbber->details->timer_task == 0) {
|
||||||
return gdk_pixbuf_ref (throbber->details->quiescent_pixbuf);
|
return g_object_ref (G_OBJECT (throbber->details->quiescent_pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (throbber->details->image_list == NULL) {
|
if (throbber->details->image_list == NULL) {
|
||||||
|
@ -370,7 +370,7 @@ select_throbber_image (NautilusThrobber *throbber)
|
||||||
|
|
||||||
element = g_list_nth (throbber->details->image_list, throbber->details->current_frame);
|
element = g_list_nth (throbber->details->image_list, throbber->details->current_frame);
|
||||||
|
|
||||||
return gdk_pixbuf_ref (element->data);
|
return g_object_ref (G_OBJECT (element->data));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draw the throbber into the passed-in rectangle */
|
/* draw the throbber into the passed-in rectangle */
|
||||||
|
@ -411,7 +411,7 @@ draw_throbber_image (GtkWidget *widget, GdkRectangle *box)
|
||||||
} else {
|
} else {
|
||||||
massaged_pixbuf = eel_create_spotlight_pixbuf (pixbuf);
|
massaged_pixbuf = eel_create_spotlight_pixbuf (pixbuf);
|
||||||
}
|
}
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
pixbuf = massaged_pixbuf;
|
pixbuf = massaged_pixbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,7 +421,7 @@ draw_throbber_image (GtkWidget *widget, GdkRectangle *box)
|
||||||
|
|
||||||
draw_pixbuf (pixbuf, widget->window, box->x + x_offset, box->y + y_offset);
|
draw_pixbuf (pixbuf, widget->window, box->x + x_offset, box->y + y_offset);
|
||||||
|
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -536,14 +536,14 @@ nautilus_throbber_unload_images (NautilusThrobber *throbber)
|
||||||
GList *current_entry;
|
GList *current_entry;
|
||||||
|
|
||||||
if (throbber->details->quiescent_pixbuf != NULL) {
|
if (throbber->details->quiescent_pixbuf != NULL) {
|
||||||
gdk_pixbuf_unref (throbber->details->quiescent_pixbuf);
|
g_object_unref (G_OBJECT (throbber->details->quiescent_pixbuf));
|
||||||
throbber->details->quiescent_pixbuf = NULL;
|
throbber->details->quiescent_pixbuf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unref all the images in the list, and then let go of the list itself */
|
/* unref all the images in the list, and then let go of the list itself */
|
||||||
current_entry = throbber->details->image_list;
|
current_entry = throbber->details->image_list;
|
||||||
while (current_entry != NULL) {
|
while (current_entry != NULL) {
|
||||||
gdk_pixbuf_unref ((GdkPixbuf*) current_entry->data);
|
g_object_unref (G_OBJECT (current_entry->data));
|
||||||
current_entry = current_entry->next;
|
current_entry = current_entry->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -571,7 +571,7 @@ load_themed_image (const char *file_name, const char *image_theme, gboolean smal
|
||||||
gdk_pixbuf_get_width (pixbuf) / 2,
|
gdk_pixbuf_get_width (pixbuf) / 2,
|
||||||
gdk_pixbuf_get_height (pixbuf) / 2,
|
gdk_pixbuf_get_height (pixbuf) / 2,
|
||||||
GDK_INTERP_BILINEAR);
|
GDK_INTERP_BILINEAR);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
pixbuf = temp_pixbuf;
|
pixbuf = temp_pixbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ nautilus_tree_change_queue_new (void)
|
||||||
NautilusTreeChangeQueue *change_queue;
|
NautilusTreeChangeQueue *change_queue;
|
||||||
|
|
||||||
change_queue = NAUTILUS_TREE_CHANGE_QUEUE (g_object_new (NAUTILUS_TYPE_TREE_CHANGE_QUEUE, NULL));
|
change_queue = NAUTILUS_TREE_CHANGE_QUEUE (g_object_new (NAUTILUS_TYPE_TREE_CHANGE_QUEUE, NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (change_queue));
|
g_object_ref (G_OBJECT (change_queue));
|
||||||
gtk_object_sink (GTK_OBJECT (change_queue));
|
gtk_object_sink (GTK_OBJECT (change_queue));
|
||||||
return change_queue;
|
return change_queue;
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ nautilus_tree_change_new (NautilusTreeChangeType change_type,
|
||||||
|
|
||||||
change = g_new0 (NautilusTreeChange, 1);
|
change = g_new0 (NautilusTreeChange, 1);
|
||||||
change->change_type = change_type;
|
change->change_type = change_type;
|
||||||
gtk_object_ref (GTK_OBJECT (node));
|
g_object_ref (G_OBJECT (node));
|
||||||
change->node = node;
|
change->node = node;
|
||||||
|
|
||||||
return change;
|
return change;
|
||||||
|
@ -158,6 +158,6 @@ nautilus_tree_change_new (NautilusTreeChangeType change_type,
|
||||||
void
|
void
|
||||||
nautilus_tree_change_free (NautilusTreeChange *change)
|
nautilus_tree_change_free (NautilusTreeChange *change)
|
||||||
{
|
{
|
||||||
gtk_object_unref (GTK_OBJECT (change->node));
|
g_object_unref (G_OBJECT (change->node));
|
||||||
g_free (change);
|
g_free (change);
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,7 @@ nautilus_tree_expansion_state_new (void)
|
||||||
NautilusTreeExpansionState *state;
|
NautilusTreeExpansionState *state;
|
||||||
|
|
||||||
state = NAUTILUS_TREE_EXPANSION_STATE (g_object_new (NAUTILUS_TYPE_TREE_EXPANSION_STATE, NULL));
|
state = NAUTILUS_TREE_EXPANSION_STATE (g_object_new (NAUTILUS_TYPE_TREE_EXPANSION_STATE, NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (state));
|
g_object_ref (G_OBJECT (state));
|
||||||
gtk_object_sink (GTK_OBJECT (state));
|
gtk_object_sink (GTK_OBJECT (state));
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@ nautilus_tree_model_class_init (gpointer klass)
|
||||||
G_STRUCT_OFFSET (NautilusTreeModelClass, node_changed),
|
G_STRUCT_OFFSET (NautilusTreeModelClass, node_changed),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
|
|
||||||
signals[NODE_REMOVED] =
|
signals[NODE_REMOVED] =
|
||||||
g_signal_new ("node_removed",
|
g_signal_new ("node_removed",
|
||||||
|
@ -122,7 +122,7 @@ nautilus_tree_model_class_init (gpointer klass)
|
||||||
G_STRUCT_OFFSET (NautilusTreeModelClass, node_removed),
|
G_STRUCT_OFFSET (NautilusTreeModelClass, node_removed),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
|
|
||||||
signals[NODE_BEING_RENAMED] =
|
signals[NODE_BEING_RENAMED] =
|
||||||
g_signal_new ("node_being_renamed",
|
g_signal_new ("node_being_renamed",
|
||||||
|
@ -140,7 +140,7 @@ nautilus_tree_model_class_init (gpointer klass)
|
||||||
G_STRUCT_OFFSET (NautilusTreeModelClass, done_loading_children),
|
G_STRUCT_OFFSET (NautilusTreeModelClass, done_loading_children),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -89,7 +89,7 @@ nautilus_tree_node_new (NautilusFile *file)
|
||||||
NautilusTreeNode *node;
|
NautilusTreeNode *node;
|
||||||
|
|
||||||
node = NAUTILUS_TREE_NODE (g_object_new (NAUTILUS_TYPE_TREE_NODE, NULL));
|
node = NAUTILUS_TREE_NODE (g_object_new (NAUTILUS_TYPE_TREE_NODE, NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (node));
|
g_object_ref (G_OBJECT (node));
|
||||||
gtk_object_sink (GTK_OBJECT (node));
|
gtk_object_sink (GTK_OBJECT (node));
|
||||||
|
|
||||||
node->details->file = nautilus_file_ref (file);
|
node->details->file = nautilus_file_ref (file);
|
||||||
|
|
|
@ -212,51 +212,51 @@ nautilus_tree_view_init_dnd (NautilusTreeView *view)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"drag_begin",
|
"drag_begin",
|
||||||
GTK_SIGNAL_FUNC(nautilus_tree_view_drag_begin),
|
G_CALLBACK(nautilus_tree_view_drag_begin),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"drag_end",
|
"drag_end",
|
||||||
GTK_SIGNAL_FUNC(nautilus_tree_view_drag_end),
|
G_CALLBACK(nautilus_tree_view_drag_end),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"drag_leave",
|
"drag_leave",
|
||||||
GTK_SIGNAL_FUNC(nautilus_tree_view_drag_leave),
|
G_CALLBACK(nautilus_tree_view_drag_leave),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"drag_motion",
|
"drag_motion",
|
||||||
GTK_SIGNAL_FUNC(nautilus_tree_view_drag_motion),
|
G_CALLBACK(nautilus_tree_view_drag_motion),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"drag_drop",
|
"drag_drop",
|
||||||
GTK_SIGNAL_FUNC(nautilus_tree_view_drag_drop),
|
G_CALLBACK(nautilus_tree_view_drag_drop),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"drag_data_received",
|
"drag_data_received",
|
||||||
GTK_SIGNAL_FUNC(nautilus_tree_view_drag_data_received),
|
G_CALLBACK(nautilus_tree_view_drag_data_received),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"drag_data_get",
|
"drag_data_get",
|
||||||
GTK_SIGNAL_FUNC(nautilus_tree_view_drag_data_get),
|
G_CALLBACK(nautilus_tree_view_drag_data_get),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
/* override the default handlers */
|
/* override the default handlers */
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"button-press-event",
|
"button-press-event",
|
||||||
GTK_SIGNAL_FUNC (nautilus_tree_view_button_press),
|
G_CALLBACK (nautilus_tree_view_button_press),
|
||||||
NULL);
|
NULL);
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"button-release-event",
|
"button-release-event",
|
||||||
GTK_SIGNAL_FUNC (nautilus_tree_view_button_release),
|
G_CALLBACK (nautilus_tree_view_button_release),
|
||||||
NULL);
|
NULL);
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"motion-notify-event",
|
"motion-notify-event",
|
||||||
GTK_SIGNAL_FUNC (nautilus_tree_view_motion_notify),
|
G_CALLBACK (nautilus_tree_view_motion_notify),
|
||||||
NULL);
|
NULL);
|
||||||
g_signal_connect (G_OBJECT (view->details->tree), "realize",
|
g_signal_connect (G_OBJECT (view->details->tree), "realize",
|
||||||
tree_view_realize_callback, view);
|
tree_view_realize_callback, view);
|
||||||
|
@ -449,7 +449,7 @@ nautilus_tree_view_drag_data_received (GtkWidget *widget,
|
||||||
EelDragInfo *drag_info;
|
EelDragInfo *drag_info;
|
||||||
NautilusTreeView *tree_view;
|
NautilusTreeView *tree_view;
|
||||||
|
|
||||||
tree_view = NAUTILUS_TREE_VIEW (gtk_object_get_data (GTK_OBJECT (widget), "tree_view"));
|
tree_view = NAUTILUS_TREE_VIEW (g_object_get_data (G_OBJECT (widget), "tree_view"));
|
||||||
dnd = tree_view->details->dnd;
|
dnd = tree_view->details->dnd;
|
||||||
drag_info = dnd->drag_info;
|
drag_info = dnd->drag_info;
|
||||||
|
|
||||||
|
@ -512,7 +512,7 @@ static void nautilus_tree_view_drag_data_get (GtkWidget *widget,
|
||||||
g_assert (widget != NULL);
|
g_assert (widget != NULL);
|
||||||
g_return_if_fail (context != NULL);
|
g_return_if_fail (context != NULL);
|
||||||
|
|
||||||
tree_view = NAUTILUS_TREE_VIEW (gtk_object_get_data (GTK_OBJECT (widget), "tree_view"));
|
tree_view = NAUTILUS_TREE_VIEW (g_object_get_data (G_OBJECT (widget), "tree_view"));
|
||||||
|
|
||||||
uri = nautilus_tree_view_get_drag_uri (tree_view);
|
uri = nautilus_tree_view_get_drag_uri (tree_view);
|
||||||
selection_string = g_strconcat (uri, "\r\n", NULL);
|
selection_string = g_strconcat (uri, "\r\n", NULL);
|
||||||
|
@ -564,7 +564,7 @@ nautilus_tree_view_button_press (GtkWidget *widget, GdkEventButton *event)
|
||||||
if (event->window != clist->clist_window)
|
if (event->window != clist->clist_window)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
tree_view = NAUTILUS_TREE_VIEW (gtk_object_get_data (GTK_OBJECT (widget), "tree_view"));
|
tree_view = NAUTILUS_TREE_VIEW (g_object_get_data (G_OBJECT (widget), "tree_view"));
|
||||||
|
|
||||||
on_row = eel_clist_get_selection_info (clist,
|
on_row = eel_clist_get_selection_info (clist,
|
||||||
event->x,
|
event->x,
|
||||||
|
@ -637,7 +637,7 @@ nautilus_tree_view_button_release (GtkWidget *widget, GdkEventButton *event)
|
||||||
if (event->window != clist->clist_window)
|
if (event->window != clist->clist_window)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
tree_view = NAUTILUS_TREE_VIEW (gtk_object_get_data (GTK_OBJECT (widget), "tree_view"));
|
tree_view = NAUTILUS_TREE_VIEW (g_object_get_data (G_OBJECT (widget), "tree_view"));
|
||||||
tree_view->details->dnd->drag_pending = FALSE;
|
tree_view->details->dnd->drag_pending = FALSE;
|
||||||
|
|
||||||
/* Set state of spinner. Use saved dnd x and y as the mouse may have moved out
|
/* Set state of spinner. Use saved dnd x and y as the mouse may have moved out
|
||||||
|
@ -712,7 +712,7 @@ nautilus_tree_view_motion_notify (GtkWidget *widget, GdkEventButton *event)
|
||||||
if (event->window != clist->clist_window)
|
if (event->window != clist->clist_window)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
tree_view = NAUTILUS_TREE_VIEW (gtk_object_get_data (GTK_OBJECT (widget), "tree_view"));
|
tree_view = NAUTILUS_TREE_VIEW (g_object_get_data (G_OBJECT (widget), "tree_view"));
|
||||||
|
|
||||||
if (tree_view->details->dnd->drag_pending) {
|
if (tree_view->details->dnd->drag_pending) {
|
||||||
int distance_squared;
|
int distance_squared;
|
||||||
|
|
|
@ -258,8 +258,8 @@ nautilus_tree_view_insert_model_node (NautilusTreeView *view, NautilusTreeNode *
|
||||||
CLIST_AUTO_SORT);
|
CLIST_AUTO_SORT);
|
||||||
view->details->inserting_node = FALSE;
|
view->details->inserting_node = FALSE;
|
||||||
|
|
||||||
gdk_pixbuf_unref (closed_pixbuf);
|
g_object_unref (G_OBJECT (closed_pixbuf));
|
||||||
gdk_pixbuf_unref (open_pixbuf);
|
g_object_unref (G_OBJECT (open_pixbuf));
|
||||||
|
|
||||||
|
|
||||||
eel_ctree_node_set_row_data (EEL_CTREE (view->details->tree),
|
eel_ctree_node_set_row_data (EEL_CTREE (view->details->tree),
|
||||||
|
@ -451,8 +451,8 @@ nautilus_tree_view_update_model_node (NautilusTreeView *view, NautilusTreeNode *
|
||||||
|
|
||||||
g_free (name);
|
g_free (name);
|
||||||
|
|
||||||
gdk_pixbuf_unref (closed_pixbuf);
|
g_object_unref (G_OBJECT (closed_pixbuf));
|
||||||
gdk_pixbuf_unref (open_pixbuf);
|
g_object_unref (G_OBJECT (open_pixbuf));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -490,7 +490,7 @@ register_unparented_node (NautilusTreeView *view, NautilusTreeNode *node)
|
||||||
g_return_if_fail (!nautilus_tree_node_is_toplevel (node));
|
g_return_if_fail (!nautilus_tree_node_is_toplevel (node));
|
||||||
|
|
||||||
if (g_list_find (view->details->unparented_tree_nodes, node) == NULL) {
|
if (g_list_find (view->details->unparented_tree_nodes, node) == NULL) {
|
||||||
gtk_object_ref (GTK_OBJECT (node));
|
g_object_ref (G_OBJECT (node));
|
||||||
view->details->unparented_tree_nodes = g_list_prepend (view->details->unparented_tree_nodes, node);
|
view->details->unparented_tree_nodes = g_list_prepend (view->details->unparented_tree_nodes, node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -503,7 +503,7 @@ forget_unparented_node (NautilusTreeView *view, NautilusTreeNode *node)
|
||||||
|
|
||||||
if (g_list_find (view->details->unparented_tree_nodes, node) != NULL) {
|
if (g_list_find (view->details->unparented_tree_nodes, node) != NULL) {
|
||||||
view->details->unparented_tree_nodes = g_list_remove (view->details->unparented_tree_nodes, node);
|
view->details->unparented_tree_nodes = g_list_remove (view->details->unparented_tree_nodes, node);
|
||||||
gtk_object_unref (GTK_OBJECT (node));
|
g_object_unref (G_OBJECT (node));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -535,7 +535,7 @@ insert_unparented_nodes (NautilusTreeView *view, NautilusTreeNode *node)
|
||||||
sub_node = p->data;
|
sub_node = p->data;
|
||||||
view->details->unparented_tree_nodes = g_list_remove (view->details->unparented_tree_nodes, sub_node);
|
view->details->unparented_tree_nodes = g_list_remove (view->details->unparented_tree_nodes, sub_node);
|
||||||
nautilus_tree_view_insert_model_node (view, sub_node);
|
nautilus_tree_view_insert_model_node (view, sub_node);
|
||||||
gtk_object_unref (GTK_OBJECT (sub_node));
|
g_object_unref (G_OBJECT (sub_node));
|
||||||
}
|
}
|
||||||
g_list_free (to_add);
|
g_list_free (to_add);
|
||||||
}
|
}
|
||||||
|
@ -886,7 +886,7 @@ ctree_compare_rows (EelCList *clist,
|
||||||
if (compare_cached_key == clist) {
|
if (compare_cached_key == clist) {
|
||||||
view = compare_cached_value;
|
view = compare_cached_value;
|
||||||
} else {
|
} else {
|
||||||
view = gtk_object_get_data (GTK_OBJECT (clist), "tree_view");
|
view = g_object_get_data (G_OBJECT (clist), "tree_view");
|
||||||
compare_cached_key = clist;
|
compare_cached_key = clist;
|
||||||
compare_cached_value = view;
|
compare_cached_value = view;
|
||||||
}
|
}
|
||||||
|
@ -919,7 +919,7 @@ create_tree (NautilusTreeView *view)
|
||||||
/* set up ctree */
|
/* set up ctree */
|
||||||
view->details->tree = eel_ctree_new (1, 0);
|
view->details->tree = eel_ctree_new (1, 0);
|
||||||
|
|
||||||
gtk_object_set_data (GTK_OBJECT (view->details->tree), "tree_view", (gpointer) view);
|
g_object_set_data (G_OBJECT (view->details->tree), "tree_view", (gpointer) view);
|
||||||
gtk_widget_add_events (GTK_WIDGET (view->details->tree), GDK_POINTER_MOTION_MASK);
|
gtk_widget_add_events (GTK_WIDGET (view->details->tree), GDK_POINTER_MOTION_MASK);
|
||||||
|
|
||||||
eel_clist_set_selection_mode (EEL_CLIST (view->details->tree), GTK_SELECTION_SINGLE);
|
eel_clist_set_selection_mode (EEL_CLIST (view->details->tree), GTK_SELECTION_SINGLE);
|
||||||
|
@ -948,22 +948,22 @@ create_tree (NautilusTreeView *view)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"tree_expand",
|
"tree_expand",
|
||||||
GTK_SIGNAL_FUNC (tree_expand_callback),
|
G_CALLBACK (tree_expand_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"tree_collapse",
|
"tree_collapse",
|
||||||
GTK_SIGNAL_FUNC (tree_collapse_callback),
|
G_CALLBACK (tree_collapse_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view->details->tree),
|
g_signal_connect (G_OBJECT (view->details->tree),
|
||||||
"tree_select_row",
|
"tree_select_row",
|
||||||
GTK_SIGNAL_FUNC (tree_select_row_callback),
|
G_CALLBACK (tree_select_row_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
gtk_signal_connect_after (GTK_OBJECT (view->details->tree),
|
gtk_signal_connect_after (GTK_OBJECT (view->details->tree),
|
||||||
"size_allocate",
|
"size_allocate",
|
||||||
GTK_SIGNAL_FUNC (size_allocate_callback),
|
G_CALLBACK (size_allocate_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
/* Keep track of changes in these prefs to filter files accordingly. */
|
/* Keep track of changes in these prefs to filter files accordingly. */
|
||||||
|
@ -1047,7 +1047,7 @@ nautilus_tree_view_init (NautilusTreeView *view)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (view),
|
g_signal_connect (G_OBJECT (view),
|
||||||
"load_location",
|
"load_location",
|
||||||
GTK_SIGNAL_FUNC (tree_load_location_callback),
|
G_CALLBACK (tree_load_location_callback),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
view->details->scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
view->details->scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||||
|
@ -1111,7 +1111,7 @@ nautilus_tree_view_destroy (GtkObject *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (view->details->tree != NULL) {
|
if (view->details->tree != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (view->details->change_queue));
|
g_object_unref (G_OBJECT (view->details->change_queue));
|
||||||
|
|
||||||
if (compare_cached_key == view->details->tree) {
|
if (compare_cached_key == view->details->tree) {
|
||||||
compare_cached_key = NULL;
|
compare_cached_key = NULL;
|
||||||
|
@ -1144,10 +1144,10 @@ nautilus_tree_view_destroy (GtkObject *object)
|
||||||
nautilus_tree_view_free_dnd (view);
|
nautilus_tree_view_free_dnd (view);
|
||||||
|
|
||||||
disconnect_model_handlers (view);
|
disconnect_model_handlers (view);
|
||||||
gtk_object_unref (GTK_OBJECT (view->details->model));
|
g_object_unref (G_OBJECT (view->details->model));
|
||||||
|
|
||||||
nautilus_tree_expansion_state_save (view->details->expansion_state);
|
nautilus_tree_expansion_state_save (view->details->expansion_state);
|
||||||
gtk_object_unref (GTK_OBJECT (view->details->expansion_state));
|
g_object_unref (G_OBJECT (view->details->expansion_state));
|
||||||
}
|
}
|
||||||
|
|
||||||
eel_gtk_object_list_free (view->details->unparented_tree_nodes);
|
eel_gtk_object_list_free (view->details->unparented_tree_nodes);
|
||||||
|
|
|
@ -77,7 +77,7 @@ e_paned_child_type (GtkContainer *container)
|
||||||
if (!E_PANED (container)->child1 || !E_PANED (container)->child2)
|
if (!E_PANED (container)->child1 || !E_PANED (container)->child2)
|
||||||
return GTK_TYPE_WIDGET;
|
return GTK_TYPE_WIDGET;
|
||||||
else
|
else
|
||||||
return GTK_TYPE_NONE;
|
return G_TYPE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -143,7 +143,7 @@ e_paned_get_arg (GtkObject *object,
|
||||||
GTK_VALUE_UINT (*arg) = paned->quantum;
|
GTK_VALUE_UINT (*arg) = paned->quantum;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
arg->type = GTK_TYPE_INVALID;
|
arg->type = G_TYPE_INVALID;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -616,8 +616,8 @@ e_paned_class_init (EPanedClass *klass)
|
||||||
|
|
||||||
klass->handle_shown = NULL;
|
klass->handle_shown = NULL;
|
||||||
|
|
||||||
gtk_object_add_arg_type("EPaned::handle_size", GTK_TYPE_UINT,
|
gtk_object_add_arg_type("EPaned::handle_size", G_TYPE_UINT,
|
||||||
GTK_ARG_READWRITE, ARG_HANDLE_SIZE);
|
GTK_ARG_READWRITE, ARG_HANDLE_SIZE);
|
||||||
gtk_object_add_arg_type("EPaned::quantum", GTK_TYPE_UINT,
|
gtk_object_add_arg_type("EPaned::quantum", G_TYPE_UINT,
|
||||||
GTK_ARG_READWRITE, ARG_QUANTUM);
|
GTK_ARG_READWRITE, ARG_QUANTUM);
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,21 +136,21 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
||||||
class->rlist_line_children = NULL;
|
class->rlist_line_children = NULL;
|
||||||
|
|
||||||
gtk_object_add_arg_type ("GtkWrapBox::homogeneous",
|
gtk_object_add_arg_type ("GtkWrapBox::homogeneous",
|
||||||
GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_HOMOGENEOUS);
|
G_TYPE_BOOLEAN, GTK_ARG_READWRITE, ARG_HOMOGENEOUS);
|
||||||
gtk_object_add_arg_type ("GtkWrapBox::justify",
|
gtk_object_add_arg_type ("GtkWrapBox::justify",
|
||||||
GTK_TYPE_JUSTIFICATION, GTK_ARG_READWRITE, ARG_JUSTIFY);
|
GTK_TYPE_JUSTIFICATION, GTK_ARG_READWRITE, ARG_JUSTIFY);
|
||||||
gtk_object_add_arg_type ("GtkWrapBox::hspacing",
|
gtk_object_add_arg_type ("GtkWrapBox::hspacing",
|
||||||
GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_HSPACING);
|
G_TYPE_UINT, GTK_ARG_READWRITE, ARG_HSPACING);
|
||||||
gtk_object_add_arg_type ("GtkWrapBox::vspacing",
|
gtk_object_add_arg_type ("GtkWrapBox::vspacing",
|
||||||
GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_VSPACING);
|
G_TYPE_UINT, GTK_ARG_READWRITE, ARG_VSPACING);
|
||||||
gtk_object_add_arg_type ("GtkWrapBox::line_justify",
|
gtk_object_add_arg_type ("GtkWrapBox::line_justify",
|
||||||
GTK_TYPE_JUSTIFICATION, GTK_ARG_READWRITE, ARG_LINE_JUSTIFY);
|
GTK_TYPE_JUSTIFICATION, GTK_ARG_READWRITE, ARG_LINE_JUSTIFY);
|
||||||
gtk_object_add_arg_type ("GtkWrapBox::aspect_ratio",
|
gtk_object_add_arg_type ("GtkWrapBox::aspect_ratio",
|
||||||
GTK_TYPE_FLOAT, GTK_ARG_READWRITE, ARG_ASPECT_RATIO);
|
G_TYPE_FLOAT, GTK_ARG_READWRITE, ARG_ASPECT_RATIO);
|
||||||
gtk_object_add_arg_type ("GtkWrapBox::current_ratio",
|
gtk_object_add_arg_type ("GtkWrapBox::current_ratio",
|
||||||
GTK_TYPE_FLOAT, GTK_ARG_READABLE, ARG_CURRENT_RATIO);
|
G_TYPE_FLOAT, GTK_ARG_READABLE, ARG_CURRENT_RATIO);
|
||||||
gtk_object_add_arg_type ("GtkWrapBox::max_children_per_line",
|
gtk_object_add_arg_type ("GtkWrapBox::max_children_per_line",
|
||||||
GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_CHILD_LIMIT);
|
G_TYPE_UINT, GTK_ARG_READWRITE, ARG_CHILD_LIMIT);
|
||||||
|
|
||||||
signals[NEED_REALLOCATION] = g_signal_new
|
signals[NEED_REALLOCATION] = g_signal_new
|
||||||
("need_reallocation",
|
("need_reallocation",
|
||||||
|
@ -252,7 +252,7 @@ gtk_wrap_box_get_arg (GtkObject *object,
|
||||||
GTK_VALUE_UINT (*arg) = wbox->child_limit;
|
GTK_VALUE_UINT (*arg) = wbox->child_limit;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
arg->type = GTK_TYPE_INVALID;
|
arg->type = G_TYPE_INVALID;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,17 +165,17 @@ present_authentication_dialog_nonblocking (CallbackInfo *info)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (dialog),
|
g_signal_connect (G_OBJECT (dialog),
|
||||||
"clicked",
|
"clicked",
|
||||||
GTK_SIGNAL_FUNC (authentication_dialog_button_clicked),
|
G_CALLBACK (authentication_dialog_button_clicked),
|
||||||
info);
|
info);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (dialog),
|
g_signal_connect (G_OBJECT (dialog),
|
||||||
"close",
|
"close",
|
||||||
GTK_SIGNAL_FUNC (authentication_dialog_closed),
|
G_CALLBACK (authentication_dialog_closed),
|
||||||
info);
|
info);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (dialog),
|
g_signal_connect (G_OBJECT (dialog),
|
||||||
"destroy",
|
"destroy",
|
||||||
GTK_SIGNAL_FUNC (authentication_dialog_destroyed),
|
G_CALLBACK (authentication_dialog_destroyed),
|
||||||
info);
|
info);
|
||||||
|
|
||||||
gtk_widget_show_all (GTK_WIDGET (dialog));
|
gtk_widget_show_all (GTK_WIDGET (dialog));
|
||||||
|
|
|
@ -217,7 +217,7 @@ nautilus_bookmark_get_pixmap_and_mask (NautilusBookmark *bookmark,
|
||||||
}
|
}
|
||||||
|
|
||||||
gdk_pixbuf_render_pixmap_and_mask (pixbuf, pixmap_return, mask_return, EEL_STANDARD_ALPHA_THRESHHOLD);
|
gdk_pixbuf_render_pixmap_and_mask (pixbuf, pixmap_return, mask_return, EEL_STANDARD_ALPHA_THRESHHOLD);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -518,7 +518,7 @@ nautilus_bookmark_new_with_icon (const char *uri, const char *name,
|
||||||
NautilusBookmark *new_bookmark;
|
NautilusBookmark *new_bookmark;
|
||||||
|
|
||||||
new_bookmark = NAUTILUS_BOOKMARK (g_object_new (NAUTILUS_TYPE_BOOKMARK, NULL));
|
new_bookmark = NAUTILUS_BOOKMARK (g_object_new (NAUTILUS_TYPE_BOOKMARK, NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (new_bookmark));
|
g_object_ref (G_OBJECT (new_bookmark));
|
||||||
gtk_object_sink (GTK_OBJECT (new_bookmark));
|
gtk_object_sink (GTK_OBJECT (new_bookmark));
|
||||||
|
|
||||||
new_bookmark->details->name = g_strdup (name);
|
new_bookmark->details->name = g_strdup (name);
|
||||||
|
|
|
@ -219,7 +219,7 @@ nautilus_customization_data_get_next_element_for_display (NautilusCustomizationD
|
||||||
pixbuf = eel_gdk_pixbuf_scale_down_to_fit (orig_pixbuf,
|
pixbuf = eel_gdk_pixbuf_scale_down_to_fit (orig_pixbuf,
|
||||||
data->maximum_icon_width,
|
data->maximum_icon_width,
|
||||||
data->maximum_icon_height);
|
data->maximum_icon_height);
|
||||||
gdk_pixbuf_unref (orig_pixbuf);
|
g_object_unref (G_OBJECT (orig_pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
*pixbuf_out = pixbuf;
|
*pixbuf_out = pixbuf;
|
||||||
|
@ -257,7 +257,7 @@ nautilus_customization_data_destroy (NautilusCustomizationData *data)
|
||||||
data->private_file_list != NULL);
|
data->private_file_list != NULL);
|
||||||
|
|
||||||
if (data->pattern_frame != NULL) {
|
if (data->pattern_frame != NULL) {
|
||||||
gdk_pixbuf_unref (data->pattern_frame);
|
g_object_unref (G_OBJECT (data->pattern_frame));
|
||||||
}
|
}
|
||||||
|
|
||||||
gnome_vfs_file_info_list_free (data->public_file_list);
|
gnome_vfs_file_info_list_free (data->public_file_list);
|
||||||
|
@ -372,7 +372,7 @@ add_reset_text (GdkPixbuf *pixbuf)
|
||||||
EEL_RGBA_COLOR_OPAQUE_WHITE,
|
EEL_RGBA_COLOR_OPAQUE_WHITE,
|
||||||
EEL_OPACITY_FULLY_OPAQUE);
|
EEL_OPACITY_FULLY_OPAQUE);
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (font));
|
g_object_unref (G_OBJECT (font));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* utility to make an attractive pattern image by compositing with a frame */
|
/* utility to make an attractive pattern image by compositing with a frame */
|
||||||
|
@ -397,11 +397,11 @@ nautilus_customization_make_pattern_chit (GdkPixbuf *pattern_tile, GdkPixbuf *fr
|
||||||
if (dragging) {
|
if (dragging) {
|
||||||
temp_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, frame_width - 6, frame_height - 6);
|
temp_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, frame_width - 6, frame_height - 6);
|
||||||
gdk_pixbuf_copy_area (pixbuf, 2, 2, frame_width - 6, frame_height - 6, temp_pixbuf, 0, 0);
|
gdk_pixbuf_copy_area (pixbuf, 2, 2, frame_width - 6, frame_height - 6, temp_pixbuf, 0, 0);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
pixbuf = temp_pixbuf;
|
pixbuf = temp_pixbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
gdk_pixbuf_unref (pattern_tile);
|
g_object_unref (G_OBJECT (pattern_tile));
|
||||||
|
|
||||||
if (is_reset) {
|
if (is_reset) {
|
||||||
add_reset_text (pixbuf);
|
add_reset_text (pixbuf);
|
||||||
|
|
|
@ -73,13 +73,13 @@ desktop_background_realized (NautilusIconContainer *icon_container, void *discon
|
||||||
|
|
||||||
if ((gboolean) GPOINTER_TO_INT (disconnect_signal)) {
|
if ((gboolean) GPOINTER_TO_INT (disconnect_signal)) {
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (icon_container),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (icon_container),
|
||||||
GTK_SIGNAL_FUNC (desktop_background_realized),
|
G_CALLBACK (desktop_background_realized),
|
||||||
disconnect_signal);
|
disconnect_signal);
|
||||||
}
|
}
|
||||||
|
|
||||||
background = eel_get_widget_background (GTK_WIDGET (icon_container));
|
background = eel_get_widget_background (GTK_WIDGET (icon_container));
|
||||||
|
|
||||||
gtk_object_set_data (GTK_OBJECT (background), "icon_container", (gpointer) icon_container);
|
g_object_set_data (G_OBJECT (background), "icon_container", (gpointer) icon_container);
|
||||||
|
|
||||||
nautilus_file_update_desktop_pixmaps (background);
|
nautilus_file_update_desktop_pixmaps (background);
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ nautilus_connect_desktop_background_to_file_metadata (NautilusIconContainer *ico
|
||||||
|
|
||||||
background = eel_get_widget_background (GTK_WIDGET (icon_container));
|
background = eel_get_widget_background (GTK_WIDGET (icon_container));
|
||||||
|
|
||||||
gtk_object_set_data (GTK_OBJECT (background), "theme_source", (gpointer) desktop_theme_source);
|
g_object_set_data (G_OBJECT (background), "theme_source", (gpointer) desktop_theme_source);
|
||||||
|
|
||||||
/* Strictly speaking, we don't need to know about metadata changes, since
|
/* Strictly speaking, we don't need to know about metadata changes, since
|
||||||
* the desktop setting aren't stored there. But, hooking up to metadata
|
* the desktop setting aren't stored there. But, hooking up to metadata
|
||||||
|
@ -110,7 +110,7 @@ nautilus_connect_desktop_background_to_file_metadata (NautilusIconContainer *ico
|
||||||
if (GTK_WIDGET_REALIZED (icon_container)) {
|
if (GTK_WIDGET_REALIZED (icon_container)) {
|
||||||
desktop_background_realized (icon_container, GINT_TO_POINTER (FALSE));
|
desktop_background_realized (icon_container, GINT_TO_POINTER (FALSE));
|
||||||
} else {
|
} else {
|
||||||
g_signal_connect (G_OBJECT (icon_container), "realize", GTK_SIGNAL_FUNC (desktop_background_realized), GINT_TO_POINTER (TRUE));
|
g_signal_connect (G_OBJECT (icon_container), "realize", G_CALLBACK (desktop_background_realized), GINT_TO_POINTER (TRUE));
|
||||||
}
|
}
|
||||||
|
|
||||||
nautilus_file_background_receive_root_window_changes (background);
|
nautilus_file_background_receive_root_window_changes (background);
|
||||||
|
@ -121,14 +121,14 @@ background_is_desktop (EelBackground *background)
|
||||||
{
|
{
|
||||||
/* == works because we're carful to always use the same string.
|
/* == works because we're carful to always use the same string.
|
||||||
*/
|
*/
|
||||||
return gtk_object_get_data (GTK_OBJECT (background), "theme_source") == desktop_theme_source;
|
return g_object_get_data (G_OBJECT (background), "theme_source") == desktop_theme_source;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *nautilus_file_background_peek_theme_source (EelBackground *background)
|
static const char *nautilus_file_background_peek_theme_source (EelBackground *background)
|
||||||
{
|
{
|
||||||
char *theme_source;
|
char *theme_source;
|
||||||
|
|
||||||
theme_source = gtk_object_get_data (GTK_OBJECT (background), "theme_source");
|
theme_source = g_object_get_data (G_OBJECT (background), "theme_source");
|
||||||
|
|
||||||
return theme_source != NULL ? theme_source : default_theme_source;
|
return theme_source != NULL ? theme_source : default_theme_source;
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ background_get_desktop_background_window (EelBackground *background)
|
||||||
{
|
{
|
||||||
gpointer layout;
|
gpointer layout;
|
||||||
|
|
||||||
layout = gtk_object_get_data (GTK_OBJECT (background), "icon_container");
|
layout = g_object_get_data (G_OBJECT (background), "icon_container");
|
||||||
return layout != NULL ? GTK_LAYOUT (layout)->bin_window : NULL;
|
return layout != NULL ? GTK_LAYOUT (layout)->bin_window : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,7 +474,7 @@ static int
|
||||||
call_settings_changed (EelBackground *background)
|
call_settings_changed (EelBackground *background)
|
||||||
{
|
{
|
||||||
NautilusFile *file;
|
NautilusFile *file;
|
||||||
file = gtk_object_get_data (GTK_OBJECT (background), "eel_background_file");
|
file = g_object_get_data (G_OBJECT (background), "eel_background_file");
|
||||||
if (file) {
|
if (file) {
|
||||||
saved_settings_changed_callback (file, background);
|
saved_settings_changed_callback (file, background);
|
||||||
}
|
}
|
||||||
|
@ -544,7 +544,7 @@ nautilus_file_background_receive_root_window_changes (EelBackground *background)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (background),
|
g_signal_connect (G_OBJECT (background),
|
||||||
"destroy",
|
"destroy",
|
||||||
GTK_SIGNAL_FUNC (desktop_background_destroyed_callback),
|
G_CALLBACK (desktop_background_destroyed_callback),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -644,7 +644,7 @@ image_loading_done_callback (EelBackground *background, gboolean successful_load
|
||||||
|
|
||||||
if ((gboolean) GPOINTER_TO_INT (disconnect_signal)) {
|
if ((gboolean) GPOINTER_TO_INT (disconnect_signal)) {
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (background),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (background),
|
||||||
GTK_SIGNAL_FUNC (image_loading_done_callback),
|
G_CALLBACK (image_loading_done_callback),
|
||||||
disconnect_signal);
|
disconnect_signal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -674,7 +674,7 @@ nautilus_file_update_desktop_pixmaps (EelBackground *background)
|
||||||
} else {
|
} else {
|
||||||
g_signal_connect (G_OBJECT (background),
|
g_signal_connect (G_OBJECT (background),
|
||||||
"image_loading_done",
|
"image_loading_done",
|
||||||
GTK_SIGNAL_FUNC (image_loading_done_callback),
|
G_CALLBACK (image_loading_done_callback),
|
||||||
GINT_TO_POINTER (TRUE));
|
GINT_TO_POINTER (TRUE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -742,7 +742,7 @@ background_changed_callback (EelBackground *background,
|
||||||
|
|
||||||
g_assert (EEL_IS_BACKGROUND (background));
|
g_assert (EEL_IS_BACKGROUND (background));
|
||||||
g_assert (NAUTILUS_IS_FILE (file));
|
g_assert (NAUTILUS_IS_FILE (file));
|
||||||
g_assert (gtk_object_get_data (GTK_OBJECT (background), "eel_background_file") == file);
|
g_assert (g_object_get_data (G_OBJECT (background), "eel_background_file") == file);
|
||||||
|
|
||||||
|
|
||||||
color = eel_background_get_color (background);
|
color = eel_background_get_color (background);
|
||||||
|
@ -792,7 +792,7 @@ initialize_background_from_settings (NautilusFile *file,
|
||||||
|
|
||||||
g_assert (NAUTILUS_IS_FILE (file));
|
g_assert (NAUTILUS_IS_FILE (file));
|
||||||
g_assert (EEL_IS_BACKGROUND (background));
|
g_assert (EEL_IS_BACKGROUND (background));
|
||||||
g_assert (gtk_object_get_data (GTK_OBJECT (background), "eel_background_file")
|
g_assert (g_object_get_data (G_OBJECT (background), "eel_background_file")
|
||||||
== file);
|
== file);
|
||||||
|
|
||||||
if (background_is_desktop (background)) {
|
if (background_is_desktop (background)) {
|
||||||
|
@ -854,7 +854,7 @@ nautilus_file_background_theme_changed (gpointer user_data)
|
||||||
EelBackground *background;
|
EelBackground *background;
|
||||||
|
|
||||||
background = EEL_BACKGROUND (user_data);
|
background = EEL_BACKGROUND (user_data);
|
||||||
file = gtk_object_get_data (GTK_OBJECT (background), "eel_background_file");
|
file = g_object_get_data (G_OBJECT (background), "eel_background_file");
|
||||||
if (file) {
|
if (file) {
|
||||||
saved_settings_changed_callback (file, background);
|
saved_settings_changed_callback (file, background);
|
||||||
}
|
}
|
||||||
|
@ -900,7 +900,7 @@ background_destroyed_callback (EelBackground *background,
|
||||||
NautilusFile *file)
|
NautilusFile *file)
|
||||||
{
|
{
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (file),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (file),
|
||||||
GTK_SIGNAL_FUNC (saved_settings_changed_callback),
|
G_CALLBACK (saved_settings_changed_callback),
|
||||||
background);
|
background);
|
||||||
nautilus_file_monitor_remove (file, background);
|
nautilus_file_monitor_remove (file, background);
|
||||||
eel_preferences_remove_callback (NAUTILUS_PREFERENCES_THEME,
|
eel_preferences_remove_callback (NAUTILUS_PREFERENCES_THEME,
|
||||||
|
@ -921,7 +921,7 @@ nautilus_connect_background_to_file_metadata (GtkWidget *widget,
|
||||||
background = eel_get_widget_background (widget);
|
background = eel_get_widget_background (widget);
|
||||||
|
|
||||||
/* Check if it is already connected. */
|
/* Check if it is already connected. */
|
||||||
old_file = gtk_object_get_data (GTK_OBJECT (background), "eel_background_file");
|
old_file = g_object_get_data (G_OBJECT (background), "eel_background_file");
|
||||||
if (old_file == file) {
|
if (old_file == file) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -930,16 +930,16 @@ nautilus_connect_background_to_file_metadata (GtkWidget *widget,
|
||||||
if (old_file != NULL) {
|
if (old_file != NULL) {
|
||||||
g_assert (NAUTILUS_IS_FILE (old_file));
|
g_assert (NAUTILUS_IS_FILE (old_file));
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (background),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (background),
|
||||||
GTK_SIGNAL_FUNC (background_changed_callback),
|
G_CALLBACK (background_changed_callback),
|
||||||
old_file);
|
old_file);
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (background),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (background),
|
||||||
GTK_SIGNAL_FUNC (background_destroyed_callback),
|
G_CALLBACK (background_destroyed_callback),
|
||||||
old_file);
|
old_file);
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (background),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (background),
|
||||||
GTK_SIGNAL_FUNC (background_reset_callback),
|
G_CALLBACK (background_reset_callback),
|
||||||
old_file);
|
old_file);
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (old_file),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (old_file),
|
||||||
GTK_SIGNAL_FUNC (saved_settings_changed_callback),
|
G_CALLBACK (saved_settings_changed_callback),
|
||||||
background);
|
background);
|
||||||
nautilus_file_monitor_remove (old_file, background);
|
nautilus_file_monitor_remove (old_file, background);
|
||||||
eel_preferences_remove_callback (NAUTILUS_PREFERENCES_THEME,
|
eel_preferences_remove_callback (NAUTILUS_PREFERENCES_THEME,
|
||||||
|
@ -950,28 +950,28 @@ nautilus_connect_background_to_file_metadata (GtkWidget *widget,
|
||||||
|
|
||||||
/* Attach the new directory. */
|
/* Attach the new directory. */
|
||||||
nautilus_file_ref (file);
|
nautilus_file_ref (file);
|
||||||
gtk_object_set_data_full (GTK_OBJECT (background),
|
g_object_set_data_full (G_OBJECT (background),
|
||||||
"eel_background_file",
|
"eel_background_file",
|
||||||
file,
|
file,
|
||||||
(GtkDestroyNotify) nautilus_file_unref);
|
(GtkDestroyNotify) nautilus_file_unref);
|
||||||
|
|
||||||
/* Connect new signal handlers. */
|
/* Connect new signal handlers. */
|
||||||
if (file != NULL) {
|
if (file != NULL) {
|
||||||
g_signal_connect (G_OBJECT (background),
|
g_signal_connect (G_OBJECT (background),
|
||||||
"settings_changed",
|
"settings_changed",
|
||||||
GTK_SIGNAL_FUNC (background_changed_callback),
|
G_CALLBACK (background_changed_callback),
|
||||||
file);
|
file);
|
||||||
g_signal_connect (G_OBJECT (background),
|
g_signal_connect (G_OBJECT (background),
|
||||||
"destroy",
|
"destroy",
|
||||||
GTK_SIGNAL_FUNC (background_destroyed_callback),
|
G_CALLBACK (background_destroyed_callback),
|
||||||
file);
|
file);
|
||||||
g_signal_connect (G_OBJECT (background),
|
g_signal_connect (G_OBJECT (background),
|
||||||
"reset",
|
"reset",
|
||||||
GTK_SIGNAL_FUNC (background_reset_callback),
|
G_CALLBACK (background_reset_callback),
|
||||||
file);
|
file);
|
||||||
g_signal_connect (G_OBJECT (file),
|
g_signal_connect (G_OBJECT (file),
|
||||||
"changed",
|
"changed",
|
||||||
GTK_SIGNAL_FUNC (saved_settings_changed_callback),
|
G_CALLBACK (saved_settings_changed_callback),
|
||||||
background);
|
background);
|
||||||
|
|
||||||
/* arrange to receive file metadata */
|
/* arrange to receive file metadata */
|
||||||
|
|
|
@ -92,7 +92,7 @@ nautilus_directory_class_init (NautilusDirectoryClass *klass)
|
||||||
G_STRUCT_OFFSET (NautilusDirectoryClass, files_added),
|
G_STRUCT_OFFSET (NautilusDirectoryClass, files_added),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
signals[FILES_CHANGED] =
|
signals[FILES_CHANGED] =
|
||||||
g_signal_new ("files_changed",
|
g_signal_new ("files_changed",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -100,7 +100,7 @@ nautilus_directory_class_init (NautilusDirectoryClass *klass)
|
||||||
G_STRUCT_OFFSET (NautilusDirectoryClass, files_changed),
|
G_STRUCT_OFFSET (NautilusDirectoryClass, files_changed),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
signals[DONE_LOADING] =
|
signals[DONE_LOADING] =
|
||||||
g_signal_new ("done_loading",
|
g_signal_new ("done_loading",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -116,7 +116,7 @@ nautilus_directory_class_init (NautilusDirectoryClass *klass)
|
||||||
G_STRUCT_OFFSET (NautilusDirectoryClass, load_error),
|
G_STRUCT_OFFSET (NautilusDirectoryClass, load_error),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__INT,
|
gtk_marshal_VOID__INT,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_INT);
|
G_TYPE_NONE, 1, G_TYPE_INT);
|
||||||
|
|
||||||
klass->get_name_for_self_as_new_file = real_get_name_for_self_as_new_file;
|
klass->get_name_for_self_as_new_file = real_get_name_for_self_as_new_file;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ get_details (GtkWindow *window)
|
||||||
{
|
{
|
||||||
NautilusDragWindowDetails *details;
|
NautilusDragWindowDetails *details;
|
||||||
|
|
||||||
details = gtk_object_get_data (GTK_OBJECT (window),
|
details = g_object_get_data (G_OBJECT (window),
|
||||||
NAUTILUS_DRAG_WINDOW_DETAILS_KEY);
|
NAUTILUS_DRAG_WINDOW_DETAILS_KEY);
|
||||||
return details;
|
return details;
|
||||||
}
|
}
|
||||||
|
@ -404,9 +404,9 @@ nautilus_drag_window_register (GtkWindow *window)
|
||||||
|
|
||||||
details = g_new0 (NautilusDragWindowDetails, 1);
|
details = g_new0 (NautilusDragWindowDetails, 1);
|
||||||
|
|
||||||
gtk_object_set_data_full (GTK_OBJECT (window),
|
g_object_set_data_full (G_OBJECT (window),
|
||||||
NAUTILUS_DRAG_WINDOW_DETAILS_KEY,
|
NAUTILUS_DRAG_WINDOW_DETAILS_KEY,
|
||||||
details, g_free);
|
details, g_free);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (window), "realize",
|
g_signal_connect (G_OBJECT (window), "realize",
|
||||||
G_CALLBACK (nautilus_drag_window_realize), NULL);
|
G_CALLBACK (nautilus_drag_window_realize), NULL);
|
||||||
|
|
|
@ -270,7 +270,7 @@ select_all_at_idle (gpointer callback_data)
|
||||||
if (!GTK_OBJECT_DESTROYED (entry)) {
|
if (!GTK_OBJECT_DESTROYED (entry)) {
|
||||||
nautilus_entry_select_all (entry);
|
nautilus_entry_select_all (entry);
|
||||||
}
|
}
|
||||||
gtk_object_unref (GTK_OBJECT (entry));
|
g_object_unref (G_OBJECT (entry));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ nautilus_entry_select_all_at_idle (NautilusEntry *entry)
|
||||||
* then gtk_entry_key_press will unselect (and we want
|
* then gtk_entry_key_press will unselect (and we want
|
||||||
* to move the text cursor position to the end).
|
* to move the text cursor position to the end).
|
||||||
*/
|
*/
|
||||||
gtk_object_ref (GTK_OBJECT (entry));
|
g_object_ref (G_OBJECT (entry));
|
||||||
gtk_idle_add (select_all_at_idle, entry);
|
gtk_idle_add (select_all_at_idle, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -357,11 +357,11 @@ create_transfer_dialog (const GnomeVFSXferProgressInfo *progress_info,
|
||||||
*/
|
*/
|
||||||
g_signal_connect (G_OBJECT (transfer_info->progress_dialog),
|
g_signal_connect (G_OBJECT (transfer_info->progress_dialog),
|
||||||
"clicked",
|
"clicked",
|
||||||
GTK_SIGNAL_FUNC (gnome_dialog_close),
|
G_CALLBACK (gnome_dialog_close),
|
||||||
NULL);
|
NULL);
|
||||||
g_signal_connect (G_OBJECT (transfer_info->progress_dialog),
|
g_signal_connect (G_OBJECT (transfer_info->progress_dialog),
|
||||||
"close",
|
"close",
|
||||||
GTK_SIGNAL_FUNC (handle_close_callback),
|
G_CALLBACK (handle_close_callback),
|
||||||
transfer_info);
|
transfer_info);
|
||||||
|
|
||||||
/* Make the progress dialog show up over the window we are copying into */
|
/* Make the progress dialog show up over the window we are copying into */
|
||||||
|
|
|
@ -161,7 +161,7 @@ nautilus_file_new_from_relative_uri (NautilusDirectory *directory,
|
||||||
} else {
|
} else {
|
||||||
file = NAUTILUS_FILE (g_object_new (NAUTILUS_TYPE_VFS_FILE, NULL));
|
file = NAUTILUS_FILE (g_object_new (NAUTILUS_TYPE_VFS_FILE, NULL));
|
||||||
}
|
}
|
||||||
gtk_object_ref (GTK_OBJECT (file));
|
g_object_ref (G_OBJECT (file));
|
||||||
gtk_object_sink (GTK_OBJECT (file));
|
gtk_object_sink (GTK_OBJECT (file));
|
||||||
|
|
||||||
#ifdef NAUTILUS_FILE_DEBUG_REF
|
#ifdef NAUTILUS_FILE_DEBUG_REF
|
||||||
|
@ -277,7 +277,7 @@ nautilus_file_new_from_info (NautilusDirectory *directory,
|
||||||
eazel_dump_stack_trace ("\t", 10);
|
eazel_dump_stack_trace ("\t", 10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gtk_object_ref (GTK_OBJECT (file));
|
g_object_ref (G_OBJECT (file));
|
||||||
gtk_object_sink (GTK_OBJECT (file));
|
gtk_object_sink (GTK_OBJECT (file));
|
||||||
|
|
||||||
nautilus_directory_ref (directory);
|
nautilus_directory_ref (directory);
|
||||||
|
@ -470,7 +470,7 @@ nautilus_file_ref (NautilusFile *file)
|
||||||
eazel_dump_stack_trace ("\t", 10);
|
eazel_dump_stack_trace ("\t", 10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gtk_object_ref (GTK_OBJECT (file));
|
g_object_ref (G_OBJECT (file));
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -488,7 +488,7 @@ nautilus_file_unref (NautilusFile *file)
|
||||||
eazel_dump_stack_trace ("\t", 10);
|
eazel_dump_stack_trace ("\t", 10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (file));
|
g_object_unref (G_OBJECT (file));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -77,7 +77,7 @@ EEL_CLASS_BOILERPLATE (NautilusFontFactory,
|
||||||
static void
|
static void
|
||||||
unref_global_font_factory (void)
|
unref_global_font_factory (void)
|
||||||
{
|
{
|
||||||
gtk_object_unref (GTK_OBJECT (global_font_factory));
|
g_object_unref (G_OBJECT (global_font_factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return a pointer to the single global font factory. */
|
/* Return a pointer to the single global font factory. */
|
||||||
|
@ -86,7 +86,7 @@ nautilus_get_current_font_factory (void)
|
||||||
{
|
{
|
||||||
if (global_font_factory == NULL) {
|
if (global_font_factory == NULL) {
|
||||||
global_font_factory = NAUTILUS_FONT_FACTORY (g_object_new (nautilus_font_factory_get_type (), NULL));
|
global_font_factory = NAUTILUS_FONT_FACTORY (g_object_new (nautilus_font_factory_get_type (), NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (global_font_factory));
|
g_object_ref (G_OBJECT (global_font_factory));
|
||||||
gtk_object_sink (GTK_OBJECT (global_font_factory));
|
gtk_object_sink (GTK_OBJECT (global_font_factory));
|
||||||
g_atexit (unref_global_font_factory);
|
g_atexit (unref_global_font_factory);
|
||||||
}
|
}
|
||||||
|
|
|
@ -936,7 +936,7 @@ global_preferences_get_smooth_bold_font (const char *file_name)
|
||||||
if (bold_font == NULL) {
|
if (bold_font == NULL) {
|
||||||
bold_font = plain_font;
|
bold_font = plain_font;
|
||||||
} else {
|
} else {
|
||||||
gtk_object_unref (GTK_OBJECT (plain_font));
|
g_object_unref (G_OBJECT (plain_font));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_assert (EEL_IS_SCALABLE_FONT (bold_font));
|
g_assert (EEL_IS_SCALABLE_FONT (bold_font));
|
||||||
|
|
|
@ -254,13 +254,13 @@ nautilus_icon_canvas_item_class_init (NautilusIconCanvasItemClass *class)
|
||||||
gtk_object_add_arg_type ("NautilusIconCanvasItem::font",
|
gtk_object_add_arg_type ("NautilusIconCanvasItem::font",
|
||||||
GTK_TYPE_BOXED, GTK_ARG_READWRITE, ARG_FONT);
|
GTK_TYPE_BOXED, GTK_ARG_READWRITE, ARG_FONT);
|
||||||
gtk_object_add_arg_type ("NautilusIconCanvasItem::highlighted_for_selection",
|
gtk_object_add_arg_type ("NautilusIconCanvasItem::highlighted_for_selection",
|
||||||
GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_HIGHLIGHTED_FOR_SELECTION);
|
G_TYPE_BOOLEAN, GTK_ARG_READWRITE, ARG_HIGHLIGHTED_FOR_SELECTION);
|
||||||
gtk_object_add_arg_type ("NautilusIconCanvasItem::highlighted_as_keyboard_focus",
|
gtk_object_add_arg_type ("NautilusIconCanvasItem::highlighted_as_keyboard_focus",
|
||||||
GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_HIGHLIGHTED_AS_KEYBOARD_FOCUS);
|
G_TYPE_BOOLEAN, GTK_ARG_READWRITE, ARG_HIGHLIGHTED_AS_KEYBOARD_FOCUS);
|
||||||
gtk_object_add_arg_type ("NautilusIconCanvasItem::highlighted_for_drop",
|
gtk_object_add_arg_type ("NautilusIconCanvasItem::highlighted_for_drop",
|
||||||
GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_HIGHLIGHTED_FOR_DROP);
|
G_TYPE_BOOLEAN, GTK_ARG_READWRITE, ARG_HIGHLIGHTED_FOR_DROP);
|
||||||
gtk_object_add_arg_type ("NautilusIconCanvasItem::smooth_font_size",
|
gtk_object_add_arg_type ("NautilusIconCanvasItem::smooth_font_size",
|
||||||
GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_SMOOTH_FONT_SIZE);
|
G_TYPE_INT, GTK_ARG_READWRITE, ARG_SMOOTH_FONT_SIZE);
|
||||||
gtk_object_add_arg_type ("NautilusIconCanvasItem::smooth_font",
|
gtk_object_add_arg_type ("NautilusIconCanvasItem::smooth_font",
|
||||||
GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_SMOOTH_FONT);
|
GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_SMOOTH_FONT);
|
||||||
|
|
||||||
|
@ -508,7 +508,7 @@ nautilus_icon_canvas_item_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
arg->type = GTK_TYPE_INVALID;
|
arg->type = G_TYPE_INVALID;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3066,7 +3066,7 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
button_press),
|
button_press),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
nautilus_marshal_BOOLEAN__POINTER,
|
nautilus_marshal_BOOLEAN__POINTER,
|
||||||
GTK_TYPE_BOOL, 1,
|
G_TYPE_BOOLEAN, 1,
|
||||||
GDK_TYPE_EVENT);
|
GDK_TYPE_EVENT);
|
||||||
signals[ACTIVATE]
|
signals[ACTIVATE]
|
||||||
= g_signal_new ("activate",
|
= g_signal_new ("activate",
|
||||||
|
@ -3077,7 +3077,7 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[CONTEXT_CLICK_SELECTION]
|
signals[CONTEXT_CLICK_SELECTION]
|
||||||
= g_signal_new ("context_click_selection",
|
= g_signal_new ("context_click_selection",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3087,7 +3087,7 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[CONTEXT_CLICK_BACKGROUND]
|
signals[CONTEXT_CLICK_BACKGROUND]
|
||||||
= g_signal_new ("context_click_background",
|
= g_signal_new ("context_click_background",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3097,7 +3097,7 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[MIDDLE_CLICK]
|
signals[MIDDLE_CLICK]
|
||||||
= g_signal_new ("middle_click",
|
= g_signal_new ("middle_click",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3107,7 +3107,7 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[ICON_POSITION_CHANGED]
|
signals[ICON_POSITION_CHANGED]
|
||||||
= g_signal_new ("icon_position_changed",
|
= g_signal_new ("icon_position_changed",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3117,8 +3117,8 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
nautilus_marshal_VOID__POINTER_POINTER,
|
nautilus_marshal_VOID__POINTER_POINTER,
|
||||||
G_TYPE_NONE, 2,
|
G_TYPE_NONE, 2,
|
||||||
GTK_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[ICON_TEXT_CHANGED]
|
signals[ICON_TEXT_CHANGED]
|
||||||
= g_signal_new ("icon_text_changed",
|
= g_signal_new ("icon_text_changed",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3128,7 +3128,7 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
nautilus_marshal_VOID__POINTER_POINTER,
|
nautilus_marshal_VOID__POINTER_POINTER,
|
||||||
G_TYPE_NONE, 2,
|
G_TYPE_NONE, 2,
|
||||||
GTK_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
G_TYPE_STRING);
|
G_TYPE_STRING);
|
||||||
signals[ICON_STRETCH_STARTED]
|
signals[ICON_STRETCH_STARTED]
|
||||||
= g_signal_new ("icon_stretch_started",
|
= g_signal_new ("icon_stretch_started",
|
||||||
|
@ -3139,7 +3139,7 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[ICON_STRETCH_ENDED]
|
signals[ICON_STRETCH_ENDED]
|
||||||
= g_signal_new ("icon_stretch_ended",
|
= g_signal_new ("icon_stretch_ended",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3149,7 +3149,7 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[RENAMING_ICON]
|
signals[RENAMING_ICON]
|
||||||
= g_signal_new ("renaming_icon",
|
= g_signal_new ("renaming_icon",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3159,7 +3159,7 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[GET_ICON_IMAGES]
|
signals[GET_ICON_IMAGES]
|
||||||
= g_signal_new ("get_icon_images",
|
= g_signal_new ("get_icon_images",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3168,10 +3168,10 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
get_icon_images),
|
get_icon_images),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
eel_marshal_POINTER__POINTER_STRING_POINTER,
|
eel_marshal_POINTER__POINTER_STRING_POINTER,
|
||||||
GTK_TYPE_POINTER, 3,
|
G_TYPE_POINTER, 3,
|
||||||
GTK_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
G_TYPE_STRING,
|
G_TYPE_STRING,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[GET_ICON_TEXT]
|
signals[GET_ICON_TEXT]
|
||||||
= g_signal_new ("get_icon_text",
|
= g_signal_new ("get_icon_text",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3193,7 +3193,7 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
eel_marshal_STRING__POINTER,
|
eel_marshal_STRING__POINTER,
|
||||||
G_TYPE_STRING, 1,
|
G_TYPE_STRING, 1,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[GET_ICON_DROP_TARGET_URI]
|
signals[GET_ICON_DROP_TARGET_URI]
|
||||||
= g_signal_new ("get_icon_drop_target_uri",
|
= g_signal_new ("get_icon_drop_target_uri",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3203,7 +3203,7 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
eel_marshal_STRING__POINTER,
|
eel_marshal_STRING__POINTER,
|
||||||
G_TYPE_STRING, 1,
|
G_TYPE_STRING, 1,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[COMPARE_ICONS]
|
signals[COMPARE_ICONS]
|
||||||
= g_signal_new ("compare_icons",
|
= g_signal_new ("compare_icons",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3212,9 +3212,9 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
compare_icons),
|
compare_icons),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
nautilus_marshal_INT__POINTER_POINTER,
|
nautilus_marshal_INT__POINTER_POINTER,
|
||||||
GTK_TYPE_INT, 2,
|
G_TYPE_INT, 2,
|
||||||
GTK_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[COMPARE_ICONS_BY_NAME]
|
signals[COMPARE_ICONS_BY_NAME]
|
||||||
= g_signal_new ("compare_icons_by_name",
|
= g_signal_new ("compare_icons_by_name",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3223,9 +3223,9 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
compare_icons_by_name),
|
compare_icons_by_name),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
nautilus_marshal_INT__POINTER_POINTER,
|
nautilus_marshal_INT__POINTER_POINTER,
|
||||||
GTK_TYPE_INT, 2,
|
G_TYPE_INT, 2,
|
||||||
GTK_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[MOVE_COPY_ITEMS]
|
signals[MOVE_COPY_ITEMS]
|
||||||
= g_signal_new ("move_copy_items",
|
= g_signal_new ("move_copy_items",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3235,12 +3235,12 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
nautilus_marshal_VOID__POINTER_POINTER_POINTER_INT_INT_INT,
|
nautilus_marshal_VOID__POINTER_POINTER_POINTER_INT_INT_INT,
|
||||||
G_TYPE_NONE, 6,
|
G_TYPE_NONE, 6,
|
||||||
GTK_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
GTK_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
GTK_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
GTK_TYPE_INT,
|
G_TYPE_INT,
|
||||||
GTK_TYPE_INT,
|
G_TYPE_INT,
|
||||||
GTK_TYPE_INT);
|
G_TYPE_INT);
|
||||||
signals[HANDLE_URI_LIST]
|
signals[HANDLE_URI_LIST]
|
||||||
= g_signal_new ("handle_uri_list",
|
= g_signal_new ("handle_uri_list",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3250,10 +3250,10 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
nautilus_marshal_VOID__POINTER_INT_INT_INT,
|
nautilus_marshal_VOID__POINTER_INT_INT_INT,
|
||||||
G_TYPE_NONE, 4,
|
G_TYPE_NONE, 4,
|
||||||
GTK_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
GTK_TYPE_INT,
|
G_TYPE_INT,
|
||||||
GTK_TYPE_INT,
|
G_TYPE_INT,
|
||||||
GTK_TYPE_INT);
|
G_TYPE_INT);
|
||||||
|
|
||||||
signals[GET_CONTAINER_URI]
|
signals[GET_CONTAINER_URI]
|
||||||
= g_signal_new ("get_container_uri",
|
= g_signal_new ("get_container_uri",
|
||||||
|
@ -3272,8 +3272,8 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
can_accept_item),
|
can_accept_item),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
eel_marshal_INT__POINTER_STRING,
|
eel_marshal_INT__POINTER_STRING,
|
||||||
GTK_TYPE_INT, 2,
|
G_TYPE_INT, 2,
|
||||||
GTK_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
G_TYPE_STRING);
|
G_TYPE_STRING);
|
||||||
signals[GET_STORED_ICON_POSITION]
|
signals[GET_STORED_ICON_POSITION]
|
||||||
= g_signal_new ("get_stored_icon_position",
|
= g_signal_new ("get_stored_icon_position",
|
||||||
|
@ -3283,9 +3283,9 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
get_stored_icon_position),
|
get_stored_icon_position),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
eel_marshal_BOOLEAN__POINTER_POINTER,
|
eel_marshal_BOOLEAN__POINTER_POINTER,
|
||||||
GTK_TYPE_BOOL, 2,
|
G_TYPE_BOOLEAN, 2,
|
||||||
GTK_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
signals[LAYOUT_CHANGED]
|
signals[LAYOUT_CHANGED]
|
||||||
= g_signal_new ("layout_changed",
|
= g_signal_new ("layout_changed",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -3303,9 +3303,9 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
preview),
|
preview),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
nautilus_marshal_INT__POINTER_INT,
|
nautilus_marshal_INT__POINTER_INT,
|
||||||
GTK_TYPE_INT, 2,
|
G_TYPE_INT, 2,
|
||||||
GTK_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
GTK_TYPE_BOOL);
|
G_TYPE_BOOLEAN);
|
||||||
signals[BAND_SELECT_STARTED]
|
signals[BAND_SELECT_STARTED]
|
||||||
= g_signal_new ("band_select_started",
|
= g_signal_new ("band_select_started",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
|
|
@ -1225,19 +1225,19 @@ nautilus_icon_dnd_init (NautilusIconContainer *container,
|
||||||
|
|
||||||
/* Messages for outgoing drag. */
|
/* Messages for outgoing drag. */
|
||||||
g_signal_connect (G_OBJECT (container), "drag_data_get",
|
g_signal_connect (G_OBJECT (container), "drag_data_get",
|
||||||
GTK_SIGNAL_FUNC (drag_data_get_callback), NULL);
|
G_CALLBACK (drag_data_get_callback), NULL);
|
||||||
g_signal_connect (G_OBJECT (container), "drag_end",
|
g_signal_connect (G_OBJECT (container), "drag_end",
|
||||||
GTK_SIGNAL_FUNC (drag_end_callback), NULL);
|
G_CALLBACK (drag_end_callback), NULL);
|
||||||
|
|
||||||
/* Messages for incoming drag. */
|
/* Messages for incoming drag. */
|
||||||
g_signal_connect (G_OBJECT (container), "drag_data_received",
|
g_signal_connect (G_OBJECT (container), "drag_data_received",
|
||||||
GTK_SIGNAL_FUNC (drag_data_received_callback), NULL);
|
G_CALLBACK (drag_data_received_callback), NULL);
|
||||||
g_signal_connect (G_OBJECT (container), "drag_motion",
|
g_signal_connect (G_OBJECT (container), "drag_motion",
|
||||||
GTK_SIGNAL_FUNC (drag_motion_callback), NULL);
|
G_CALLBACK (drag_motion_callback), NULL);
|
||||||
g_signal_connect (G_OBJECT (container), "drag_drop",
|
g_signal_connect (G_OBJECT (container), "drag_drop",
|
||||||
GTK_SIGNAL_FUNC (drag_drop_callback), NULL);
|
G_CALLBACK (drag_drop_callback), NULL);
|
||||||
g_signal_connect (G_OBJECT (container), "drag_leave",
|
g_signal_connect (G_OBJECT (container), "drag_leave",
|
||||||
GTK_SIGNAL_FUNC (drag_leave_callback), NULL);
|
G_CALLBACK (drag_leave_callback), NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -263,7 +263,7 @@ destroy_icon_factory (void)
|
||||||
eel_preferences_remove_callback (NAUTILUS_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT,
|
eel_preferences_remove_callback (NAUTILUS_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT,
|
||||||
thumbnail_limit_changed_callback,
|
thumbnail_limit_changed_callback,
|
||||||
NULL);
|
NULL);
|
||||||
gtk_object_unref (GTK_OBJECT (global_icon_factory));
|
g_object_unref (G_OBJECT (global_icon_factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return a pointer to the single global icon factory. */
|
/* Return a pointer to the single global icon factory. */
|
||||||
|
@ -273,7 +273,7 @@ get_icon_factory (void)
|
||||||
if (global_icon_factory == NULL) {
|
if (global_icon_factory == NULL) {
|
||||||
global_icon_factory = NAUTILUS_ICON_FACTORY
|
global_icon_factory = NAUTILUS_ICON_FACTORY
|
||||||
(g_object_new (nautilus_icon_factory_get_type (), NULL));
|
(g_object_new (nautilus_icon_factory_get_type (), NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (global_icon_factory));
|
g_object_ref (G_OBJECT (global_icon_factory));
|
||||||
gtk_object_sink (GTK_OBJECT (global_icon_factory));
|
gtk_object_sink (GTK_OBJECT (global_icon_factory));
|
||||||
|
|
||||||
icon_theme_changed_callback (NULL);
|
icon_theme_changed_callback (NULL);
|
||||||
|
@ -341,14 +341,14 @@ load_thumbnail_frames (NautilusIconFactory *factory)
|
||||||
|
|
||||||
image_path = nautilus_theme_get_image_path ("thumbnail_frame.png");
|
image_path = nautilus_theme_get_image_path ("thumbnail_frame.png");
|
||||||
if (factory->thumbnail_frame != NULL) {
|
if (factory->thumbnail_frame != NULL) {
|
||||||
gdk_pixbuf_unref (factory->thumbnail_frame);
|
g_object_unref (G_OBJECT (factory->thumbnail_frame));
|
||||||
}
|
}
|
||||||
factory->thumbnail_frame = gdk_pixbuf_new_from_file (image_path, NULL);
|
factory->thumbnail_frame = gdk_pixbuf_new_from_file (image_path, NULL);
|
||||||
g_free (image_path);
|
g_free (image_path);
|
||||||
|
|
||||||
image_path = nautilus_theme_get_image_path ("thumbnail_frame.aa.png");
|
image_path = nautilus_theme_get_image_path ("thumbnail_frame.aa.png");
|
||||||
if (factory->thumbnail_frame_aa != NULL) {
|
if (factory->thumbnail_frame_aa != NULL) {
|
||||||
gdk_pixbuf_unref (factory->thumbnail_frame_aa);
|
g_object_unref (G_OBJECT (factory->thumbnail_frame_aa));
|
||||||
}
|
}
|
||||||
factory->thumbnail_frame_aa = gdk_pixbuf_new_from_file (image_path, NULL);
|
factory->thumbnail_frame_aa = gdk_pixbuf_new_from_file (image_path, NULL);
|
||||||
g_free (image_path);
|
g_free (image_path);
|
||||||
|
@ -431,7 +431,7 @@ cache_icon_new (GdkPixbuf *pixbuf,
|
||||||
g_assert (g_hash_table_lookup (factory->cache_icons, pixbuf) == NULL);
|
g_assert (g_hash_table_lookup (factory->cache_icons, pixbuf) == NULL);
|
||||||
|
|
||||||
/* Grab the pixbuf since we are keeping it. */
|
/* Grab the pixbuf since we are keeping it. */
|
||||||
gdk_pixbuf_ref (pixbuf);
|
g_object_ref (G_OBJECT (pixbuf));
|
||||||
#if GNOME2_CONVERSION_COMPLETE
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
gdk_pixbuf_set_last_unref_handler
|
gdk_pixbuf_set_last_unref_handler
|
||||||
(pixbuf, mark_icon_not_outstanding, NULL);
|
(pixbuf, mark_icon_not_outstanding, NULL);
|
||||||
|
@ -528,7 +528,7 @@ cache_icon_unref (CacheIcon *icon)
|
||||||
* and we were counting on the unref handler to catch it.
|
* and we were counting on the unref handler to catch it.
|
||||||
*/
|
*/
|
||||||
if (!icon->outstanding) {
|
if (!icon->outstanding) {
|
||||||
gdk_pixbuf_unref (icon->pixbuf);
|
g_object_unref (G_OBJECT (icon->pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (icon);
|
g_free (icon);
|
||||||
|
@ -587,10 +587,10 @@ nautilus_icon_factory_destroy (GtkObject *object)
|
||||||
g_hash_table_destroy (factory->icon_cache);
|
g_hash_table_destroy (factory->icon_cache);
|
||||||
|
|
||||||
if (factory->thumbnail_frame != NULL) {
|
if (factory->thumbnail_frame != NULL) {
|
||||||
gdk_pixbuf_unref (factory->thumbnail_frame);
|
g_object_unref (G_OBJECT (factory->thumbnail_frame));
|
||||||
}
|
}
|
||||||
if (factory->thumbnail_frame_aa != NULL) {
|
if (factory->thumbnail_frame_aa != NULL) {
|
||||||
gdk_pixbuf_unref (factory->thumbnail_frame_aa);
|
g_object_unref (G_OBJECT (factory->thumbnail_frame_aa));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (factory->theme.current.name);
|
g_free (factory->theme.current.name);
|
||||||
|
@ -1618,7 +1618,7 @@ load_specific_icon (NautilusScalableIcon *scalable_icon,
|
||||||
/* Since we got something, we can create a cache icon. */
|
/* Since we got something, we can create a cache icon. */
|
||||||
icon = cache_icon_new (pixbuf, type, FALSE, &details);
|
icon = cache_icon_new (pixbuf, type, FALSE, &details);
|
||||||
get_cache_time (scalable_icon->uri, &icon->cache_time);
|
get_cache_time (scalable_icon->uri, &icon->cache_time);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
|
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
@ -1753,7 +1753,7 @@ scale_icon (CacheIcon *icon,
|
||||||
&scaled_details);
|
&scaled_details);
|
||||||
scaled_icon->is_fallback = icon->is_fallback;
|
scaled_icon->is_fallback = icon->is_fallback;
|
||||||
scaled_icon->cache_time = icon->cache_time;
|
scaled_icon->cache_time = icon->cache_time;
|
||||||
gdk_pixbuf_unref (scaled_pixbuf);
|
g_object_unref (G_OBJECT (scaled_pixbuf));
|
||||||
return scaled_icon;
|
return scaled_icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2058,10 +2058,10 @@ nautilus_icon_factory_get_pixbuf_for_icon (NautilusScalableIcon *scalable_icon,
|
||||||
if (!icon->outstanding) {
|
if (!icon->outstanding) {
|
||||||
icon->outstanding = TRUE;
|
icon->outstanding = TRUE;
|
||||||
#ifndef GNOME2_CONVERSION_COMPLETE
|
#ifndef GNOME2_CONVERSION_COMPLETE
|
||||||
gdk_pixbuf_ref (pixbuf);
|
g_object_ref (G_OBJECT (pixbuf));
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
gdk_pixbuf_ref (pixbuf);
|
g_object_ref (G_OBJECT (pixbuf));
|
||||||
}
|
}
|
||||||
cache_icon_unref (icon);
|
cache_icon_unref (icon);
|
||||||
|
|
||||||
|
@ -2178,7 +2178,7 @@ nautilus_icon_factory_get_pixmap_and_mask_for_file (NautilusFile *file,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gdk_pixbuf_render_pixmap_and_mask (pixbuf, pixmap, mask, EEL_STANDARD_ALPHA_THRESHHOLD);
|
gdk_pixbuf_render_pixmap_and_mask (pixbuf, pixmap, mask, EEL_STANDARD_ALPHA_THRESHHOLD);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convenience routine for getting a pixbuf from an icon name. */
|
/* Convenience routine for getting a pixbuf from an icon name. */
|
||||||
|
@ -2252,7 +2252,7 @@ embedded_text_font_free (void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (embedded_text_font));
|
g_object_unref (G_OBJECT (embedded_text_font));
|
||||||
embedded_text_font = NULL;
|
embedded_text_font = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2308,7 +2308,7 @@ embed_text (GdkPixbuf *pixbuf_without_text,
|
||||||
EEL_RGB_COLOR_BLACK,
|
EEL_RGB_COLOR_BLACK,
|
||||||
EEL_OPACITY_FULLY_OPAQUE);
|
EEL_OPACITY_FULLY_OPAQUE);
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (smooth_text_layout));
|
g_object_unref (G_OBJECT (smooth_text_layout));
|
||||||
|
|
||||||
return pixbuf_with_text;
|
return pixbuf_with_text;
|
||||||
}
|
}
|
||||||
|
@ -2352,7 +2352,7 @@ load_icon_with_embedded_text (NautilusScalableIcon *scalable_icon,
|
||||||
&details);
|
&details);
|
||||||
icon_with_text->cache_time = icon_without_text->cache_time;
|
icon_with_text->cache_time = icon_without_text->cache_time;
|
||||||
cache_icon_unref (icon_without_text);
|
cache_icon_unref (icon_without_text);
|
||||||
gdk_pixbuf_unref (pixbuf_with_text);
|
g_object_unref (G_OBJECT (pixbuf_with_text));
|
||||||
|
|
||||||
return icon_with_text;
|
return icon_with_text;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1179,7 +1179,7 @@ iti_class_init (NautilusIconTextItemClass *text_item_class)
|
||||||
G_STRUCT_OFFSET (NautilusIconTextItemClass, text_changed),
|
G_STRUCT_OFFSET (NautilusIconTextItemClass, text_changed),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_BOOLEAN__VOID,
|
gtk_marshal_BOOLEAN__VOID,
|
||||||
GTK_TYPE_BOOL, 0);
|
G_TYPE_BOOLEAN, 0);
|
||||||
|
|
||||||
iti_signals [TEXT_EDITED] = g_signal_new
|
iti_signals [TEXT_EDITED] = g_signal_new
|
||||||
("text_edited",
|
("text_edited",
|
||||||
|
|
|
@ -654,7 +654,7 @@ nautilus_merged_directory_class_init (gpointer klass)
|
||||||
add_real_directory),
|
add_real_directory),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
signals[REMOVE_REAL_DIRECTORY]
|
signals[REMOVE_REAL_DIRECTORY]
|
||||||
= g_signal_new ("remove_real_directory",
|
= g_signal_new ("remove_real_directory",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -663,5 +663,5 @@ nautilus_merged_directory_class_init (gpointer klass)
|
||||||
remove_real_directory),
|
remove_real_directory),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
}
|
}
|
||||||
|
|
|
@ -320,7 +320,7 @@ nautilus_program_chooser_get_type (GnomeDialog *program_chooser)
|
||||||
{
|
{
|
||||||
GnomeVFSMimeActionType type;
|
GnomeVFSMimeActionType type;
|
||||||
|
|
||||||
type = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (program_chooser), "type"));
|
type = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (program_chooser), "type"));
|
||||||
|
|
||||||
g_assert (type == GNOME_VFS_MIME_ACTION_TYPE_COMPONENT ||
|
g_assert (type == GNOME_VFS_MIME_ACTION_TYPE_COMPONENT ||
|
||||||
type == GNOME_VFS_MIME_ACTION_TYPE_APPLICATION);
|
type == GNOME_VFS_MIME_ACTION_TYPE_APPLICATION);
|
||||||
|
@ -392,25 +392,25 @@ repopulate_program_list (GnomeDialog *program_chooser,
|
||||||
static NautilusFile *
|
static NautilusFile *
|
||||||
nautilus_program_chooser_get_file (GnomeDialog *chooser)
|
nautilus_program_chooser_get_file (GnomeDialog *chooser)
|
||||||
{
|
{
|
||||||
return NAUTILUS_FILE (gtk_object_get_data (GTK_OBJECT (chooser), "file"));
|
return NAUTILUS_FILE (g_object_get_data (G_OBJECT (chooser), "file"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkCList *
|
static GtkCList *
|
||||||
nautilus_program_chooser_get_clist (GnomeDialog *chooser)
|
nautilus_program_chooser_get_clist (GnomeDialog *chooser)
|
||||||
{
|
{
|
||||||
return GTK_CLIST (gtk_object_get_data (GTK_OBJECT (chooser), "clist"));
|
return GTK_CLIST (g_object_get_data (G_OBJECT (chooser), "clist"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkFrame *
|
static GtkFrame *
|
||||||
nautilus_program_chooser_get_frame (GnomeDialog *chooser)
|
nautilus_program_chooser_get_frame (GnomeDialog *chooser)
|
||||||
{
|
{
|
||||||
return GTK_FRAME (gtk_object_get_data (GTK_OBJECT (chooser), "frame"));
|
return GTK_FRAME (g_object_get_data (G_OBJECT (chooser), "frame"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkLabel *
|
static GtkLabel *
|
||||||
nautilus_program_chooser_get_status_label (GnomeDialog *chooser)
|
nautilus_program_chooser_get_status_label (GnomeDialog *chooser)
|
||||||
{
|
{
|
||||||
return GTK_LABEL (gtk_object_get_data (GTK_OBJECT (chooser), "status_label"));
|
return GTK_LABEL (g_object_get_data (G_OBJECT (chooser), "status_label"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -438,28 +438,28 @@ static void
|
||||||
nautilus_program_chooser_set_file (GnomeDialog *chooser, NautilusFile *file)
|
nautilus_program_chooser_set_file (GnomeDialog *chooser, NautilusFile *file)
|
||||||
{
|
{
|
||||||
nautilus_file_ref (file);
|
nautilus_file_ref (file);
|
||||||
gtk_object_set_data_full (GTK_OBJECT (chooser),
|
g_object_set_data_full (G_OBJECT (chooser),
|
||||||
"file",
|
"file",
|
||||||
file,
|
file,
|
||||||
(GtkDestroyNotify)nautilus_file_unref);
|
(GtkDestroyNotify) nautilus_file_unref);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_program_chooser_set_clist (GnomeDialog *chooser, GtkCList *clist)
|
nautilus_program_chooser_set_clist (GnomeDialog *chooser, GtkCList *clist)
|
||||||
{
|
{
|
||||||
gtk_object_set_data (GTK_OBJECT (chooser), "clist", clist);
|
g_object_set_data (G_OBJECT (chooser), "clist", clist);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_program_chooser_set_frame (GnomeDialog *chooser, GtkFrame *frame)
|
nautilus_program_chooser_set_frame (GnomeDialog *chooser, GtkFrame *frame)
|
||||||
{
|
{
|
||||||
gtk_object_set_data (GTK_OBJECT (chooser), "frame", frame);
|
g_object_set_data (G_OBJECT (chooser), "frame", frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_program_chooser_set_status_label (GnomeDialog *chooser, GtkLabel *status_label)
|
nautilus_program_chooser_set_status_label (GnomeDialog *chooser, GtkLabel *status_label)
|
||||||
{
|
{
|
||||||
gtk_object_set_data (GTK_OBJECT (chooser), "status_label", status_label);
|
g_object_set_data (G_OBJECT (chooser), "status_label", status_label);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
|
@ -1290,7 +1290,7 @@ nautilus_program_chooser_new (GnomeVFSMimeActionType action_type,
|
||||||
PROGRAM_CHOOSER_DEFAULT_HEIGHT);
|
PROGRAM_CHOOSER_DEFAULT_HEIGHT);
|
||||||
gtk_window_set_wmclass (GTK_WINDOW (window), "program_chooser", "Nautilus");
|
gtk_window_set_wmclass (GTK_WINDOW (window), "program_chooser", "Nautilus");
|
||||||
|
|
||||||
gtk_object_set_data (GTK_OBJECT (window), "type", GINT_TO_POINTER (action_type));
|
g_object_set_data (G_OBJECT (window), "type", GINT_TO_POINTER (action_type));
|
||||||
|
|
||||||
dialog_vbox = GNOME_DIALOG (window)->vbox;
|
dialog_vbox = GNOME_DIALOG (window)->vbox;
|
||||||
|
|
||||||
|
@ -1320,7 +1320,7 @@ nautilus_program_chooser_new (GnomeVFSMimeActionType action_type,
|
||||||
eel_gnome_dialog_get_button_by_index
|
eel_gnome_dialog_get_button_by_index
|
||||||
(GNOME_DIALOG (window), GNOME_OK));
|
(GNOME_DIALOG (window), GNOME_OK));
|
||||||
#endif
|
#endif
|
||||||
gtk_object_set_data (GTK_OBJECT (window), "list", clist);
|
g_object_set_data (G_OBJECT (window), "list", clist);
|
||||||
|
|
||||||
repopulate_program_list (GNOME_DIALOG (window), file, GTK_CLIST (clist));
|
repopulate_program_list (GNOME_DIALOG (window), file, GTK_CLIST (clist));
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ choose_application_destroy (ChooseApplicationCallbackData *choose_data)
|
||||||
{
|
{
|
||||||
nautilus_file_unref (choose_data->file);
|
nautilus_file_unref (choose_data->file);
|
||||||
if (choose_data->parent_window != NULL) {
|
if (choose_data->parent_window != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (choose_data->parent_window));
|
g_object_unref (G_OBJECT (choose_data->parent_window));
|
||||||
}
|
}
|
||||||
g_free (choose_data);
|
g_free (choose_data);
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ choose_component_destroy (ChooseComponentCallbackData *choose_data)
|
||||||
{
|
{
|
||||||
nautilus_file_unref (choose_data->file);
|
nautilus_file_unref (choose_data->file);
|
||||||
if (choose_data->parent_window != NULL) {
|
if (choose_data->parent_window != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (choose_data->parent_window));
|
g_object_unref (G_OBJECT (choose_data->parent_window));
|
||||||
}
|
}
|
||||||
g_free (choose_data);
|
g_free (choose_data);
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ nautilus_choose_component_for_file (NautilusFile *file,
|
||||||
*/
|
*/
|
||||||
nautilus_file_ref (file);
|
nautilus_file_ref (file);
|
||||||
if (parent_window != NULL) {
|
if (parent_window != NULL) {
|
||||||
gtk_object_ref (GTK_OBJECT (parent_window));
|
g_object_ref (G_OBJECT (parent_window));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create data to pass through. */
|
/* Create data to pass through. */
|
||||||
|
@ -380,7 +380,7 @@ nautilus_choose_application_for_file (NautilusFile *file,
|
||||||
*/
|
*/
|
||||||
nautilus_file_ref (file);
|
nautilus_file_ref (file);
|
||||||
if (parent_window != NULL) {
|
if (parent_window != NULL) {
|
||||||
gtk_object_ref (GTK_OBJECT (parent_window));
|
g_object_ref (G_OBJECT (parent_window));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create data to pass through. */
|
/* Create data to pass through. */
|
||||||
|
|
|
@ -575,7 +575,7 @@ theme_list_prepend (GList *theme_list,
|
||||||
attributes->preview_pixbuf = eel_gdk_pixbuf_scale_down_to_fit (unscaled_preview_pixbuf,
|
attributes->preview_pixbuf = eel_gdk_pixbuf_scale_down_to_fit (unscaled_preview_pixbuf,
|
||||||
THEME_PREVIEW_ICON_WIDTH,
|
THEME_PREVIEW_ICON_WIDTH,
|
||||||
THEME_PREVIEW_ICON_HEIGHT);
|
THEME_PREVIEW_ICON_HEIGHT);
|
||||||
gdk_pixbuf_unref (unscaled_preview_pixbuf);
|
g_object_unref (G_OBJECT (unscaled_preview_pixbuf));
|
||||||
|
|
||||||
attributes->builtin = builtin;
|
attributes->builtin = builtin;
|
||||||
|
|
||||||
|
@ -721,7 +721,7 @@ attributes_free (gpointer data,
|
||||||
g_free (attributes->display_name);
|
g_free (attributes->display_name);
|
||||||
g_free (attributes->description);
|
g_free (attributes->description);
|
||||||
if (attributes->preview_pixbuf != NULL) {
|
if (attributes->preview_pixbuf != NULL) {
|
||||||
gdk_pixbuf_unref (attributes->preview_pixbuf);
|
g_object_unref (G_OBJECT (attributes->preview_pixbuf));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -589,7 +589,7 @@ make_thumbnails (gpointer data)
|
||||||
if (full_size_image != NULL) {
|
if (full_size_image != NULL) {
|
||||||
/* scale the content image as necessary */
|
/* scale the content image as necessary */
|
||||||
scaled_image = eel_gdk_pixbuf_scale_down_to_fit (full_size_image, 96, 96);
|
scaled_image = eel_gdk_pixbuf_scale_down_to_fit (full_size_image, 96, 96);
|
||||||
gdk_pixbuf_unref (full_size_image);
|
g_object_unref (G_OBJECT (full_size_image));
|
||||||
|
|
||||||
thumbnail_path = gnome_vfs_get_local_path_from_uri (new_thumbnail_uri);
|
thumbnail_path = gnome_vfs_get_local_path_from_uri (new_thumbnail_uri);
|
||||||
if (thumbnail_path == NULL
|
if (thumbnail_path == NULL
|
||||||
|
@ -597,7 +597,7 @@ make_thumbnails (gpointer data)
|
||||||
g_warning ("error saving thumbnail %s", thumbnail_path);
|
g_warning ("error saving thumbnail %s", thumbnail_path);
|
||||||
}
|
}
|
||||||
g_free (thumbnail_path);
|
g_free (thumbnail_path);
|
||||||
gdk_pixbuf_unref (scaled_image);
|
g_object_unref (G_OBJECT (scaled_image));
|
||||||
} else {
|
} else {
|
||||||
/* gdk-pixbuf couldn't load the image, so trying using ImageMagick */
|
/* gdk-pixbuf couldn't load the image, so trying using ImageMagick */
|
||||||
char *temp_str;
|
char *temp_str;
|
||||||
|
@ -717,6 +717,6 @@ nautilus_thumbnail_load_framed_image (const char *path, gboolean anti_aliased_fr
|
||||||
pixbuf_with_frame = eel_embed_image_in_frame
|
pixbuf_with_frame = eel_embed_image_in_frame
|
||||||
(pixbuf, frame,
|
(pixbuf, frame,
|
||||||
left_offset, top_offset, right_offset, bottom_offset);
|
left_offset, top_offset, right_offset, bottom_offset);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
return pixbuf_with_frame;
|
return pixbuf_with_frame;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ nautilus_trash_monitor_class_init (NautilusTrashMonitorClass *klass)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__BOOLEAN,
|
gtk_marshal_VOID__BOOLEAN,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_BOOL);
|
G_TYPE_BOOLEAN);
|
||||||
|
|
||||||
signals[CHECK_TRASH_DIRECTORY_ADDED] = g_signal_new
|
signals[CHECK_TRASH_DIRECTORY_ADDED] = g_signal_new
|
||||||
("check_trash_directory_added",
|
("check_trash_directory_added",
|
||||||
|
@ -85,7 +85,7 @@ nautilus_trash_monitor_class_init (NautilusTrashMonitorClass *klass)
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -220,10 +220,10 @@ void
|
||||||
nautilus_undo_manager_attach (NautilusUndoManager *manager, GObject *target)
|
nautilus_undo_manager_attach (NautilusUndoManager *manager, GObject *target)
|
||||||
{
|
{
|
||||||
g_return_if_fail (NAUTILUS_IS_UNDO_MANAGER (manager));
|
g_return_if_fail (NAUTILUS_IS_UNDO_MANAGER (manager));
|
||||||
g_return_if_fail (GTK_IS_OBJECT (target));
|
g_return_if_fail (G_IS_OBJECT (target));
|
||||||
|
|
||||||
nautilus_undo_attach_undo_manager
|
nautilus_undo_attach_undo_manager
|
||||||
(GTK_OBJECT (target),
|
(G_OBJECT (target),
|
||||||
bonobo_object_corba_objref (BONOBO_OBJECT (manager)));
|
bonobo_object_corba_objref (BONOBO_OBJECT (manager)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ nautilus_undo_manager_set_up_bonobo_ui_handler_undo_item (NautilusUndoManager *m
|
||||||
/* Update it again whenever the changed signal is emitted. */
|
/* Update it again whenever the changed signal is emitted. */
|
||||||
eel_gtk_signal_connect_full_while_alive
|
eel_gtk_signal_connect_full_while_alive
|
||||||
(GTK_OBJECT (manager), "changed",
|
(GTK_OBJECT (manager), "changed",
|
||||||
GTK_SIGNAL_FUNC (update_undo_menu_item), NULL,
|
G_CALLBACK (update_undo_menu_item), NULL,
|
||||||
connection, undo_menu_handler_connection_free_cover,
|
connection, undo_menu_handler_connection_free_cover,
|
||||||
FALSE, FALSE,
|
FALSE, FALSE,
|
||||||
GTK_OBJECT (handler));
|
GTK_OBJECT (handler));
|
||||||
|
|
|
@ -47,7 +47,7 @@ typedef struct {
|
||||||
} EditableUndoObjectData;
|
} EditableUndoObjectData;
|
||||||
|
|
||||||
|
|
||||||
static void restore_editable_from_undo_snapshot_callback (GtkObject *target,
|
static void restore_editable_from_undo_snapshot_callback (GObject *target,
|
||||||
gpointer callback_data);
|
gpointer callback_data);
|
||||||
static void editable_register_edit_undo (GtkEditable *editable);
|
static void editable_register_edit_undo (GtkEditable *editable);
|
||||||
static void free_editable_object_data (gpointer data);
|
static void free_editable_object_data (gpointer data);
|
||||||
|
@ -76,13 +76,13 @@ nautilus_undo_set_up_nautilus_entry_for_undo (NautilusEntry *entry)
|
||||||
|
|
||||||
data = g_new(EditableUndoObjectData, 1);
|
data = g_new(EditableUndoObjectData, 1);
|
||||||
data->undo_registered = FALSE;
|
data->undo_registered = FALSE;
|
||||||
gtk_object_set_data_full (GTK_OBJECT (entry), "undo_registered",
|
g_object_set_data_full (G_OBJECT (entry), "undo_registered",
|
||||||
data, free_editable_object_data);
|
data, free_editable_object_data);
|
||||||
|
|
||||||
/* Connect to entry signals */
|
/* Connect to entry signals */
|
||||||
g_signal_connect (G_OBJECT (entry),
|
g_signal_connect (G_OBJECT (entry),
|
||||||
"user_changed",
|
"user_changed",
|
||||||
GTK_SIGNAL_FUNC (nautilus_entry_user_changed_callback),
|
G_CALLBACK (nautilus_entry_user_changed_callback),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ nautilus_undo_tear_down_nautilus_entry_for_undo (NautilusEntry *entry)
|
||||||
|
|
||||||
/* Disconnect from entry signals */
|
/* Disconnect from entry signals */
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (entry),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (entry),
|
||||||
GTK_SIGNAL_FUNC (nautilus_entry_user_changed_callback),
|
G_CALLBACK (nautilus_entry_user_changed_callback),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ editable_register_edit_undo (GtkEditable *editable)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check our undo registered flag */
|
/* Check our undo registered flag */
|
||||||
data = gtk_object_get_data (GTK_OBJECT (editable), "undo_registered");
|
data = g_object_get_data (G_OBJECT (editable), "undo_registered");
|
||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
g_warning ("Undo data is NULL");
|
g_warning ("Undo data is NULL");
|
||||||
return;
|
return;
|
||||||
|
@ -169,7 +169,7 @@ editable_register_edit_undo (GtkEditable *editable)
|
||||||
&undo_data->selection_end);
|
&undo_data->selection_end);
|
||||||
|
|
||||||
nautilus_undo_register
|
nautilus_undo_register
|
||||||
(GTK_OBJECT (editable),
|
(G_OBJECT (editable),
|
||||||
restore_editable_from_undo_snapshot_callback,
|
restore_editable_from_undo_snapshot_callback,
|
||||||
undo_data,
|
undo_data,
|
||||||
(GDestroyNotify) free_editable_undo_data,
|
(GDestroyNotify) free_editable_undo_data,
|
||||||
|
@ -194,19 +194,19 @@ nautilus_undo_set_up_editable_for_undo (GtkEditable *editable)
|
||||||
/* Connect to editable signals */
|
/* Connect to editable signals */
|
||||||
g_signal_connect (G_OBJECT (editable),
|
g_signal_connect (G_OBJECT (editable),
|
||||||
"insert_text",
|
"insert_text",
|
||||||
GTK_SIGNAL_FUNC (editable_insert_text_callback),
|
G_CALLBACK (editable_insert_text_callback),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (editable),
|
g_signal_connect (G_OBJECT (editable),
|
||||||
"delete_text",
|
"delete_text",
|
||||||
GTK_SIGNAL_FUNC (editable_delete_text_callback),
|
G_CALLBACK (editable_delete_text_callback),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
|
||||||
data = g_new (EditableUndoObjectData, 1);
|
data = g_new (EditableUndoObjectData, 1);
|
||||||
data->undo_registered = FALSE;
|
data->undo_registered = FALSE;
|
||||||
gtk_object_set_data_full (GTK_OBJECT (editable), "undo_registered",
|
g_object_set_data_full (G_OBJECT (editable), "undo_registered",
|
||||||
data, free_editable_object_data);
|
data, free_editable_object_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -218,11 +218,11 @@ nautilus_undo_tear_down_editable_for_undo (GtkEditable *editable)
|
||||||
|
|
||||||
/* Disconnect from entry signals */
|
/* Disconnect from entry signals */
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (editable),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (editable),
|
||||||
GTK_SIGNAL_FUNC (editable_insert_text_callback),
|
G_CALLBACK (editable_insert_text_callback),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (editable),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (editable),
|
||||||
GTK_SIGNAL_FUNC (editable_delete_text_callback),
|
G_CALLBACK (editable_delete_text_callback),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,19 +231,19 @@ nautilus_undo_tear_down_editable_for_undo (GtkEditable *editable)
|
||||||
* Restore edited text.
|
* Restore edited text.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
restore_editable_from_undo_snapshot_callback (GtkObject *target, gpointer callback_data)
|
restore_editable_from_undo_snapshot_callback (GObject *target, gpointer callback_data)
|
||||||
{
|
{
|
||||||
GtkEditable *editable;
|
GtkEditable *editable;
|
||||||
GtkWindow *window;
|
GtkWindow *window;
|
||||||
EditableUndoData *undo_data;
|
EditableUndoData *undo_data;
|
||||||
EditableUndoObjectData *data;
|
EditableUndoObjectData *data;
|
||||||
gint position;
|
gint position;
|
||||||
|
|
||||||
editable = GTK_EDITABLE (target);
|
editable = GTK_EDITABLE (target);
|
||||||
undo_data = (EditableUndoData *) callback_data;
|
undo_data = (EditableUndoData *) callback_data;
|
||||||
|
|
||||||
/* Check our undo registered flag */
|
/* Check our undo registered flag */
|
||||||
data = gtk_object_get_data (target, "undo_registered");
|
data = g_object_get_data (target, "undo_registered");
|
||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
g_warning ("Undo regisetred flag not found");
|
g_warning ("Undo regisetred flag not found");
|
||||||
return;
|
return;
|
||||||
|
@ -262,7 +262,7 @@ restore_editable_from_undo_snapshot_callback (GtkObject *target, gpointer callba
|
||||||
strlen (undo_data->undo_text), &position);
|
strlen (undo_data->undo_text), &position);
|
||||||
|
|
||||||
/* Set focus to widget */
|
/* Set focus to widget */
|
||||||
window = GTK_WINDOW (gtk_widget_get_toplevel ( GTK_WIDGET (target)));
|
window = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (target)));
|
||||||
gtk_window_set_focus (window, GTK_WIDGET (editable));
|
gtk_window_set_focus (window, GTK_WIDGET (editable));
|
||||||
|
|
||||||
/* We have to do this call, because the previous call selects all text */
|
/* We have to do this call, because the previous call selects all text */
|
||||||
|
@ -330,7 +330,7 @@ nautilus_undo_editable_set_undo_key (GtkEditable *editable, gboolean value)
|
||||||
/* Connect to entry signals */
|
/* Connect to entry signals */
|
||||||
g_signal_connect (G_OBJECT (editable),
|
g_signal_connect (G_OBJECT (editable),
|
||||||
"key_press_event",
|
"key_press_event",
|
||||||
GTK_SIGNAL_FUNC (editable_key_press_event),
|
G_CALLBACK (editable_key_press_event),
|
||||||
NULL);
|
NULL);
|
||||||
} else {
|
} else {
|
||||||
/* FIXME bugzilla.gnome.org 45092: Warns if the handler
|
/* FIXME bugzilla.gnome.org 45092: Warns if the handler
|
||||||
|
@ -338,7 +338,7 @@ nautilus_undo_editable_set_undo_key (GtkEditable *editable, gboolean value)
|
||||||
* to prevent that little problem.
|
* to prevent that little problem.
|
||||||
*/
|
*/
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (editable),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (editable),
|
||||||
GTK_SIGNAL_FUNC (editable_key_press_event),
|
G_CALLBACK (editable_key_press_event),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -306,7 +306,7 @@ nautilus_volume_monitor_class_init (NautilusVolumeMonitorClass *klass)
|
||||||
volume_mounted),
|
volume_mounted),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
|
|
||||||
signals[VOLUME_UNMOUNT_STARTED]
|
signals[VOLUME_UNMOUNT_STARTED]
|
||||||
= g_signal_new ("volume_unmount_started",
|
= g_signal_new ("volume_unmount_started",
|
||||||
|
@ -316,7 +316,7 @@ nautilus_volume_monitor_class_init (NautilusVolumeMonitorClass *klass)
|
||||||
volume_unmount_started),
|
volume_unmount_started),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
|
|
||||||
signals[VOLUME_UNMOUNT_FAILED]
|
signals[VOLUME_UNMOUNT_FAILED]
|
||||||
= g_signal_new ("volume_unmount_failed",
|
= g_signal_new ("volume_unmount_failed",
|
||||||
|
@ -326,7 +326,7 @@ nautilus_volume_monitor_class_init (NautilusVolumeMonitorClass *klass)
|
||||||
volume_unmount_failed),
|
volume_unmount_failed),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
|
|
||||||
signals[VOLUME_UNMOUNTED]
|
signals[VOLUME_UNMOUNTED]
|
||||||
= g_signal_new ("volume_unmounted",
|
= g_signal_new ("volume_unmounted",
|
||||||
|
@ -336,7 +336,7 @@ nautilus_volume_monitor_class_init (NautilusVolumeMonitorClass *klass)
|
||||||
volume_unmounted),
|
volume_unmounted),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
|
|
||||||
/* Check environment a bit. */
|
/* Check environment a bit. */
|
||||||
if (g_file_exists ("/vol/dev")) {
|
if (g_file_exists ("/vol/dev")) {
|
||||||
|
|
|
@ -152,7 +152,7 @@ select_all_idle_callback (gpointer callback_data)
|
||||||
select_all (editable);
|
select_all (editable);
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (editable));
|
g_object_unref (G_OBJECT (editable));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@ select_all_callback (BonoboUIComponent *ui,
|
||||||
g_assert (strcmp (command_name, "Select All") == 0);
|
g_assert (strcmp (command_name, "Select All") == 0);
|
||||||
|
|
||||||
editable = GTK_EDITABLE (callback_data);
|
editable = GTK_EDITABLE (callback_data);
|
||||||
gtk_object_ref (GTK_OBJECT (editable));
|
g_object_ref (G_OBJECT (editable));
|
||||||
gtk_idle_add (select_all_idle_callback, editable);
|
gtk_idle_add (select_all_idle_callback, editable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,21 +248,21 @@ typedef struct {
|
||||||
static gboolean
|
static gboolean
|
||||||
clipboard_items_are_merged_in (GtkWidget *widget)
|
clipboard_items_are_merged_in (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
return GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget),
|
return GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget),
|
||||||
"Nautilus:clipboard_menu_items_merged"));
|
"Nautilus:clipboard_menu_items_merged"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_clipboard_items_are_merged_in (GtkObject *widget_as_object,
|
set_clipboard_items_are_merged_in (GObject *widget_as_object,
|
||||||
gboolean merged_in)
|
gboolean merged_in)
|
||||||
{
|
{
|
||||||
gtk_object_set_data (widget_as_object,
|
g_object_set_data (widget_as_object,
|
||||||
"Nautilus:clipboard_menu_items_merged",
|
"Nautilus:clipboard_menu_items_merged",
|
||||||
GINT_TO_POINTER (merged_in));
|
GINT_TO_POINTER (merged_in));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
merge_in_clipboard_menu_items (GtkObject *widget_as_object,
|
merge_in_clipboard_menu_items (GObject *widget_as_object,
|
||||||
TargetCallbackData *target_data)
|
TargetCallbackData *target_data)
|
||||||
{
|
{
|
||||||
BonoboUIComponent *ui;
|
BonoboUIComponent *ui;
|
||||||
|
@ -296,7 +296,7 @@ merge_in_clipboard_menu_items (GtkObject *widget_as_object,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
merge_out_clipboard_menu_items (GtkObject *widget_as_object,
|
merge_out_clipboard_menu_items (GObject *widget_as_object,
|
||||||
TargetCallbackData *target_data)
|
TargetCallbackData *target_data)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -333,13 +333,11 @@ focus_changed_callback (GtkWidget *widget,
|
||||||
ui = target_data->component;
|
ui = target_data->component;
|
||||||
if (GTK_WIDGET_HAS_FOCUS (widget)) {
|
if (GTK_WIDGET_HAS_FOCUS (widget)) {
|
||||||
if (!clipboard_items_are_merged_in (widget)) {
|
if (!clipboard_items_are_merged_in (widget)) {
|
||||||
merge_in_clipboard_menu_items (GTK_OBJECT (widget),
|
merge_in_clipboard_menu_items (G_OBJECT (widget), target_data);
|
||||||
target_data);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (clipboard_items_are_merged_in (widget)) {
|
if (clipboard_items_are_merged_in (widget)) {
|
||||||
merge_out_clipboard_menu_items (GTK_OBJECT (widget),
|
merge_out_clipboard_menu_items (G_OBJECT (widget), target_data);
|
||||||
target_data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -453,7 +451,7 @@ nautilus_clipboard_set_up_editable (GtkEditable *target,
|
||||||
static gboolean
|
static gboolean
|
||||||
widget_was_set_up_with_selection_sensitivity (GtkWidget *widget)
|
widget_was_set_up_with_selection_sensitivity (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
return GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget),
|
return GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget),
|
||||||
"Nautilus:shares_selection_changes"));
|
"Nautilus:shares_selection_changes"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -507,17 +505,17 @@ nautilus_clipboard_set_up_editable_in_control (GtkEditable *target,
|
||||||
/* We'd like to use gtk_signal_connect_while_alive, but it's
|
/* We'd like to use gtk_signal_connect_while_alive, but it's
|
||||||
* not compatible with gtk_signal_disconnect calls.
|
* not compatible with gtk_signal_disconnect calls.
|
||||||
*/
|
*/
|
||||||
gtk_object_set_data (GTK_OBJECT (target),
|
g_object_set_data (G_OBJECT (target),
|
||||||
"Nautilus:shares_selection_changes",
|
"Nautilus:shares_selection_changes",
|
||||||
GINT_TO_POINTER (shares_selection_changes));
|
GINT_TO_POINTER (shares_selection_changes));
|
||||||
g_signal_connect (G_OBJECT (target),
|
g_signal_connect (G_OBJECT (target),
|
||||||
"focus_in_event",
|
"focus_in_event",
|
||||||
G_CALLBACK (first_focus_callback),
|
G_CALLBACK (first_focus_callback),
|
||||||
control);
|
control);
|
||||||
g_signal_connect (G_OBJECT (target),
|
g_signal_connect (G_OBJECT (target),
|
||||||
"destroy",
|
"destroy",
|
||||||
G_CALLBACK (control_destroyed_callback),
|
G_CALLBACK (control_destroyed_callback),
|
||||||
control);
|
control);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -26,10 +26,10 @@
|
||||||
#define NAUTILUS_UNDO_PRIVATE_H
|
#define NAUTILUS_UNDO_PRIVATE_H
|
||||||
|
|
||||||
#include <libnautilus/nautilus-distributed-undo.h>
|
#include <libnautilus/nautilus-distributed-undo.h>
|
||||||
#include <gtk/gtkobject.h>
|
#include <gobject/gobject.h>
|
||||||
|
|
||||||
Nautilus_Undo_Manager nautilus_undo_get_undo_manager (GtkObject *attached_object);
|
Nautilus_Undo_Manager nautilus_undo_get_undo_manager (GObject *attached_object);
|
||||||
void nautilus_undo_attach_undo_manager (GtkObject *object,
|
void nautilus_undo_attach_undo_manager (GObject *object,
|
||||||
Nautilus_Undo_Manager manager);
|
Nautilus_Undo_Manager manager);
|
||||||
|
|
||||||
#endif /* NAUTILUS_UNDO_PRIVATE_H */
|
#endif /* NAUTILUS_UNDO_PRIVATE_H */
|
||||||
|
|
|
@ -137,11 +137,11 @@ remove_transaction_from_object (gpointer list_data, gpointer callback_data)
|
||||||
transaction = NAUTILUS_UNDO_TRANSACTION (callback_data);
|
transaction = NAUTILUS_UNDO_TRANSACTION (callback_data);
|
||||||
|
|
||||||
/* Remove the transaction from the list on the atom. */
|
/* Remove the transaction from the list on the atom. */
|
||||||
list = gtk_object_get_data (atom->target, NAUTILUS_UNDO_TRANSACTION_LIST_DATA);
|
list = g_object_get_data (atom->target, NAUTILUS_UNDO_TRANSACTION_LIST_DATA);
|
||||||
|
|
||||||
if (list != NULL) {
|
if (list != NULL) {
|
||||||
list = g_list_remove (list, transaction);
|
list = g_list_remove (list, transaction);
|
||||||
gtk_object_set_data (atom->target, NAUTILUS_UNDO_TRANSACTION_LIST_DATA, list);
|
g_object_set_data (atom->target, NAUTILUS_UNDO_TRANSACTION_LIST_DATA, list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,21 +193,21 @@ nautilus_undo_transaction_add_atom (NautilusUndoTransaction *transaction,
|
||||||
(transaction->atom_list, g_memdup (atom, sizeof (*atom)));
|
(transaction->atom_list, g_memdup (atom, sizeof (*atom)));
|
||||||
|
|
||||||
/* Add the transaction to the list on the atoms target object. */
|
/* Add the transaction to the list on the atoms target object. */
|
||||||
list = gtk_object_get_data (atom->target, NAUTILUS_UNDO_TRANSACTION_LIST_DATA);
|
list = g_object_get_data (atom->target, NAUTILUS_UNDO_TRANSACTION_LIST_DATA);
|
||||||
if (g_list_find (list, transaction) != NULL) {
|
if (g_list_find (list, transaction) != NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If it's not already on that atom, this object is new. */
|
/* If it's not already on that atom, this object is new. */
|
||||||
list = g_list_prepend (list, transaction);
|
list = g_list_prepend (list, transaction);
|
||||||
gtk_object_set_data (atom->target, NAUTILUS_UNDO_TRANSACTION_LIST_DATA, list);
|
g_object_set_data (atom->target, NAUTILUS_UNDO_TRANSACTION_LIST_DATA, list);
|
||||||
|
|
||||||
/* Connect a signal handler to the atom so it will unregister
|
/* Connect a signal handler to the atom so it will unregister
|
||||||
* itself when it's destroyed.
|
* itself when it's destroyed.
|
||||||
*/
|
*/
|
||||||
gtk_signal_connect (atom->target, "destroy",
|
g_signal_connect (atom->target, "destroy",
|
||||||
GTK_SIGNAL_FUNC (nautilus_undo_transaction_unregister_object),
|
G_CALLBACK (nautilus_undo_transaction_unregister_object),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -245,14 +245,14 @@ nautilus_undo_transaction_add_to_undo_manager (NautilusUndoTransaction *transact
|
||||||
|
|
||||||
static void
|
static void
|
||||||
remove_atoms (NautilusUndoTransaction *transaction,
|
remove_atoms (NautilusUndoTransaction *transaction,
|
||||||
GtkObject *object)
|
GObject *object)
|
||||||
{
|
{
|
||||||
CORBA_Environment ev;
|
CORBA_Environment ev;
|
||||||
GList *p, *next;
|
GList *p, *next;
|
||||||
NautilusUndoAtom *atom;
|
NautilusUndoAtom *atom;
|
||||||
|
|
||||||
g_assert (NAUTILUS_IS_UNDO_TRANSACTION (transaction));
|
g_assert (NAUTILUS_IS_UNDO_TRANSACTION (transaction));
|
||||||
g_assert (GTK_IS_OBJECT (object));
|
g_assert (G_IS_OBJECT (object));
|
||||||
|
|
||||||
CORBA_exception_init (&ev);
|
CORBA_exception_init (&ev);
|
||||||
|
|
||||||
|
@ -285,23 +285,23 @@ static void
|
||||||
remove_atoms_cover (gpointer list_data, gpointer callback_data)
|
remove_atoms_cover (gpointer list_data, gpointer callback_data)
|
||||||
{
|
{
|
||||||
if (NAUTILUS_IS_UNDO_TRANSACTION (list_data)) {
|
if (NAUTILUS_IS_UNDO_TRANSACTION (list_data)) {
|
||||||
remove_atoms (NAUTILUS_UNDO_TRANSACTION (list_data), GTK_OBJECT (callback_data));
|
remove_atoms (NAUTILUS_UNDO_TRANSACTION (list_data), G_OBJECT (callback_data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nautilus_undo_transaction_unregister_object (GtkObject *object)
|
nautilus_undo_transaction_unregister_object (GObject *object)
|
||||||
{
|
{
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_OBJECT (object));
|
g_return_if_fail (G_IS_OBJECT (object));
|
||||||
|
|
||||||
/* Remove atoms from each transaction on the list. */
|
/* Remove atoms from each transaction on the list. */
|
||||||
list = gtk_object_get_data (object, NAUTILUS_UNDO_TRANSACTION_LIST_DATA);
|
list = g_object_get_data (object, NAUTILUS_UNDO_TRANSACTION_LIST_DATA);
|
||||||
if (list != NULL) {
|
if (list != NULL) {
|
||||||
g_list_foreach (list, remove_atoms_cover, object);
|
g_list_foreach (list, remove_atoms_cover, object);
|
||||||
g_list_free (list);
|
g_list_free (list);
|
||||||
gtk_object_remove_data (object, NAUTILUS_UNDO_TRANSACTION_LIST_DATA);
|
g_object_set_data (object, NAUTILUS_UNDO_TRANSACTION_LIST_DATA, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ typedef struct {
|
||||||
POA_Nautilus_Undo_Transaction__epv epv;
|
POA_Nautilus_Undo_Transaction__epv epv;
|
||||||
} NautilusUndoTransactionClass;
|
} NautilusUndoTransactionClass;
|
||||||
|
|
||||||
GtkType nautilus_undo_transaction_get_type (void);
|
GType nautilus_undo_transaction_get_type (void);
|
||||||
NautilusUndoTransaction *nautilus_undo_transaction_new (const char *operation_name,
|
NautilusUndoTransaction *nautilus_undo_transaction_new (const char *operation_name,
|
||||||
const char *undo_menu_item_label,
|
const char *undo_menu_item_label,
|
||||||
const char *undo_menu_item_hint,
|
const char *undo_menu_item_hint,
|
||||||
|
@ -69,6 +69,6 @@ void nautilus_undo_transaction_add_atom (Nautilus
|
||||||
const NautilusUndoAtom *atom);
|
const NautilusUndoAtom *atom);
|
||||||
void nautilus_undo_transaction_add_to_undo_manager (NautilusUndoTransaction *transaction,
|
void nautilus_undo_transaction_add_to_undo_manager (NautilusUndoTransaction *transaction,
|
||||||
Nautilus_Undo_Manager manager);
|
Nautilus_Undo_Manager manager);
|
||||||
void nautilus_undo_transaction_unregister_object (GtkObject *atom_target);
|
void nautilus_undo_transaction_unregister_object (GObject *atom_target);
|
||||||
|
|
||||||
#endif /* NAUTILUS_UNDO_TRANSACTION_H */
|
#endif /* NAUTILUS_UNDO_TRANSACTION_H */
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
/* Register a simple undo action by calling nautilus_undo_register_full. */
|
/* Register a simple undo action by calling nautilus_undo_register_full. */
|
||||||
void
|
void
|
||||||
nautilus_undo_register (GtkObject *target,
|
nautilus_undo_register (GObject *target,
|
||||||
NautilusUndoCallback callback,
|
NautilusUndoCallback callback,
|
||||||
gpointer callback_data,
|
gpointer callback_data,
|
||||||
GDestroyNotify callback_data_destroy_notify,
|
GDestroyNotify callback_data_destroy_notify,
|
||||||
|
@ -49,7 +49,7 @@ nautilus_undo_register (GtkObject *target,
|
||||||
NautilusUndoAtom atom;
|
NautilusUndoAtom atom;
|
||||||
GList single_atom_list;
|
GList single_atom_list;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_OBJECT (target));
|
g_return_if_fail (G_IS_OBJECT (target));
|
||||||
g_return_if_fail (callback != NULL);
|
g_return_if_fail (callback != NULL);
|
||||||
|
|
||||||
/* Make an atom. */
|
/* Make an atom. */
|
||||||
|
@ -79,7 +79,7 @@ nautilus_undo_register (GtkObject *target,
|
||||||
/* Register an undo action. */
|
/* Register an undo action. */
|
||||||
void
|
void
|
||||||
nautilus_undo_register_full (GList *atoms,
|
nautilus_undo_register_full (GList *atoms,
|
||||||
GtkObject *undo_manager_search_start_object,
|
GObject *undo_manager_search_start_object,
|
||||||
const char *operation_name,
|
const char *operation_name,
|
||||||
const char *undo_menu_item_label,
|
const char *undo_menu_item_label,
|
||||||
const char *undo_menu_item_hint,
|
const char *undo_menu_item_hint,
|
||||||
|
@ -90,7 +90,7 @@ nautilus_undo_register_full (GList *atoms,
|
||||||
GList *p;
|
GList *p;
|
||||||
|
|
||||||
g_return_if_fail (atoms != NULL);
|
g_return_if_fail (atoms != NULL);
|
||||||
g_return_if_fail (GTK_IS_OBJECT (undo_manager_search_start_object));
|
g_return_if_fail (G_IS_OBJECT (undo_manager_search_start_object));
|
||||||
|
|
||||||
/* Create an undo transaction */
|
/* Create an undo transaction */
|
||||||
transaction = nautilus_undo_transaction_new (operation_name,
|
transaction = nautilus_undo_transaction_new (operation_name,
|
||||||
|
@ -113,7 +113,7 @@ nautilus_undo_register_full (GList *atoms,
|
||||||
|
|
||||||
/* Cover for forgetting about all undo relating to a particular target. */
|
/* Cover for forgetting about all undo relating to a particular target. */
|
||||||
void
|
void
|
||||||
nautilus_undo_unregister (GtkObject *target)
|
nautilus_undo_unregister (GObject *target)
|
||||||
{
|
{
|
||||||
/* Perhaps this should also unregister all children if called on a
|
/* Perhaps this should also unregister all children if called on a
|
||||||
* GtkContainer? That might be handy.
|
* GtkContainer? That might be handy.
|
||||||
|
@ -122,12 +122,12 @@ nautilus_undo_unregister (GtkObject *target)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nautilus_undo (GtkObject *undo_manager_search_start_object)
|
nautilus_undo (GObject *undo_manager_search_start_object)
|
||||||
{
|
{
|
||||||
Nautilus_Undo_Manager manager;
|
Nautilus_Undo_Manager manager;
|
||||||
CORBA_Environment ev;
|
CORBA_Environment ev;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_OBJECT (undo_manager_search_start_object));
|
g_return_if_fail (G_IS_OBJECT (undo_manager_search_start_object));
|
||||||
|
|
||||||
CORBA_exception_init (&ev);
|
CORBA_exception_init (&ev);
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ nautilus_undo (GtkObject *undo_manager_search_start_object)
|
||||||
}
|
}
|
||||||
|
|
||||||
Nautilus_Undo_Manager
|
Nautilus_Undo_Manager
|
||||||
nautilus_undo_get_undo_manager (GtkObject *start_object)
|
nautilus_undo_get_undo_manager (GObject *start_object)
|
||||||
{
|
{
|
||||||
Nautilus_Undo_Manager manager;
|
Nautilus_Undo_Manager manager;
|
||||||
GtkWidget *parent;
|
GtkWidget *parent;
|
||||||
|
@ -150,10 +150,10 @@ nautilus_undo_get_undo_manager (GtkObject *start_object)
|
||||||
return CORBA_OBJECT_NIL;
|
return CORBA_OBJECT_NIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_OBJECT (start_object), NULL);
|
g_return_val_if_fail (G_IS_OBJECT (start_object), NULL);
|
||||||
|
|
||||||
/* Check for an undo manager right here. */
|
/* Check for an undo manager right here. */
|
||||||
manager = gtk_object_get_data (start_object, NAUTILUS_UNDO_MANAGER_DATA);
|
manager = g_object_get_data (start_object, NAUTILUS_UNDO_MANAGER_DATA);
|
||||||
if (manager != NULL) {
|
if (manager != NULL) {
|
||||||
return manager;
|
return manager;
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ nautilus_undo_get_undo_manager (GtkObject *start_object)
|
||||||
if (GTK_IS_WIDGET (start_object)) {
|
if (GTK_IS_WIDGET (start_object)) {
|
||||||
parent = GTK_WIDGET (start_object)->parent;
|
parent = GTK_WIDGET (start_object)->parent;
|
||||||
if (parent != NULL) {
|
if (parent != NULL) {
|
||||||
manager = nautilus_undo_get_undo_manager (GTK_OBJECT (parent));
|
manager = nautilus_undo_get_undo_manager (G_OBJECT (parent));
|
||||||
if (manager != NULL) {
|
if (manager != NULL) {
|
||||||
return manager;
|
return manager;
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ nautilus_undo_get_undo_manager (GtkObject *start_object)
|
||||||
if (GTK_IS_WINDOW (start_object)) {
|
if (GTK_IS_WINDOW (start_object)) {
|
||||||
transient_parent = GTK_WINDOW (start_object)->transient_parent;
|
transient_parent = GTK_WINDOW (start_object)->transient_parent;
|
||||||
if (transient_parent != NULL) {
|
if (transient_parent != NULL) {
|
||||||
manager = nautilus_undo_get_undo_manager (GTK_OBJECT (transient_parent));
|
manager = nautilus_undo_get_undo_manager (G_OBJECT (transient_parent));
|
||||||
if (manager != NULL) {
|
if (manager != NULL) {
|
||||||
return manager;
|
return manager;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ nautilus_undo_get_undo_manager (GtkObject *start_object)
|
||||||
|
|
||||||
/* In the case of a canvas item, try the canvas. */
|
/* In the case of a canvas item, try the canvas. */
|
||||||
if (GNOME_IS_CANVAS_ITEM (start_object)) {
|
if (GNOME_IS_CANVAS_ITEM (start_object)) {
|
||||||
manager = nautilus_undo_get_undo_manager (GTK_OBJECT (GNOME_CANVAS_ITEM (start_object)->canvas));
|
manager = nautilus_undo_get_undo_manager (G_OBJECT (GNOME_CANVAS_ITEM (start_object)->canvas));
|
||||||
if (manager != NULL) {
|
if (manager != NULL) {
|
||||||
return manager;
|
return manager;
|
||||||
}
|
}
|
||||||
|
@ -199,16 +199,16 @@ undo_manager_unref_cover (gpointer manager)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nautilus_undo_attach_undo_manager (GtkObject *object,
|
nautilus_undo_attach_undo_manager (GObject *object,
|
||||||
Nautilus_Undo_Manager manager)
|
Nautilus_Undo_Manager manager)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GTK_IS_OBJECT (object));
|
g_return_if_fail (G_IS_OBJECT (object));
|
||||||
|
|
||||||
if (manager == NULL) {
|
if (manager == NULL) {
|
||||||
gtk_object_remove_data (object, NAUTILUS_UNDO_MANAGER_DATA);
|
g_object_set_data (object, NAUTILUS_UNDO_MANAGER_DATA, NULL);
|
||||||
} else {
|
} else {
|
||||||
bonobo_object_dup_ref (manager, NULL);
|
bonobo_object_dup_ref (manager, NULL);
|
||||||
gtk_object_set_data_full
|
g_object_set_data_full
|
||||||
(object, NAUTILUS_UNDO_MANAGER_DATA,
|
(object, NAUTILUS_UNDO_MANAGER_DATA,
|
||||||
manager, undo_manager_unref_cover);
|
manager, undo_manager_unref_cover);
|
||||||
}
|
}
|
||||||
|
@ -216,8 +216,8 @@ nautilus_undo_attach_undo_manager (GtkObject *object,
|
||||||
|
|
||||||
/* Copy a reference to the undo manager fromone object to another. */
|
/* Copy a reference to the undo manager fromone object to another. */
|
||||||
void
|
void
|
||||||
nautilus_undo_share_undo_manager (GtkObject *destination_object,
|
nautilus_undo_share_undo_manager (GObject *destination_object,
|
||||||
GtkObject *source_object)
|
GObject *source_object)
|
||||||
{
|
{
|
||||||
Nautilus_Undo_Manager manager;
|
Nautilus_Undo_Manager manager;
|
||||||
CORBA_Environment ev;
|
CORBA_Environment ev;
|
||||||
|
@ -267,7 +267,7 @@ set_up_bonobo_control (BonoboControl *control)
|
||||||
|
|
||||||
/* Attach the undo manager to the widget, or detach the old one. */
|
/* Attach the undo manager to the widget, or detach the old one. */
|
||||||
widget = bonobo_control_get_widget (control);
|
widget = bonobo_control_get_widget (control);
|
||||||
nautilus_undo_attach_undo_manager (GTK_OBJECT (widget), manager);
|
nautilus_undo_attach_undo_manager (G_OBJECT (widget), manager);
|
||||||
CORBA_Object_release (manager, &ev);
|
CORBA_Object_release (manager, &ev);
|
||||||
|
|
||||||
CORBA_exception_free (&ev);
|
CORBA_exception_free (&ev);
|
||||||
|
@ -280,5 +280,5 @@ nautilus_undo_set_up_bonobo_control (BonoboControl *control)
|
||||||
|
|
||||||
set_up_bonobo_control (control);
|
set_up_bonobo_control (control);
|
||||||
g_signal_connect (G_OBJECT (control), "set_frame",
|
g_signal_connect (G_OBJECT (control), "set_frame",
|
||||||
GTK_SIGNAL_FUNC (set_up_bonobo_control), NULL);
|
G_CALLBACK (set_up_bonobo_control), NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,21 +29,21 @@
|
||||||
#include <bonobo/bonobo-control.h>
|
#include <bonobo/bonobo-control.h>
|
||||||
|
|
||||||
/* The basic undoable operation. */
|
/* The basic undoable operation. */
|
||||||
typedef void (* NautilusUndoCallback) (GtkObject *target, gpointer callback_data);
|
typedef void (* NautilusUndoCallback) (GObject *target, gpointer callback_data);
|
||||||
|
|
||||||
/* Recipe for undo of a bit of work on an object.
|
/* Recipe for undo of a bit of work on an object.
|
||||||
* Create these atoms when you want to register more
|
* Create these atoms when you want to register more
|
||||||
* than one as a single undoable operation.
|
* than one as a single undoable operation.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GtkObject *target;
|
GObject *target;
|
||||||
NautilusUndoCallback callback;
|
NautilusUndoCallback callback;
|
||||||
gpointer callback_data;
|
gpointer callback_data;
|
||||||
GDestroyNotify callback_data_destroy_notify;
|
GDestroyNotify callback_data_destroy_notify;
|
||||||
} NautilusUndoAtom;
|
} NautilusUndoAtom;
|
||||||
|
|
||||||
/* Registering something that can be undone. */
|
/* Registering something that can be undone. */
|
||||||
void nautilus_undo_register (GtkObject *target,
|
void nautilus_undo_register (GObject *target,
|
||||||
NautilusUndoCallback callback,
|
NautilusUndoCallback callback,
|
||||||
gpointer callback_data,
|
gpointer callback_data,
|
||||||
GDestroyNotify callback_data_destroy_notify,
|
GDestroyNotify callback_data_destroy_notify,
|
||||||
|
@ -53,22 +53,22 @@ void nautilus_undo_register (GtkObject *target,
|
||||||
const char *redo_menu_item_label,
|
const char *redo_menu_item_label,
|
||||||
const char *redo_menu_item_hint);
|
const char *redo_menu_item_hint);
|
||||||
void nautilus_undo_register_full (GList *atoms,
|
void nautilus_undo_register_full (GList *atoms,
|
||||||
GtkObject *undo_manager_search_start_object,
|
GObject *undo_manager_search_start_object,
|
||||||
const char *operation_name,
|
const char *operation_name,
|
||||||
const char *undo_menu_item_label,
|
const char *undo_menu_item_label,
|
||||||
const char *undo_menu_item_hint,
|
const char *undo_menu_item_hint,
|
||||||
const char *redo_menu_item_label,
|
const char *redo_menu_item_label,
|
||||||
const char *redo_menu_item_hint);
|
const char *redo_menu_item_hint);
|
||||||
void nautilus_undo_unregister (GtkObject *target);
|
void nautilus_undo_unregister (GObject *target);
|
||||||
|
|
||||||
/* Performing an undo explicitly. Only for use by objects "out in the field".
|
/* Performing an undo explicitly. Only for use by objects "out in the field".
|
||||||
* The menu bar itself uses a richer API in the undo manager.
|
* The menu bar itself uses a richer API in the undo manager.
|
||||||
*/
|
*/
|
||||||
void nautilus_undo (GtkObject *undo_manager_search_start_object);
|
void nautilus_undo (GObject *undo_manager_search_start_object);
|
||||||
|
|
||||||
/* Connecting an undo manager. */
|
/* Connecting an undo manager. */
|
||||||
void nautilus_undo_share_undo_manager (GtkObject *destination_object,
|
void nautilus_undo_share_undo_manager (GObject *destination_object,
|
||||||
GtkObject *source_object);
|
GObject *source_object);
|
||||||
void nautilus_undo_set_up_bonobo_control (BonoboControl *control);
|
void nautilus_undo_set_up_bonobo_control (BonoboControl *control);
|
||||||
|
|
||||||
#endif /* NAUTILUS_UNDO_H */
|
#endif /* NAUTILUS_UNDO_H */
|
||||||
|
|
|
@ -831,7 +831,7 @@ nautilus_view_class_init (NautilusViewClass *klass)
|
||||||
G_STRUCT_OFFSET (NautilusViewClass, selection_changed),
|
G_STRUCT_OFFSET (NautilusViewClass, selection_changed),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_NONE__POINTER,
|
gtk_marshal_NONE__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
signals[TITLE_CHANGED] =
|
signals[TITLE_CHANGED] =
|
||||||
g_signal_new ("title_changed",
|
g_signal_new ("title_changed",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
@ -847,7 +847,7 @@ nautilus_view_class_init (NautilusViewClass *klass)
|
||||||
G_STRUCT_OFFSET (NautilusViewClass, history_changed),
|
G_STRUCT_OFFSET (NautilusViewClass, history_changed),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_NONE__POINTER,
|
gtk_marshal_NONE__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
|
|
||||||
epv->load_location = impl_Nautilus_View_load_location;
|
epv->load_location = impl_Nautilus_View_load_location;
|
||||||
epv->stop_loading = impl_Nautilus_View_stop_loading;
|
epv->stop_loading = impl_Nautilus_View_stop_loading;
|
||||||
|
|
|
@ -534,7 +534,7 @@ delayed_init (FMDesktopIconView *desktop_icon_view)
|
||||||
g_signal_connect (G_OBJECT (fm_directory_view_get_model
|
g_signal_connect (G_OBJECT (fm_directory_view_get_model
|
||||||
(FM_DIRECTORY_VIEW (desktop_icon_view))),
|
(FM_DIRECTORY_VIEW (desktop_icon_view))),
|
||||||
"done_loading",
|
"done_loading",
|
||||||
GTK_SIGNAL_FUNC (done_loading), desktop_icon_view);
|
G_CALLBACK (done_loading), desktop_icon_view);
|
||||||
|
|
||||||
/* Monitor desktop directory. */
|
/* Monitor desktop directory. */
|
||||||
desktop_icon_view->details->reload_desktop_timeout =
|
desktop_icon_view->details->reload_desktop_timeout =
|
||||||
|
@ -572,7 +572,7 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view)
|
||||||
if (!nautilus_monitor_active ()) {
|
if (!nautilus_monitor_active ()) {
|
||||||
desktop_icon_view->details->delayed_init_signal = gtk_signal_connect
|
desktop_icon_view->details->delayed_init_signal = gtk_signal_connect
|
||||||
(GTK_OBJECT (desktop_icon_view), "begin_loading",
|
(GTK_OBJECT (desktop_icon_view), "begin_loading",
|
||||||
GTK_SIGNAL_FUNC (delayed_init), desktop_icon_view);
|
G_CALLBACK (delayed_init), desktop_icon_view);
|
||||||
}
|
}
|
||||||
|
|
||||||
nautilus_icon_container_set_is_fixed_size (icon_container, TRUE);
|
nautilus_icon_container_set_is_fixed_size (icon_container, TRUE);
|
||||||
|
@ -612,17 +612,17 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (icon_container),
|
g_signal_connect (G_OBJECT (icon_container),
|
||||||
"middle_click",
|
"middle_click",
|
||||||
GTK_SIGNAL_FUNC (fm_desktop_icon_view_handle_middle_click),
|
G_CALLBACK (fm_desktop_icon_view_handle_middle_click),
|
||||||
desktop_icon_view);
|
desktop_icon_view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (icon_container),
|
g_signal_connect (G_OBJECT (icon_container),
|
||||||
"compare_icons",
|
"compare_icons",
|
||||||
GTK_SIGNAL_FUNC (desktop_icons_compare_callback),
|
G_CALLBACK (desktop_icons_compare_callback),
|
||||||
desktop_icon_view);
|
desktop_icon_view);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (desktop_icon_view),
|
g_signal_connect (G_OBJECT (desktop_icon_view),
|
||||||
"event",
|
"event",
|
||||||
GTK_SIGNAL_FUNC (event_callback),
|
G_CALLBACK (event_callback),
|
||||||
desktop_icon_view);
|
desktop_icon_view);
|
||||||
|
|
||||||
gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_trash_monitor_get ()),
|
gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_trash_monitor_get ()),
|
||||||
|
@ -1061,7 +1061,7 @@ mount_parameters_new (FMDesktopIconView *view, const char *mount_path)
|
||||||
g_assert (!eel_str_is_empty (mount_path));
|
g_assert (!eel_str_is_empty (mount_path));
|
||||||
|
|
||||||
new_parameters = g_new (MountParameters, 1);
|
new_parameters = g_new (MountParameters, 1);
|
||||||
gtk_object_ref (GTK_OBJECT (view));
|
g_object_ref (G_OBJECT (view));
|
||||||
new_parameters->view = view;
|
new_parameters->view = view;
|
||||||
new_parameters->mount_path = g_strdup (mount_path);
|
new_parameters->mount_path = g_strdup (mount_path);
|
||||||
|
|
||||||
|
@ -1073,7 +1073,7 @@ mount_parameters_free (MountParameters *parameters)
|
||||||
{
|
{
|
||||||
g_assert (parameters != NULL);
|
g_assert (parameters != NULL);
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (parameters->view));
|
g_object_unref (G_OBJECT (parameters->view));
|
||||||
g_free (parameters->mount_path);
|
g_free (parameters->mount_path);
|
||||||
g_free (parameters);
|
g_free (parameters);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5710,7 +5710,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass)
|
||||||
G_STRUCT_OFFSET (FMDirectoryViewClass, load_error),
|
G_STRUCT_OFFSET (FMDirectoryViewClass, load_error),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__INT,
|
gtk_marshal_VOID__INT,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_INT);
|
G_TYPE_NONE, 1, G_TYPE_INT);
|
||||||
signals[REMOVE_FILE] =
|
signals[REMOVE_FILE] =
|
||||||
g_signal_new ("remove_file",
|
g_signal_new ("remove_file",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
|
|
@ -253,7 +253,7 @@ rename_callback (NautilusFile *file, GnomeVFSResult result, gpointer callback_da
|
||||||
|
|
||||||
g_assert (NAUTILUS_IS_FILE (file));
|
g_assert (NAUTILUS_IS_FILE (file));
|
||||||
g_assert (callback_data == NULL);
|
g_assert (callback_data == NULL);
|
||||||
name = gtk_object_get_data (GTK_OBJECT (file), NEW_NAME_TAG);
|
name = g_object_get_data (G_OBJECT (file), NEW_NAME_TAG);
|
||||||
g_assert (name != NULL);
|
g_assert (name != NULL);
|
||||||
|
|
||||||
/* If rename failed, notify the user. */
|
/* If rename failed, notify the user. */
|
||||||
|
@ -273,7 +273,7 @@ cancel_rename (NautilusFile *file)
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
name = gtk_object_get_data (GTK_OBJECT (file), NEW_NAME_TAG);
|
name = g_object_get_data (G_OBJECT (file), NEW_NAME_TAG);
|
||||||
if (name == NULL) {
|
if (name == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ cancel_rename (NautilusFile *file)
|
||||||
eel_timed_wait_stop (cancel_rename_callback, file);
|
eel_timed_wait_stop (cancel_rename_callback, file);
|
||||||
|
|
||||||
/* Let go of file name. */
|
/* Let go of file name. */
|
||||||
gtk_object_remove_data (GTK_OBJECT (file), NEW_NAME_TAG);
|
g_object_set_data (G_OBJECT (file), NEW_NAME_TAG, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -299,10 +299,10 @@ fm_rename_file (NautilusFile *file,
|
||||||
cancel_rename (file);
|
cancel_rename (file);
|
||||||
|
|
||||||
/* Attach the new name to the file. */
|
/* Attach the new name to the file. */
|
||||||
gtk_object_set_data_full (GTK_OBJECT (file),
|
g_object_set_data_full (G_OBJECT (file),
|
||||||
NEW_NAME_TAG,
|
NEW_NAME_TAG,
|
||||||
g_strdup (new_name),
|
g_strdup (new_name),
|
||||||
g_free);
|
g_free);
|
||||||
|
|
||||||
/* Start the timed wait to cancel the rename. */
|
/* Start the timed wait to cancel the rename. */
|
||||||
old_name = nautilus_file_get_display_name (file);
|
old_name = nautilus_file_get_display_name (file);
|
||||||
|
|
|
@ -2390,7 +2390,7 @@ fm_icon_view_update_icon_container_smooth_font (FMIconView *icon_view)
|
||||||
|
|
||||||
nautilus_icon_container_set_smooth_label_font (icon_container,
|
nautilus_icon_container_set_smooth_label_font (icon_container,
|
||||||
scalable_font);
|
scalable_font);
|
||||||
gtk_object_unref (GTK_OBJECT (scalable_font));
|
g_object_unref (G_OBJECT (scalable_font));
|
||||||
|
|
||||||
nautilus_icon_container_request_update_all (icon_container);
|
nautilus_icon_container_request_update_all (icon_container);
|
||||||
}
|
}
|
||||||
|
|
|
@ -392,10 +392,10 @@ fm_list_view_compare_rows (EelCList *clist,
|
||||||
file2 = (NautilusFile *) (row2->data);
|
file2 = (NautilusFile *) (row2->data);
|
||||||
|
|
||||||
if (file1 == NULL) {
|
if (file1 == NULL) {
|
||||||
file1 = gtk_object_get_data (GTK_OBJECT (clist), PENDING_USER_DATA_KEY);
|
file1 = g_object_get_data (G_OBJECT (clist), PENDING_USER_DATA_KEY);
|
||||||
}
|
}
|
||||||
if (file2 == NULL) {
|
if (file2 == NULL) {
|
||||||
file2 = gtk_object_get_data (GTK_OBJECT (clist), PENDING_USER_DATA_KEY);
|
file2 = g_object_get_data (G_OBJECT (clist), PENDING_USER_DATA_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
list_view = FM_LIST_VIEW (GTK_WIDGET (clist)->parent);
|
list_view = FM_LIST_VIEW (GTK_WIDGET (clist)->parent);
|
||||||
|
@ -506,7 +506,7 @@ select_matching_name_callback (GtkWidget *widget, const char *pattern, FMListVie
|
||||||
int array_row_index;
|
int array_row_index;
|
||||||
|
|
||||||
g_assert (EEL_IS_LIST (widget));
|
g_assert (EEL_IS_LIST (widget));
|
||||||
g_assert (gtk_object_get_data (GTK_OBJECT (widget), PENDING_USER_DATA_KEY) == NULL);
|
g_assert (g_object_get_data (G_OBJECT (widget), PENDING_USER_DATA_KEY) == NULL);
|
||||||
|
|
||||||
/* build an array of rows, sorted by name */
|
/* build an array of rows, sorted by name */
|
||||||
array = make_sorted_row_array (widget);
|
array = make_sorted_row_array (widget);
|
||||||
|
@ -535,7 +535,7 @@ select_previous_next_common (GtkWidget *widget, FMListView *list_view, gboolean
|
||||||
int last_selected_row;
|
int last_selected_row;
|
||||||
|
|
||||||
g_assert (EEL_IS_LIST (widget));
|
g_assert (EEL_IS_LIST (widget));
|
||||||
g_assert (gtk_object_get_data (GTK_OBJECT (widget), PENDING_USER_DATA_KEY) == NULL);
|
g_assert (g_object_get_data (G_OBJECT (widget), PENDING_USER_DATA_KEY) == NULL);
|
||||||
|
|
||||||
/* build an array of rows */
|
/* build an array of rows */
|
||||||
array = make_sorted_row_array (widget);
|
array = make_sorted_row_array (widget);
|
||||||
|
@ -1291,12 +1291,12 @@ add_to_list (FMListView *list_view, NautilusFile *file)
|
||||||
/* Temporarily set user data value as hack for the problem
|
/* Temporarily set user data value as hack for the problem
|
||||||
* that compare_rows is called before the row data can be set.
|
* that compare_rows is called before the row data can be set.
|
||||||
*/
|
*/
|
||||||
gtk_object_set_data (GTK_OBJECT (clist), PENDING_USER_DATA_KEY, file);
|
g_object_set_data (G_OBJECT (clist), PENDING_USER_DATA_KEY, file);
|
||||||
/* Note that since list is auto-sorted new_row isn't necessarily last row. */
|
/* Note that since list is auto-sorted new_row isn't necessarily last row. */
|
||||||
new_row = eel_clist_append (clist, text);
|
new_row = eel_clist_append (clist, text);
|
||||||
|
|
||||||
eel_clist_set_row_data (clist, new_row, file);
|
eel_clist_set_row_data (clist, new_row, file);
|
||||||
gtk_object_set_data (GTK_OBJECT (clist), PENDING_USER_DATA_KEY, NULL);
|
g_object_set_data (G_OBJECT (clist), PENDING_USER_DATA_KEY, NULL);
|
||||||
|
|
||||||
/* Mark one column as a link. */
|
/* Mark one column as a link. */
|
||||||
eel_list_mark_cell_as_link (list, new_row, get_link_column (list_view));
|
eel_list_mark_cell_as_link (list, new_row, get_link_column (list_view));
|
||||||
|
|
|
@ -259,7 +259,7 @@ update_properties_window_icon (EelImage *image)
|
||||||
|
|
||||||
g_assert (EEL_IS_IMAGE (image));
|
g_assert (EEL_IS_IMAGE (image));
|
||||||
|
|
||||||
file = gtk_object_get_data (GTK_OBJECT (image), "nautilus_file");
|
file = g_object_get_data (G_OBJECT (image), "nautilus_file");
|
||||||
|
|
||||||
g_assert (NAUTILUS_IS_FILE (file));
|
g_assert (NAUTILUS_IS_FILE (file));
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ update_properties_window_icon (EelImage *image)
|
||||||
|
|
||||||
eel_image_set_pixbuf (image, pixbuf);
|
eel_image_set_pixbuf (image, pixbuf);
|
||||||
|
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ uri_is_local_image (const char *uri)
|
||||||
if (pixbuf == NULL) {
|
if (pixbuf == NULL) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,18 +358,18 @@ create_image_widget_for_file (NautilusFile *file)
|
||||||
GDK_ACTION_COPY | GDK_ACTION_MOVE);
|
GDK_ACTION_COPY | GDK_ACTION_MOVE);
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT (image), "drag_data_received",
|
gtk_signal_connect( GTK_OBJECT (image), "drag_data_received",
|
||||||
GTK_SIGNAL_FUNC (fm_properties_window_drag_data_received), NULL);
|
G_CALLBACK (fm_properties_window_drag_data_received), NULL);
|
||||||
|
|
||||||
|
|
||||||
eel_image_set_pixbuf (EEL_IMAGE (image), pixbuf);
|
eel_image_set_pixbuf (EEL_IMAGE (image), pixbuf);
|
||||||
|
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
|
|
||||||
nautilus_file_ref (file);
|
nautilus_file_ref (file);
|
||||||
gtk_object_set_data_full (GTK_OBJECT (image),
|
g_object_set_data_full (G_OBJECT (image),
|
||||||
"nautilus_file",
|
"nautilus_file",
|
||||||
file,
|
file,
|
||||||
(GtkDestroyNotify) nautilus_file_unref);
|
(GtkDestroyNotify) nautilus_file_unref);
|
||||||
|
|
||||||
/* React to icon theme changes. */
|
/* React to icon theme changes. */
|
||||||
gtk_signal_connect_object_while_alive (nautilus_icon_factory_get (),
|
gtk_signal_connect_object_while_alive (nautilus_icon_factory_get (),
|
||||||
|
@ -392,7 +392,7 @@ name_field_update_to_match_file (NautilusEntry *name_field)
|
||||||
const char *original_name;
|
const char *original_name;
|
||||||
char *current_name, *displayed_name;
|
char *current_name, *displayed_name;
|
||||||
|
|
||||||
file = gtk_object_get_data (GTK_OBJECT (name_field), "nautilus_file");
|
file = g_object_get_data (G_OBJECT (name_field), "nautilus_file");
|
||||||
|
|
||||||
if (file == NULL || nautilus_file_is_gone (file)) {
|
if (file == NULL || nautilus_file_is_gone (file)) {
|
||||||
gtk_widget_set_sensitive (GTK_WIDGET (name_field), FALSE);
|
gtk_widget_set_sensitive (GTK_WIDGET (name_field), FALSE);
|
||||||
|
@ -400,7 +400,7 @@ name_field_update_to_match_file (NautilusEntry *name_field)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
original_name = (const char *) gtk_object_get_data (GTK_OBJECT (name_field),
|
original_name = (const char *) g_object_get_data (G_OBJECT (name_field),
|
||||||
"original_name");
|
"original_name");
|
||||||
|
|
||||||
/* If the file name has changed since the original name was stored,
|
/* If the file name has changed since the original name was stored,
|
||||||
|
@ -410,10 +410,10 @@ name_field_update_to_match_file (NautilusEntry *name_field)
|
||||||
*/
|
*/
|
||||||
current_name = nautilus_file_get_display_name (file);
|
current_name = nautilus_file_get_display_name (file);
|
||||||
if (eel_strcmp (original_name, current_name) != 0) {
|
if (eel_strcmp (original_name, current_name) != 0) {
|
||||||
gtk_object_set_data_full (GTK_OBJECT (name_field),
|
g_object_set_data_full (G_OBJECT (name_field),
|
||||||
"original_name",
|
"original_name",
|
||||||
current_name,
|
current_name,
|
||||||
g_free);
|
g_free);
|
||||||
|
|
||||||
/* Only reset the text if it's different from what is
|
/* Only reset the text if it's different from what is
|
||||||
* currently showing. This causes minimal ripples (e.g.
|
* currently showing. This causes minimal ripples (e.g.
|
||||||
|
@ -445,7 +445,7 @@ name_field_restore_original_name (NautilusEntry *name_field)
|
||||||
const char *original_name;
|
const char *original_name;
|
||||||
char *displayed_name;
|
char *displayed_name;
|
||||||
|
|
||||||
original_name = (const char *) gtk_object_get_data (GTK_OBJECT (name_field),
|
original_name = (const char *) g_object_get_data (G_OBJECT (name_field),
|
||||||
"original_name");
|
"original_name");
|
||||||
displayed_name = gtk_editable_get_chars (GTK_EDITABLE (name_field), 0, -1);
|
displayed_name = gtk_editable_get_chars (GTK_EDITABLE (name_field), 0, -1);
|
||||||
|
|
||||||
|
@ -478,7 +478,7 @@ rename_callback (NautilusFile *file, GnomeVFSResult result, gpointer callback_da
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (window));
|
g_object_unref (G_OBJECT (window));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -496,7 +496,7 @@ name_field_done_editing (NautilusEntry *name_field, FMPropertiesWindow *window)
|
||||||
|
|
||||||
g_assert (NAUTILUS_IS_ENTRY (name_field));
|
g_assert (NAUTILUS_IS_ENTRY (name_field));
|
||||||
|
|
||||||
file = gtk_object_get_data (GTK_OBJECT (name_field), "nautilus_file");
|
file = g_object_get_data (G_OBJECT (name_field), "nautilus_file");
|
||||||
|
|
||||||
g_assert (NAUTILUS_IS_FILE (file));
|
g_assert (NAUTILUS_IS_FILE (file));
|
||||||
|
|
||||||
|
@ -514,7 +514,7 @@ name_field_done_editing (NautilusEntry *name_field, FMPropertiesWindow *window)
|
||||||
name_field_restore_original_name (NAUTILUS_ENTRY (name_field));
|
name_field_restore_original_name (NAUTILUS_ENTRY (name_field));
|
||||||
} else {
|
} else {
|
||||||
set_pending_name (window, new_name);
|
set_pending_name (window, new_name);
|
||||||
gtk_object_ref (GTK_OBJECT (window));
|
g_object_ref (G_OBJECT (window));
|
||||||
nautilus_file_rename (file, new_name,
|
nautilus_file_rename (file, new_name,
|
||||||
rename_callback, window);
|
rename_callback, window);
|
||||||
}
|
}
|
||||||
|
@ -555,8 +555,8 @@ property_button_update (GtkToggleButton *button)
|
||||||
char *name;
|
char *name;
|
||||||
GList *keywords, *word;
|
GList *keywords, *word;
|
||||||
|
|
||||||
file = gtk_object_get_data (GTK_OBJECT (button), "nautilus_file");
|
file = g_object_get_data (G_OBJECT (button), "nautilus_file");
|
||||||
name = gtk_object_get_data (GTK_OBJECT (button), "nautilus_property_name");
|
name = g_object_get_data (G_OBJECT (button), "nautilus_property_name");
|
||||||
|
|
||||||
/* Handle the case where there's nothing to toggle. */
|
/* Handle the case where there's nothing to toggle. */
|
||||||
if (file == NULL || nautilus_file_is_gone (file) || name == NULL) {
|
if (file == NULL || nautilus_file_is_gone (file) || name == NULL) {
|
||||||
|
@ -578,8 +578,8 @@ property_button_toggled (GtkToggleButton *button)
|
||||||
char *name;
|
char *name;
|
||||||
GList *keywords, *word;
|
GList *keywords, *word;
|
||||||
|
|
||||||
file = gtk_object_get_data (GTK_OBJECT (button), "nautilus_file");
|
file = g_object_get_data (G_OBJECT (button), "nautilus_file");
|
||||||
name = gtk_object_get_data (GTK_OBJECT (button), "nautilus_property_name");
|
name = g_object_get_data (G_OBJECT (button), "nautilus_property_name");
|
||||||
|
|
||||||
/* Handle the case where there's nothing to toggle. */
|
/* Handle the case where there's nothing to toggle. */
|
||||||
if (file == NULL || nautilus_file_is_gone (file) || name == NULL) {
|
if (file == NULL || nautilus_file_is_gone (file) || name == NULL) {
|
||||||
|
@ -644,7 +644,7 @@ value_field_update_internal (GtkLabel *label,
|
||||||
g_assert (NAUTILUS_IS_FILE (file));
|
g_assert (NAUTILUS_IS_FILE (file));
|
||||||
g_assert (!ellipsize_text || EEL_IS_ELLIPSIZING_LABEL (label));
|
g_assert (!ellipsize_text || EEL_IS_ELLIPSIZING_LABEL (label));
|
||||||
|
|
||||||
attribute_name = gtk_object_get_data (GTK_OBJECT (label), "file_attribute");
|
attribute_name = g_object_get_data (G_OBJECT (label), "file_attribute");
|
||||||
attribute_value = nautilus_file_get_string_attribute_with_default (file, attribute_name);
|
attribute_value = nautilus_file_get_string_attribute_with_default (file, attribute_name);
|
||||||
|
|
||||||
if (ellipsize_text) {
|
if (ellipsize_text) {
|
||||||
|
@ -735,10 +735,10 @@ attach_value_field_internal (GtkTable *table,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stash a copy of the file attribute name in this field for the callback's sake. */
|
/* Stash a copy of the file attribute name in this field for the callback's sake. */
|
||||||
gtk_object_set_data_full (GTK_OBJECT (value_field),
|
g_object_set_data_full (G_OBJECT (value_field),
|
||||||
"file_attribute",
|
"file_attribute",
|
||||||
g_strdup (file_attribute_name),
|
g_strdup (file_attribute_name),
|
||||||
g_free);
|
g_free);
|
||||||
|
|
||||||
/* Fill in the value. */
|
/* Fill in the value. */
|
||||||
if (ellipsize_text) {
|
if (ellipsize_text) {
|
||||||
|
@ -1569,10 +1569,10 @@ create_basic_page (FMPropertiesWindow *window)
|
||||||
|
|
||||||
/* Attach parameters and signal handler. */
|
/* Attach parameters and signal handler. */
|
||||||
nautilus_file_ref (original_file);
|
nautilus_file_ref (original_file);
|
||||||
gtk_object_set_data_full (GTK_OBJECT (name_field),
|
g_object_set_data_full (G_OBJECT (name_field),
|
||||||
"nautilus_file",
|
"nautilus_file",
|
||||||
original_file,
|
original_file,
|
||||||
(GtkDestroyNotify) nautilus_file_unref);
|
(GtkDestroyNotify) nautilus_file_unref);
|
||||||
|
|
||||||
/* Update name field initially before hooking up changed signal. */
|
/* Update name field initially before hooking up changed signal. */
|
||||||
name_field_update_to_match_file (NAUTILUS_ENTRY (name_field));
|
name_field_update_to_match_file (NAUTILUS_ENTRY (name_field));
|
||||||
|
@ -1592,7 +1592,7 @@ create_basic_page (FMPropertiesWindow *window)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (name_field), "focus_out_event",
|
g_signal_connect (G_OBJECT (name_field), "focus_out_event",
|
||||||
GTK_SIGNAL_FUNC (name_field_focus_out),
|
G_CALLBACK (name_field_focus_out),
|
||||||
window);
|
window);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (name_field), "activate",
|
g_signal_connect (G_OBJECT (name_field), "activate",
|
||||||
|
@ -1646,13 +1646,13 @@ create_basic_page (FMPropertiesWindow *window)
|
||||||
gtk_widget_show (temp_button);
|
gtk_widget_show (temp_button);
|
||||||
gtk_box_pack_start (GTK_BOX (button_box), temp_button, FALSE, FALSE, 4);
|
gtk_box_pack_start (GTK_BOX (button_box), temp_button, FALSE, FALSE, 4);
|
||||||
|
|
||||||
gtk_signal_connect(GTK_OBJECT (temp_button), "clicked", GTK_SIGNAL_FUNC (select_image_button_callback), window);
|
gtk_signal_connect(GTK_OBJECT (temp_button), "clicked", G_CALLBACK (select_image_button_callback), window);
|
||||||
|
|
||||||
temp_button = gtk_button_new_with_mnemonic (_("_Remove Custom Icon"));
|
temp_button = gtk_button_new_with_mnemonic (_("_Remove Custom Icon"));
|
||||||
gtk_widget_show (temp_button);
|
gtk_widget_show (temp_button);
|
||||||
gtk_box_pack_start (GTK_BOX(button_box), temp_button, FALSE, FALSE, 4);
|
gtk_box_pack_start (GTK_BOX(button_box), temp_button, FALSE, FALSE, 4);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (temp_button), "clicked", GTK_SIGNAL_FUNC (remove_image_button_callback), window);
|
g_signal_connect (G_OBJECT (temp_button), "clicked", G_CALLBACK (remove_image_button_callback), window);
|
||||||
|
|
||||||
window->details->remove_image_button = temp_button;
|
window->details->remove_image_button = temp_button;
|
||||||
|
|
||||||
|
@ -1729,7 +1729,7 @@ create_emblems_page (FMPropertiesWindow *window)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp (emblem_name, "erase") == 0) {
|
if (strcmp (emblem_name, "erase") == 0) {
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
g_free (label);
|
g_free (label);
|
||||||
g_free (emblem_name);
|
g_free (emblem_name);
|
||||||
continue;
|
continue;
|
||||||
|
@ -1740,19 +1740,19 @@ create_emblems_page (FMPropertiesWindow *window)
|
||||||
eel_labeled_image_set_spacing (EEL_LABELED_IMAGE (GTK_BIN (button)->child), EMBLEM_LABEL_SPACING);
|
eel_labeled_image_set_spacing (EEL_LABELED_IMAGE (GTK_BIN (button)->child), EMBLEM_LABEL_SPACING);
|
||||||
|
|
||||||
g_free (label);
|
g_free (label);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
|
|
||||||
/* Attach parameters and signal handler. */
|
/* Attach parameters and signal handler. */
|
||||||
gtk_object_set_data_full (GTK_OBJECT (button),
|
g_object_set_data_full (G_OBJECT (button),
|
||||||
"nautilus_property_name",
|
"nautilus_property_name",
|
||||||
emblem_name,
|
emblem_name,
|
||||||
g_free);
|
g_free);
|
||||||
|
|
||||||
nautilus_file_ref (file);
|
nautilus_file_ref (file);
|
||||||
gtk_object_set_data_full (GTK_OBJECT (button),
|
g_object_set_data_full (G_OBJECT (button),
|
||||||
"nautilus_file",
|
"nautilus_file",
|
||||||
file,
|
file,
|
||||||
(GtkDestroyNotify) nautilus_file_unref);
|
(GtkDestroyNotify) nautilus_file_unref);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (button),
|
g_signal_connect (G_OBJECT (button),
|
||||||
"toggled",
|
"toggled",
|
||||||
|
@ -1810,9 +1810,9 @@ update_permissions_check_button_state (GtkWidget *check_button, NautilusFile *fi
|
||||||
|
|
||||||
g_assert (nautilus_file_can_get_permissions (file));
|
g_assert (nautilus_file_can_get_permissions (file));
|
||||||
|
|
||||||
toggled_signal_id = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (check_button),
|
toggled_signal_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (check_button),
|
||||||
"toggled_signal_id"));
|
"toggled_signal_id"));
|
||||||
permission = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (check_button),
|
permission = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (check_button),
|
||||||
"permission"));
|
"permission"));
|
||||||
g_assert (toggled_signal_id > 0);
|
g_assert (toggled_signal_id > 0);
|
||||||
g_assert (permission != 0);
|
g_assert (permission != 0);
|
||||||
|
@ -1851,7 +1851,7 @@ permissions_check_button_toggled (GtkToggleButton *toggle_button, gpointer user_
|
||||||
g_assert (nautilus_file_can_get_permissions (file));
|
g_assert (nautilus_file_can_get_permissions (file));
|
||||||
g_assert (nautilus_file_can_set_permissions (file));
|
g_assert (nautilus_file_can_set_permissions (file));
|
||||||
|
|
||||||
permission_mask = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (toggle_button),
|
permission_mask = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (toggle_button),
|
||||||
"permission"));
|
"permission"));
|
||||||
|
|
||||||
/* Modify the file's permissions according to the state of this check button. */
|
/* Modify the file's permissions according to the state of this check button. */
|
||||||
|
@ -1878,14 +1878,14 @@ set_up_permissions_checkbox (GtkWidget *check_button,
|
||||||
guint toggled_signal_id;
|
guint toggled_signal_id;
|
||||||
|
|
||||||
toggled_signal_id = g_signal_connect (G_OBJECT (check_button), "toggled",
|
toggled_signal_id = g_signal_connect (G_OBJECT (check_button), "toggled",
|
||||||
GTK_SIGNAL_FUNC (permissions_check_button_toggled),
|
G_CALLBACK (permissions_check_button_toggled),
|
||||||
file);
|
file);
|
||||||
|
|
||||||
/* Load up the check_button with data we'll need when updating its state. */
|
/* Load up the check_button with data we'll need when updating its state. */
|
||||||
gtk_object_set_data (GTK_OBJECT (check_button),
|
g_object_set_data (G_OBJECT (check_button),
|
||||||
"toggled_signal_id",
|
"toggled_signal_id",
|
||||||
GINT_TO_POINTER (toggled_signal_id));
|
GINT_TO_POINTER (toggled_signal_id));
|
||||||
gtk_object_set_data (GTK_OBJECT (check_button),
|
g_object_set_data (G_OBJECT (check_button),
|
||||||
"permission",
|
"permission",
|
||||||
GINT_TO_POINTER (permission));
|
GINT_TO_POINTER (permission));
|
||||||
|
|
||||||
|
|
|
@ -389,7 +389,7 @@ fm_search_list_view_init (gpointer object,
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (nautilus_view),
|
g_signal_connect (G_OBJECT (nautilus_view),
|
||||||
"load_location",
|
"load_location",
|
||||||
GTK_SIGNAL_FUNC (load_location_callback),
|
G_CALLBACK (load_location_callback),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ nautilus_about_destroy (GtkObject *object)
|
||||||
about = NAUTILUS_ABOUT (object);
|
about = NAUTILUS_ABOUT (object);
|
||||||
|
|
||||||
if (about->details->background_pixbuf != NULL) {
|
if (about->details->background_pixbuf != NULL) {
|
||||||
gdk_pixbuf_unref (about->details->background_pixbuf);
|
g_object_unref (G_OBJECT (about->details->background_pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_strfreev (about->details->authors);
|
g_strfreev (about->details->authors);
|
||||||
|
@ -178,7 +178,7 @@ nautilus_about_init (NautilusAbout *about)
|
||||||
gtk_signal_connect
|
gtk_signal_connect
|
||||||
(GTK_OBJECT (about),
|
(GTK_OBJECT (about),
|
||||||
"close",
|
"close",
|
||||||
GTK_SIGNAL_FUNC (nautilus_about_close),
|
G_CALLBACK (nautilus_about_close),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,8 +406,8 @@ nautilus_about_draw_info (NautilusAbout *about,
|
||||||
g_strfreev (comment_array);
|
g_strfreev (comment_array);
|
||||||
|
|
||||||
/* release the fonts */
|
/* release the fonts */
|
||||||
gtk_object_unref (GTK_OBJECT(plain_font));
|
g_object_unref (G_OBJECT(plain_font));
|
||||||
gtk_object_unref (GTK_OBJECT(bold_font));
|
g_object_unref (G_OBJECT(bold_font));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update authors is called to randomize the author array and redraw it */
|
/* update authors is called to randomize the author array and redraw it */
|
||||||
|
@ -435,7 +435,7 @@ nautilus_about_update_authors (NautilusAbout *about)
|
||||||
/* redraw the authors */
|
/* redraw the authors */
|
||||||
plain_font = eel_scalable_font_get_default_font ();
|
plain_font = eel_scalable_font_get_default_font ();
|
||||||
draw_author_list (about, about->details->background_pixbuf, plain_font);
|
draw_author_list (about, about->details->background_pixbuf, plain_font);
|
||||||
gtk_object_unref (GTK_OBJECT(plain_font));
|
g_object_unref (G_OBJECT(plain_font));
|
||||||
|
|
||||||
about->details->last_update_time = time (NULL);
|
about->details->last_update_time = time (NULL);
|
||||||
|
|
||||||
|
|
|
@ -284,7 +284,7 @@ nautilus_bookmark_list_delete_item_at (NautilusBookmarkList *bookmarks,
|
||||||
|
|
||||||
g_assert (NAUTILUS_IS_BOOKMARK (doomed->data));
|
g_assert (NAUTILUS_IS_BOOKMARK (doomed->data));
|
||||||
stop_monitoring_bookmark (bookmarks, NAUTILUS_BOOKMARK (doomed->data));
|
stop_monitoring_bookmark (bookmarks, NAUTILUS_BOOKMARK (doomed->data));
|
||||||
gtk_object_unref (GTK_OBJECT (doomed->data));
|
g_object_unref (G_OBJECT (doomed->data));
|
||||||
|
|
||||||
g_list_free_1 (doomed);
|
g_list_free_1 (doomed);
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ nautilus_bookmark_list_delete_items_with_uri (NautilusBookmarkList *bookmarks,
|
||||||
if (eel_strcmp (bookmark_uri, uri) == 0) {
|
if (eel_strcmp (bookmark_uri, uri) == 0) {
|
||||||
bookmarks->list = g_list_remove_link (bookmarks->list, node);
|
bookmarks->list = g_list_remove_link (bookmarks->list, node);
|
||||||
stop_monitoring_bookmark (bookmarks, NAUTILUS_BOOKMARK (node->data));
|
stop_monitoring_bookmark (bookmarks, NAUTILUS_BOOKMARK (node->data));
|
||||||
gtk_object_unref (GTK_OBJECT (node->data));
|
g_object_unref (G_OBJECT (node->data));
|
||||||
g_list_free_1 (node);
|
g_list_free_1 (node);
|
||||||
list_changed = TRUE;
|
list_changed = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -469,7 +469,7 @@ nautilus_bookmark_list_new (void)
|
||||||
NautilusBookmarkList *list;
|
NautilusBookmarkList *list;
|
||||||
|
|
||||||
list = NAUTILUS_BOOKMARK_LIST (g_object_new (NAUTILUS_TYPE_BOOKMARK_LIST, NULL));
|
list = NAUTILUS_BOOKMARK_LIST (g_object_new (NAUTILUS_TYPE_BOOKMARK_LIST, NULL));
|
||||||
gtk_object_ref (GTK_OBJECT (list));
|
g_object_ref (G_OBJECT (list));
|
||||||
gtk_object_sink (GTK_OBJECT (list));
|
gtk_object_sink (GTK_OBJECT (list));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -106,7 +106,7 @@ static void set_up_close_accelerator (GtkWidget *window);
|
||||||
* Return value: A pointer to the new window.
|
* Return value: A pointer to the new window.
|
||||||
**/
|
**/
|
||||||
GtkWindow *
|
GtkWindow *
|
||||||
create_bookmarks_window (NautilusBookmarkList *list, GtkObject *undo_manager_source)
|
create_bookmarks_window (NautilusBookmarkList *list, GObject *undo_manager_source)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *content_area;
|
GtkWidget *content_area;
|
||||||
|
@ -125,7 +125,7 @@ create_bookmarks_window (NautilusBookmarkList *list, GtkObject *undo_manager_sou
|
||||||
gnome_dialog_set_close (GNOME_DIALOG (window), TRUE);
|
gnome_dialog_set_close (GNOME_DIALOG (window), TRUE);
|
||||||
|
|
||||||
set_up_close_accelerator (window);
|
set_up_close_accelerator (window);
|
||||||
nautilus_undo_share_undo_manager (GTK_OBJECT (window), undo_manager_source);
|
nautilus_undo_share_undo_manager (G_OBJECT (window), undo_manager_source);
|
||||||
gtk_window_set_wmclass (GTK_WINDOW (window), "bookmarks", "Nautilus");
|
gtk_window_set_wmclass (GTK_WINDOW (window), "bookmarks", "Nautilus");
|
||||||
gtk_widget_set_usize (window,
|
gtk_widget_set_usize (window,
|
||||||
BOOKMARKS_WINDOW_MIN_WIDTH,
|
BOOKMARKS_WINDOW_MIN_WIDTH,
|
||||||
|
@ -437,7 +437,7 @@ on_row_move (GtkCList *clist,
|
||||||
gtk_signal_handler_unblock(GTK_OBJECT(bookmarks),
|
gtk_signal_handler_unblock(GTK_OBJECT(bookmarks),
|
||||||
bookmark_list_changed_signalID);
|
bookmark_list_changed_signalID);
|
||||||
|
|
||||||
gtk_object_unref(GTK_OBJECT(bookmark));
|
g_object_unref (G_OBJECT (bookmark));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -495,7 +495,7 @@ update_bookmark_from_text ()
|
||||||
gtk_signal_handler_unblock (GTK_OBJECT (bookmarks),
|
gtk_signal_handler_unblock (GTK_OBJECT (bookmarks),
|
||||||
bookmark_list_changed_signalID);
|
bookmark_list_changed_signalID);
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (bookmark));
|
g_object_unref (G_OBJECT (bookmark));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -566,8 +566,8 @@ on_window_hide_event (GtkWidget *widget,
|
||||||
nautilus_bookmarks_window_save_geometry (GTK_WINDOW (widget));
|
nautilus_bookmarks_window_save_geometry (GTK_WINDOW (widget));
|
||||||
|
|
||||||
/* Disable undo for entry widgets */
|
/* Disable undo for entry widgets */
|
||||||
nautilus_undo_unregister (GTK_OBJECT (name_field));
|
nautilus_undo_unregister (G_OBJECT (name_field));
|
||||||
nautilus_undo_unregister (GTK_OBJECT (uri_field));
|
nautilus_undo_unregister (G_OBJECT (uri_field));
|
||||||
|
|
||||||
/* restore_geometry only works after window is hidden */
|
/* restore_geometry only works after window is hidden */
|
||||||
gtk_idle_add (restore_geometry, widget);
|
gtk_idle_add (restore_geometry, widget);
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include "nautilus-bookmark-list.h"
|
#include "nautilus-bookmark-list.h"
|
||||||
|
|
||||||
GtkWindow *create_bookmarks_window (NautilusBookmarkList *bookmarks,
|
GtkWindow *create_bookmarks_window (NautilusBookmarkList *bookmarks,
|
||||||
GtkObject *undo_manager_source);
|
GObject *undo_manager_source);
|
||||||
void nautilus_bookmarks_window_save_geometry (GtkWindow *window);
|
void nautilus_bookmarks_window_save_geometry (GtkWindow *window);
|
||||||
|
|
||||||
#endif /* NAUTILUS_BOOKMARKS_WINDOW_H */
|
#endif /* NAUTILUS_BOOKMARKS_WINDOW_H */
|
||||||
|
|
|
@ -62,39 +62,30 @@ struct NautilusComplexSearchBarDetails {
|
||||||
GSList *search_criteria;
|
GSList *search_criteria;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void real_activate (NautilusNavigationBar *bar);
|
static void nautilus_complex_search_bar_class_init (NautilusComplexSearchBarClass *class);
|
||||||
static char *nautilus_complex_search_bar_get_location (NautilusNavigationBar *bar);
|
static void nautilus_complex_search_bar_init (NautilusComplexSearchBar *bar);
|
||||||
static void nautilus_complex_search_bar_set_location (NautilusNavigationBar *bar,
|
static void attach_criterion_to_search_bar (NautilusComplexSearchBar *bar,
|
||||||
const char *location);
|
NautilusSearchBarCriterion *criterion,
|
||||||
static void nautilus_complex_search_bar_class_init (NautilusComplexSearchBarClass *class);
|
int position);
|
||||||
static void nautilus_complex_search_bar_init (NautilusComplexSearchBar *bar);
|
static void unattach_criterion_from_search_bar (NautilusComplexSearchBar *bar,
|
||||||
static void nautilus_complex_search_bar_destroy (GtkObject *object);
|
NautilusSearchBarCriterion *criterion);
|
||||||
static void attach_criterion_to_search_bar (NautilusComplexSearchBar *bar,
|
static void more_options_callback (GtkObject *object,
|
||||||
NautilusSearchBarCriterion *criterion,
|
gpointer data);
|
||||||
int position);
|
static void fewer_options_callback (GtkObject *object,
|
||||||
|
gpointer data);
|
||||||
static void unattach_criterion_from_search_bar (NautilusComplexSearchBar *bar,
|
static GtkWidget *load_find_them_pixmap_widget (void);
|
||||||
NautilusSearchBarCriterion *criterion);
|
static void update_options_buttons_state (NautilusComplexSearchBar *bar);
|
||||||
static void more_options_callback (GtkObject *object,
|
static void update_find_button_state (NautilusComplexSearchBar *bar);
|
||||||
gpointer data);
|
static void update_dynamic_buttons_state (NautilusComplexSearchBar *bar);
|
||||||
static void fewer_options_callback (GtkObject *object,
|
static void update_criteria_choices (gpointer list_item,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void search_bar_criterion_type_changed_callback (GtkObject *old_criterion_object,
|
|
||||||
gpointer data);
|
|
||||||
static GtkWidget * load_find_them_pixmap_widget (void);
|
|
||||||
|
|
||||||
static void update_options_buttons_state (NautilusComplexSearchBar *bar);
|
|
||||||
static void update_find_button_state (NautilusComplexSearchBar *bar);
|
|
||||||
static void update_dynamic_buttons_state (NautilusComplexSearchBar *bar);
|
|
||||||
static void update_criteria_choices (gpointer list_item,
|
|
||||||
gpointer data);
|
|
||||||
|
|
||||||
EEL_CLASS_BOILERPLATE (NautilusComplexSearchBar, nautilus_complex_search_bar, NAUTILUS_TYPE_SEARCH_BAR)
|
EEL_CLASS_BOILERPLATE (NautilusComplexSearchBar, nautilus_complex_search_bar, NAUTILUS_TYPE_SEARCH_BAR)
|
||||||
|
|
||||||
/* called by the criterion when the user chooses
|
/* called by the criterion when the user chooses
|
||||||
a new criterion type */
|
a new criterion type */
|
||||||
static void
|
static void
|
||||||
search_bar_criterion_type_changed_callback (GtkObject *old_criterion_object,
|
search_bar_criterion_type_changed_callback (GObject *old_criterion_object,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
NautilusSearchBarCriterionType new_type;
|
NautilusSearchBarCriterionType new_type;
|
||||||
|
@ -109,8 +100,7 @@ search_bar_criterion_type_changed_callback (GtkObject *old_criterion_object,
|
||||||
bar = NAUTILUS_COMPLEX_SEARCH_BAR (data);
|
bar = NAUTILUS_COMPLEX_SEARCH_BAR (data);
|
||||||
|
|
||||||
/* First create the new criterion with the type that was activated */
|
/* First create the new criterion with the type that was activated */
|
||||||
new_type = GPOINTER_TO_INT (gtk_object_get_data (old_criterion_object,
|
new_type = GPOINTER_TO_INT (g_object_get_data (old_criterion_object, "type"));
|
||||||
"type"));
|
|
||||||
new_criterion = nautilus_search_bar_criterion_new_with_type (new_type,
|
new_criterion = nautilus_search_bar_criterion_new_with_type (new_type,
|
||||||
bar);
|
bar);
|
||||||
g_signal_connect (G_OBJECT (new_criterion),
|
g_signal_connect (G_OBJECT (new_criterion),
|
||||||
|
@ -166,22 +156,6 @@ queue_search_bar_resize_callback (GtkObject *search_bar,
|
||||||
nautilus_complex_search_bar_queue_resize (bar);
|
nautilus_complex_search_bar_queue_resize (bar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_complex_search_bar_class_init (NautilusComplexSearchBarClass *klass)
|
|
||||||
{
|
|
||||||
GtkObjectClass *object_class;
|
|
||||||
NautilusNavigationBarClass *navigation_bar_class;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
|
||||||
object_class->destroy = nautilus_complex_search_bar_destroy;
|
|
||||||
|
|
||||||
navigation_bar_class = NAUTILUS_NAVIGATION_BAR_CLASS (klass);
|
|
||||||
navigation_bar_class->activate = real_activate;
|
|
||||||
navigation_bar_class->get_location = nautilus_complex_search_bar_get_location;
|
|
||||||
navigation_bar_class->set_location = nautilus_complex_search_bar_set_location;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_complex_search_bar_init (NautilusComplexSearchBar *bar)
|
nautilus_complex_search_bar_init (NautilusComplexSearchBar *bar)
|
||||||
|
@ -459,7 +433,7 @@ load_find_them_pixmap_widget (void)
|
||||||
pixbuf = gdk_pixbuf_new_from_file (NAUTILUS_PIXMAPDIR "/search.png", NULL);
|
pixbuf = gdk_pixbuf_new_from_file (NAUTILUS_PIXMAPDIR "/search.png", NULL);
|
||||||
if (pixbuf != NULL) {
|
if (pixbuf != NULL) {
|
||||||
gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, EEL_STANDARD_ALPHA_THRESHHOLD);
|
gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, EEL_STANDARD_ALPHA_THRESHHOLD);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
widget = gtk_pixmap_new (pixmap, mask);
|
widget = gtk_pixmap_new (pixmap, mask);
|
||||||
|
|
||||||
gdk_pixmap_unref (pixmap);
|
gdk_pixmap_unref (pixmap);
|
||||||
|
@ -481,7 +455,7 @@ nautilus_complex_search_bar_new (NautilusWindow *window)
|
||||||
g_return_val_if_fail (NAUTILUS_IS_WINDOW (window), NULL);
|
g_return_val_if_fail (NAUTILUS_IS_WINDOW (window), NULL);
|
||||||
|
|
||||||
bar = gtk_widget_new (NAUTILUS_TYPE_COMPLEX_SEARCH_BAR, NULL);
|
bar = gtk_widget_new (NAUTILUS_TYPE_COMPLEX_SEARCH_BAR, NULL);
|
||||||
gtk_object_set_data (GTK_OBJECT (bar), "associated_window", window);
|
g_object_set_data (G_OBJECT (bar), "associated_window", window);
|
||||||
|
|
||||||
/* Set up the first criterion's entry for the clipboard */
|
/* Set up the first criterion's entry for the clipboard */
|
||||||
first_criterion = NAUTILUS_COMPLEX_SEARCH_BAR (bar)->details->search_criteria->data;
|
first_criterion = NAUTILUS_COMPLEX_SEARCH_BAR (bar)->details->search_criteria->data;
|
||||||
|
@ -502,7 +476,7 @@ nautilus_complex_search_bar_set_up_enclosed_entry_for_clipboard (NautilusComplex
|
||||||
{
|
{
|
||||||
NautilusWindow *associated_window;
|
NautilusWindow *associated_window;
|
||||||
|
|
||||||
associated_window = gtk_object_get_data (GTK_OBJECT (bar),
|
associated_window = g_object_get_data (G_OBJECT (bar),
|
||||||
"associated_window");
|
"associated_window");
|
||||||
|
|
||||||
g_assert (associated_window != NULL);
|
g_assert (associated_window != NULL);
|
||||||
|
@ -648,3 +622,19 @@ nautilus_complex_search_bar_get_search_criteria (NautilusComplexSearchBar *bar)
|
||||||
{
|
{
|
||||||
return bar->details->search_criteria;
|
return bar->details->search_criteria;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
nautilus_complex_search_bar_class_init (NautilusComplexSearchBarClass *klass)
|
||||||
|
{
|
||||||
|
GtkObjectClass *object_class;
|
||||||
|
NautilusNavigationBarClass *navigation_bar_class;
|
||||||
|
|
||||||
|
object_class = GTK_OBJECT_CLASS (klass);
|
||||||
|
object_class->destroy = nautilus_complex_search_bar_destroy;
|
||||||
|
|
||||||
|
navigation_bar_class = NAUTILUS_NAVIGATION_BAR_CLASS (klass);
|
||||||
|
navigation_bar_class->activate = real_activate;
|
||||||
|
navigation_bar_class->get_location = nautilus_complex_search_bar_get_location;
|
||||||
|
navigation_bar_class->set_location = nautilus_complex_search_bar_set_location;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ static void
|
||||||
component_adapter_factory_at_exit_destructor (void)
|
component_adapter_factory_at_exit_destructor (void)
|
||||||
{
|
{
|
||||||
if (global_component_adapter_factory != NULL) {
|
if (global_component_adapter_factory != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (global_component_adapter_factory));
|
g_object_unref (G_OBJECT (global_component_adapter_factory));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ nautilus_component_adapter_factory_get (void)
|
||||||
factory = NAUTILUS_COMPONENT_ADAPTER_FACTORY
|
factory = NAUTILUS_COMPONENT_ADAPTER_FACTORY
|
||||||
(g_object_new (NAUTILUS_TYPE_COMPONENT_ADAPTER_FACTORY, NULL));
|
(g_object_new (NAUTILUS_TYPE_COMPONENT_ADAPTER_FACTORY, NULL));
|
||||||
|
|
||||||
gtk_object_ref (GTK_OBJECT (factory));
|
g_object_ref (G_OBJECT (factory));
|
||||||
gtk_object_sink (GTK_OBJECT (factory));
|
gtk_object_sink (GTK_OBJECT (factory));
|
||||||
|
|
||||||
global_component_adapter_factory = factory;
|
global_component_adapter_factory = factory;
|
||||||
|
|
|
@ -134,8 +134,8 @@ nautilus_desktop_window_new (NautilusApplication *application)
|
||||||
/* Special sawmill setting*/
|
/* Special sawmill setting*/
|
||||||
gtk_window_set_wmclass (GTK_WINDOW (window), "desktop_window", "Nautilus");
|
gtk_window_set_wmclass (GTK_WINDOW (window), "desktop_window", "Nautilus");
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (window), "realize", GTK_SIGNAL_FUNC (nautilus_desktop_window_realized), NULL);
|
g_signal_connect (G_OBJECT (window), "realize", G_CALLBACK (nautilus_desktop_window_realized), NULL);
|
||||||
g_signal_connect (G_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (nautilus_desktop_window_delete_event), NULL);
|
g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (nautilus_desktop_window_delete_event), NULL);
|
||||||
|
|
||||||
/* Point window at the desktop folder.
|
/* Point window at the desktop folder.
|
||||||
* Note that nautilus_desktop_window_init is too early to do this.
|
* Note that nautilus_desktop_window_init is too early to do this.
|
||||||
|
|
|
@ -277,7 +277,7 @@ nautilus_sidebar_init (GtkObject *object)
|
||||||
|
|
||||||
/* allocate and install the panel tabs */
|
/* allocate and install the panel tabs */
|
||||||
sidebar->details->notebook = GTK_NOTEBOOK (gtk_notebook_new ());
|
sidebar->details->notebook = GTK_NOTEBOOK (gtk_notebook_new ());
|
||||||
gtk_object_ref (GTK_OBJECT (sidebar->details->notebook));
|
g_object_ref (G_OBJECT (sidebar->details->notebook));
|
||||||
gtk_object_sink (GTK_OBJECT (sidebar->details->notebook));
|
gtk_object_sink (GTK_OBJECT (sidebar->details->notebook));
|
||||||
|
|
||||||
gtk_notebook_set_show_tabs (sidebar->details->notebook, FALSE);
|
gtk_notebook_set_show_tabs (sidebar->details->notebook, FALSE);
|
||||||
|
@ -305,7 +305,7 @@ nautilus_sidebar_destroy (GtkObject *object)
|
||||||
|
|
||||||
sidebar = NAUTILUS_SIDEBAR (object);
|
sidebar = NAUTILUS_SIDEBAR (object);
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (sidebar->details->notebook));
|
g_object_unref (G_OBJECT (sidebar->details->notebook));
|
||||||
|
|
||||||
if (sidebar->details->file != NULL) {
|
if (sidebar->details->file != NULL) {
|
||||||
gtk_signal_disconnect (GTK_OBJECT (sidebar->details->file),
|
gtk_signal_disconnect (GTK_OBJECT (sidebar->details->file),
|
||||||
|
@ -416,9 +416,9 @@ toggle_sidebar_panel (GtkWidget *widget,
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_CHECK_MENU_ITEM (widget));
|
g_return_if_fail (GTK_IS_CHECK_MENU_ITEM (widget));
|
||||||
g_return_if_fail (NAUTILUS_IS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (widget))));
|
g_return_if_fail (NAUTILUS_IS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (widget))));
|
||||||
g_return_if_fail (gtk_object_get_data (GTK_OBJECT (widget), "nautilus-sidebar/preference-key") != NULL);
|
g_return_if_fail (g_object_get_data (G_OBJECT (widget), "nautilus-sidebar/preference-key") != NULL);
|
||||||
|
|
||||||
preference_key = gtk_object_get_data (GTK_OBJECT (widget), "nautilus-sidebar/preference-key");
|
preference_key = g_object_get_data (G_OBJECT (widget), "nautilus-sidebar/preference-key");
|
||||||
|
|
||||||
sidebar = NAUTILUS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (widget)));
|
sidebar = NAUTILUS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (widget)));
|
||||||
|
|
||||||
|
@ -481,17 +481,17 @@ sidebar_for_each_sidebar_panel (const char *name,
|
||||||
gtk_menu_append (data->menu, menu_item);
|
gtk_menu_append (data->menu, menu_item);
|
||||||
gtk_signal_connect_full (GTK_OBJECT (menu_item),
|
gtk_signal_connect_full (GTK_OBJECT (menu_item),
|
||||||
"activate",
|
"activate",
|
||||||
GTK_SIGNAL_FUNC (toggle_sidebar_panel),
|
G_CALLBACK (toggle_sidebar_panel),
|
||||||
NULL,
|
NULL,
|
||||||
g_strdup (iid),
|
g_strdup (iid),
|
||||||
g_free,
|
g_free,
|
||||||
FALSE,
|
FALSE,
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
gtk_object_set_data_full (GTK_OBJECT (menu_item),
|
g_object_set_data_full (G_OBJECT (menu_item),
|
||||||
"nautilus-sidebar/preference-key",
|
"nautilus-sidebar/preference-key",
|
||||||
g_strdup (preference_key),
|
g_strdup (preference_key),
|
||||||
g_free);
|
g_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* utility routine to add a menu item for each potential sidebar panel */
|
/* utility routine to add a menu item for each potential sidebar panel */
|
||||||
|
@ -682,7 +682,7 @@ uri_is_local_image (const char *uri)
|
||||||
if (pixbuf == NULL) {
|
if (pixbuf == NULL) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1377,7 +1377,7 @@ add_command_buttons (NautilusSidebar *sidebar, GList *application_list)
|
||||||
|
|
||||||
eel_gtk_signal_connect_free_data
|
eel_gtk_signal_connect_free_data
|
||||||
(GTK_OBJECT (temp_button), "clicked",
|
(GTK_OBJECT (temp_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC (command_button_callback), id_string);
|
G_CALLBACK (command_button_callback), id_string);
|
||||||
|
|
||||||
gtk_object_set_user_data (GTK_OBJECT (temp_button), sidebar);
|
gtk_object_set_user_data (GTK_OBJECT (temp_button), sidebar);
|
||||||
|
|
||||||
|
@ -1431,7 +1431,7 @@ add_buttons_from_metadata (NautilusSidebar *sidebar, const char *button_data)
|
||||||
|
|
||||||
eel_gtk_signal_connect_free_data
|
eel_gtk_signal_connect_free_data
|
||||||
(GTK_OBJECT (temp_button), "clicked",
|
(GTK_OBJECT (temp_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC (metadata_button_callback), command_string);
|
G_CALLBACK (metadata_button_callback), command_string);
|
||||||
gtk_object_set_user_data (GTK_OBJECT (temp_button), sidebar);
|
gtk_object_set_user_data (GTK_OBJECT (temp_button), sidebar);
|
||||||
|
|
||||||
gtk_widget_show (temp_button);
|
gtk_widget_show (temp_button);
|
||||||
|
@ -1503,7 +1503,7 @@ nautilus_sidebar_update_buttons (NautilusSidebar *sidebar)
|
||||||
sidebar->details->has_buttons = TRUE;
|
sidebar->details->has_buttons = TRUE;
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (temp_button), "clicked",
|
g_signal_connect (G_OBJECT (temp_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC (empty_trash_callback), NULL);
|
G_CALLBACK (empty_trash_callback), NULL);
|
||||||
|
|
||||||
gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_trash_monitor_get ()),
|
gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_trash_monitor_get ()),
|
||||||
"trash_state_changed",
|
"trash_state_changed",
|
||||||
|
|
|
@ -62,8 +62,8 @@ link_set_check_box_toggled (GtkToggleButton *button, GtkWindow *window_to_update
|
||||||
{
|
{
|
||||||
char *path, *name;
|
char *path, *name;
|
||||||
|
|
||||||
path = gtk_object_get_data (GTK_OBJECT (button), "nautilus_directory_path");
|
path = g_object_get_data (G_OBJECT (button), "nautilus_directory_path");
|
||||||
name = gtk_object_get_data (GTK_OBJECT (button), "nautilus_link_set_name");
|
name = g_object_get_data (G_OBJECT (button), "nautilus_link_set_name");
|
||||||
|
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)))
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)))
|
||||||
nautilus_link_set_install(path, name);
|
nautilus_link_set_install(path, name);
|
||||||
|
@ -99,15 +99,15 @@ make_link_set_check_box(const char *directory_path, GtkWidget *checkbox_table,
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox), nautilus_link_set_is_installed(directory_path, name));
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox), nautilus_link_set_is_installed(directory_path, name));
|
||||||
|
|
||||||
/* Attach the parameters and a signal handler. */
|
/* Attach the parameters and a signal handler. */
|
||||||
gtk_object_set_data_full (GTK_OBJECT (checkbox),
|
g_object_set_data_full (G_OBJECT (checkbox),
|
||||||
"nautilus_directory_path",
|
"nautilus_directory_path",
|
||||||
g_strdup (directory_path),
|
g_strdup (directory_path),
|
||||||
g_free);
|
g_free);
|
||||||
|
|
||||||
gtk_object_set_data_full (GTK_OBJECT (checkbox),
|
g_object_set_data_full (G_OBJECT (checkbox),
|
||||||
"nautilus_link_set_name",
|
"nautilus_link_set_name",
|
||||||
g_strdup(name),
|
g_strdup(name),
|
||||||
g_free);
|
g_free);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (checkbox),
|
g_signal_connect (G_OBJECT (checkbox),
|
||||||
"toggled",
|
"toggled",
|
||||||
|
@ -260,7 +260,7 @@ nautilus_link_set_toggle_configure_window (const char *directory_path, GtkWindow
|
||||||
window_to_update);
|
window_to_update);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (link_set_window), "delete_event",
|
g_signal_connect (G_OBJECT (link_set_window), "delete_event",
|
||||||
GTK_SIGNAL_FUNC (delete_window_callback), NULL);
|
G_CALLBACK (delete_window_callback), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return link_set_window;
|
return link_set_window;
|
||||||
|
|
|
@ -679,7 +679,7 @@ nautilus_location_bar_init (NautilusLocationBar *bar)
|
||||||
drag_types, G_N_ELEMENTS (drag_types),
|
drag_types, G_N_ELEMENTS (drag_types),
|
||||||
GDK_ACTION_LINK);
|
GDK_ACTION_LINK);
|
||||||
gtk_signal_connect (GTK_OBJECT (event_box), "drag_data_get",
|
gtk_signal_connect (GTK_OBJECT (event_box), "drag_data_get",
|
||||||
GTK_SIGNAL_FUNC (drag_data_get_callback),
|
G_CALLBACK (drag_data_get_callback),
|
||||||
bar);
|
bar);
|
||||||
|
|
||||||
/* Drag dest. */
|
/* Drag dest. */
|
||||||
|
@ -688,7 +688,7 @@ nautilus_location_bar_init (NautilusLocationBar *bar)
|
||||||
drop_types, G_N_ELEMENTS (drop_types),
|
drop_types, G_N_ELEMENTS (drop_types),
|
||||||
GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK);
|
GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK);
|
||||||
g_signal_connect (G_OBJECT (bar), "drag_data_received",
|
g_signal_connect (G_OBJECT (bar), "drag_data_received",
|
||||||
GTK_SIGNAL_FUNC (drag_data_received_callback),
|
G_CALLBACK (drag_data_received_callback),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
gtk_widget_show_all (hbox);
|
gtk_widget_show_all (hbox);
|
||||||
|
|
|
@ -152,7 +152,7 @@ bookmark_holder_new (NautilusBookmark *bookmark,
|
||||||
/* Ref the bookmark because it might be unreffed away while
|
/* Ref the bookmark because it might be unreffed away while
|
||||||
* we're holding onto it (not an issue for window).
|
* we're holding onto it (not an issue for window).
|
||||||
*/
|
*/
|
||||||
gtk_object_ref (GTK_OBJECT (bookmark));
|
g_object_ref (G_OBJECT (bookmark));
|
||||||
new_bookmark_holder->prompt_for_removal = is_bookmarks_menu;
|
new_bookmark_holder->prompt_for_removal = is_bookmarks_menu;
|
||||||
|
|
||||||
new_bookmark_holder->changed_handler_id =
|
new_bookmark_holder->changed_handler_id =
|
||||||
|
@ -170,7 +170,7 @@ bookmark_holder_free (BookmarkHolder *bookmark_holder)
|
||||||
{
|
{
|
||||||
gtk_signal_disconnect (GTK_OBJECT (bookmark_holder->bookmark),
|
gtk_signal_disconnect (GTK_OBJECT (bookmark_holder->bookmark),
|
||||||
bookmark_holder->changed_handler_id);
|
bookmark_holder->changed_handler_id);
|
||||||
gtk_object_unref (GTK_OBJECT (bookmark_holder->bookmark));
|
g_object_unref (G_OBJECT (bookmark_holder->bookmark));
|
||||||
g_free (bookmark_holder);
|
g_free (bookmark_holder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -889,7 +889,7 @@ append_bookmark_to_menu (NautilusWindow *window,
|
||||||
index_in_parent,
|
index_in_parent,
|
||||||
display_name,
|
display_name,
|
||||||
pixbuf);
|
pixbuf);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
g_free (display_name);
|
g_free (display_name);
|
||||||
|
|
||||||
/* Add the status tip */
|
/* Add the status tip */
|
||||||
|
@ -1002,7 +1002,7 @@ create_menu_item_from_node (NautilusWindow *window,
|
||||||
if (strcmp (node->name, "bookmark") == 0) {
|
if (strcmp (node->name, "bookmark") == 0) {
|
||||||
bookmark = nautilus_bookmark_new_from_node (node);
|
bookmark = nautilus_bookmark_new_from_node (node);
|
||||||
append_bookmark_to_menu (window, bookmark, menu_path, index, TRUE);
|
append_bookmark_to_menu (window, bookmark, menu_path, index, TRUE);
|
||||||
gtk_object_unref (GTK_OBJECT (bookmark));
|
g_object_unref (G_OBJECT (bookmark));
|
||||||
} else if (strcmp (node->name, "separator") == 0) {
|
} else if (strcmp (node->name, "separator") == 0) {
|
||||||
append_separator (window, menu_path);
|
append_separator (window, menu_path);
|
||||||
} else if (strcmp (node->name, "folder") == 0) {
|
} else if (strcmp (node->name, "folder") == 0) {
|
||||||
|
@ -1061,7 +1061,7 @@ static NautilusBookmarkList *bookmarks = NULL;
|
||||||
static void
|
static void
|
||||||
free_bookmark_list (void)
|
free_bookmark_list (void)
|
||||||
{
|
{
|
||||||
gtk_object_unref (GTK_OBJECT (bookmarks));
|
g_object_unref (G_OBJECT (bookmarks));
|
||||||
}
|
}
|
||||||
|
|
||||||
static NautilusBookmarkList *
|
static NautilusBookmarkList *
|
||||||
|
@ -1076,7 +1076,7 @@ get_bookmark_list (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkWindow *
|
static GtkWindow *
|
||||||
get_or_create_bookmarks_window (GtkObject *undo_manager_source)
|
get_or_create_bookmarks_window (GObject *undo_manager_source)
|
||||||
{
|
{
|
||||||
if (bookmarks_window == NULL) {
|
if (bookmarks_window == NULL) {
|
||||||
bookmarks_window = create_bookmarks_window (get_bookmark_list(), undo_manager_source);
|
bookmarks_window = create_bookmarks_window (get_bookmark_list(), undo_manager_source);
|
||||||
|
@ -1116,7 +1116,7 @@ static void
|
||||||
edit_bookmarks (NautilusWindow *window)
|
edit_bookmarks (NautilusWindow *window)
|
||||||
{
|
{
|
||||||
eel_gtk_window_present
|
eel_gtk_window_present
|
||||||
(get_or_create_bookmarks_window (GTK_OBJECT (window)));
|
(get_or_create_bookmarks_window (G_OBJECT (window)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -187,7 +187,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
|
||||||
gdk_pixbuf_render_pixmap_and_mask
|
gdk_pixbuf_render_pixmap_and_mask
|
||||||
(pixbuf, &mini_icon_pixmap, &mini_icon_mask,
|
(pixbuf, &mini_icon_pixmap, &mini_icon_mask,
|
||||||
EEL_STANDARD_ALPHA_THRESHHOLD);
|
EEL_STANDARD_ALPHA_THRESHHOLD);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
g_atexit (unref_mini_icon);
|
g_atexit (unref_mini_icon);
|
||||||
}
|
}
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
@ -916,10 +916,10 @@ nautilus_window_destroy (GtkObject *object)
|
||||||
nautilus_window_clear_forward_list (window);
|
nautilus_window_clear_forward_list (window);
|
||||||
|
|
||||||
if (window->current_location_bookmark != NULL) {
|
if (window->current_location_bookmark != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (window->current_location_bookmark));
|
g_object_unref (G_OBJECT (window->current_location_bookmark));
|
||||||
}
|
}
|
||||||
if (window->last_location_bookmark != NULL) {
|
if (window->last_location_bookmark != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (window->last_location_bookmark));
|
g_object_unref (G_OBJECT (window->last_location_bookmark));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->status_bar_clear_id != 0) {
|
if (window->status_bar_clear_id != 0) {
|
||||||
|
@ -1124,10 +1124,10 @@ view_as_menu_switch_views_callback (GtkWidget *widget, gpointer data)
|
||||||
|
|
||||||
window = NAUTILUS_WINDOW (data);
|
window = NAUTILUS_WINDOW (data);
|
||||||
|
|
||||||
if (GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), "extra viewer")) == TRUE) {
|
if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "extra viewer")) == TRUE) {
|
||||||
activate_extra_viewer (window);
|
activate_extra_viewer (window);
|
||||||
} else {
|
} else {
|
||||||
viewer_index = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), "viewer index"));
|
viewer_index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "viewer index"));
|
||||||
activate_nth_short_list_item (window, viewer_index);
|
activate_nth_short_list_item (window, viewer_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1149,7 +1149,7 @@ create_view_as_menu_item (NautilusWindow *window,
|
||||||
G_CALLBACK (view_as_menu_switch_views_callback),
|
G_CALLBACK (view_as_menu_switch_views_callback),
|
||||||
window);
|
window);
|
||||||
|
|
||||||
gtk_object_set_data (GTK_OBJECT (menu_item),
|
g_object_set_data (G_OBJECT (menu_item),
|
||||||
"viewer index",
|
"viewer index",
|
||||||
GINT_TO_POINTER (index));
|
GINT_TO_POINTER (index));
|
||||||
|
|
||||||
|
@ -1255,7 +1255,7 @@ update_extra_viewer_in_view_as_menus (NautilusWindow *window,
|
||||||
/* Add new menu item. */
|
/* Add new menu item. */
|
||||||
if (id != NULL) {
|
if (id != NULL) {
|
||||||
new_menu_item = create_view_as_menu_item (window, window->details->extra_viewer, 0);
|
new_menu_item = create_view_as_menu_item (window, window->details->extra_viewer, 0);
|
||||||
gtk_object_set_data (GTK_OBJECT (new_menu_item), "extra viewer", GINT_TO_POINTER (TRUE));
|
g_object_set_data (G_OBJECT (new_menu_item), "extra viewer", GINT_TO_POINTER (TRUE));
|
||||||
gtk_menu_prepend (GTK_MENU (menu), new_menu_item);
|
gtk_menu_prepend (GTK_MENU (menu), new_menu_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1766,7 +1766,7 @@ remove_from_history_list (NautilusBookmark *bookmark)
|
||||||
/* Remove any older entry for this same item. There can be at most 1. */
|
/* Remove any older entry for this same item. There can be at most 1. */
|
||||||
if (node != NULL) {
|
if (node != NULL) {
|
||||||
history_list = g_list_remove_link (history_list, node);
|
history_list = g_list_remove_link (history_list, node);
|
||||||
gtk_object_unref (node->data);
|
g_object_unref (G_OBJECT (node->data));
|
||||||
g_list_free_1 (node);
|
g_list_free_1 (node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1788,7 +1788,7 @@ add_to_history_list (NautilusBookmark *bookmark)
|
||||||
free_history_list_is_set_up = TRUE;
|
free_history_list_is_set_up = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_object_ref (GTK_OBJECT (bookmark));
|
g_object_ref (G_OBJECT (bookmark));
|
||||||
remove_from_history_list (bookmark);
|
remove_from_history_list (bookmark);
|
||||||
history_list = g_list_prepend (history_list, bookmark);
|
history_list = g_list_prepend (history_list, bookmark);
|
||||||
|
|
||||||
|
@ -1796,7 +1796,7 @@ add_to_history_list (NautilusBookmark *bookmark)
|
||||||
if (extra_count > 0) {
|
if (extra_count > 0) {
|
||||||
history_list = g_list_reverse (history_list);
|
history_list = g_list_reverse (history_list);
|
||||||
for (index = 0; index < extra_count; ++index) {
|
for (index = 0; index < extra_count; ++index) {
|
||||||
gtk_object_unref (history_list->data);
|
g_object_unref (G_OBJECT (history_list->data));
|
||||||
history_list = g_list_remove (history_list, history_list->data);
|
history_list = g_list_remove (history_list, history_list->data);
|
||||||
}
|
}
|
||||||
history_list = g_list_reverse (history_list);
|
history_list = g_list_reverse (history_list);
|
||||||
|
@ -1812,7 +1812,7 @@ nautilus_remove_from_history_list_no_notify (const char *uri)
|
||||||
|
|
||||||
bookmark = nautilus_bookmark_new (uri, "");
|
bookmark = nautilus_bookmark_new (uri, "");
|
||||||
remove_from_history_list (bookmark);
|
remove_from_history_list (bookmark);
|
||||||
gtk_object_unref (GTK_OBJECT (bookmark));
|
g_object_unref (G_OBJECT (bookmark));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -187,7 +187,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
|
||||||
gdk_pixbuf_render_pixmap_and_mask
|
gdk_pixbuf_render_pixmap_and_mask
|
||||||
(pixbuf, &mini_icon_pixmap, &mini_icon_mask,
|
(pixbuf, &mini_icon_pixmap, &mini_icon_mask,
|
||||||
EEL_STANDARD_ALPHA_THRESHHOLD);
|
EEL_STANDARD_ALPHA_THRESHHOLD);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
g_atexit (unref_mini_icon);
|
g_atexit (unref_mini_icon);
|
||||||
}
|
}
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
@ -916,10 +916,10 @@ nautilus_window_destroy (GtkObject *object)
|
||||||
nautilus_window_clear_forward_list (window);
|
nautilus_window_clear_forward_list (window);
|
||||||
|
|
||||||
if (window->current_location_bookmark != NULL) {
|
if (window->current_location_bookmark != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (window->current_location_bookmark));
|
g_object_unref (G_OBJECT (window->current_location_bookmark));
|
||||||
}
|
}
|
||||||
if (window->last_location_bookmark != NULL) {
|
if (window->last_location_bookmark != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (window->last_location_bookmark));
|
g_object_unref (G_OBJECT (window->last_location_bookmark));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->status_bar_clear_id != 0) {
|
if (window->status_bar_clear_id != 0) {
|
||||||
|
@ -1124,10 +1124,10 @@ view_as_menu_switch_views_callback (GtkWidget *widget, gpointer data)
|
||||||
|
|
||||||
window = NAUTILUS_WINDOW (data);
|
window = NAUTILUS_WINDOW (data);
|
||||||
|
|
||||||
if (GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), "extra viewer")) == TRUE) {
|
if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "extra viewer")) == TRUE) {
|
||||||
activate_extra_viewer (window);
|
activate_extra_viewer (window);
|
||||||
} else {
|
} else {
|
||||||
viewer_index = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), "viewer index"));
|
viewer_index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "viewer index"));
|
||||||
activate_nth_short_list_item (window, viewer_index);
|
activate_nth_short_list_item (window, viewer_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1149,7 +1149,7 @@ create_view_as_menu_item (NautilusWindow *window,
|
||||||
G_CALLBACK (view_as_menu_switch_views_callback),
|
G_CALLBACK (view_as_menu_switch_views_callback),
|
||||||
window);
|
window);
|
||||||
|
|
||||||
gtk_object_set_data (GTK_OBJECT (menu_item),
|
g_object_set_data (G_OBJECT (menu_item),
|
||||||
"viewer index",
|
"viewer index",
|
||||||
GINT_TO_POINTER (index));
|
GINT_TO_POINTER (index));
|
||||||
|
|
||||||
|
@ -1255,7 +1255,7 @@ update_extra_viewer_in_view_as_menus (NautilusWindow *window,
|
||||||
/* Add new menu item. */
|
/* Add new menu item. */
|
||||||
if (id != NULL) {
|
if (id != NULL) {
|
||||||
new_menu_item = create_view_as_menu_item (window, window->details->extra_viewer, 0);
|
new_menu_item = create_view_as_menu_item (window, window->details->extra_viewer, 0);
|
||||||
gtk_object_set_data (GTK_OBJECT (new_menu_item), "extra viewer", GINT_TO_POINTER (TRUE));
|
g_object_set_data (G_OBJECT (new_menu_item), "extra viewer", GINT_TO_POINTER (TRUE));
|
||||||
gtk_menu_prepend (GTK_MENU (menu), new_menu_item);
|
gtk_menu_prepend (GTK_MENU (menu), new_menu_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1766,7 +1766,7 @@ remove_from_history_list (NautilusBookmark *bookmark)
|
||||||
/* Remove any older entry for this same item. There can be at most 1. */
|
/* Remove any older entry for this same item. There can be at most 1. */
|
||||||
if (node != NULL) {
|
if (node != NULL) {
|
||||||
history_list = g_list_remove_link (history_list, node);
|
history_list = g_list_remove_link (history_list, node);
|
||||||
gtk_object_unref (node->data);
|
g_object_unref (G_OBJECT (node->data));
|
||||||
g_list_free_1 (node);
|
g_list_free_1 (node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1788,7 +1788,7 @@ add_to_history_list (NautilusBookmark *bookmark)
|
||||||
free_history_list_is_set_up = TRUE;
|
free_history_list_is_set_up = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_object_ref (GTK_OBJECT (bookmark));
|
g_object_ref (G_OBJECT (bookmark));
|
||||||
remove_from_history_list (bookmark);
|
remove_from_history_list (bookmark);
|
||||||
history_list = g_list_prepend (history_list, bookmark);
|
history_list = g_list_prepend (history_list, bookmark);
|
||||||
|
|
||||||
|
@ -1796,7 +1796,7 @@ add_to_history_list (NautilusBookmark *bookmark)
|
||||||
if (extra_count > 0) {
|
if (extra_count > 0) {
|
||||||
history_list = g_list_reverse (history_list);
|
history_list = g_list_reverse (history_list);
|
||||||
for (index = 0; index < extra_count; ++index) {
|
for (index = 0; index < extra_count; ++index) {
|
||||||
gtk_object_unref (history_list->data);
|
g_object_unref (G_OBJECT (history_list->data));
|
||||||
history_list = g_list_remove (history_list, history_list->data);
|
history_list = g_list_remove (history_list, history_list->data);
|
||||||
}
|
}
|
||||||
history_list = g_list_reverse (history_list);
|
history_list = g_list_reverse (history_list);
|
||||||
|
@ -1812,7 +1812,7 @@ nautilus_remove_from_history_list_no_notify (const char *uri)
|
||||||
|
|
||||||
bookmark = nautilus_bookmark_new (uri, "");
|
bookmark = nautilus_bookmark_new (uri, "");
|
||||||
remove_from_history_list (bookmark);
|
remove_from_history_list (bookmark);
|
||||||
gtk_object_unref (GTK_OBJECT (bookmark));
|
g_object_unref (G_OBJECT (bookmark));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -450,12 +450,12 @@ preferences_dialog_create (void)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (dialog),
|
g_signal_connect (G_OBJECT (dialog),
|
||||||
"response",
|
"response",
|
||||||
GTK_SIGNAL_FUNC (dialog_button_response_callback),
|
G_CALLBACK (dialog_button_response_callback),
|
||||||
dialog);
|
dialog);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (dialog),
|
g_signal_connect (G_OBJECT (dialog),
|
||||||
"close",
|
"close",
|
||||||
GTK_SIGNAL_FUNC (dialog_close_callback),
|
G_CALLBACK (dialog_close_callback),
|
||||||
NULL);
|
NULL);
|
||||||
return dialog;
|
return dialog;
|
||||||
}
|
}
|
||||||
|
@ -556,7 +556,7 @@ preferences_dialog_populate_themes_group (EelPreferencesGroup *group)
|
||||||
/* Keep track of theme chooser changes */
|
/* Keep track of theme chooser changes */
|
||||||
g_signal_connect (G_OBJECT (child),
|
g_signal_connect (G_OBJECT (child),
|
||||||
"theme_changed",
|
"theme_changed",
|
||||||
GTK_SIGNAL_FUNC (theme_changed_callback),
|
G_CALLBACK (theme_changed_callback),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* Have the custom preferences item tell us when its time to update the displayed
|
/* Have the custom preferences item tell us when its time to update the displayed
|
||||||
|
@ -564,7 +564,7 @@ preferences_dialog_populate_themes_group (EelPreferencesGroup *group)
|
||||||
*/
|
*/
|
||||||
g_signal_connect (G_OBJECT (item),
|
g_signal_connect (G_OBJECT (item),
|
||||||
"custom_update_displayed_value",
|
"custom_update_displayed_value",
|
||||||
GTK_SIGNAL_FUNC (update_theme_selector_displayed_value_callback),
|
G_CALLBACK (update_theme_selector_displayed_value_callback),
|
||||||
child);
|
child);
|
||||||
update_theme_selector_displayed_value_callback (EEL_PREFERENCES_ITEM (item), child);
|
update_theme_selector_displayed_value_callback (EEL_PREFERENCES_ITEM (item), child);
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,7 @@ dump_dialog_new (const char *title)
|
||||||
(GTK_WINDOW (dump_dialog->window));
|
(GTK_WINDOW (dump_dialog->window));
|
||||||
g_signal_connect (G_OBJECT (dump_dialog->window),
|
g_signal_connect (G_OBJECT (dump_dialog->window),
|
||||||
"delete_event",
|
"delete_event",
|
||||||
GTK_SIGNAL_FUNC (window_delete_event),
|
G_CALLBACK (window_delete_event),
|
||||||
dump_dialog->window);
|
dump_dialog->window);
|
||||||
|
|
||||||
gtk_widget_set_usize (dump_dialog->window, 700, 700);
|
gtk_widget_set_usize (dump_dialog->window, 700, 700);
|
||||||
|
@ -203,12 +203,12 @@ dump_dialog_new (const char *title)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (print_button),
|
g_signal_connect (G_OBJECT (print_button),
|
||||||
"clicked",
|
"clicked",
|
||||||
GTK_SIGNAL_FUNC (window_print_button_callback),
|
G_CALLBACK (window_print_button_callback),
|
||||||
dump_dialog);
|
dump_dialog);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (save_button),
|
g_signal_connect (G_OBJECT (save_button),
|
||||||
"clicked",
|
"clicked",
|
||||||
GTK_SIGNAL_FUNC (window_save_button_callback),
|
G_CALLBACK (window_save_button_callback),
|
||||||
dump_dialog);
|
dump_dialog);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (dump_dialog->window), main_box);
|
gtk_container_add (GTK_CONTAINER (dump_dialog->window), main_box);
|
||||||
|
|
|
@ -445,7 +445,7 @@ nautilus_property_browser_destroy (GtkObject *object)
|
||||||
eel_g_list_free_deep (property_browser->details->keywords);
|
eel_g_list_free_deep (property_browser->details->keywords);
|
||||||
|
|
||||||
if (property_browser->details->property_chit) {
|
if (property_browser->details->property_chit) {
|
||||||
gdk_pixbuf_unref (property_browser->details->property_chit);
|
g_object_unref (G_OBJECT (property_browser->details->property_chit));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (property_browser->details);
|
g_free (property_browser->details);
|
||||||
|
@ -671,7 +671,7 @@ make_drag_image (NautilusPropertyBrowser *property_browser, const char* file_nam
|
||||||
pixbuf = nautilus_customization_make_pattern_chit (orig_pixbuf, property_browser->details->property_chit, TRUE, is_reset);
|
pixbuf = nautilus_customization_make_pattern_chit (orig_pixbuf, property_browser->details->property_chit, TRUE, is_reset);
|
||||||
} else {
|
} else {
|
||||||
pixbuf = eel_gdk_pixbuf_scale_down_to_fit (orig_pixbuf, MAX_ICON_WIDTH, MAX_ICON_HEIGHT);
|
pixbuf = eel_gdk_pixbuf_scale_down_to_fit (orig_pixbuf, MAX_ICON_WIDTH, MAX_ICON_HEIGHT);
|
||||||
gdk_pixbuf_unref (orig_pixbuf);
|
g_object_unref (G_OBJECT (orig_pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (image_file_name);
|
g_free (image_file_name);
|
||||||
|
@ -1481,9 +1481,9 @@ element_clicked_callback (GtkWidget *image_table,
|
||||||
g_return_if_fail (EEL_IS_LABELED_IMAGE (child));
|
g_return_if_fail (EEL_IS_LABELED_IMAGE (child));
|
||||||
g_return_if_fail (event != NULL);
|
g_return_if_fail (event != NULL);
|
||||||
g_return_if_fail (NAUTILUS_IS_PROPERTY_BROWSER (callback_data));
|
g_return_if_fail (NAUTILUS_IS_PROPERTY_BROWSER (callback_data));
|
||||||
g_return_if_fail (gtk_object_get_data (GTK_OBJECT (child), "property-name") != NULL);
|
g_return_if_fail (g_object_get_data (G_OBJECT (child), "property-name") != NULL);
|
||||||
|
|
||||||
element_name = gtk_object_get_data (GTK_OBJECT (child), "property-name");
|
element_name = g_object_get_data (G_OBJECT (child), "property-name");
|
||||||
property_browser = NAUTILUS_PROPERTY_BROWSER (callback_data);
|
property_browser = NAUTILUS_PROPERTY_BROWSER (callback_data);
|
||||||
|
|
||||||
/* handle remove mode by removing the element */
|
/* handle remove mode by removing the element */
|
||||||
|
@ -1540,7 +1540,7 @@ element_clicked_callback (GtkWidget *image_table,
|
||||||
&mask_for_dragged_file,
|
&mask_for_dragged_file,
|
||||||
EEL_STANDARD_ALPHA_THRESHHOLD);
|
EEL_STANDARD_ALPHA_THRESHHOLD);
|
||||||
|
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
gtk_drag_set_icon_pixmap
|
gtk_drag_set_icon_pixmap
|
||||||
(context,
|
(context,
|
||||||
gtk_widget_get_colormap (GTK_WIDGET (property_browser)),
|
gtk_widget_get_colormap (GTK_WIDGET (property_browser)),
|
||||||
|
@ -1608,10 +1608,10 @@ labeled_image_new (const char *text,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (property_name != NULL) {
|
if (property_name != NULL) {
|
||||||
gtk_object_set_data_full (GTK_OBJECT (labeled_image),
|
g_object_set_data_full (G_OBJECT (labeled_image),
|
||||||
"property-name",
|
"property-name",
|
||||||
g_strdup (property_name),
|
g_strdup (property_name),
|
||||||
(GtkDestroyNotify) g_free);
|
g_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
return labeled_image;
|
return labeled_image;
|
||||||
|
@ -1692,7 +1692,7 @@ make_properties_from_directories (NautilusPropertyBrowser *property_browser)
|
||||||
|
|
||||||
g_free (object_name);
|
g_free (object_name);
|
||||||
g_free (object_label);
|
g_free (object_label);
|
||||||
gdk_pixbuf_unref (object_pixbuf);
|
g_object_unref (G_OBJECT (object_pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1799,7 +1799,7 @@ make_properties_from_xml_node (NautilusPropertyBrowser *property_browser,
|
||||||
gtk_container_add (GTK_CONTAINER (property_browser->details->content_table), new_property);
|
gtk_container_add (GTK_CONTAINER (property_browser->details->content_table), new_property);
|
||||||
gtk_widget_show (new_property);
|
gtk_widget_show (new_property);
|
||||||
|
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
xmlFree (color);
|
xmlFree (color);
|
||||||
xmlFree (name);
|
xmlFree (name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -316,7 +316,7 @@ nautilus_search_bar_criterion_new_from_values (NautilusSearchBarCriterionType ty
|
||||||
item = gtk_menu_item_new_with_label (context_stripped_criteria_title);
|
item = gtk_menu_item_new_with_label (context_stripped_criteria_title);
|
||||||
g_free (context_stripped_criteria_title);
|
g_free (context_stripped_criteria_title);
|
||||||
|
|
||||||
gtk_object_set_data (GTK_OBJECT(item), "type", GINT_TO_POINTER(i));
|
g_object_set_data (G_OBJECT(item), "type", GINT_TO_POINTER(i));
|
||||||
g_signal_connect (G_OBJECT (item),
|
g_signal_connect (G_OBJECT (item),
|
||||||
"activate",
|
"activate",
|
||||||
G_CALLBACK (criterion_type_changed_callback),
|
G_CALLBACK (criterion_type_changed_callback),
|
||||||
|
@ -350,7 +350,7 @@ nautilus_search_bar_criterion_new_from_values (NautilusSearchBarCriterionType ty
|
||||||
g_free (context_stripped_relation);
|
g_free (context_stripped_relation);
|
||||||
}
|
}
|
||||||
gtk_widget_show (item);
|
gtk_widget_show (item);
|
||||||
gtk_object_set_data (GTK_OBJECT(item), "type", GINT_TO_POINTER(i));
|
g_object_set_data (G_OBJECT(item), "type", GINT_TO_POINTER(i));
|
||||||
/* Callback to desensitize the date widget for menu items that
|
/* Callback to desensitize the date widget for menu items that
|
||||||
don't need a date, like "yesterday" */
|
don't need a date, like "yesterday" */
|
||||||
if (details->type == NAUTILUS_DATE_MODIFIED_SEARCH_CRITERION) {
|
if (details->type == NAUTILUS_DATE_MODIFIED_SEARCH_CRITERION) {
|
||||||
|
@ -405,7 +405,7 @@ nautilus_search_bar_criterion_new_from_values (NautilusSearchBarCriterionType ty
|
||||||
item = gtk_menu_item_new_with_label (context_stripped_value);
|
item = gtk_menu_item_new_with_label (context_stripped_value);
|
||||||
g_free (context_stripped_value);
|
g_free (context_stripped_value);
|
||||||
gtk_widget_show (item);
|
gtk_widget_show (item);
|
||||||
gtk_object_set_data (GTK_OBJECT(item), "type", GINT_TO_POINTER(i));
|
g_object_set_data (G_OBJECT(item), "type", GINT_TO_POINTER(i));
|
||||||
gtk_menu_append (GTK_MENU (value_menu),
|
gtk_menu_append (GTK_MENU (value_menu),
|
||||||
item);
|
item);
|
||||||
}
|
}
|
||||||
|
@ -594,20 +594,20 @@ nautilus_search_bar_criterion_get_location (NautilusSearchBarCriterion *criterio
|
||||||
- call
|
- call
|
||||||
option_menu = gtk_option_menu_get_menu (criterion->details->some_menu)
|
option_menu = gtk_option_menu_get_menu (criterion->details->some_menu)
|
||||||
menu_item = gtk_menu_get_active (option_menu)
|
menu_item = gtk_menu_get_active (option_menu)
|
||||||
number = gtk_object_get_data (menu_item, "type")
|
number = g_object_get_data (menu_item, "type")
|
||||||
*/
|
*/
|
||||||
menu = gtk_option_menu_get_menu (criterion->details->available_criteria);
|
menu = gtk_option_menu_get_menu (criterion->details->available_criteria);
|
||||||
menu_item = gtk_menu_get_active (GTK_MENU (menu));
|
menu_item = gtk_menu_get_active (GTK_MENU (menu));
|
||||||
name_number = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (menu_item), "type"));
|
name_number = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menu_item), "type"));
|
||||||
|
|
||||||
menu = gtk_option_menu_get_menu (criterion->details->relation_menu);
|
menu = gtk_option_menu_get_menu (criterion->details->relation_menu);
|
||||||
menu_item = gtk_menu_get_active (GTK_MENU (menu));
|
menu_item = gtk_menu_get_active (GTK_MENU (menu));
|
||||||
relation_number = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (menu_item), "type"));
|
relation_number = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menu_item), "type"));
|
||||||
|
|
||||||
if (criterion->details->use_value_menu) {
|
if (criterion->details->use_value_menu) {
|
||||||
menu = gtk_option_menu_get_menu (criterion->details->value_menu);
|
menu = gtk_option_menu_get_menu (criterion->details->value_menu);
|
||||||
menu_item = gtk_menu_get_active (GTK_MENU (menu));
|
menu_item = gtk_menu_get_active (GTK_MENU (menu));
|
||||||
value_number = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (menu_item), "type"));
|
value_number = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menu_item), "type"));
|
||||||
} else if (criterion->details->use_value_entry) {
|
} else if (criterion->details->use_value_entry) {
|
||||||
value_text = gtk_entry_get_text (GTK_ENTRY (criterion->details->value_entry));
|
value_text = gtk_entry_get_text (GTK_ENTRY (criterion->details->value_entry));
|
||||||
} else if (criterion->details->type == NAUTILUS_DATE_MODIFIED_SEARCH_CRITERION) {
|
} else if (criterion->details->type == NAUTILUS_DATE_MODIFIED_SEARCH_CRITERION) {
|
||||||
|
@ -716,7 +716,7 @@ nautilus_search_bar_criterion_update_valid_criteria_choices (NautilusSearchBarCr
|
||||||
item = gtk_menu_item_new_with_label (context_stripped_criteria_title);
|
item = gtk_menu_item_new_with_label (context_stripped_criteria_title);
|
||||||
g_free (context_stripped_criteria_title);
|
g_free (context_stripped_criteria_title);
|
||||||
|
|
||||||
gtk_object_set_data (GTK_OBJECT(item), "type", GINT_TO_POINTER(i));
|
g_object_set_data (G_OBJECT(item), "type", GINT_TO_POINTER(i));
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (item),
|
g_signal_connect (G_OBJECT (item),
|
||||||
"activate",
|
"activate",
|
||||||
|
@ -902,7 +902,7 @@ get_emblem_location_for (int relation_number,
|
||||||
|
|
||||||
g_assert (relation_number == 0 ||
|
g_assert (relation_number == 0 ||
|
||||||
relation_number == 1);
|
relation_number == 1);
|
||||||
emblem_text = gtk_object_get_data (GTK_OBJECT (menu_item),
|
emblem_text = g_object_get_data (G_OBJECT (menu_item),
|
||||||
"emblem name");
|
"emblem name");
|
||||||
printf ("%s %s %s", NAUTILUS_SEARCH_URI_TEXT_EMBLEMS, possible_relations[relation_number], emblem_text);
|
printf ("%s %s %s", NAUTILUS_SEARCH_URI_TEXT_EMBLEMS, possible_relations[relation_number], emblem_text);
|
||||||
return g_strdup_printf ("%s %s %s", NAUTILUS_SEARCH_URI_TEXT_EMBLEMS,
|
return g_strdup_printf ("%s %s %s", NAUTILUS_SEARCH_URI_TEXT_EMBLEMS,
|
||||||
|
@ -998,15 +998,15 @@ make_emblem_value_menu (NautilusSearchBarCriterion *criterion)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp (emblem_name, "erase") == 0) {
|
if (strcmp (emblem_name, "erase") == 0) {
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
g_free (label);
|
g_free (label);
|
||||||
g_free (emblem_name);
|
g_free (emblem_name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
menu_item = gtk_menu_item_new ();
|
menu_item = gtk_menu_item_new ();
|
||||||
|
|
||||||
gtk_object_set_data_full (GTK_OBJECT (menu_item), "emblem name",
|
g_object_set_data_full (G_OBJECT (menu_item), "emblem name",
|
||||||
g_strdup (emblem_name), (GtkDestroyNotify) g_free);
|
g_strdup (emblem_name), g_free);
|
||||||
|
|
||||||
|
|
||||||
image = eel_labeled_image_new (label, pixbuf);
|
image = eel_labeled_image_new (label, pixbuf);
|
||||||
|
@ -1018,7 +1018,7 @@ make_emblem_value_menu (NautilusSearchBarCriterion *criterion)
|
||||||
gtk_widget_show_all (menu_item);
|
gtk_widget_show_all (menu_item);
|
||||||
gtk_menu_append (GTK_MENU (value_menu), menu_item);
|
gtk_menu_append (GTK_MENU (value_menu), menu_item);
|
||||||
|
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
g_free (label);
|
g_free (label);
|
||||||
g_free (emblem_name);
|
g_free (emblem_name);
|
||||||
}
|
}
|
||||||
|
@ -1044,8 +1044,8 @@ criterion_type_changed_callback (GtkObject *object,
|
||||||
menu_item = GTK_WIDGET (object);
|
menu_item = GTK_WIDGET (object);
|
||||||
|
|
||||||
g_return_if_fail (NAUTILUS_IS_COMPLEX_SEARCH_BAR (criterion->details->bar));
|
g_return_if_fail (NAUTILUS_IS_COMPLEX_SEARCH_BAR (criterion->details->bar));
|
||||||
gtk_object_set_data (GTK_OBJECT (criterion), "type",
|
g_object_set_data (G_OBJECT (criterion), "type",
|
||||||
gtk_object_get_data (GTK_OBJECT (menu_item), "type"));
|
g_object_get_data (G_OBJECT (menu_item), "type"));
|
||||||
g_signal_emit (G_OBJECT (criterion),
|
g_signal_emit (G_OBJECT (criterion),
|
||||||
signals[CRITERION_TYPE_CHANGED], 0);
|
signals[CRITERION_TYPE_CHANGED], 0);
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ nautilus_sidebar_tabs_load_theme_data (NautilusSidebarTabs *sidebar_tabs)
|
||||||
|
|
||||||
/* unload the old font if necessary */
|
/* unload the old font if necessary */
|
||||||
if (sidebar_tabs->details->tab_font != NULL) {
|
if (sidebar_tabs->details->tab_font != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (sidebar_tabs->details->tab_font));
|
g_object_unref (G_OBJECT (sidebar_tabs->details->tab_font));
|
||||||
sidebar_tabs->details->tab_font = NULL;
|
sidebar_tabs->details->tab_font = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ smooth_font_changed_callback (gpointer callback_data)
|
||||||
new_font = nautilus_global_preferences_get_default_smooth_bold_font ();
|
new_font = nautilus_global_preferences_get_default_smooth_bold_font ();
|
||||||
|
|
||||||
if (sidebar_tabs->details->tab_font != NULL) {
|
if (sidebar_tabs->details->tab_font != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (sidebar_tabs->details->tab_font));
|
g_object_unref (G_OBJECT (sidebar_tabs->details->tab_font));
|
||||||
sidebar_tabs->details->tab_font = NULL;
|
sidebar_tabs->details->tab_font = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ tab_item_destroy (TabItem *item)
|
||||||
g_free (item->indicator_pixbuf_name);
|
g_free (item->indicator_pixbuf_name);
|
||||||
|
|
||||||
if (item->indicator_pixbuf != NULL) {
|
if (item->indicator_pixbuf != NULL) {
|
||||||
gdk_pixbuf_unref (item->indicator_pixbuf);
|
g_object_unref (G_OBJECT (item->indicator_pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item->listener_id != 0) {
|
if (item->listener_id != 0) {
|
||||||
|
@ -387,7 +387,7 @@ nautilus_sidebar_tabs_destroy (GtkObject *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sidebar_tabs->details->tab_font != NULL) {
|
if (sidebar_tabs->details->tab_font != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (sidebar_tabs->details->tab_font));
|
g_object_unref (G_OBJECT (sidebar_tabs->details->tab_font));
|
||||||
sidebar_tabs->details->tab_font = NULL;
|
sidebar_tabs->details->tab_font = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,7 +415,7 @@ nautilus_sidebar_tabs_unload_tab_pieces (NautilusSidebarTabs *sidebar_tabs)
|
||||||
int index;
|
int index;
|
||||||
for (index = 0; index < LAST_TAB_OFFSET; index++) {
|
for (index = 0; index < LAST_TAB_OFFSET; index++) {
|
||||||
if (sidebar_tabs->details->tab_piece_images[index]) {
|
if (sidebar_tabs->details->tab_piece_images[index]) {
|
||||||
gdk_pixbuf_unref (sidebar_tabs->details->tab_piece_images[index]);
|
g_object_unref (G_OBJECT (sidebar_tabs->details->tab_piece_images[index]));
|
||||||
sidebar_tabs->details->tab_piece_images[index] = NULL;
|
sidebar_tabs->details->tab_piece_images[index] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -688,7 +688,7 @@ draw_one_tab_plain (NautilusSidebarTabs *sidebar_tabs, GdkGC *gc, char *tab_name
|
||||||
GDK_RGB_DITHER_MAX,
|
GDK_RGB_DITHER_MAX,
|
||||||
0, 0);
|
0, 0);
|
||||||
|
|
||||||
gdk_pixbuf_unref (temp_pixbuf);
|
g_object_unref (G_OBJECT (temp_pixbuf));
|
||||||
|
|
||||||
/* draw the bottom lines */
|
/* draw the bottom lines */
|
||||||
tab_bottom = y + sidebar_tabs->details->tab_height - 1;
|
tab_bottom = y + sidebar_tabs->details->tab_height - 1;
|
||||||
|
@ -1224,7 +1224,7 @@ draw_or_layout_all_tabs (NautilusSidebarTabs *sidebar_tabs, gboolean layout_only
|
||||||
GDK_RGB_DITHER_MAX,
|
GDK_RGB_DITHER_MAX,
|
||||||
0, 0);
|
0, 0);
|
||||||
|
|
||||||
gdk_pixbuf_unref (tab_pixbuf);
|
g_object_unref (G_OBJECT (tab_pixbuf));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1307,7 +1307,7 @@ nautilus_sidebar_tabs_expose (GtkWidget *widget, GdkEventExpose *event)
|
||||||
GDK_RGB_DITHER_MAX,
|
GDK_RGB_DITHER_MAX,
|
||||||
0, 0);
|
0, 0);
|
||||||
|
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
} else {
|
} else {
|
||||||
draw_one_tab_plain (sidebar_tabs, temp_gc, sidebar_tabs->details->title, NULL,
|
draw_one_tab_plain (sidebar_tabs, temp_gc, sidebar_tabs->details->title, NULL,
|
||||||
x_pos + TITLE_TAB_OFFSET, y_pos, sidebar_tabs->details->title_prelit, &sidebar_tabs->details->title_rect);
|
x_pos + TITLE_TAB_OFFSET, y_pos, sidebar_tabs->details->title_prelit, &sidebar_tabs->details->title_rect);
|
||||||
|
@ -1355,7 +1355,7 @@ nautilus_sidebar_tabs_update_tab_item (NautilusSidebarTabs *sidebar_tabs, TabIte
|
||||||
tab_item->indicator_pixbuf_name = g_strdup (tab_image_name);
|
tab_item->indicator_pixbuf_name = g_strdup (tab_image_name);
|
||||||
|
|
||||||
if (tab_item->indicator_pixbuf != NULL) {
|
if (tab_item->indicator_pixbuf != NULL) {
|
||||||
gdk_pixbuf_unref (tab_item->indicator_pixbuf);
|
g_object_unref (G_OBJECT (tab_item->indicator_pixbuf));
|
||||||
tab_item->indicator_pixbuf = NULL;
|
tab_item->indicator_pixbuf = NULL;
|
||||||
}
|
}
|
||||||
if (tab_image_name != NULL) {
|
if (tab_image_name != NULL) {
|
||||||
|
|
|
@ -157,8 +157,8 @@ smooth_font_changed_callback (gpointer callback_data)
|
||||||
eel_label_set_smooth_font (EEL_LABEL (sidebar_title->details->title_label), new_bold_font);
|
eel_label_set_smooth_font (EEL_LABEL (sidebar_title->details->title_label), new_bold_font);
|
||||||
eel_label_set_smooth_font (EEL_LABEL (sidebar_title->details->more_info_label), new_font);
|
eel_label_set_smooth_font (EEL_LABEL (sidebar_title->details->more_info_label), new_font);
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (new_font));
|
g_object_unref (G_OBJECT (new_font));
|
||||||
gtk_object_unref (GTK_OBJECT (new_bold_font));
|
g_object_unref (G_OBJECT (new_bold_font));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GNOME2_CONVERSION_COMPLETE
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
|
@ -568,7 +568,7 @@ update_title_font (NautilusSidebarTitle *sidebar_title)
|
||||||
eel_label_set_smooth_font_size (EEL_LABEL (sidebar_title->details->title_label),
|
eel_label_set_smooth_font_size (EEL_LABEL (sidebar_title->details->title_label),
|
||||||
largest_fitting_smooth_font_size);
|
largest_fitting_smooth_font_size);
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (smooth_font));
|
g_object_unref (G_OBJECT (smooth_font));
|
||||||
|
|
||||||
#if GNOME2_CONVERSION_COMPLETE
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
/* Update the regular font */
|
/* Update the regular font */
|
||||||
|
@ -742,7 +742,7 @@ update_emblems (NautilusSidebarTitle *sidebar_title)
|
||||||
FALSE, NULL, FALSE);
|
FALSE, NULL, FALSE);
|
||||||
if (pixbuf != NULL) {
|
if (pixbuf != NULL) {
|
||||||
add_emblem (sidebar_title, pixbuf);
|
add_emblem (sidebar_title, pixbuf);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -277,7 +277,7 @@ nautilus_sidebar_init (GtkObject *object)
|
||||||
|
|
||||||
/* allocate and install the panel tabs */
|
/* allocate and install the panel tabs */
|
||||||
sidebar->details->notebook = GTK_NOTEBOOK (gtk_notebook_new ());
|
sidebar->details->notebook = GTK_NOTEBOOK (gtk_notebook_new ());
|
||||||
gtk_object_ref (GTK_OBJECT (sidebar->details->notebook));
|
g_object_ref (G_OBJECT (sidebar->details->notebook));
|
||||||
gtk_object_sink (GTK_OBJECT (sidebar->details->notebook));
|
gtk_object_sink (GTK_OBJECT (sidebar->details->notebook));
|
||||||
|
|
||||||
gtk_notebook_set_show_tabs (sidebar->details->notebook, FALSE);
|
gtk_notebook_set_show_tabs (sidebar->details->notebook, FALSE);
|
||||||
|
@ -305,7 +305,7 @@ nautilus_sidebar_destroy (GtkObject *object)
|
||||||
|
|
||||||
sidebar = NAUTILUS_SIDEBAR (object);
|
sidebar = NAUTILUS_SIDEBAR (object);
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (sidebar->details->notebook));
|
g_object_unref (G_OBJECT (sidebar->details->notebook));
|
||||||
|
|
||||||
if (sidebar->details->file != NULL) {
|
if (sidebar->details->file != NULL) {
|
||||||
gtk_signal_disconnect (GTK_OBJECT (sidebar->details->file),
|
gtk_signal_disconnect (GTK_OBJECT (sidebar->details->file),
|
||||||
|
@ -416,9 +416,9 @@ toggle_sidebar_panel (GtkWidget *widget,
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_CHECK_MENU_ITEM (widget));
|
g_return_if_fail (GTK_IS_CHECK_MENU_ITEM (widget));
|
||||||
g_return_if_fail (NAUTILUS_IS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (widget))));
|
g_return_if_fail (NAUTILUS_IS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (widget))));
|
||||||
g_return_if_fail (gtk_object_get_data (GTK_OBJECT (widget), "nautilus-sidebar/preference-key") != NULL);
|
g_return_if_fail (g_object_get_data (G_OBJECT (widget), "nautilus-sidebar/preference-key") != NULL);
|
||||||
|
|
||||||
preference_key = gtk_object_get_data (GTK_OBJECT (widget), "nautilus-sidebar/preference-key");
|
preference_key = g_object_get_data (G_OBJECT (widget), "nautilus-sidebar/preference-key");
|
||||||
|
|
||||||
sidebar = NAUTILUS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (widget)));
|
sidebar = NAUTILUS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (widget)));
|
||||||
|
|
||||||
|
@ -481,17 +481,17 @@ sidebar_for_each_sidebar_panel (const char *name,
|
||||||
gtk_menu_append (data->menu, menu_item);
|
gtk_menu_append (data->menu, menu_item);
|
||||||
gtk_signal_connect_full (GTK_OBJECT (menu_item),
|
gtk_signal_connect_full (GTK_OBJECT (menu_item),
|
||||||
"activate",
|
"activate",
|
||||||
GTK_SIGNAL_FUNC (toggle_sidebar_panel),
|
G_CALLBACK (toggle_sidebar_panel),
|
||||||
NULL,
|
NULL,
|
||||||
g_strdup (iid),
|
g_strdup (iid),
|
||||||
g_free,
|
g_free,
|
||||||
FALSE,
|
FALSE,
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
gtk_object_set_data_full (GTK_OBJECT (menu_item),
|
g_object_set_data_full (G_OBJECT (menu_item),
|
||||||
"nautilus-sidebar/preference-key",
|
"nautilus-sidebar/preference-key",
|
||||||
g_strdup (preference_key),
|
g_strdup (preference_key),
|
||||||
g_free);
|
g_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* utility routine to add a menu item for each potential sidebar panel */
|
/* utility routine to add a menu item for each potential sidebar panel */
|
||||||
|
@ -682,7 +682,7 @@ uri_is_local_image (const char *uri)
|
||||||
if (pixbuf == NULL) {
|
if (pixbuf == NULL) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1377,7 +1377,7 @@ add_command_buttons (NautilusSidebar *sidebar, GList *application_list)
|
||||||
|
|
||||||
eel_gtk_signal_connect_free_data
|
eel_gtk_signal_connect_free_data
|
||||||
(GTK_OBJECT (temp_button), "clicked",
|
(GTK_OBJECT (temp_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC (command_button_callback), id_string);
|
G_CALLBACK (command_button_callback), id_string);
|
||||||
|
|
||||||
gtk_object_set_user_data (GTK_OBJECT (temp_button), sidebar);
|
gtk_object_set_user_data (GTK_OBJECT (temp_button), sidebar);
|
||||||
|
|
||||||
|
@ -1431,7 +1431,7 @@ add_buttons_from_metadata (NautilusSidebar *sidebar, const char *button_data)
|
||||||
|
|
||||||
eel_gtk_signal_connect_free_data
|
eel_gtk_signal_connect_free_data
|
||||||
(GTK_OBJECT (temp_button), "clicked",
|
(GTK_OBJECT (temp_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC (metadata_button_callback), command_string);
|
G_CALLBACK (metadata_button_callback), command_string);
|
||||||
gtk_object_set_user_data (GTK_OBJECT (temp_button), sidebar);
|
gtk_object_set_user_data (GTK_OBJECT (temp_button), sidebar);
|
||||||
|
|
||||||
gtk_widget_show (temp_button);
|
gtk_widget_show (temp_button);
|
||||||
|
@ -1503,7 +1503,7 @@ nautilus_sidebar_update_buttons (NautilusSidebar *sidebar)
|
||||||
sidebar->details->has_buttons = TRUE;
|
sidebar->details->has_buttons = TRUE;
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (temp_button), "clicked",
|
g_signal_connect (G_OBJECT (temp_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC (empty_trash_callback), NULL);
|
G_CALLBACK (empty_trash_callback), NULL);
|
||||||
|
|
||||||
gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_trash_monitor_get ()),
|
gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_trash_monitor_get ()),
|
||||||
"trash_state_changed",
|
"trash_state_changed",
|
||||||
|
|
|
@ -88,7 +88,7 @@ nautilus_signaller_init (gpointer object, gpointer klass)
|
||||||
static void
|
static void
|
||||||
unref_global_signaller (void)
|
unref_global_signaller (void)
|
||||||
{
|
{
|
||||||
gtk_object_unref (GTK_OBJECT (global_signaller));
|
g_object_unref (G_OBJECT (global_signaller));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkObject *
|
GtkObject *
|
||||||
|
@ -96,7 +96,7 @@ nautilus_signaller_get_current (void)
|
||||||
{
|
{
|
||||||
if (global_signaller == NULL) {
|
if (global_signaller == NULL) {
|
||||||
global_signaller = g_object_new (nautilus_signaller_get_type (), NULL);
|
global_signaller = g_object_new (nautilus_signaller_get_type (), NULL);
|
||||||
gtk_object_ref (GTK_OBJECT (global_signaller));
|
g_object_ref (G_OBJECT (global_signaller));
|
||||||
gtk_object_sink (GTK_OBJECT (global_signaller));
|
gtk_object_sink (GTK_OBJECT (global_signaller));
|
||||||
g_atexit (unref_global_signaller);
|
g_atexit (unref_global_signaller);
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
|
||||||
gdk_pixbuf_render_pixmap_and_mask
|
gdk_pixbuf_render_pixmap_and_mask
|
||||||
(pixbuf, &mini_icon_pixmap, &mini_icon_mask,
|
(pixbuf, &mini_icon_pixmap, &mini_icon_mask,
|
||||||
EEL_STANDARD_ALPHA_THRESHHOLD);
|
EEL_STANDARD_ALPHA_THRESHHOLD);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
g_atexit (unref_mini_icon);
|
g_atexit (unref_mini_icon);
|
||||||
}
|
}
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
@ -916,10 +916,10 @@ nautilus_window_destroy (GtkObject *object)
|
||||||
nautilus_window_clear_forward_list (window);
|
nautilus_window_clear_forward_list (window);
|
||||||
|
|
||||||
if (window->current_location_bookmark != NULL) {
|
if (window->current_location_bookmark != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (window->current_location_bookmark));
|
g_object_unref (G_OBJECT (window->current_location_bookmark));
|
||||||
}
|
}
|
||||||
if (window->last_location_bookmark != NULL) {
|
if (window->last_location_bookmark != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (window->last_location_bookmark));
|
g_object_unref (G_OBJECT (window->last_location_bookmark));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->status_bar_clear_id != 0) {
|
if (window->status_bar_clear_id != 0) {
|
||||||
|
@ -1124,10 +1124,10 @@ view_as_menu_switch_views_callback (GtkWidget *widget, gpointer data)
|
||||||
|
|
||||||
window = NAUTILUS_WINDOW (data);
|
window = NAUTILUS_WINDOW (data);
|
||||||
|
|
||||||
if (GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), "extra viewer")) == TRUE) {
|
if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "extra viewer")) == TRUE) {
|
||||||
activate_extra_viewer (window);
|
activate_extra_viewer (window);
|
||||||
} else {
|
} else {
|
||||||
viewer_index = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), "viewer index"));
|
viewer_index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "viewer index"));
|
||||||
activate_nth_short_list_item (window, viewer_index);
|
activate_nth_short_list_item (window, viewer_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1149,7 +1149,7 @@ create_view_as_menu_item (NautilusWindow *window,
|
||||||
G_CALLBACK (view_as_menu_switch_views_callback),
|
G_CALLBACK (view_as_menu_switch_views_callback),
|
||||||
window);
|
window);
|
||||||
|
|
||||||
gtk_object_set_data (GTK_OBJECT (menu_item),
|
g_object_set_data (G_OBJECT (menu_item),
|
||||||
"viewer index",
|
"viewer index",
|
||||||
GINT_TO_POINTER (index));
|
GINT_TO_POINTER (index));
|
||||||
|
|
||||||
|
@ -1255,7 +1255,7 @@ update_extra_viewer_in_view_as_menus (NautilusWindow *window,
|
||||||
/* Add new menu item. */
|
/* Add new menu item. */
|
||||||
if (id != NULL) {
|
if (id != NULL) {
|
||||||
new_menu_item = create_view_as_menu_item (window, window->details->extra_viewer, 0);
|
new_menu_item = create_view_as_menu_item (window, window->details->extra_viewer, 0);
|
||||||
gtk_object_set_data (GTK_OBJECT (new_menu_item), "extra viewer", GINT_TO_POINTER (TRUE));
|
g_object_set_data (G_OBJECT (new_menu_item), "extra viewer", GINT_TO_POINTER (TRUE));
|
||||||
gtk_menu_prepend (GTK_MENU (menu), new_menu_item);
|
gtk_menu_prepend (GTK_MENU (menu), new_menu_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1766,7 +1766,7 @@ remove_from_history_list (NautilusBookmark *bookmark)
|
||||||
/* Remove any older entry for this same item. There can be at most 1. */
|
/* Remove any older entry for this same item. There can be at most 1. */
|
||||||
if (node != NULL) {
|
if (node != NULL) {
|
||||||
history_list = g_list_remove_link (history_list, node);
|
history_list = g_list_remove_link (history_list, node);
|
||||||
gtk_object_unref (node->data);
|
g_object_unref (G_OBJECT (node->data));
|
||||||
g_list_free_1 (node);
|
g_list_free_1 (node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1788,7 +1788,7 @@ add_to_history_list (NautilusBookmark *bookmark)
|
||||||
free_history_list_is_set_up = TRUE;
|
free_history_list_is_set_up = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_object_ref (GTK_OBJECT (bookmark));
|
g_object_ref (G_OBJECT (bookmark));
|
||||||
remove_from_history_list (bookmark);
|
remove_from_history_list (bookmark);
|
||||||
history_list = g_list_prepend (history_list, bookmark);
|
history_list = g_list_prepend (history_list, bookmark);
|
||||||
|
|
||||||
|
@ -1796,7 +1796,7 @@ add_to_history_list (NautilusBookmark *bookmark)
|
||||||
if (extra_count > 0) {
|
if (extra_count > 0) {
|
||||||
history_list = g_list_reverse (history_list);
|
history_list = g_list_reverse (history_list);
|
||||||
for (index = 0; index < extra_count; ++index) {
|
for (index = 0; index < extra_count; ++index) {
|
||||||
gtk_object_unref (history_list->data);
|
g_object_unref (G_OBJECT (history_list->data));
|
||||||
history_list = g_list_remove (history_list, history_list->data);
|
history_list = g_list_remove (history_list, history_list->data);
|
||||||
}
|
}
|
||||||
history_list = g_list_reverse (history_list);
|
history_list = g_list_reverse (history_list);
|
||||||
|
@ -1812,7 +1812,7 @@ nautilus_remove_from_history_list_no_notify (const char *uri)
|
||||||
|
|
||||||
bookmark = nautilus_bookmark_new (uri, "");
|
bookmark = nautilus_bookmark_new (uri, "");
|
||||||
remove_from_history_list (bookmark);
|
remove_from_history_list (bookmark);
|
||||||
gtk_object_unref (GTK_OBJECT (bookmark));
|
g_object_unref (G_OBJECT (bookmark));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -84,7 +84,7 @@ nautilus_switchable_navigation_bar_class_init (NautilusSwitchableNavigationBarCl
|
||||||
mode_changed),
|
mode_changed),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__STRING,
|
g_cclosure_marshal_VOID__STRING,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_INT);
|
G_TYPE_NONE, 1, G_TYPE_INT);
|
||||||
|
|
||||||
object_class->destroy = nautilus_switchable_navigation_bar_destroy;
|
object_class->destroy = nautilus_switchable_navigation_bar_destroy;
|
||||||
|
|
||||||
|
|
|
@ -179,19 +179,19 @@ nautilus_theme_selector_init (NautilusThemeSelector *theme_selector)
|
||||||
theme_selector->details->install_theme_button = gtk_button_new_with_label (_("Add New Theme..."));
|
theme_selector->details->install_theme_button = gtk_button_new_with_label (_("Add New Theme..."));
|
||||||
g_signal_connect (G_OBJECT (theme_selector->details->install_theme_button),
|
g_signal_connect (G_OBJECT (theme_selector->details->install_theme_button),
|
||||||
"clicked",
|
"clicked",
|
||||||
GTK_SIGNAL_FUNC (install_theme_button_clicked_callback),
|
G_CALLBACK (install_theme_button_clicked_callback),
|
||||||
theme_selector);
|
theme_selector);
|
||||||
|
|
||||||
theme_selector->details->remove_theme_button = gtk_button_new_with_label (_("Remove Theme..."));
|
theme_selector->details->remove_theme_button = gtk_button_new_with_label (_("Remove Theme..."));
|
||||||
g_signal_connect (G_OBJECT (theme_selector->details->remove_theme_button),
|
g_signal_connect (G_OBJECT (theme_selector->details->remove_theme_button),
|
||||||
"clicked",
|
"clicked",
|
||||||
GTK_SIGNAL_FUNC (remove_theme_button_clicked_callback),
|
G_CALLBACK (remove_theme_button_clicked_callback),
|
||||||
theme_selector);
|
theme_selector);
|
||||||
|
|
||||||
theme_selector->details->cancel_remove_button = gtk_button_new_with_label (_("Cancel Remove"));
|
theme_selector->details->cancel_remove_button = gtk_button_new_with_label (_("Cancel Remove"));
|
||||||
g_signal_connect (G_OBJECT (theme_selector->details->cancel_remove_button),
|
g_signal_connect (G_OBJECT (theme_selector->details->cancel_remove_button),
|
||||||
"clicked",
|
"clicked",
|
||||||
GTK_SIGNAL_FUNC (cancel_remove_button_clicked_callback),
|
G_CALLBACK (cancel_remove_button_clicked_callback),
|
||||||
theme_selector);
|
theme_selector);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (button_box), theme_selector->details->cancel_remove_button, TRUE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (button_box), theme_selector->details->cancel_remove_button, TRUE, FALSE, 0);
|
||||||
|
@ -222,13 +222,13 @@ nautilus_theme_selector_init (NautilusThemeSelector *theme_selector)
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (theme_selector->details->theme_selector),
|
g_signal_connect (G_OBJECT (theme_selector->details->theme_selector),
|
||||||
"selection_changed",
|
"selection_changed",
|
||||||
GTK_SIGNAL_FUNC (theme_selector_changed_callback),
|
G_CALLBACK (theme_selector_changed_callback),
|
||||||
theme_selector);
|
theme_selector);
|
||||||
|
|
||||||
theme_selector->details->theme_selector_changed_connection =
|
theme_selector->details->theme_selector_changed_connection =
|
||||||
g_signal_connect (G_OBJECT (theme_selector->details->remove_theme_selector),
|
g_signal_connect (G_OBJECT (theme_selector->details->remove_theme_selector),
|
||||||
"selection_changed",
|
"selection_changed",
|
||||||
GTK_SIGNAL_FUNC (remove_theme_selector_changed_callback),
|
G_CALLBACK (remove_theme_selector_changed_callback),
|
||||||
theme_selector);
|
theme_selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,10 +259,10 @@ file_selection_ok_clicked_callback (GtkWidget *button,
|
||||||
g_return_if_fail (GTK_IS_BUTTON (button));
|
g_return_if_fail (GTK_IS_BUTTON (button));
|
||||||
g_return_if_fail (GTK_IS_FILE_SELECTION (callback_data));
|
g_return_if_fail (GTK_IS_FILE_SELECTION (callback_data));
|
||||||
|
|
||||||
g_return_if_fail (NAUTILUS_IS_THEME_SELECTOR (gtk_object_get_data (GTK_OBJECT (callback_data),
|
g_return_if_fail (NAUTILUS_IS_THEME_SELECTOR (g_object_get_data (G_OBJECT (callback_data),
|
||||||
THEME_SELECTOR_DATA_KEY)));
|
THEME_SELECTOR_DATA_KEY)));
|
||||||
|
|
||||||
theme_selector = NAUTILUS_THEME_SELECTOR (gtk_object_get_data (GTK_OBJECT (callback_data),
|
theme_selector = NAUTILUS_THEME_SELECTOR (g_object_get_data (G_OBJECT (callback_data),
|
||||||
THEME_SELECTOR_DATA_KEY));
|
THEME_SELECTOR_DATA_KEY));
|
||||||
|
|
||||||
selected_path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (callback_data));
|
selected_path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (callback_data));
|
||||||
|
@ -331,18 +331,18 @@ install_theme_button_clicked_callback (GtkWidget *button,
|
||||||
|
|
||||||
eel_gtk_window_set_up_close_accelerator (GTK_WINDOW (file_selection_dialog));
|
eel_gtk_window_set_up_close_accelerator (GTK_WINDOW (file_selection_dialog));
|
||||||
|
|
||||||
gtk_object_set_data (GTK_OBJECT (file_selection_dialog),
|
g_object_set_data (G_OBJECT (file_selection_dialog),
|
||||||
THEME_SELECTOR_DATA_KEY,
|
THEME_SELECTOR_DATA_KEY,
|
||||||
callback_data);
|
callback_data);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (file_selection_dialog)->ok_button),
|
g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (file_selection_dialog)->ok_button),
|
||||||
"clicked",
|
"clicked",
|
||||||
GTK_SIGNAL_FUNC (file_selection_ok_clicked_callback),
|
G_CALLBACK (file_selection_ok_clicked_callback),
|
||||||
file_selection_dialog);
|
file_selection_dialog);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (file_selection_dialog)->cancel_button),
|
g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (file_selection_dialog)->cancel_button),
|
||||||
"clicked",
|
"clicked",
|
||||||
GTK_SIGNAL_FUNC (file_selection_cancel_clicked_callback),
|
G_CALLBACK (file_selection_cancel_clicked_callback),
|
||||||
file_selection_dialog);
|
file_selection_dialog);
|
||||||
|
|
||||||
gtk_window_set_position (GTK_WINDOW (file_selection_dialog), GTK_WIN_POS_MOUSE);
|
gtk_window_set_position (GTK_WINDOW (file_selection_dialog), GTK_WIN_POS_MOUSE);
|
||||||
|
|
|
@ -165,7 +165,7 @@ nautilus_view_frame_class_init (NautilusViewFrameClass *klass)
|
||||||
change_selection),
|
change_selection),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
gtk_marshal_VOID__POINTER,
|
gtk_marshal_VOID__POINTER,
|
||||||
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
signals[CHANGE_STATUS] = g_signal_new
|
signals[CHANGE_STATUS] = g_signal_new
|
||||||
("change_status",
|
("change_status",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -192,7 +192,7 @@ nautilus_view_frame_class_init (NautilusViewFrameClass *klass)
|
||||||
get_history_list),
|
get_history_list),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
nautilus_marshal_POINTER__VOID,
|
nautilus_marshal_POINTER__VOID,
|
||||||
GTK_TYPE_POINTER, 0);
|
G_TYPE_POINTER, 0);
|
||||||
signals[GO_BACK] = g_signal_new
|
signals[GO_BACK] = g_signal_new
|
||||||
("go_back",
|
("go_back",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -237,7 +237,7 @@ nautilus_view_frame_class_init (NautilusViewFrameClass *klass)
|
||||||
open_location_force_new_window),
|
open_location_force_new_window),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
eel_marshal_VOID__STRING_POINTER,
|
eel_marshal_VOID__STRING_POINTER,
|
||||||
G_TYPE_NONE, 2, G_TYPE_STRING, GTK_TYPE_POINTER);
|
G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_POINTER);
|
||||||
signals[OPEN_LOCATION_IN_THIS_WINDOW] = g_signal_new
|
signals[OPEN_LOCATION_IN_THIS_WINDOW] = g_signal_new
|
||||||
("open_location_in_this_window",
|
("open_location_in_this_window",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -264,7 +264,7 @@ nautilus_view_frame_class_init (NautilusViewFrameClass *klass)
|
||||||
report_location_change),
|
report_location_change),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
eel_marshal_VOID__STRING_POINTER_STRING,
|
eel_marshal_VOID__STRING_POINTER_STRING,
|
||||||
G_TYPE_NONE, 3, G_TYPE_STRING, GTK_TYPE_POINTER, G_TYPE_STRING);
|
G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_STRING);
|
||||||
signals[REPORT_REDIRECT] = g_signal_new
|
signals[REPORT_REDIRECT] = g_signal_new
|
||||||
("report_redirect",
|
("report_redirect",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
@ -273,7 +273,7 @@ nautilus_view_frame_class_init (NautilusViewFrameClass *klass)
|
||||||
report_redirect),
|
report_redirect),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
eel_marshal_VOID__STRING_STRING_POINTER_STRING,
|
eel_marshal_VOID__STRING_STRING_POINTER_STRING,
|
||||||
G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, GTK_TYPE_POINTER, G_TYPE_STRING);
|
G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_STRING);
|
||||||
signals[TITLE_CHANGED] = g_signal_new
|
signals[TITLE_CHANGED] = g_signal_new
|
||||||
("title_changed",
|
("title_changed",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
|
|
@ -309,7 +309,7 @@ set_displayed_location (NautilusWindow *window, const char *location)
|
||||||
if (recreate) {
|
if (recreate) {
|
||||||
/* We've changed locations, must recreate bookmark for current location. */
|
/* We've changed locations, must recreate bookmark for current location. */
|
||||||
if (window->last_location_bookmark != NULL) {
|
if (window->last_location_bookmark != NULL) {
|
||||||
gtk_object_unref (GTK_OBJECT (window->last_location_bookmark));
|
g_object_unref (G_OBJECT (window->last_location_bookmark));
|
||||||
}
|
}
|
||||||
window->last_location_bookmark = window->current_location_bookmark;
|
window->last_location_bookmark = window->current_location_bookmark;
|
||||||
window->current_location_bookmark = location == NULL ? NULL
|
window->current_location_bookmark = location == NULL ? NULL
|
||||||
|
@ -363,7 +363,7 @@ handle_go_back (NautilusWindow *window, const char *location)
|
||||||
/* Use the first bookmark in the history list rather than creating a new one. */
|
/* Use the first bookmark in the history list rather than creating a new one. */
|
||||||
window->forward_list = g_list_prepend (window->forward_list,
|
window->forward_list = g_list_prepend (window->forward_list,
|
||||||
window->last_location_bookmark);
|
window->last_location_bookmark);
|
||||||
gtk_object_ref (GTK_OBJECT (window->forward_list->data));
|
g_object_ref (G_OBJECT (window->forward_list->data));
|
||||||
|
|
||||||
/* Move extra links from Back to Forward list */
|
/* Move extra links from Back to Forward list */
|
||||||
for (i = 0; i < window->details->location_change_distance; ++i) {
|
for (i = 0; i < window->details->location_change_distance; ++i) {
|
||||||
|
@ -375,7 +375,7 @@ handle_go_back (NautilusWindow *window, const char *location)
|
||||||
/* One bookmark falls out of back/forward lists and becomes viewed location */
|
/* One bookmark falls out of back/forward lists and becomes viewed location */
|
||||||
link = window->back_list;
|
link = window->back_list;
|
||||||
window->back_list = g_list_remove_link (window->back_list, link);
|
window->back_list = g_list_remove_link (window->back_list, link);
|
||||||
gtk_object_unref (GTK_OBJECT (link->data));
|
g_object_unref (G_OBJECT (link->data));
|
||||||
g_list_free_1 (link);
|
g_list_free_1 (link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,7 +400,7 @@ handle_go_forward (NautilusWindow *window, const char *location)
|
||||||
/* Use the first bookmark in the history list rather than creating a new one. */
|
/* Use the first bookmark in the history list rather than creating a new one. */
|
||||||
window->back_list = g_list_prepend (window->back_list,
|
window->back_list = g_list_prepend (window->back_list,
|
||||||
window->last_location_bookmark);
|
window->last_location_bookmark);
|
||||||
gtk_object_ref (GTK_OBJECT (window->back_list->data));
|
g_object_ref (G_OBJECT (window->back_list->data));
|
||||||
|
|
||||||
/* Move extra links from Forward to Back list */
|
/* Move extra links from Forward to Back list */
|
||||||
for (i = 0; i < window->details->location_change_distance; ++i) {
|
for (i = 0; i < window->details->location_change_distance; ++i) {
|
||||||
|
@ -412,7 +412,7 @@ handle_go_forward (NautilusWindow *window, const char *location)
|
||||||
/* One bookmark falls out of back/forward lists and becomes viewed location */
|
/* One bookmark falls out of back/forward lists and becomes viewed location */
|
||||||
link = window->forward_list;
|
link = window->forward_list;
|
||||||
window->forward_list = g_list_remove_link (window->forward_list, link);
|
window->forward_list = g_list_remove_link (window->forward_list, link);
|
||||||
gtk_object_unref (GTK_OBJECT (link->data));
|
g_object_unref (G_OBJECT (link->data));
|
||||||
g_list_free_1 (link);
|
g_list_free_1 (link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,7 +434,7 @@ handle_go_elsewhere (NautilusWindow *window, const char *location)
|
||||||
/* Use the first bookmark in the history list rather than creating a new one. */
|
/* Use the first bookmark in the history list rather than creating a new one. */
|
||||||
window->back_list = g_list_prepend (window->back_list,
|
window->back_list = g_list_prepend (window->back_list,
|
||||||
window->last_location_bookmark);
|
window->last_location_bookmark);
|
||||||
gtk_object_ref (GTK_OBJECT (window->back_list->data));
|
g_object_ref (G_OBJECT (window->back_list->data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -627,14 +627,14 @@ update_for_new_location (NautilusWindow *window)
|
||||||
static gboolean
|
static gboolean
|
||||||
unref_callback (gpointer callback_data)
|
unref_callback (gpointer callback_data)
|
||||||
{
|
{
|
||||||
gtk_object_unref (GTK_OBJECT (callback_data));
|
g_object_unref (G_OBJECT (callback_data));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ref_now_unref_at_idle_time (GtkObject *object)
|
ref_now_unref_at_idle_time (GObject *object)
|
||||||
{
|
{
|
||||||
gtk_object_ref (object);
|
g_object_ref (object);
|
||||||
g_idle_add (unref_callback, object);
|
g_idle_add (unref_callback, object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,13 +652,13 @@ location_has_really_changed (NautilusWindow *window)
|
||||||
* help for out of process components.
|
* help for out of process components.
|
||||||
*/
|
*/
|
||||||
if (window->content_view != NULL) {
|
if (window->content_view != NULL) {
|
||||||
ref_now_unref_at_idle_time (GTK_OBJECT (window->content_view));
|
ref_now_unref_at_idle_time (G_OBJECT (window->content_view));
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect_view (window, window->content_view);
|
disconnect_view (window, window->content_view);
|
||||||
nautilus_window_set_content_view_widget (window, window->new_content_view);
|
nautilus_window_set_content_view_widget (window, window->new_content_view);
|
||||||
}
|
}
|
||||||
gtk_object_unref (GTK_OBJECT (window->new_content_view));
|
g_object_unref (G_OBJECT (window->new_content_view));
|
||||||
window->new_content_view = NULL;
|
window->new_content_view = NULL;
|
||||||
|
|
||||||
/* Update displayed view in menu. Only do this if we're not switching
|
/* Update displayed view in menu. Only do this if we're not switching
|
||||||
|
@ -766,10 +766,10 @@ set_view_frame_info (NautilusViewFrame *view_frame,
|
||||||
gboolean is_sidebar_panel,
|
gboolean is_sidebar_panel,
|
||||||
const NautilusViewIdentifier *id)
|
const NautilusViewIdentifier *id)
|
||||||
{
|
{
|
||||||
gtk_object_set_data_full (GTK_OBJECT (view_frame),
|
g_object_set_data_full (G_OBJECT (view_frame),
|
||||||
"info",
|
"info",
|
||||||
view_frame_info_new (is_sidebar_panel, id),
|
view_frame_info_new (is_sidebar_panel, id),
|
||||||
(GtkDestroyNotify) view_frame_info_free);
|
(GtkDestroyNotify) view_frame_info_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -777,8 +777,8 @@ view_frame_is_sidebar_panel (NautilusViewFrame *view_frame)
|
||||||
{
|
{
|
||||||
ViewFrameInfo *info;
|
ViewFrameInfo *info;
|
||||||
|
|
||||||
info = (ViewFrameInfo *)gtk_object_get_data
|
info = (ViewFrameInfo *) g_object_get_data
|
||||||
(GTK_OBJECT (view_frame), "info");
|
(G_OBJECT (view_frame), "info");
|
||||||
return info->is_sidebar_panel;
|
return info->is_sidebar_panel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -787,8 +787,8 @@ view_frame_get_label (NautilusViewFrame *view_frame)
|
||||||
{
|
{
|
||||||
ViewFrameInfo *info;
|
ViewFrameInfo *info;
|
||||||
|
|
||||||
info = (ViewFrameInfo *)gtk_object_get_data
|
info = (ViewFrameInfo *) g_object_get_data
|
||||||
(GTK_OBJECT (view_frame), "info");
|
(G_OBJECT (view_frame), "info");
|
||||||
return g_strdup (info->id->name);
|
return g_strdup (info->id->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -797,8 +797,8 @@ view_frame_get_id (NautilusViewFrame *view_frame)
|
||||||
{
|
{
|
||||||
ViewFrameInfo *info;
|
ViewFrameInfo *info;
|
||||||
|
|
||||||
info = (ViewFrameInfo *)gtk_object_get_data
|
info = (ViewFrameInfo *) g_object_get_data
|
||||||
(GTK_OBJECT (view_frame), "info");
|
(G_OBJECT (view_frame), "info");
|
||||||
return nautilus_view_identifier_copy (info->id);
|
return nautilus_view_identifier_copy (info->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -971,14 +971,14 @@ load_content_view (NautilusWindow *window,
|
||||||
/* reuse existing content view */
|
/* reuse existing content view */
|
||||||
view = window->content_view;
|
view = window->content_view;
|
||||||
window->new_content_view = view;
|
window->new_content_view = view;
|
||||||
gtk_object_ref (GTK_OBJECT (view));
|
g_object_ref (G_OBJECT (view));
|
||||||
set_to_pending_location_and_selection (window);
|
set_to_pending_location_and_selection (window);
|
||||||
} else {
|
} else {
|
||||||
/* create a new content view */
|
/* create a new content view */
|
||||||
view = nautilus_view_frame_new (window->details->ui_container,
|
view = nautilus_view_frame_new (window->details->ui_container,
|
||||||
window->application->undo_manager);
|
window->application->undo_manager);
|
||||||
window->new_content_view = view;
|
window->new_content_view = view;
|
||||||
gtk_object_ref (GTK_OBJECT (view));
|
g_object_ref (G_OBJECT (view));
|
||||||
gtk_object_sink (GTK_OBJECT (view));
|
gtk_object_sink (GTK_OBJECT (view));
|
||||||
set_view_frame_info (view, FALSE, id);
|
set_view_frame_info (view, FALSE, id);
|
||||||
connect_view (window, view);
|
connect_view (window, view);
|
||||||
|
@ -1077,7 +1077,7 @@ free_location_change (NautilusWindow *window)
|
||||||
disconnect_view (window, window->new_content_view);
|
disconnect_view (window, window->new_content_view);
|
||||||
gtk_widget_destroy (GTK_WIDGET (window->new_content_view));
|
gtk_widget_destroy (GTK_WIDGET (window->new_content_view));
|
||||||
}
|
}
|
||||||
gtk_object_unref (GTK_OBJECT (window->new_content_view));
|
g_object_unref (G_OBJECT (window->new_content_view));
|
||||||
window->new_content_view = NULL;
|
window->new_content_view = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1684,7 +1684,7 @@ get_history_list_callback (NautilusViewFrame *view,
|
||||||
g_free (name);
|
g_free (name);
|
||||||
g_free (location);
|
g_free (location);
|
||||||
g_free (pixbuf_xml);
|
g_free (pixbuf_xml);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
|
@ -1946,7 +1946,7 @@ connect_view (NautilusWindow *window, NautilusViewFrame *view)
|
||||||
|
|
||||||
#define CONNECT(signal) gtk_signal_connect \
|
#define CONNECT(signal) gtk_signal_connect \
|
||||||
(view_object, #signal, \
|
(view_object, #signal, \
|
||||||
GTK_SIGNAL_FUNC (signal##_callback), window);
|
G_CALLBACK (signal##_callback), window);
|
||||||
FOR_EACH_NAUTILUS_WINDOW_SIGNAL (CONNECT)
|
FOR_EACH_NAUTILUS_WINDOW_SIGNAL (CONNECT)
|
||||||
#undef CONNECT
|
#undef CONNECT
|
||||||
}
|
}
|
||||||
|
@ -1968,7 +1968,7 @@ disconnect_view (NautilusWindow *window, NautilusViewFrame *view)
|
||||||
|
|
||||||
#define DISCONNECT(signal) gtk_signal_disconnect_by_func \
|
#define DISCONNECT(signal) gtk_signal_disconnect_by_func \
|
||||||
(view_object, \
|
(view_object, \
|
||||||
GTK_SIGNAL_FUNC (signal##_callback), window);
|
G_CALLBACK (signal##_callback), window);
|
||||||
FOR_EACH_NAUTILUS_WINDOW_SIGNAL (DISCONNECT)
|
FOR_EACH_NAUTILUS_WINDOW_SIGNAL (DISCONNECT)
|
||||||
#undef DISCONNECT
|
#undef DISCONNECT
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,7 @@ bookmark_holder_new (NautilusBookmark *bookmark,
|
||||||
/* Ref the bookmark because it might be unreffed away while
|
/* Ref the bookmark because it might be unreffed away while
|
||||||
* we're holding onto it (not an issue for window).
|
* we're holding onto it (not an issue for window).
|
||||||
*/
|
*/
|
||||||
gtk_object_ref (GTK_OBJECT (bookmark));
|
g_object_ref (G_OBJECT (bookmark));
|
||||||
new_bookmark_holder->prompt_for_removal = is_bookmarks_menu;
|
new_bookmark_holder->prompt_for_removal = is_bookmarks_menu;
|
||||||
|
|
||||||
new_bookmark_holder->changed_handler_id =
|
new_bookmark_holder->changed_handler_id =
|
||||||
|
@ -170,7 +170,7 @@ bookmark_holder_free (BookmarkHolder *bookmark_holder)
|
||||||
{
|
{
|
||||||
gtk_signal_disconnect (GTK_OBJECT (bookmark_holder->bookmark),
|
gtk_signal_disconnect (GTK_OBJECT (bookmark_holder->bookmark),
|
||||||
bookmark_holder->changed_handler_id);
|
bookmark_holder->changed_handler_id);
|
||||||
gtk_object_unref (GTK_OBJECT (bookmark_holder->bookmark));
|
g_object_unref (G_OBJECT (bookmark_holder->bookmark));
|
||||||
g_free (bookmark_holder);
|
g_free (bookmark_holder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -889,7 +889,7 @@ append_bookmark_to_menu (NautilusWindow *window,
|
||||||
index_in_parent,
|
index_in_parent,
|
||||||
display_name,
|
display_name,
|
||||||
pixbuf);
|
pixbuf);
|
||||||
gdk_pixbuf_unref (pixbuf);
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
g_free (display_name);
|
g_free (display_name);
|
||||||
|
|
||||||
/* Add the status tip */
|
/* Add the status tip */
|
||||||
|
@ -1002,7 +1002,7 @@ create_menu_item_from_node (NautilusWindow *window,
|
||||||
if (strcmp (node->name, "bookmark") == 0) {
|
if (strcmp (node->name, "bookmark") == 0) {
|
||||||
bookmark = nautilus_bookmark_new_from_node (node);
|
bookmark = nautilus_bookmark_new_from_node (node);
|
||||||
append_bookmark_to_menu (window, bookmark, menu_path, index, TRUE);
|
append_bookmark_to_menu (window, bookmark, menu_path, index, TRUE);
|
||||||
gtk_object_unref (GTK_OBJECT (bookmark));
|
g_object_unref (G_OBJECT (bookmark));
|
||||||
} else if (strcmp (node->name, "separator") == 0) {
|
} else if (strcmp (node->name, "separator") == 0) {
|
||||||
append_separator (window, menu_path);
|
append_separator (window, menu_path);
|
||||||
} else if (strcmp (node->name, "folder") == 0) {
|
} else if (strcmp (node->name, "folder") == 0) {
|
||||||
|
@ -1061,7 +1061,7 @@ static NautilusBookmarkList *bookmarks = NULL;
|
||||||
static void
|
static void
|
||||||
free_bookmark_list (void)
|
free_bookmark_list (void)
|
||||||
{
|
{
|
||||||
gtk_object_unref (GTK_OBJECT (bookmarks));
|
g_object_unref (G_OBJECT (bookmarks));
|
||||||
}
|
}
|
||||||
|
|
||||||
static NautilusBookmarkList *
|
static NautilusBookmarkList *
|
||||||
|
@ -1076,7 +1076,7 @@ get_bookmark_list (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkWindow *
|
static GtkWindow *
|
||||||
get_or_create_bookmarks_window (GtkObject *undo_manager_source)
|
get_or_create_bookmarks_window (GObject *undo_manager_source)
|
||||||
{
|
{
|
||||||
if (bookmarks_window == NULL) {
|
if (bookmarks_window == NULL) {
|
||||||
bookmarks_window = create_bookmarks_window (get_bookmark_list(), undo_manager_source);
|
bookmarks_window = create_bookmarks_window (get_bookmark_list(), undo_manager_source);
|
||||||
|
@ -1116,7 +1116,7 @@ static void
|
||||||
edit_bookmarks (NautilusWindow *window)
|
edit_bookmarks (NautilusWindow *window)
|
||||||
{
|
{
|
||||||
eel_gtk_window_present
|
eel_gtk_window_present
|
||||||
(get_or_create_bookmarks_window (GTK_OBJECT (window)));
|
(get_or_create_bookmarks_window (G_OBJECT (window)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue