mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-25 02:36:07 +00:00
More GNOME 2 work. We now compile up to libnautilus-private and I'm
* Lots of files: More GNOME 2 work. We now compile up to libnautilus-private and I'm working my way through the files in there. Also changed all the initialize_class and initialize to class_init and init.
This commit is contained in:
parent
b36a91ca55
commit
5abcc19954
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2001-10-28 Darin Adler <darin@bentspoon.com>
|
||||||
|
|
||||||
|
* Lots of files:
|
||||||
|
More GNOME 2 work. We now compile up to libnautilus-private and
|
||||||
|
I'm working my way through the files in there. Also changed all
|
||||||
|
the initialize_class and initialize to class_init and init.
|
||||||
|
|
||||||
|
2001-10-25 Thomas Canty <tommydal@optushome.com.au>
|
||||||
|
|
||||||
|
* Lots of files:
|
||||||
|
More work towards compiling under GNOME 2
|
||||||
|
|
||||||
2001-10-24 Darin Adler <darin@bentspoon.com>
|
2001-10-24 Darin Adler <darin@bentspoon.com>
|
||||||
|
|
||||||
* Lots of files:
|
* Lots of files:
|
||||||
|
|
|
@ -63,7 +63,7 @@ create_pixbufs ()
|
||||||
|
|
||||||
path = g_strdup_printf ("%s/pixmaps/%s", DATADIR, ICON_NAME);
|
path = g_strdup_printf ("%s/pixmaps/%s", DATADIR, ICON_NAME);
|
||||||
|
|
||||||
icon_pixbuf = gdk_pixbuf_new_from_file (path);
|
icon_pixbuf = gdk_pixbuf_new_from_file (path, NULL);
|
||||||
g_free (path);
|
g_free (path);
|
||||||
|
|
||||||
g_assert (icon_pixbuf != NULL);
|
g_assert (icon_pixbuf != NULL);
|
||||||
|
|
|
@ -212,7 +212,7 @@ main (int argc, char **argv)
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
nautilus_global_preferences_initialize ();
|
nautilus_global_preferences_init ();
|
||||||
|
|
||||||
main_hbox = gtk_hbox_new (FALSE, 1);
|
main_hbox = gtk_hbox_new (FALSE, 1);
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,7 @@
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <libgnome/gnome-defs.h> /* must come before gnome-init.h */
|
#include <libgnome/gnome-init.h> /* must come before liboaf.h */
|
||||||
#include <libgnomeui/gnome-init.h> /* must come before liboaf.h */
|
|
||||||
|
|
||||||
#include "nautilus-adapter-factory-server.h"
|
#include "nautilus-adapter-factory-server.h"
|
||||||
#include <bonobo/bonobo-generic-factory.h>
|
#include <bonobo/bonobo-generic-factory.h>
|
||||||
|
@ -36,7 +35,7 @@
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <libgnomevfs/gnome-vfs-init.h>
|
#include <libgnomevfs/gnome-vfs-init.h>
|
||||||
#include <eel/eel-debug.h>
|
#include <eel/eel-debug.h>
|
||||||
#include <liboaf/liboaf.h>
|
#include <bonobo-activation/bonobo-activation.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define META_FACTORY_IID "OAFIID:nautilus_adapter_factory_generic_factory:8e62e106-807d-4d37-b14a-00dc82ecf88f"
|
#define META_FACTORY_IID "OAFIID:nautilus_adapter_factory_generic_factory:8e62e106-807d-4d37-b14a-00dc82ecf88f"
|
||||||
|
@ -100,8 +99,8 @@ main (int argc, char *argv[])
|
||||||
/* Disable session manager connection */
|
/* Disable session manager connection */
|
||||||
gnome_client_disable_master_connection ();
|
gnome_client_disable_master_connection ();
|
||||||
|
|
||||||
gnomelib_register_popt_table (oaf_popt_options, oaf_get_popt_table_name ());
|
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
|
||||||
orb = oaf_init (argc, argv);
|
orb = bonobo_activation_init (argc, argv);
|
||||||
|
|
||||||
/* Initialize libraries. */
|
/* Initialize libraries. */
|
||||||
gnome_init ("nautilus-adapter", VERSION,
|
gnome_init ("nautilus-adapter", VERSION,
|
||||||
|
@ -112,7 +111,7 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
/* Create the factory. */
|
/* Create the factory. */
|
||||||
|
|
||||||
registration_id = oaf_make_registration_id (META_FACTORY_IID, g_getenv ("DISPLAY"));
|
registration_id = bonobo_activation_make_registration_id (META_FACTORY_IID, g_getenv ("DISPLAY"));
|
||||||
|
|
||||||
factory = bonobo_generic_factory_new_multi (registration_id, adapter_factory_make_object, NULL);
|
factory = bonobo_generic_factory_new_multi (registration_id, adapter_factory_make_object, NULL);
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@ struct NautilusAdapterControlEmbedStrategyDetails {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void nautilus_adapter_control_embed_strategy_initialize_class (NautilusAdapterControlEmbedStrategyClass *klass);
|
static void nautilus_adapter_control_embed_strategy_class_init (NautilusAdapterControlEmbedStrategyClass *klass);
|
||||||
static void nautilus_adapter_control_embed_strategy_initialize (NautilusAdapterControlEmbedStrategy *strategy);
|
static void nautilus_adapter_control_embed_strategy_init (NautilusAdapterControlEmbedStrategy *strategy);
|
||||||
static void nautilus_adapter_control_embed_strategy_activate (NautilusAdapterEmbedStrategy *object,
|
static void nautilus_adapter_control_embed_strategy_activate (NautilusAdapterEmbedStrategy *object,
|
||||||
gpointer ui_container);
|
gpointer ui_container);
|
||||||
static void nautilus_adapter_control_embed_strategy_deactivate (NautilusAdapterEmbedStrategy *object);
|
static void nautilus_adapter_control_embed_strategy_deactivate (NautilusAdapterEmbedStrategy *object);
|
||||||
|
@ -62,7 +62,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusAdapterControlEmbedStrategy, nautilus_adap
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_control_embed_strategy_initialize_class (NautilusAdapterControlEmbedStrategyClass *klass)
|
nautilus_adapter_control_embed_strategy_class_init (NautilusAdapterControlEmbedStrategyClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
NautilusAdapterEmbedStrategyClass *adapter_embed_strategy_class;
|
NautilusAdapterEmbedStrategyClass *adapter_embed_strategy_class;
|
||||||
|
@ -80,7 +80,7 @@ nautilus_adapter_control_embed_strategy_initialize_class (NautilusAdapterControl
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_control_embed_strategy_initialize (NautilusAdapterControlEmbedStrategy *strategy)
|
nautilus_adapter_control_embed_strategy_init (NautilusAdapterControlEmbedStrategy *strategy)
|
||||||
{
|
{
|
||||||
strategy->details = g_new0 (NautilusAdapterControlEmbedStrategyDetails, 1);
|
strategy->details = g_new0 (NautilusAdapterControlEmbedStrategyDetails, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,8 +49,8 @@ struct NautilusAdapterEmbeddableEmbedStrategyDetails {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void nautilus_adapter_embeddable_embed_strategy_initialize_class (NautilusAdapterEmbeddableEmbedStrategyClass *klass);
|
static void nautilus_adapter_embeddable_embed_strategy_class_init (NautilusAdapterEmbeddableEmbedStrategyClass *klass);
|
||||||
static void nautilus_adapter_embeddable_embed_strategy_initialize (NautilusAdapterEmbeddableEmbedStrategy *strategy);
|
static void nautilus_adapter_embeddable_embed_strategy_init (NautilusAdapterEmbeddableEmbedStrategy *strategy);
|
||||||
static void nautilus_adapter_embeddable_embed_strategy_destroy (GtkObject *object);
|
static void nautilus_adapter_embeddable_embed_strategy_destroy (GtkObject *object);
|
||||||
static void nautilus_adapter_embeddable_embed_strategy_activate (NautilusAdapterEmbedStrategy *object,
|
static void nautilus_adapter_embeddable_embed_strategy_activate (NautilusAdapterEmbedStrategy *object,
|
||||||
gpointer ui_container);
|
gpointer ui_container);
|
||||||
|
@ -65,7 +65,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusAdapterEmbeddableEmbedStrategy, nautilus_a
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_embeddable_embed_strategy_initialize_class (NautilusAdapterEmbeddableEmbedStrategyClass *klass)
|
nautilus_adapter_embeddable_embed_strategy_class_init (NautilusAdapterEmbeddableEmbedStrategyClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
NautilusAdapterEmbedStrategyClass *adapter_embed_strategy_class;
|
NautilusAdapterEmbedStrategyClass *adapter_embed_strategy_class;
|
||||||
|
@ -83,7 +83,7 @@ nautilus_adapter_embeddable_embed_strategy_initialize_class (NautilusAdapterEmbe
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_embeddable_embed_strategy_initialize (NautilusAdapterEmbeddableEmbedStrategy *strategy)
|
nautilus_adapter_embeddable_embed_strategy_init (NautilusAdapterEmbeddableEmbedStrategy *strategy)
|
||||||
{
|
{
|
||||||
strategy->details = g_new0 (NautilusAdapterEmbeddableEmbedStrategyDetails, 1);
|
strategy->details = g_new0 (NautilusAdapterEmbeddableEmbedStrategyDetails, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,8 @@ enum {
|
||||||
|
|
||||||
static guint signals[LAST_SIGNAL];
|
static guint signals[LAST_SIGNAL];
|
||||||
|
|
||||||
static void nautilus_adapter_embed_strategy_initialize_class (NautilusAdapterEmbedStrategyClass *klass);
|
static void nautilus_adapter_embed_strategy_class_init (NautilusAdapterEmbedStrategyClass *klass);
|
||||||
static void nautilus_adapter_embed_strategy_initialize (NautilusAdapterEmbedStrategy *strategy);
|
static void nautilus_adapter_embed_strategy_init (NautilusAdapterEmbedStrategy *strategy);
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusAdapterEmbedStrategy,
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusAdapterEmbedStrategy,
|
||||||
nautilus_adapter_embed_strategy,
|
nautilus_adapter_embed_strategy,
|
||||||
|
@ -59,42 +59,43 @@ EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (nautilus_adapter_embed_strategy, get_widget)
|
||||||
EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (nautilus_adapter_embed_strategy, get_zoomable)
|
EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (nautilus_adapter_embed_strategy, get_zoomable)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_embed_strategy_initialize_class (NautilusAdapterEmbedStrategyClass *klass)
|
nautilus_adapter_embed_strategy_class_init (NautilusAdapterEmbedStrategyClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass *) klass;
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
signals[ACTIVATE] =
|
signals[ACTIVATE] =
|
||||||
gtk_signal_new ("activate",
|
g_signal_new ("activate",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusAdapterEmbedStrategyClass, activate),
|
G_STRUCT_OFFSET (NautilusAdapterEmbedStrategyClass, activate),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_POINTER, 0);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_POINTER, 0);
|
||||||
signals[DEACTIVATE] =
|
signals[DEACTIVATE] =
|
||||||
gtk_signal_new ("deactivate",
|
g_signal_new ("deactivate",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusAdapterEmbedStrategyClass, deactivate),
|
G_STRUCT_OFFSET (NautilusAdapterEmbedStrategyClass, deactivate),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
signals[OPEN_LOCATION] =
|
signals[OPEN_LOCATION] =
|
||||||
gtk_signal_new ("open_location",
|
g_signal_new ("open_location",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusAdapterEmbedStrategyClass, open_location),
|
G_STRUCT_OFFSET (NautilusAdapterEmbedStrategyClass, open_location),
|
||||||
gtk_marshal_NONE__STRING,
|
NULL, NULL,
|
||||||
GTK_TYPE_STRING, 0);
|
g_cclosure_marshal_VOID__STRING,
|
||||||
|
G_TYPE_STRING, 0);
|
||||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
|
||||||
|
|
||||||
EEL_ASSIGN_MUST_OVERRIDE_SIGNAL (klass, nautilus_adapter_embed_strategy, get_widget);
|
EEL_ASSIGN_MUST_OVERRIDE_SIGNAL (klass, nautilus_adapter_embed_strategy, get_widget);
|
||||||
EEL_ASSIGN_MUST_OVERRIDE_SIGNAL (klass, nautilus_adapter_embed_strategy, get_zoomable);
|
EEL_ASSIGN_MUST_OVERRIDE_SIGNAL (klass, nautilus_adapter_embed_strategy, get_zoomable);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_embed_strategy_initialize (NautilusAdapterEmbedStrategy *strategy)
|
nautilus_adapter_embed_strategy_init (NautilusAdapterEmbedStrategy *strategy)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,8 @@ struct NautilusAdapterEmbeddableEmbedStrategyDetails {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void nautilus_adapter_embeddable_embed_strategy_initialize_class (NautilusAdapterEmbeddableEmbedStrategyClass *klass);
|
static void nautilus_adapter_embeddable_embed_strategy_class_init (NautilusAdapterEmbeddableEmbedStrategyClass *klass);
|
||||||
static void nautilus_adapter_embeddable_embed_strategy_initialize (NautilusAdapterEmbeddableEmbedStrategy *strategy);
|
static void nautilus_adapter_embeddable_embed_strategy_init (NautilusAdapterEmbeddableEmbedStrategy *strategy);
|
||||||
static void nautilus_adapter_embeddable_embed_strategy_destroy (GtkObject *object);
|
static void nautilus_adapter_embeddable_embed_strategy_destroy (GtkObject *object);
|
||||||
static void nautilus_adapter_embeddable_embed_strategy_activate (NautilusAdapterEmbedStrategy *object,
|
static void nautilus_adapter_embeddable_embed_strategy_activate (NautilusAdapterEmbedStrategy *object,
|
||||||
gpointer ui_container);
|
gpointer ui_container);
|
||||||
|
@ -65,7 +65,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusAdapterEmbeddableEmbedStrategy, nautilus_a
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_embeddable_embed_strategy_initialize_class (NautilusAdapterEmbeddableEmbedStrategyClass *klass)
|
nautilus_adapter_embeddable_embed_strategy_class_init (NautilusAdapterEmbeddableEmbedStrategyClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
NautilusAdapterEmbedStrategyClass *adapter_embed_strategy_class;
|
NautilusAdapterEmbedStrategyClass *adapter_embed_strategy_class;
|
||||||
|
@ -83,7 +83,7 @@ nautilus_adapter_embeddable_embed_strategy_initialize_class (NautilusAdapterEmbe
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_embeddable_embed_strategy_initialize (NautilusAdapterEmbeddableEmbedStrategy *strategy)
|
nautilus_adapter_embeddable_embed_strategy_init (NautilusAdapterEmbeddableEmbedStrategy *strategy)
|
||||||
{
|
{
|
||||||
strategy->details = g_new0 (NautilusAdapterEmbeddableEmbedStrategyDetails, 1);
|
strategy->details = g_new0 (NautilusAdapterEmbeddableEmbedStrategyDetails, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnomeui/gnome-stock.h>
|
#include <libgnomeui/gnome-stock-icons.h>
|
||||||
#include <libnautilus-adapter/nautilus-adapter-factory.h>
|
#include <libnautilus-adapter/nautilus-adapter-factory.h>
|
||||||
#include <eel/eel-gtk-macros.h>
|
#include <eel/eel-gtk-macros.h>
|
||||||
#include <libnautilus/nautilus-bonobo-ui.h>
|
#include <libnautilus/nautilus-bonobo-ui.h>
|
||||||
|
@ -79,8 +79,8 @@ static POA_Nautilus_ComponentAdapterFactory__vepv impl_Nautilus_ComponentAdapter
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void nautilus_adapter_factory_server_initialize_class (NautilusAdapterFactoryServerClass *klass);
|
static void nautilus_adapter_factory_server_class_init (NautilusAdapterFactoryServerClass *klass);
|
||||||
static void nautilus_adapter_factory_server_initialize (NautilusAdapterFactoryServer *server);
|
static void nautilus_adapter_factory_server_init (NautilusAdapterFactoryServer *server);
|
||||||
static void nautilus_adapter_factory_server_destroy (GtkObject *object);
|
static void nautilus_adapter_factory_server_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusAdapterFactoryServer,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_factory_server_initialize_class (NautilusAdapterFactoryServerClass *klass)
|
nautilus_adapter_factory_server_class_init (NautilusAdapterFactoryServerClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ nautilus_adapter_factory_server_initialize_class (NautilusAdapterFactoryServerCl
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_factory_server_initialize (NautilusAdapterFactoryServer *server)
|
nautilus_adapter_factory_server_init (NautilusAdapterFactoryServer *server)
|
||||||
{
|
{
|
||||||
CORBA_Environment ev;
|
CORBA_Environment ev;
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,8 @@ struct NautilusAdapterFileLoadStrategyDetails {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void nautilus_adapter_file_load_strategy_initialize_class (NautilusAdapterFileLoadStrategyClass *klass);
|
static void nautilus_adapter_file_load_strategy_class_init (NautilusAdapterFileLoadStrategyClass *klass);
|
||||||
static void nautilus_adapter_file_load_strategy_initialize (NautilusAdapterFileLoadStrategy *strategy);
|
static void nautilus_adapter_file_load_strategy_init (NautilusAdapterFileLoadStrategy *strategy);
|
||||||
static void nautilus_adapter_file_load_strategy_destroy (GtkObject *object);
|
static void nautilus_adapter_file_load_strategy_destroy (GtkObject *object);
|
||||||
|
|
||||||
static void nautilus_adapter_file_load_strategy_load_location (NautilusAdapterLoadStrategy *strategy,
|
static void nautilus_adapter_file_load_strategy_load_location (NautilusAdapterLoadStrategy *strategy,
|
||||||
|
@ -57,7 +57,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusAdapterFileLoadStrategy, nautilus_adapter_
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_file_load_strategy_initialize_class (NautilusAdapterFileLoadStrategyClass *klass)
|
nautilus_adapter_file_load_strategy_class_init (NautilusAdapterFileLoadStrategyClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
NautilusAdapterLoadStrategyClass *adapter_load_strategy_class;
|
NautilusAdapterLoadStrategyClass *adapter_load_strategy_class;
|
||||||
|
@ -73,7 +73,7 @@ nautilus_adapter_file_load_strategy_initialize_class (NautilusAdapterFileLoadStr
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_file_load_strategy_initialize (NautilusAdapterFileLoadStrategy *strategy)
|
nautilus_adapter_file_load_strategy_init (NautilusAdapterFileLoadStrategy *strategy)
|
||||||
{
|
{
|
||||||
strategy->details = g_new0 (NautilusAdapterFileLoadStrategyDetails, 1);
|
strategy->details = g_new0 (NautilusAdapterFileLoadStrategyDetails, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,8 +53,8 @@ static guint signals[LAST_SIGNAL];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void nautilus_adapter_load_strategy_initialize_class (NautilusAdapterLoadStrategyClass *klass);
|
static void nautilus_adapter_load_strategy_class_init (NautilusAdapterLoadStrategyClass *klass);
|
||||||
static void nautilus_adapter_load_strategy_initialize (NautilusAdapterLoadStrategy *strategy);
|
static void nautilus_adapter_load_strategy_init (NautilusAdapterLoadStrategy *strategy);
|
||||||
static void nautilus_adapter_load_strategy_destroy (GtkObject *object);
|
static void nautilus_adapter_load_strategy_destroy (GtkObject *object);
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusAdapterLoadStrategy, nautilus_adapter_load_strategy, GTK_TYPE_OBJECT)
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusAdapterLoadStrategy, nautilus_adapter_load_strategy, GTK_TYPE_OBJECT)
|
||||||
|
@ -63,7 +63,7 @@ EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (nautilus_adapter_load_strategy, load_locatio
|
||||||
EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (nautilus_adapter_load_strategy, stop_loading)
|
EEL_IMPLEMENT_MUST_OVERRIDE_SIGNAL (nautilus_adapter_load_strategy, stop_loading)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_load_strategy_initialize_class (NautilusAdapterLoadStrategyClass *klass)
|
nautilus_adapter_load_strategy_class_init (NautilusAdapterLoadStrategyClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -76,39 +76,41 @@ nautilus_adapter_load_strategy_initialize_class (NautilusAdapterLoadStrategyClas
|
||||||
|
|
||||||
|
|
||||||
signals[REPORT_LOAD_UNDERWAY] =
|
signals[REPORT_LOAD_UNDERWAY] =
|
||||||
gtk_signal_new ("report_load_underway",
|
g_signal_new ("report_load_underway",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusAdapterLoadStrategyClass, report_load_underway),
|
G_STRUCT_OFFSET (NautilusAdapterLoadStrategyClass, report_load_underway),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
signals[REPORT_LOAD_PROGRESS] =
|
signals[REPORT_LOAD_PROGRESS] =
|
||||||
gtk_signal_new ("report_load_progress",
|
g_signal_new ("report_load_progress",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusAdapterLoadStrategyClass, report_load_progress),
|
G_STRUCT_OFFSET (NautilusAdapterLoadStrategyClass, report_load_progress),
|
||||||
eel_gtk_marshal_NONE__DOUBLE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1, GTK_TYPE_DOUBLE);
|
eel_gtk_marshal_NONE__DOUBLE,
|
||||||
|
G_TYPE_NONE, 1, GTK_TYPE_DOUBLE);
|
||||||
signals[REPORT_LOAD_COMPLETE] =
|
signals[REPORT_LOAD_COMPLETE] =
|
||||||
gtk_signal_new ("report_load_complete",
|
g_signal_new ("report_load_complete",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusAdapterLoadStrategyClass, report_load_complete),
|
G_STRUCT_OFFSET (NautilusAdapterLoadStrategyClass, report_load_complete),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
signals[REPORT_LOAD_FAILED] =
|
signals[REPORT_LOAD_FAILED] =
|
||||||
gtk_signal_new ("report_load_failed",
|
g_signal_new ("report_load_failed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusAdapterLoadStrategyClass, report_load_failed),
|
G_STRUCT_OFFSET (NautilusAdapterLoadStrategyClass, report_load_failed),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_load_strategy_initialize (NautilusAdapterLoadStrategy *strategy)
|
nautilus_adapter_load_strategy_init (NautilusAdapterLoadStrategy *strategy)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,8 @@ struct NautilusAdapterProgressiveLoadStrategyDetails {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void nautilus_adapter_progressive_load_strategy_initialize_class (NautilusAdapterProgressiveLoadStrategyClass *klass);
|
static void nautilus_adapter_progressive_load_strategy_class_init (NautilusAdapterProgressiveLoadStrategyClass *klass);
|
||||||
static void nautilus_adapter_progressive_load_strategy_initialize (NautilusAdapterProgressiveLoadStrategy *strategy);
|
static void nautilus_adapter_progressive_load_strategy_init (NautilusAdapterProgressiveLoadStrategy *strategy);
|
||||||
static void nautilus_adapter_progressive_load_strategy_destroy (GtkObject *object);
|
static void nautilus_adapter_progressive_load_strategy_destroy (GtkObject *object);
|
||||||
|
|
||||||
static void nautilus_adapter_progressive_load_strategy_load_location (NautilusAdapterLoadStrategy *strategy,
|
static void nautilus_adapter_progressive_load_strategy_load_location (NautilusAdapterLoadStrategy *strategy,
|
||||||
|
@ -68,7 +68,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusAdapterProgressiveLoadStrategy, nautilus_a
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_progressive_load_strategy_initialize_class (NautilusAdapterProgressiveLoadStrategyClass *klass)
|
nautilus_adapter_progressive_load_strategy_class_init (NautilusAdapterProgressiveLoadStrategyClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
NautilusAdapterLoadStrategyClass *adapter_load_strategy_class;
|
NautilusAdapterLoadStrategyClass *adapter_load_strategy_class;
|
||||||
|
@ -84,7 +84,7 @@ nautilus_adapter_progressive_load_strategy_initialize_class (NautilusAdapterProg
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_progressive_load_strategy_initialize (NautilusAdapterProgressiveLoadStrategy *strategy)
|
nautilus_adapter_progressive_load_strategy_init (NautilusAdapterProgressiveLoadStrategy *strategy)
|
||||||
{
|
{
|
||||||
strategy->details = g_new0 (NautilusAdapterProgressiveLoadStrategyDetails, 1);
|
strategy->details = g_new0 (NautilusAdapterProgressiveLoadStrategyDetails, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,8 +42,8 @@ struct NautilusAdapterStreamLoadStrategyDetails {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void nautilus_adapter_stream_load_strategy_initialize_class (NautilusAdapterStreamLoadStrategyClass *klass);
|
static void nautilus_adapter_stream_load_strategy_class_init (NautilusAdapterStreamLoadStrategyClass *klass);
|
||||||
static void nautilus_adapter_stream_load_strategy_initialize (NautilusAdapterStreamLoadStrategy *strategy);
|
static void nautilus_adapter_stream_load_strategy_init (NautilusAdapterStreamLoadStrategy *strategy);
|
||||||
static void nautilus_adapter_stream_load_strategy_destroy (GtkObject *object);
|
static void nautilus_adapter_stream_load_strategy_destroy (GtkObject *object);
|
||||||
|
|
||||||
static void nautilus_adapter_stream_load_strategy_load_location (NautilusAdapterLoadStrategy *strategy,
|
static void nautilus_adapter_stream_load_strategy_load_location (NautilusAdapterLoadStrategy *strategy,
|
||||||
|
@ -56,7 +56,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusAdapterStreamLoadStrategy, nautilus_adapte
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_stream_load_strategy_initialize_class (NautilusAdapterStreamLoadStrategyClass *klass)
|
nautilus_adapter_stream_load_strategy_class_init (NautilusAdapterStreamLoadStrategyClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
NautilusAdapterLoadStrategyClass *adapter_load_strategy_class;
|
NautilusAdapterLoadStrategyClass *adapter_load_strategy_class;
|
||||||
|
@ -72,7 +72,7 @@ nautilus_adapter_stream_load_strategy_initialize_class (NautilusAdapterStreamLoa
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_stream_load_strategy_initialize (NautilusAdapterStreamLoadStrategy *strategy)
|
nautilus_adapter_stream_load_strategy_init (NautilusAdapterStreamLoadStrategy *strategy)
|
||||||
{
|
{
|
||||||
strategy->details = g_new0 (NautilusAdapterStreamLoadStrategyDetails, 1);
|
strategy->details = g_new0 (NautilusAdapterStreamLoadStrategyDetails, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,13 @@
|
||||||
#include "nautilus-adapter-load-strategy.h"
|
#include "nautilus-adapter-load-strategy.h"
|
||||||
#include <bonobo/bonobo-control.h>
|
#include <bonobo/bonobo-control.h>
|
||||||
#include <bonobo/bonobo-item-container.h>
|
#include <bonobo/bonobo-item-container.h>
|
||||||
#include <bonobo/bonobo-object-client.h>
|
|
||||||
#include <bonobo/bonobo-view-frame.h>
|
#include <bonobo/bonobo-view-frame.h>
|
||||||
#include <eel/eel-generous-bin.h>
|
#include <eel/eel-generous-bin.h>
|
||||||
#include <eel/eel-gtk-macros.h>
|
#include <eel/eel-gtk-macros.h>
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnomeui/gnome-stock.h>
|
#include <libgnomeui/gnome-stock-icons.h>
|
||||||
#include <libnautilus-adapter/nautilus-adapter-factory.h>
|
#include <libnautilus-adapter/nautilus-adapter-factory.h>
|
||||||
#include <libnautilus/nautilus-bonobo-ui.h>
|
#include <libnautilus/nautilus-bonobo-ui.h>
|
||||||
|
|
||||||
|
@ -71,8 +70,8 @@ static void nautilus_adapter_load_progress_callback (NautilusAdapter
|
||||||
double fraction_complete);
|
double fraction_complete);
|
||||||
static void nautilus_adapter_load_complete_callback (NautilusAdapter *adapter);
|
static void nautilus_adapter_load_complete_callback (NautilusAdapter *adapter);
|
||||||
static void nautilus_adapter_load_failed_callback (NautilusAdapter *adapter);
|
static void nautilus_adapter_load_failed_callback (NautilusAdapter *adapter);
|
||||||
static void nautilus_adapter_initialize_class (NautilusAdapterClass *klass);
|
static void nautilus_adapter_class_init (NautilusAdapterClass *klass);
|
||||||
static void nautilus_adapter_initialize (NautilusAdapter *server);
|
static void nautilus_adapter_init (NautilusAdapter *server);
|
||||||
static void nautilus_adapter_destroy (GtkObject *object);
|
static void nautilus_adapter_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,7 +81,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusAdapter,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_initialize_class (NautilusAdapterClass *klass)
|
nautilus_adapter_class_init (NautilusAdapterClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -92,7 +91,7 @@ nautilus_adapter_initialize_class (NautilusAdapterClass *klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_adapter_initialize (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));
|
gtk_object_ref (GTK_OBJECT (adapter));
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include <eel/eel-debug.h>
|
#include <eel/eel-debug.h>
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
#include <libgnomevfs/gnome-vfs.h>
|
#include <libgnomevfs/gnome-vfs.h>
|
||||||
#include <liboaf/liboaf.h>
|
#include <bonobo-activation/bonobo-activation.h>
|
||||||
|
|
||||||
static int object_count = 0;
|
static int object_count = 0;
|
||||||
|
|
||||||
|
@ -45,12 +45,12 @@ hardware_view_object_destroyed(GtkObject *obj)
|
||||||
|
|
||||||
static BonoboObject *
|
static BonoboObject *
|
||||||
hardware_view_make_object (BonoboGenericFactory *factory,
|
hardware_view_make_object (BonoboGenericFactory *factory,
|
||||||
const char *oaf_iid,
|
const char *bonobo_activation_iid,
|
||||||
void *closure)
|
void *closure)
|
||||||
{
|
{
|
||||||
NautilusView *view;
|
NautilusView *view;
|
||||||
|
|
||||||
if (strcmp (oaf_iid, "OAFIID:nautilus_hardware_view:4a3f3793-bab4-4640-9f56-e7871fe8e150")) {
|
if (strcmp (bonobo_activation_iid, "OAFIID:nautilus_hardware_view:4a3f3793-bab4-4640-9f56-e7871fe8e150")) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,8 +86,8 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
CORBA_exception_init(&ev);
|
CORBA_exception_init(&ev);
|
||||||
|
|
||||||
gnomelib_register_popt_table (oaf_popt_options, oaf_get_popt_table_name ());
|
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
|
||||||
orb = oaf_init (argc, argv);
|
orb = bonobo_activation_init (argc, argv);
|
||||||
|
|
||||||
gnome_init ("nautilus-hardware-view", VERSION,
|
gnome_init ("nautilus-hardware-view", VERSION,
|
||||||
argc, argv);
|
argc, argv);
|
||||||
|
@ -98,7 +98,7 @@ int main(int argc, char *argv[])
|
||||||
g_thread_init (NULL);
|
g_thread_init (NULL);
|
||||||
gnome_vfs_init ();
|
gnome_vfs_init ();
|
||||||
|
|
||||||
registration_id = oaf_make_registration_id ("OAFIID:nautilus_hardware_view_factory:8c80e55a-5c03-4403-9e51-3a5711b8a5ce",
|
registration_id = bonobo_activation_make_registration_id ("OAFIID:nautilus_hardware_view_factory:8c80e55a-5c03-4403-9e51-3a5711b8a5ce",
|
||||||
getenv ("DISPLAY"));
|
getenv ("DISPLAY"));
|
||||||
factory = bonobo_generic_factory_new_multi (registration_id,
|
factory = bonobo_generic_factory_new_multi (registration_id,
|
||||||
hardware_view_make_object,
|
hardware_view_make_object,
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <libgnorba/gnorba.h>
|
|
||||||
#include <eel/eel-background.h>
|
#include <eel/eel-background.h>
|
||||||
#include <libnautilus-private/nautilus-directory-background.h>
|
#include <libnautilus-private/nautilus-directory-background.h>
|
||||||
#include <libnautilus-private/nautilus-file-utilities.h>
|
#include <libnautilus-private/nautilus-file-utilities.h>
|
||||||
|
@ -86,8 +85,8 @@ static void nautilus_hardware_view_drag_data_received (GtkWidget
|
||||||
GtkSelectionData *selection_data,
|
GtkSelectionData *selection_data,
|
||||||
guint info,
|
guint info,
|
||||||
guint time);
|
guint time);
|
||||||
static void nautilus_hardware_view_initialize_class (NautilusHardwareViewClass *klass);
|
static void nautilus_hardware_view_class_init (NautilusHardwareViewClass *klass);
|
||||||
static void nautilus_hardware_view_initialize (NautilusHardwareView *view);
|
static void nautilus_hardware_view_init (NautilusHardwareView *view);
|
||||||
static void nautilus_hardware_view_destroy (GtkObject *object);
|
static void nautilus_hardware_view_destroy (GtkObject *object);
|
||||||
static void hardware_view_load_location_callback (NautilusView *view,
|
static void hardware_view_load_location_callback (NautilusView *view,
|
||||||
const char *location,
|
const char *location,
|
||||||
|
@ -100,7 +99,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusHardwareView, nautilus_hardware_view, GTK_
|
||||||
#define HARDWARE_DEFAULT_BACKGROUND_COLOR "rgb:DDDD/DDDD/BBBB"
|
#define HARDWARE_DEFAULT_BACKGROUND_COLOR "rgb:DDDD/DDDD/BBBB"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_hardware_view_initialize_class (NautilusHardwareViewClass *klass)
|
nautilus_hardware_view_class_init (NautilusHardwareViewClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
|
@ -152,7 +151,7 @@ set_bonobo_properties (BonoboPropertyBag *bag,
|
||||||
|
|
||||||
/* initialize ourselves by connecting to the load_location signal and allocating our subviews */
|
/* initialize ourselves by connecting to the load_location signal and allocating our subviews */
|
||||||
static void
|
static void
|
||||||
nautilus_hardware_view_initialize (NautilusHardwareView *hardware_view)
|
nautilus_hardware_view_init (NautilusHardwareView *hardware_view)
|
||||||
{
|
{
|
||||||
EelBackground *background;
|
EelBackground *background;
|
||||||
hardware_view->details = g_new0 (NautilusHardwareViewDetails, 1);
|
hardware_view->details = g_new0 (NautilusHardwareViewDetails, 1);
|
||||||
|
@ -172,7 +171,7 @@ nautilus_hardware_view_initialize (NautilusHardwareView *hardware_view)
|
||||||
/* prepare ourselves to receive dropped objects */
|
/* prepare ourselves to receive dropped objects */
|
||||||
gtk_drag_dest_set (GTK_WIDGET (hardware_view),
|
gtk_drag_dest_set (GTK_WIDGET (hardware_view),
|
||||||
GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_DROP,
|
GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_DROP,
|
||||||
hardware_dnd_target_table, EEL_N_ELEMENTS (hardware_dnd_target_table), GDK_ACTION_COPY);
|
hardware_dnd_target_table, G_N_ELEMENTS (hardware_dnd_target_table), GDK_ACTION_COPY);
|
||||||
|
|
||||||
/* allocate a property bag to specify the name of the icon for this component */
|
/* allocate a property bag to specify the name of the icon for this component */
|
||||||
hardware_view->details->property_bag = bonobo_property_bag_new (get_bonobo_properties, set_bonobo_properties, hardware_view);
|
hardware_view->details->property_bag = bonobo_property_bag_new (get_bonobo_properties, set_bonobo_properties, hardware_view);
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <eel/eel-glib-extensions.h>
|
#include <eel/eel-glib-extensions.h>
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnome/gnome-util.h>
|
#include <libgnome/gnome-util.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
@ -973,7 +972,7 @@ fmt_scrollkeeper_parse_toc_section (HyperbolaDocTree * tree, char **ancestors,
|
||||||
char separator[2] = { '\0' };
|
char separator[2] = { '\0' };
|
||||||
|
|
||||||
|
|
||||||
next_child = node->xmlChildrenNode;
|
next_child = node->children;
|
||||||
|
|
||||||
/* Set up the positioning information for the HyperbolaDocTree */
|
/* Set up the positioning information for the HyperbolaDocTree */
|
||||||
section = fmt_scrollkeeper_expand_ancestor_list (ancestors, &i);
|
section = fmt_scrollkeeper_expand_ancestor_list (ancestors, &i);
|
||||||
|
@ -1079,7 +1078,7 @@ fmt_scrollkeeper_parse_doc_toc (HyperbolaDocTree * tree, char **ancestors,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process the top-level tocsect nodes in the file */
|
/* Process the top-level tocsect nodes in the file */
|
||||||
for (pos = 1, next_child = toc_doc->xmlRootNode->xmlChildrenNode; next_child != NULL;
|
for (pos = 1, next_child = toc_doc->children->children; next_child != NULL;
|
||||||
next_child = next_child->next) {
|
next_child = next_child->next) {
|
||||||
if (!g_strncasecmp (next_child->name, "tocsect", 7)) {
|
if (!g_strncasecmp (next_child->name, "tocsect", 7)) {
|
||||||
fmt_scrollkeeper_parse_toc_section (tree, ancestors,
|
fmt_scrollkeeper_parse_toc_section (tree, ancestors,
|
||||||
|
@ -1131,17 +1130,17 @@ fmt_scrollkeeper_parse_document (HyperbolaDocTree * tree, char **ancestors,
|
||||||
|
|
||||||
toc_location = g_new0 (char, 1024);
|
toc_location = g_new0 (char, 1024);
|
||||||
|
|
||||||
next_child = node->xmlChildrenNode;
|
next_child = node->children;
|
||||||
|
|
||||||
/* Obtain info about the document from the XML node describing it */
|
/* Obtain info about the document from the XML node describing it */
|
||||||
for (; next_child != NULL; next_child = next_child->next) {
|
for (; next_child != NULL; next_child = next_child->next) {
|
||||||
|
|
||||||
if (!g_strcasecmp (next_child->name, "doctitle")) {
|
if (!g_strcasecmp (next_child->name, "doctitle")) {
|
||||||
doc_data[0] = xmlNodeGetContent (next_child->xmlChildrenNode);
|
doc_data[0] = xmlNodeGetContent (next_child->children);
|
||||||
} else if (!g_strcasecmp (next_child->name, "docsource")) {
|
} else if (!g_strcasecmp (next_child->name, "docsource")) {
|
||||||
doc_data[1] = xmlNodeGetContent (next_child->xmlChildrenNode);
|
doc_data[1] = xmlNodeGetContent (next_child->children);
|
||||||
} else if (!g_strcasecmp (next_child->name, "docformat")) {
|
} else if (!g_strcasecmp (next_child->name, "docformat")) {
|
||||||
doc_data[2] = xmlNodeGetContent (next_child->xmlChildrenNode);
|
doc_data[2] = xmlNodeGetContent (next_child->children);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1228,11 +1227,11 @@ fmt_scrollkeeper_parse_section (HyperbolaDocTree * tree, char **ancestors,
|
||||||
char **section;
|
char **section;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
next_child = node->xmlChildrenNode;
|
next_child = node->children;
|
||||||
|
|
||||||
/* Make space for this level and add the title of this node to the path */
|
/* Make space for this level and add the title of this node to the path */
|
||||||
section = fmt_scrollkeeper_expand_ancestor_list (ancestors, &i);
|
section = fmt_scrollkeeper_expand_ancestor_list (ancestors, &i);
|
||||||
section[i] = xmlNodeGetContent (next_child->xmlChildrenNode);
|
section[i] = xmlNodeGetContent (next_child->children);
|
||||||
section[i + 1] = NULL;
|
section[i + 1] = NULL;
|
||||||
|
|
||||||
/* There is no URI so use this function instead */
|
/* There is no URI so use this function instead */
|
||||||
|
@ -1272,14 +1271,14 @@ fmt_scrollkeeper_parse_xml (HyperbolaDocTree * tree, char **defpath,
|
||||||
xmlNodePtr node;
|
xmlNodePtr node;
|
||||||
|
|
||||||
/* Ensure the document is valid and a real ScrollKeeper document */
|
/* Ensure the document is valid and a real ScrollKeeper document */
|
||||||
if (!doc->xmlRootNode || !doc->xmlRootNode->name ||
|
if (!doc->children || !doc->children->name ||
|
||||||
g_strcasecmp (doc->xmlRootNode->name, "ScrollKeeperContentsList")) {
|
g_strcasecmp (doc->children->name, "ScrollKeeperContentsList")) {
|
||||||
g_warning ("Invalid ScrollKeeper XML Contents List!");
|
g_warning ("Invalid ScrollKeeper XML Contents List!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start parsing the list and add to the tree */
|
/* Start parsing the list and add to the tree */
|
||||||
for (node = doc->xmlRootNode->xmlChildrenNode; node != NULL; node = node->next) {
|
for (node = doc->children->children; node != NULL; node = node->next) {
|
||||||
if (!g_strcasecmp (node->name, "sect"))
|
if (!g_strcasecmp (node->name, "sect"))
|
||||||
fmt_scrollkeeper_parse_section (tree, defpath, node);
|
fmt_scrollkeeper_parse_section (tree, defpath, node);
|
||||||
}
|
}
|
||||||
|
@ -1304,12 +1303,12 @@ fmt_scrollkeeper_trim_empty_branches (xmlNodePtr cl_node)
|
||||||
next = node->next;
|
next = node->next;
|
||||||
|
|
||||||
if (!strcmp (node->name, "sect") &&
|
if (!strcmp (node->name, "sect") &&
|
||||||
node->xmlChildrenNode->next !=
|
node->children->next !=
|
||||||
NULL) fmt_scrollkeeper_trim_empty_branches (node->
|
NULL) fmt_scrollkeeper_trim_empty_branches (node->
|
||||||
xmlChildrenNode->next);
|
children->next);
|
||||||
|
|
||||||
if (!strcmp (node->name, "sect") &&
|
if (!strcmp (node->name, "sect") &&
|
||||||
node->xmlChildrenNode->next == NULL) {
|
node->children->next == NULL) {
|
||||||
xmlUnlinkNode (node);
|
xmlUnlinkNode (node);
|
||||||
xmlFreeNode (node);
|
xmlFreeNode (node);
|
||||||
}
|
}
|
||||||
|
@ -1330,8 +1329,8 @@ fmt_scrollkeeper_tree_empty (xmlNodePtr cl_node)
|
||||||
next = node->next;
|
next = node->next;
|
||||||
|
|
||||||
if (!strcmp (node->name, "sect") &&
|
if (!strcmp (node->name, "sect") &&
|
||||||
node->xmlChildrenNode->next != NULL) {
|
node->children->next != NULL) {
|
||||||
ret_val = fmt_scrollkeeper_tree_empty (node->xmlChildrenNode->next);
|
ret_val = fmt_scrollkeeper_tree_empty (node->children->next);
|
||||||
if (!ret_val)
|
if (!ret_val)
|
||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
@ -1418,7 +1417,7 @@ fmt_scrollkeeper_populate_tree (HyperbolaDocTree * tree)
|
||||||
node = node->next) {
|
node = node->next) {
|
||||||
doc = fmt_scrollkeeper_get_xml_tree_of_locale (node->data);
|
doc = fmt_scrollkeeper_get_xml_tree_of_locale (node->data);
|
||||||
if (doc != NULL) {
|
if (doc != NULL) {
|
||||||
if (doc->xmlRootNode != NULL && !fmt_scrollkeeper_tree_empty(doc->xmlRootNode->xmlChildrenNode)) {
|
if (doc->children != NULL && !fmt_scrollkeeper_tree_empty(doc->children->children)) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
xmlFreeDoc (doc);
|
xmlFreeDoc (doc);
|
||||||
|
@ -1428,7 +1427,7 @@ fmt_scrollkeeper_populate_tree (HyperbolaDocTree * tree)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doc) {
|
if (doc) {
|
||||||
fmt_scrollkeeper_trim_empty_branches (doc->xmlRootNode->xmlChildrenNode);
|
fmt_scrollkeeper_trim_empty_branches (doc->children->children);
|
||||||
fmt_scrollkeeper_parse_xml (tree, tree_path, doc);
|
fmt_scrollkeeper_parse_xml (tree, tree_path, doc);
|
||||||
xmlFreeDoc (doc);
|
xmlFreeDoc (doc);
|
||||||
}
|
}
|
||||||
|
@ -1475,13 +1474,13 @@ fmt_toplevel_add_doc (HyperbolaDocTree * tree, char * omf_name)
|
||||||
if (doc == NULL)
|
if (doc == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (doc->xmlRootNode == NULL || doc->xmlRootNode->xmlChildrenNode == NULL ||
|
if (doc->children == NULL || doc->children->children == NULL ||
|
||||||
doc->xmlRootNode->xmlChildrenNode->xmlChildrenNode == NULL) {
|
doc->children->children->children == NULL) {
|
||||||
xmlFreeDoc(doc);
|
xmlFreeDoc(doc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(node = doc->xmlRootNode->xmlChildrenNode->xmlChildrenNode; node != NULL;
|
for(node = doc->children->children->children; node != NULL;
|
||||||
node = node->next) {
|
node = node->next) {
|
||||||
if (!strcmp(node->name, "identifier")) {
|
if (!strcmp(node->name, "identifier")) {
|
||||||
doc_path = xmlGetProp(node, "url");
|
doc_path = xmlGetProp(node, "url");
|
||||||
|
@ -1491,7 +1490,7 @@ fmt_toplevel_add_doc (HyperbolaDocTree * tree, char * omf_name)
|
||||||
if (!strcmp(node->name, "title")) {
|
if (!strcmp(node->name, "title")) {
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
ptr = xmlNodeGetContent (node->xmlChildrenNode);
|
ptr = xmlNodeGetContent (node->children);
|
||||||
if (ptr != NULL) {
|
if (ptr != NULL) {
|
||||||
str = remove_leading_and_trailing_white_spaces (ptr);
|
str = remove_leading_and_trailing_white_spaces (ptr);
|
||||||
title = g_strconcat (prefix, str, NULL);
|
title = g_strconcat (prefix, str, NULL);
|
||||||
|
@ -1613,7 +1612,7 @@ get_path_from_node (const char *omf_dir, xmlNode *docpath_node)
|
||||||
{
|
{
|
||||||
char *str, *omf_path, *omf_name;
|
char *str, *omf_path, *omf_name;
|
||||||
|
|
||||||
str = xmlNodeGetContent (docpath_node->xmlChildrenNode);
|
str = xmlNodeGetContent (docpath_node->children);
|
||||||
omf_name = remove_leading_and_trailing_white_spaces (str);
|
omf_name = remove_leading_and_trailing_white_spaces (str);
|
||||||
omf_path = g_strdup_printf ("%s/%s", omf_dir, omf_name);
|
omf_path = g_strdup_printf ("%s/%s", omf_dir, omf_name);
|
||||||
|
|
||||||
|
@ -1645,7 +1644,7 @@ fmt_toplevel_parse_xml_tree (HyperbolaDocTree * tree,
|
||||||
int bytes_read;
|
int bytes_read;
|
||||||
gboolean node_added;
|
gboolean node_added;
|
||||||
|
|
||||||
if (doc == NULL || doc->xmlRootNode == NULL)
|
if (doc == NULL || doc->children == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (locales == NULL)
|
if (locales == NULL)
|
||||||
|
@ -1669,7 +1668,7 @@ fmt_toplevel_parse_xml_tree (HyperbolaDocTree * tree,
|
||||||
|
|
||||||
node_added = FALSE;
|
node_added = FALSE;
|
||||||
|
|
||||||
for(doc_node = doc->xmlRootNode->xmlChildrenNode; doc_node != NULL;
|
for(doc_node = doc->children->children; doc_node != NULL;
|
||||||
doc_node = doc_node->next) {
|
doc_node = doc_node->next) {
|
||||||
|
|
||||||
/* nothing found yet */
|
/* nothing found yet */
|
||||||
|
@ -1677,11 +1676,11 @@ fmt_toplevel_parse_xml_tree (HyperbolaDocTree * tree,
|
||||||
|
|
||||||
/* check out the doc for the current locale */
|
/* check out the doc for the current locale */
|
||||||
|
|
||||||
for(docpath_node = doc_node->xmlChildrenNode;
|
for(docpath_node = doc_node->children;
|
||||||
docpath_node != NULL;
|
docpath_node != NULL;
|
||||||
docpath_node = docpath_node->next) {
|
docpath_node = docpath_node->next) {
|
||||||
/* check validity of the node first */
|
/* check validity of the node first */
|
||||||
if (has_content (docpath_node->xmlChildrenNode)
|
if (has_content (docpath_node->children)
|
||||||
&& is_new_locale_better (locales,
|
&& is_new_locale_better (locales,
|
||||||
best_path_node,
|
best_path_node,
|
||||||
docpath_node)) {
|
docpath_node)) {
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <eel/eel-debug.h>
|
#include <eel/eel-debug.h>
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
#include <libnautilus-private/nautilus-global-preferences.h>
|
#include <libnautilus-private/nautilus-global-preferences.h>
|
||||||
#include <liboaf/liboaf.h>
|
#include <bonobo-activation/bonobo-activation.h>
|
||||||
|
|
||||||
#include "hyperbola-nav.h"
|
#include "hyperbola-nav.h"
|
||||||
|
|
||||||
|
@ -94,9 +94,9 @@ main (int argc, char *argv[])
|
||||||
/* Disable session manager connection */
|
/* Disable session manager connection */
|
||||||
gnome_client_disable_master_connection ();
|
gnome_client_disable_master_connection ();
|
||||||
|
|
||||||
gnomelib_register_popt_table (oaf_popt_options,
|
gnomelib_register_popt_table (bonobo_activation_popt_options,
|
||||||
oaf_get_popt_table_name ());
|
bonobo_activation_get_popt_table_name ());
|
||||||
orb = oaf_init (argc, argv);
|
orb = bonobo_activation_init (argc, argv);
|
||||||
|
|
||||||
gnome_init ("hyperbola", VERSION, argc, argv);
|
gnome_init ("hyperbola", VERSION, argc, argv);
|
||||||
|
|
||||||
|
@ -104,10 +104,10 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL);
|
bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL);
|
||||||
|
|
||||||
nautilus_global_preferences_initialize ();
|
nautilus_global_preferences_init ();
|
||||||
|
|
||||||
registration_id =
|
registration_id =
|
||||||
oaf_make_registration_id
|
bonobo_activation_make_registration_id
|
||||||
("OAFIID:hyperbola_factory:02b54c63-101b-4b27-a285-f99ed332ecdb",
|
("OAFIID:hyperbola_factory:02b54c63-101b-4b27-a285-f99ed332ecdb",
|
||||||
g_getenv ("DISPLAY"));
|
g_getenv ("DISPLAY"));
|
||||||
factory =
|
factory =
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#include "hyperbola-filefmt.h"
|
#include "hyperbola-filefmt.h"
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gtk/gtkctree.h>
|
#include <gtk/gtkctree.h>
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnomeui/gnome-uidefs.h>
|
#include <libgnomeui/gnome-uidefs.h>
|
||||||
#include <libnautilus-private/nautilus-theme.h>
|
#include <libnautilus-private/nautilus-theme.h>
|
||||||
|
@ -80,7 +79,7 @@ ensure_pixmap_and_mask (GdkPixmap **pixmap, GdkBitmap **mask, const char *name)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pixbuf = gdk_pixbuf_new_from_file (fullname);
|
pixbuf = gdk_pixbuf_new_from_file (fullname, NULL);
|
||||||
if (pixbuf == NULL) {
|
if (pixbuf == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,8 +63,8 @@ typedef struct {
|
||||||
#define HISTORY_VIEW_COLUMN_COUNT 2
|
#define HISTORY_VIEW_COLUMN_COUNT 2
|
||||||
|
|
||||||
static GtkType nautilus_history_view_get_type (void);
|
static GtkType nautilus_history_view_get_type (void);
|
||||||
static void nautilus_history_view_initialize_class (NautilusHistoryViewClass *klass);
|
static void nautilus_history_view_class_init (NautilusHistoryViewClass *klass);
|
||||||
static void nautilus_history_view_initialize (NautilusHistoryView *view);
|
static void nautilus_history_view_init (NautilusHistoryView *view);
|
||||||
static void nautilus_history_view_destroy (GtkObject *object);
|
static void nautilus_history_view_destroy (GtkObject *object);
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusHistoryView,
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusHistoryView,
|
||||||
|
@ -265,7 +265,7 @@ history_changed_callback (NautilusHistoryView *view,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_history_view_initialize_class (NautilusHistoryViewClass *klass)
|
nautilus_history_view_class_init (NautilusHistoryViewClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ nautilus_history_view_initialize_class (NautilusHistoryViewClass *klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_history_view_initialize (NautilusHistoryView *view)
|
nautilus_history_view_init (NautilusHistoryView *view)
|
||||||
{
|
{
|
||||||
GtkCList *list;
|
GtkCList *list;
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
|
@ -350,6 +350,6 @@ main (int argc, char *argv[])
|
||||||
FACTORY_IID,
|
FACTORY_IID,
|
||||||
VIEW_IID,
|
VIEW_IID,
|
||||||
nautilus_view_create_from_get_type_function,
|
nautilus_view_create_from_get_type_function,
|
||||||
nautilus_global_preferences_initialize,
|
nautilus_global_preferences_init,
|
||||||
nautilus_history_view_get_type);
|
nautilus_history_view_get_type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
#include <liboaf/liboaf.h>
|
#include <bonobo-activation/bonobo-activation.h>
|
||||||
|
|
||||||
#include <bonobo.h>
|
#include <bonobo.h>
|
||||||
|
|
||||||
|
@ -775,7 +775,7 @@ scrollable_control_factory (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static BonoboObject *
|
static BonoboObject *
|
||||||
bonobo_object_factory (BonoboGenericFactory *this, const char *oaf_iid,
|
bonobo_object_factory (BonoboGenericFactory *this, const char *bonobo_activation_iid,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
bonobo_object_data_t *bod;
|
bonobo_object_data_t *bod;
|
||||||
|
@ -786,9 +786,9 @@ bonobo_object_factory (BonoboGenericFactory *this, const char *oaf_iid,
|
||||||
* Creates the BonoboObject server
|
* Creates the BonoboObject server
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (strcmp (oaf_iid, "OAFIID:nautilus-image-generic:6ed7ef0d-9274-4132-9a27-9f048142782f") == 0) {
|
if (strcmp (bonobo_activation_iid, "OAFIID:nautilus-image-generic:6ed7ef0d-9274-4132-9a27-9f048142782f") == 0) {
|
||||||
bod = scaled_control_factory ();
|
bod = scaled_control_factory ();
|
||||||
} else if (strcmp (oaf_iid, "OAFIID:nautilus-image-viewer:30686633-23d5-422b-83c6-4f1b06f8abcd") == 0) {
|
} else if (strcmp (bonobo_activation_iid, "OAFIID:nautilus-image-viewer:30686633-23d5-422b-83c6-4f1b06f8abcd") == 0) {
|
||||||
bod = scrollable_control_factory ();
|
bod = scrollable_control_factory ();
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -806,7 +806,7 @@ init_bonobo_image_generic_factory (void)
|
||||||
{
|
{
|
||||||
char *registration_id;
|
char *registration_id;
|
||||||
|
|
||||||
registration_id = oaf_make_registration_id ("OAFIID:nautilus_image_view_factory:61ea9ab1-e4b4-4da8-8f54-61cf6f33c4f6",
|
registration_id = bonobo_activation_make_registration_id ("OAFIID:nautilus_image_view_factory:61ea9ab1-e4b4-4da8-8f54-61cf6f33c4f6",
|
||||||
g_getenv ("DISPLAY"));
|
g_getenv ("DISPLAY"));
|
||||||
|
|
||||||
image_factory = bonobo_generic_factory_new_multi
|
image_factory = bonobo_generic_factory_new_multi
|
||||||
|
@ -825,8 +825,8 @@ init_server_factory (int argc, char **argv)
|
||||||
/* Disable session manager connection */
|
/* Disable session manager connection */
|
||||||
gnome_client_disable_master_connection ();
|
gnome_client_disable_master_connection ();
|
||||||
|
|
||||||
gnomelib_register_popt_table (oaf_popt_options, oaf_get_popt_table_name ());
|
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
|
||||||
oaf_init (argc, argv);
|
bonobo_activation_init (argc, argv);
|
||||||
|
|
||||||
gnome_init ("bonobo-image-generic", VERSION,
|
gnome_init ("bonobo-image-generic", VERSION,
|
||||||
argc, argv);
|
argc, argv);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "nautilus-content-loser.h"
|
#include "nautilus-content-loser.h"
|
||||||
|
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
#include <liboaf/liboaf.h>
|
#include <bonobo-activation/bonobo-activation.h>
|
||||||
#include <bonobo.h>
|
#include <bonobo.h>
|
||||||
|
|
||||||
static int object_count = 0;
|
static int object_count = 0;
|
||||||
|
@ -80,8 +80,8 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
nautilus_content_loser_maybe_fail ("pre-init");
|
nautilus_content_loser_maybe_fail ("pre-init");
|
||||||
|
|
||||||
gnomelib_register_popt_table (oaf_popt_options, oaf_get_popt_table_name ());
|
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
|
||||||
orb = oaf_init (argc, argv);
|
orb = bonobo_activation_init (argc, argv);
|
||||||
|
|
||||||
gnome_init ("nautilus-content-loser", VERSION,
|
gnome_init ("nautilus-content-loser", VERSION,
|
||||||
argc, argv);
|
argc, argv);
|
||||||
|
@ -90,7 +90,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
nautilus_content_loser_maybe_fail ("post-init");
|
nautilus_content_loser_maybe_fail ("post-init");
|
||||||
|
|
||||||
registration_id = oaf_make_registration_id ("OAFIID:nautilus_content_loser_factory:adf30e75-3b63-4360-8784-a8e239390a69", getenv ("DISPLAY"));
|
registration_id = bonobo_activation_make_registration_id ("OAFIID:nautilus_content_loser_factory:adf30e75-3b63-4360-8784-a8e239390a69", getenv ("DISPLAY"));
|
||||||
factory = bonobo_generic_factory_new_multi (registration_id,
|
factory = bonobo_generic_factory_new_multi (registration_id,
|
||||||
loser_make_object,
|
loser_make_object,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnomeui/gnome-stock.h>
|
#include <libgnomeui/gnome-stock-icons.h>
|
||||||
#include <libnautilus/nautilus-bonobo-ui.h>
|
#include <libnautilus/nautilus-bonobo-ui.h>
|
||||||
#include <eel/eel-gtk-macros.h>
|
#include <eel/eel-gtk-macros.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -43,8 +43,8 @@ struct NautilusContentLoserDetails {
|
||||||
NautilusView *nautilus_view;
|
NautilusView *nautilus_view;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void nautilus_content_loser_initialize_class (NautilusContentLoserClass *klass);
|
static void nautilus_content_loser_class_init (NautilusContentLoserClass *klass);
|
||||||
static void nautilus_content_loser_initialize (NautilusContentLoser *view);
|
static void nautilus_content_loser_init (NautilusContentLoser *view);
|
||||||
static void nautilus_content_loser_destroy (GtkObject *object);
|
static void nautilus_content_loser_destroy (GtkObject *object);
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusContentLoser, nautilus_content_loser, GTK_TYPE_LABEL)
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusContentLoser, nautilus_content_loser, GTK_TYPE_LABEL)
|
||||||
|
@ -59,7 +59,7 @@ static void nautilus_content_loser_fail (void);
|
||||||
static void ensure_fail_env (void);
|
static void ensure_fail_env (void);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_content_loser_initialize_class (NautilusContentLoserClass *klass)
|
nautilus_content_loser_class_init (NautilusContentLoserClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ nautilus_content_loser_initialize_class (NautilusContentLoserClass *klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_content_loser_initialize (NautilusContentLoser *view)
|
nautilus_content_loser_init (NautilusContentLoser *view)
|
||||||
{
|
{
|
||||||
view->details = g_new0 (NautilusContentLoserDetails, 1);
|
view->details = g_new0 (NautilusContentLoserDetails, 1);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "nautilus-sidebar-loser.h"
|
#include "nautilus-sidebar-loser.h"
|
||||||
|
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
#include <liboaf/liboaf.h>
|
#include <bonobo-activation/bonobo-activation.h>
|
||||||
#include <bonobo.h>
|
#include <bonobo.h>
|
||||||
|
|
||||||
static int object_count = 0;
|
static int object_count = 0;
|
||||||
|
@ -80,8 +80,8 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
nautilus_sidebar_loser_maybe_fail ("pre-init");
|
nautilus_sidebar_loser_maybe_fail ("pre-init");
|
||||||
|
|
||||||
gnomelib_register_popt_table (oaf_popt_options, oaf_get_popt_table_name ());
|
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
|
||||||
orb = oaf_init (argc, argv);
|
orb = bonobo_activation_init (argc, argv);
|
||||||
|
|
||||||
gnome_init ("nautilus-sidebar-loser", VERSION,
|
gnome_init ("nautilus-sidebar-loser", VERSION,
|
||||||
argc, argv);
|
argc, argv);
|
||||||
|
@ -91,7 +91,7 @@ int main(int argc, char *argv[])
|
||||||
nautilus_sidebar_loser_maybe_fail ("post-init");
|
nautilus_sidebar_loser_maybe_fail ("post-init");
|
||||||
|
|
||||||
|
|
||||||
registration_id = oaf_make_registration_id ("OAFIID:nautilus_sidebar_loser_factory:5d9aadfa-a8a4-4ec0-8332-d6f806c211fa", getenv ("DISPLAY"));
|
registration_id = bonobo_activation_make_registration_id ("OAFIID:nautilus_sidebar_loser_factory:5d9aadfa-a8a4-4ec0-8332-d6f806c211fa", getenv ("DISPLAY"));
|
||||||
factory = bonobo_generic_factory_new_multi (registration_id,
|
factory = bonobo_generic_factory_new_multi (registration_id,
|
||||||
loser_make_object,
|
loser_make_object,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnomeui/gnome-stock.h>
|
#include <libgnomeui/gnome-stock-icons.h>
|
||||||
#include <libnautilus/nautilus-bonobo-ui.h>
|
#include <libnautilus/nautilus-bonobo-ui.h>
|
||||||
#include <eel/eel-gtk-macros.h>
|
#include <eel/eel-gtk-macros.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -45,8 +45,8 @@ struct NautilusSidebarLoserDetails {
|
||||||
NautilusView *nautilus_view;
|
NautilusView *nautilus_view;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void nautilus_sidebar_loser_initialize_class (NautilusSidebarLoserClass *klass);
|
static void nautilus_sidebar_loser_class_init (NautilusSidebarLoserClass *klass);
|
||||||
static void nautilus_sidebar_loser_initialize (NautilusSidebarLoser *view);
|
static void nautilus_sidebar_loser_init (NautilusSidebarLoser *view);
|
||||||
static void nautilus_sidebar_loser_destroy (GtkObject *object);
|
static void nautilus_sidebar_loser_destroy (GtkObject *object);
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusSidebarLoser, nautilus_sidebar_loser, GTK_TYPE_LABEL)
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusSidebarLoser, nautilus_sidebar_loser, GTK_TYPE_LABEL)
|
||||||
|
@ -61,7 +61,7 @@ static void nautilus_sidebar_loser_fail (void);
|
||||||
static void ensure_fail_env (void);
|
static void ensure_fail_env (void);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_sidebar_loser_initialize_class (NautilusSidebarLoserClass *klass)
|
nautilus_sidebar_loser_class_init (NautilusSidebarLoserClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ nautilus_sidebar_loser_initialize_class (NautilusSidebarLoserClass *klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_sidebar_loser_initialize (NautilusSidebarLoser *view)
|
nautilus_sidebar_loser_init (NautilusSidebarLoser *view)
|
||||||
{
|
{
|
||||||
view->details = g_new0 (NautilusSidebarLoserDetails, 1);
|
view->details = g_new0 (NautilusSidebarLoserDetails, 1);
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,7 @@ activation_cancel (NautilusBonoboActivationHandle *handle)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
oaf_activation_callback (Bonobo_Unknown activated_object,
|
bonobo_activation_activation_callback (Bonobo_Unknown activated_object,
|
||||||
const char *error_reason,
|
const char *error_reason,
|
||||||
gpointer callback_data)
|
gpointer callback_data)
|
||||||
{
|
{
|
||||||
|
@ -539,8 +539,8 @@ nautilus_bonobo_activate_from_id (const char *iid,
|
||||||
handle->callback = callback;
|
handle->callback = callback;
|
||||||
handle->callback_data = callback_data;
|
handle->callback_data = callback_data;
|
||||||
|
|
||||||
oaf_activate_from_id_async ((char *) iid, 0,
|
bonobo_activation_activate_from_id_async ((char *) iid, 0,
|
||||||
oaf_activation_callback,
|
bonobo_activation_activation_callback,
|
||||||
handle, NULL);
|
handle, NULL);
|
||||||
|
|
||||||
if (handle != NULL) {
|
if (handle != NULL) {
|
||||||
|
|
|
@ -163,7 +163,7 @@ get_mozilla_path (void)
|
||||||
"/usr/lib/mozilla-0.8.1" /* lame, but helpful for finding Ximian package */
|
"/usr/lib/mozilla-0.8.1" /* lame, but helpful for finding Ximian package */
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < EEL_N_ELEMENTS (paths); i++) {
|
for (i = 0; i < G_N_ELEMENTS (paths); i++) {
|
||||||
if (is_good_mozilla_path (paths[i])) {
|
if (is_good_mozilla_path (paths[i])) {
|
||||||
return g_strdup (paths[i]);
|
return g_strdup (paths[i]);
|
||||||
}
|
}
|
||||||
|
@ -215,8 +215,8 @@ main (int argc, char *argv[])
|
||||||
/* Disable session manager connection */
|
/* Disable session manager connection */
|
||||||
gnome_client_disable_master_connection ();
|
gnome_client_disable_master_connection ();
|
||||||
|
|
||||||
gnomelib_register_popt_table (oaf_popt_options, oaf_get_popt_table_name ());
|
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
|
||||||
orb = oaf_init (argc, argv);
|
orb = bonobo_activation_init (argc, argv);
|
||||||
|
|
||||||
gnome_init ("nautilus-mozilla-content-view", VERSION,
|
gnome_init ("nautilus-mozilla-content-view", VERSION,
|
||||||
argc, argv);
|
argc, argv);
|
||||||
|
@ -238,7 +238,7 @@ main (int argc, char *argv[])
|
||||||
g_warning ("Couldn't init gconf");
|
g_warning ("Couldn't init gconf");
|
||||||
}
|
}
|
||||||
|
|
||||||
registration_id = oaf_make_registration_id ("OAFIID:nautilus_mozilla_content_view_factory:020a0285-6b96-4685-84a1-4a56eb6baa2b", getenv ("DISPLAY"));
|
registration_id = bonobo_activation_make_registration_id ("OAFIID:nautilus_mozilla_content_view_factory:020a0285-6b96-4685-84a1-4a56eb6baa2b", getenv ("DISPLAY"));
|
||||||
factory = bonobo_generic_factory_new_multi (registration_id,
|
factory = bonobo_generic_factory_new_multi (registration_id,
|
||||||
mozilla_make_object,
|
mozilla_make_object,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnomeui/gnome-dialog-util.h>
|
#include <libgnomeui/gnome-dialog-util.h>
|
||||||
#include <libgnomeui/gnome-dialog.h>
|
#include <libgnomeui/gnome-dialog.h>
|
||||||
#include <libgnomeui/gnome-stock.h>
|
#include <libgnomeui/gnome-stock-icons.h>
|
||||||
#include <libgnomevfs/gnome-vfs.h>
|
#include <libgnomevfs/gnome-vfs.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
@ -118,8 +118,8 @@ typedef struct NautilusMozillaContentViewChrome {
|
||||||
} NautilusMozillaContentViewChrome;
|
} NautilusMozillaContentViewChrome;
|
||||||
|
|
||||||
/* GTK Type System */
|
/* GTK Type System */
|
||||||
static void nautilus_mozilla_content_view_initialize_class (NautilusMozillaContentViewClass *klass);
|
static void nautilus_mozilla_content_view_class_init (NautilusMozillaContentViewClass *klass);
|
||||||
static void nautilus_mozilla_content_view_initialize (NautilusMozillaContentView *view);
|
static void nautilus_mozilla_content_view_init (NautilusMozillaContentView *view);
|
||||||
static void nautilus_mozilla_content_view_destroy (GtkObject *object);
|
static void nautilus_mozilla_content_view_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
|
||||||
|
@ -234,8 +234,8 @@ static gint string_list_get_index_of_string (const char *string_list[],
|
||||||
guint num_strings,
|
guint num_strings,
|
||||||
const char *string);
|
const char *string);
|
||||||
|
|
||||||
static void pre_widget_initialize (void);
|
static void pre_widget_init (void);
|
||||||
static void post_widget_initialize (void);
|
static void post_widget_init (void);
|
||||||
|
|
||||||
/* BonoboControl callbacks */
|
/* BonoboControl callbacks */
|
||||||
static void bonobo_control_activate_callback (BonoboObject *control, gboolean state, gpointer callback_data);
|
static void bonobo_control_activate_callback (BonoboObject *control, gboolean state, gpointer callback_data);
|
||||||
|
@ -248,7 +248,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusMozillaContentView,
|
||||||
GTK_TYPE_VBOX);
|
GTK_TYPE_VBOX);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_mozilla_content_view_initialize_class (NautilusMozillaContentViewClass *klass)
|
nautilus_mozilla_content_view_class_init (NautilusMozillaContentViewClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ nautilus_mozilla_content_view_initialize_class (NautilusMozillaContentViewClass
|
||||||
|
|
||||||
object_class->destroy = nautilus_mozilla_content_view_destroy;
|
object_class->destroy = nautilus_mozilla_content_view_destroy;
|
||||||
|
|
||||||
pre_widget_initialize ();
|
pre_widget_init ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ set_bonobo_properties (BonoboPropertyBag *bag,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_mozilla_content_view_initialize (NautilusMozillaContentView *view)
|
nautilus_mozilla_content_view_init (NautilusMozillaContentView *view)
|
||||||
{
|
{
|
||||||
view->details = g_new0 (NautilusMozillaContentViewDetails, 1);
|
view->details = g_new0 (NautilusMozillaContentViewDetails, 1);
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ nautilus_mozilla_content_view_initialize (NautilusMozillaContentView *view)
|
||||||
* created, otherwise the mozilla runtime environment is not properly
|
* created, otherwise the mozilla runtime environment is not properly
|
||||||
* setup.
|
* setup.
|
||||||
*/
|
*/
|
||||||
post_widget_initialize ();
|
post_widget_init ();
|
||||||
|
|
||||||
/* Add callbacks to the beast */
|
/* Add callbacks to the beast */
|
||||||
gtk_signal_connect (GTK_OBJECT (view->details->mozilla),
|
gtk_signal_connect (GTK_OBJECT (view->details->mozilla),
|
||||||
|
@ -1858,7 +1858,7 @@ should_uri_navigate_bypass_nautilus (const char *uri)
|
||||||
|
|
||||||
g_return_val_if_fail (uri != NULL, FALSE);
|
g_return_val_if_fail (uri != NULL, FALSE);
|
||||||
|
|
||||||
return string_list_get_index_of_string (handled_by_nautilus, EEL_N_ELEMENTS (handled_by_nautilus),
|
return string_list_get_index_of_string (handled_by_nautilus, G_N_ELEMENTS (handled_by_nautilus),
|
||||||
uri) != STRING_LIST_NOT_FOUND;
|
uri) != STRING_LIST_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1875,7 +1875,7 @@ should_mozilla_load_uri_directly (const char *uri)
|
||||||
"eazel-services"
|
"eazel-services"
|
||||||
};
|
};
|
||||||
|
|
||||||
return string_list_get_index_of_string (handled_by_mozilla, EEL_N_ELEMENTS (handled_by_mozilla),
|
return string_list_get_index_of_string (handled_by_mozilla, G_N_ELEMENTS (handled_by_mozilla),
|
||||||
uri) != STRING_LIST_NOT_FOUND;
|
uri) != STRING_LIST_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1913,7 +1913,7 @@ string_list_get_index_of_string (const char *string_list[], guint num_strings, c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pre_widget_initialize (void)
|
pre_widget_init (void)
|
||||||
{
|
{
|
||||||
const char *profile_directory_name = "MozillaProfile";
|
const char *profile_directory_name = "MozillaProfile";
|
||||||
char *profile_base_path;
|
char *profile_base_path;
|
||||||
|
@ -1945,7 +1945,7 @@ pre_widget_initialize (void)
|
||||||
* is created
|
* is created
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
post_widget_initialize (void)
|
post_widget_init (void)
|
||||||
{
|
{
|
||||||
static gboolean once = FALSE;
|
static gboolean once = FALSE;
|
||||||
char *cache_dir;
|
char *cache_dir;
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include "nautilus-mozilla-encoding-tables.h"
|
#include "nautilus-mozilla-encoding-tables.h"
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,6 @@ main (int argc, char *argv[])
|
||||||
FACTORY_IID,
|
FACTORY_IID,
|
||||||
VIEW_IID,
|
VIEW_IID,
|
||||||
nautilus_view_create_from_get_type_function,
|
nautilus_view_create_from_get_type_function,
|
||||||
nautilus_global_preferences_initialize,
|
nautilus_global_preferences_init,
|
||||||
nautilus_music_view_get_type);
|
nautilus_music_view_get_type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,8 +184,8 @@ static void nautilus_music_view_drag_data_received (GtkWidget
|
||||||
guint info,
|
guint info,
|
||||||
guint time,
|
guint time,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
static void nautilus_music_view_initialize_class (NautilusMusicViewClass *klass);
|
static void nautilus_music_view_class_init (NautilusMusicViewClass *klass);
|
||||||
static void nautilus_music_view_initialize (NautilusMusicView *view);
|
static void nautilus_music_view_init (NautilusMusicView *view);
|
||||||
static void nautilus_music_view_destroy (GtkObject *object);
|
static void nautilus_music_view_destroy (GtkObject *object);
|
||||||
static void nautilus_music_view_update (NautilusMusicView *music_view);
|
static void nautilus_music_view_update (NautilusMusicView *music_view);
|
||||||
static void music_view_background_appearance_changed_callback (EelBackground *background,
|
static void music_view_background_appearance_changed_callback (EelBackground *background,
|
||||||
|
@ -231,7 +231,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusMusicView,
|
||||||
NAUTILUS_TYPE_VIEW)
|
NAUTILUS_TYPE_VIEW)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_music_view_initialize_class (NautilusMusicViewClass *klass)
|
nautilus_music_view_class_init (NautilusMusicViewClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ get_cell_text (GtkWidget *widget, int column_index, int cell_width,
|
||||||
/* initialize ourselves by connecting to the location change signal and allocating our subviews */
|
/* initialize ourselves by connecting to the location change signal and allocating our subviews */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_music_view_initialize (NautilusMusicView *music_view)
|
nautilus_music_view_init (NautilusMusicView *music_view)
|
||||||
{
|
{
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
@ -328,12 +328,12 @@ nautilus_music_view_initialize (NautilusMusicView *music_view)
|
||||||
gtk_box_pack_start (GTK_BOX (music_view->details->album_container), music_view->details->album_title, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (music_view->details->album_container), music_view->details->album_title, FALSE, FALSE, 0);
|
||||||
|
|
||||||
/* Localize the titles */
|
/* Localize the titles */
|
||||||
for (i = 0; i < EEL_N_ELEMENTS (titles); i++) {
|
for (i = 0; i < G_N_ELEMENTS (titles); i++) {
|
||||||
titles[i] = _(titles[i]);
|
titles[i] = _(titles[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* allocate a list widget to hold the song list */
|
/* allocate a list widget to hold the song list */
|
||||||
music_view->details->song_list = eel_list_new_with_titles (EEL_N_ELEMENTS (titles), (const char * const *) titles);
|
music_view->details->song_list = eel_list_new_with_titles (G_N_ELEMENTS (titles), (const char * const *) titles);
|
||||||
|
|
||||||
EEL_CLIST_SET_FLAG (EEL_CLIST (music_view->details->song_list), CLIST_SHOW_TITLES);
|
EEL_CLIST_SET_FLAG (EEL_CLIST (music_view->details->song_list), CLIST_SHOW_TITLES);
|
||||||
|
|
||||||
|
@ -403,7 +403,7 @@ eel_clist_set_column_width (EEL_CLIST (music_view->details->song_list), BITRATE,
|
||||||
/* prepare ourselves to receive dropped objects */
|
/* prepare ourselves to receive dropped objects */
|
||||||
gtk_drag_dest_set (GTK_WIDGET (music_view->details->event_box),
|
gtk_drag_dest_set (GTK_WIDGET (music_view->details->event_box),
|
||||||
GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_DROP,
|
GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_DROP,
|
||||||
music_dnd_target_table, EEL_N_ELEMENTS (music_dnd_target_table), GDK_ACTION_COPY);
|
music_dnd_target_table, G_N_ELEMENTS (music_dnd_target_table), GDK_ACTION_COPY);
|
||||||
|
|
||||||
|
|
||||||
music_view->details->player_state = PLAYER_STOPPED;
|
music_view->details->player_state = PLAYER_STOPPED;
|
||||||
|
@ -1700,7 +1700,7 @@ nautilus_music_view_set_album_image (NautilusMusicView *music_view, const char *
|
||||||
|
|
||||||
if (image_path_uri != NULL) {
|
if (image_path_uri != NULL) {
|
||||||
image_path = gnome_vfs_get_local_path_from_uri (image_path_uri);
|
image_path = gnome_vfs_get_local_path_from_uri (image_path_uri);
|
||||||
pixbuf = gdk_pixbuf_new_from_file (image_path);
|
pixbuf = gdk_pixbuf_new_from_file (image_path, NULL);
|
||||||
|
|
||||||
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);
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
#include <gtk/gtkscrolledwindow.h>
|
#include <gtk/gtkscrolledwindow.h>
|
||||||
#include <gtk/gtkvbox.h>
|
#include <gtk/gtkvbox.h>
|
||||||
|
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnome/gnome-util.h>
|
#include <libgnome/gnome-util.h>
|
||||||
|
|
||||||
|
@ -1178,7 +1177,7 @@ extract_items (RSSChannelData *channel_data, xmlNodePtr container_node)
|
||||||
char *title, *temp_str;
|
char *title, *temp_str;
|
||||||
gboolean scripting_news_format;
|
gboolean scripting_news_format;
|
||||||
|
|
||||||
current_node = container_node->childs;
|
current_node = container_node->children;
|
||||||
item_count = 0;
|
item_count = 0;
|
||||||
while (current_node != NULL) {
|
while (current_node != NULL) {
|
||||||
if (eel_strcmp (current_node->name, "item") == 0) {
|
if (eel_strcmp (current_node->name, "item") == 0) {
|
||||||
|
@ -1495,7 +1494,7 @@ rss_read_done_callback (GnomeVFSResult result,
|
||||||
/* flag the update time */
|
/* flag the update time */
|
||||||
time (&channel_data->last_update);
|
time (&channel_data->last_update);
|
||||||
|
|
||||||
/* Parse the rss file with gnome-xml. The gnome-xml parser requires a zero-terminated array. */
|
/* Parse the rss file with libxml. The libxml parser requires a zero-terminated array. */
|
||||||
buffer = g_realloc (file_contents, file_size + 1);
|
buffer = g_realloc (file_contents, file_size + 1);
|
||||||
buffer[file_size] = '\0';
|
buffer[file_size] = '\0';
|
||||||
rss_document = xmlParseMemory (buffer, file_size);
|
rss_document = xmlParseMemory (buffer, file_size);
|
||||||
|
@ -1618,7 +1617,7 @@ nautilus_news_add_channels (News *news_data, xmlDocPtr channels)
|
||||||
/* walk through the children of the root object, generating new channel
|
/* walk through the children of the root object, generating new channel
|
||||||
* objects and adding them to the channel list
|
* objects and adding them to the channel list
|
||||||
*/
|
*/
|
||||||
current_channel = xmlDocGetRootElement (channels)->childs;
|
current_channel = xmlDocGetRootElement (channels)->children;
|
||||||
while (current_channel != NULL) {
|
while (current_channel != NULL) {
|
||||||
if (eel_strcmp (current_channel->name, "rss_channel") == 0) {
|
if (eel_strcmp (current_channel->name, "rss_channel") == 0) {
|
||||||
name = xmlGetProp (current_channel, "name");
|
name = xmlGetProp (current_channel, "name");
|
||||||
|
@ -1762,7 +1761,7 @@ nautilus_news_load_images (News *news_data)
|
||||||
|
|
||||||
news_bullet_path = nautilus_theme_get_image_path ("news_bullet.png");
|
news_bullet_path = nautilus_theme_get_image_path ("news_bullet.png");
|
||||||
if (news_bullet_path != NULL) {
|
if (news_bullet_path != NULL) {
|
||||||
news_data->bullet = gdk_pixbuf_new_from_file (news_bullet_path);
|
news_data->bullet = gdk_pixbuf_new_from_file (news_bullet_path, NULL);
|
||||||
g_free (news_bullet_path);
|
g_free (news_bullet_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1772,7 +1771,7 @@ nautilus_news_load_images (News *news_data)
|
||||||
|
|
||||||
news_bullet_path = nautilus_theme_get_image_path ("changed_bullet.png");
|
news_bullet_path = nautilus_theme_get_image_path ("changed_bullet.png");
|
||||||
if (news_bullet_path != NULL) {
|
if (news_bullet_path != NULL) {
|
||||||
news_data->changed_bullet = gdk_pixbuf_new_from_file (news_bullet_path);
|
news_data->changed_bullet = gdk_pixbuf_new_from_file (news_bullet_path, NULL);
|
||||||
g_free (news_bullet_path);
|
g_free (news_bullet_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2162,7 +2161,7 @@ add_channels_to_lists (News* news_data)
|
||||||
/* loop through the channel entries, adding an entry to the configure
|
/* loop through the channel entries, adding an entry to the configure
|
||||||
* list for each entry in the file
|
* list for each entry in the file
|
||||||
*/
|
*/
|
||||||
current_channel = xmlDocGetRootElement (channel_doc)->childs;
|
current_channel = xmlDocGetRootElement (channel_doc)->children;
|
||||||
channel_index = 0;
|
channel_index = 0;
|
||||||
while (current_channel != NULL) {
|
while (current_channel != NULL) {
|
||||||
if (eel_strcmp (current_channel->name, "rss_channel") == 0) {
|
if (eel_strcmp (current_channel->name, "rss_channel") == 0) {
|
||||||
|
@ -2544,6 +2543,6 @@ main(int argc, char *argv[])
|
||||||
"OAFIID:nautilus_news_view_factory:041601",
|
"OAFIID:nautilus_news_view_factory:041601",
|
||||||
"OAFIID:nautilus_news_view:041601",
|
"OAFIID:nautilus_news_view:041601",
|
||||||
make_news_view,
|
make_news_view,
|
||||||
nautilus_global_preferences_initialize,
|
nautilus_global_preferences_init,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -436,6 +436,6 @@ main(int argc, char *argv[])
|
||||||
"OAFIID:nautilus_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0",
|
"OAFIID:nautilus_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0",
|
||||||
"OAFIID:nautilus_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185",
|
"OAFIID:nautilus_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185",
|
||||||
make_notes_view,
|
make_notes_view,
|
||||||
nautilus_global_preferences_initialize,
|
nautilus_global_preferences_init,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include <libnautilus/nautilus-bonobo-ui.h>
|
#include <libnautilus/nautilus-bonobo-ui.h>
|
||||||
#include <bonobo/bonobo-control.h>
|
#include <bonobo/bonobo-control.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnomeui/gnome-stock.h>
|
#include <libgnomeui/gnome-stock-icons.h>
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
#include <gtk/gtklabel.h>
|
#include <gtk/gtklabel.h>
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
|
@ -58,8 +58,8 @@ struct NautilusSampleContentViewDetails {
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void nautilus_sample_content_view_initialize_class (NautilusSampleContentViewClass *klass);
|
static void nautilus_sample_content_view_class_init (NautilusSampleContentViewClass *klass);
|
||||||
static void nautilus_sample_content_view_initialize (NautilusSampleContentView *view);
|
static void nautilus_sample_content_view_init (NautilusSampleContentView *view);
|
||||||
static void nautilus_sample_content_view_destroy (GtkObject *object);
|
static void nautilus_sample_content_view_destroy (GtkObject *object);
|
||||||
static void sample_load_location_callback (NautilusView *nautilus_view,
|
static void sample_load_location_callback (NautilusView *nautilus_view,
|
||||||
const char *location,
|
const char *location,
|
||||||
|
@ -95,8 +95,8 @@ nautilus_sample_content_view_get_type (void)
|
||||||
"NautilusSampleContentView",
|
"NautilusSampleContentView",
|
||||||
sizeof (NautilusSampleContentView),
|
sizeof (NautilusSampleContentView),
|
||||||
sizeof (NautilusSampleContentViewClass),
|
sizeof (NautilusSampleContentViewClass),
|
||||||
(GtkClassInitFunc)nautilus_sample_content_view_initialize_class,
|
(GtkClassInitFunc)nautilus_sample_content_view_class_init,
|
||||||
(GtkObjectInitFunc)nautilus_sample_content_view_initialize,
|
(GtkObjectInitFunc)nautilus_sample_content_view_init,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
@ -115,7 +115,7 @@ nautilus_sample_content_view_get_type (void)
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_sample_content_view_initialize_class (NautilusSampleContentViewClass *klass)
|
nautilus_sample_content_view_class_init (NautilusSampleContentViewClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ nautilus_sample_content_view_initialize_class (NautilusSampleContentViewClass *k
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_sample_content_view_initialize (NautilusSampleContentView *view)
|
nautilus_sample_content_view_init (NautilusSampleContentView *view)
|
||||||
{
|
{
|
||||||
g_assert (NAUTILUS_IS_SAMPLE_CONTENT_VIEW (view));
|
g_assert (NAUTILUS_IS_SAMPLE_CONTENT_VIEW (view));
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <liboaf/liboaf.h>
|
#include <bonobo-activation/bonobo-activation.h>
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
#include <bonobo.h>
|
#include <bonobo.h>
|
||||||
#include <zvt/zvtterm.h>
|
#include <zvt/zvtterm.h>
|
||||||
|
|
||||||
#include <popt.h>
|
#include <popt.h>
|
||||||
extern struct poptOption oaf_popt_options[];
|
extern struct poptOption bonobo_activation_popt_options[];
|
||||||
|
|
||||||
static BonoboObject *
|
static BonoboObject *
|
||||||
shell_factory (BonoboGenericFactory *Factory, void *closure)
|
shell_factory (BonoboGenericFactory *Factory, void *closure)
|
||||||
|
@ -39,7 +39,7 @@ shell_factory_init (void)
|
||||||
if (xterm_factory != NULL)
|
if (xterm_factory != NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
registration_id = oaf_make_registration_id (, g_getenv ("DISPLAY"));
|
registration_id = bonobo_activation_make_registration_id (, g_getenv ("DISPLAY"));
|
||||||
factory = bonobo_generic_factory_new_multi "OAFIID:shell_factory:10a7d344-c4cd-402f-9e05-bd591bbc5618", shell_factory, NULL);
|
factory = bonobo_generic_factory_new_multi "OAFIID:shell_factory:10a7d344-c4cd-402f-9e05-bd591bbc5618", shell_factory, NULL);
|
||||||
g_free (registration_id);
|
g_free (registration_id);
|
||||||
|
|
||||||
|
@ -57,8 +57,8 @@ init_bonobo (int argc, char **argv)
|
||||||
/* Disable session manager connection */
|
/* Disable session manager connection */
|
||||||
gnome_client_disable_master_connection ();
|
gnome_client_disable_master_connection ();
|
||||||
|
|
||||||
gnomelib_register_popt_table (oaf_popt_options, oaf_get_popt_table_name ());
|
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
|
||||||
orb = oaf_init (argc, argv);
|
orb = bonobo_activation_init (argc, argv);
|
||||||
|
|
||||||
gnome_init_with_popt_table ("xterm-control-factory", "0.0",
|
gnome_init_with_popt_table ("xterm-control-factory", "0.0",
|
||||||
argc, argv);
|
argc, argv);
|
||||||
|
|
|
@ -54,6 +54,6 @@ main (int argc, char *argv[])
|
||||||
FACTORY_IID,
|
FACTORY_IID,
|
||||||
VIEW_IID,
|
VIEW_IID,
|
||||||
nautilus_view_create_from_get_type_function,
|
nautilus_view_create_from_get_type_function,
|
||||||
nautilus_global_preferences_initialize,
|
nautilus_global_preferences_init,
|
||||||
nautilus_text_view_get_type);
|
nautilus_text_view_get_type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,8 +88,8 @@ typedef struct {
|
||||||
char *source_mode;
|
char *source_mode;
|
||||||
} ServiceMenuItemParameters;
|
} ServiceMenuItemParameters;
|
||||||
|
|
||||||
static void nautilus_text_view_initialize_class (NautilusTextViewClass *klass);
|
static void nautilus_text_view_class_init (NautilusTextViewClass *klass);
|
||||||
static void nautilus_text_view_initialize (NautilusTextView *view);
|
static void nautilus_text_view_init (NautilusTextView *view);
|
||||||
static void nautilus_text_view_destroy (GtkObject *object);
|
static void nautilus_text_view_destroy (GtkObject *object);
|
||||||
static void nautilus_text_view_update (NautilusTextView *text_view);
|
static void nautilus_text_view_update (NautilusTextView *text_view);
|
||||||
static void text_view_load_location_callback (NautilusView *view,
|
static void text_view_load_location_callback (NautilusView *view,
|
||||||
|
@ -125,7 +125,7 @@ static const int max_preferred_zoom_levels = (sizeof (text_view_preferred_zoom_l
|
||||||
sizeof (float)) - 1;
|
sizeof (float)) - 1;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_text_view_initialize_class (NautilusTextViewClass *klass)
|
nautilus_text_view_class_init (NautilusTextViewClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ nautilus_text_view_initialize_class (NautilusTextViewClass *klass)
|
||||||
/* initialize ourselves by connecting to the location change signal and allocating our subviews */
|
/* initialize ourselves by connecting to the location change signal and allocating our subviews */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_text_view_initialize (NautilusTextView *text_view)
|
nautilus_text_view_init (NautilusTextView *text_view)
|
||||||
{
|
{
|
||||||
GtkWidget *scrolled_window;
|
GtkWidget *scrolled_window;
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ nautilus_text_view_initialize (NautilusTextView *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,
|
||||||
text_view_preferred_zoom_levels, NULL,
|
text_view_preferred_zoom_levels, NULL,
|
||||||
EEL_N_ELEMENTS (text_view_preferred_zoom_levels));
|
G_N_ELEMENTS (text_view_preferred_zoom_levels));
|
||||||
|
|
||||||
bonobo_object_add_interface (BONOBO_OBJECT (text_view),
|
bonobo_object_add_interface (BONOBO_OBJECT (text_view),
|
||||||
BONOBO_OBJECT (text_view->details->zoomable));
|
BONOBO_OBJECT (text_view->details->zoomable));
|
||||||
|
|
|
@ -80,8 +80,8 @@ main (int argc, char *argv[])
|
||||||
/* Disable session manager connection */
|
/* Disable session manager connection */
|
||||||
gnome_client_disable_master_connection ();
|
gnome_client_disable_master_connection ();
|
||||||
|
|
||||||
gnomelib_register_popt_table (oaf_popt_options, oaf_get_popt_table_name ());
|
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
|
||||||
orb = oaf_init (argc, argv);
|
orb = bonobo_activation_init (argc, argv);
|
||||||
|
|
||||||
gnome_init ("nautilus-throbber", VERSION, argc, argv);
|
gnome_init ("nautilus-throbber", VERSION, argc, argv);
|
||||||
g_thread_init (NULL);
|
g_thread_init (NULL);
|
||||||
|
@ -89,9 +89,9 @@ main (int argc, char *argv[])
|
||||||
gnome_vfs_init ();
|
gnome_vfs_init ();
|
||||||
bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL);
|
bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL);
|
||||||
|
|
||||||
nautilus_global_preferences_initialize ();
|
nautilus_global_preferences_init ();
|
||||||
|
|
||||||
registration_id = oaf_make_registration_id ("OAFIID:nautilus_throbber_factory", g_getenv ("DISPLAY"));
|
registration_id = bonobo_activation_make_registration_id ("OAFIID:nautilus_throbber_factory", g_getenv ("DISPLAY"));
|
||||||
factory = bonobo_generic_factory_new_multi (registration_id,
|
factory = bonobo_generic_factory_new_multi (registration_id,
|
||||||
throbber_make_object,
|
throbber_make_object,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include <gtk/gtkmenu.h>
|
#include <gtk/gtkmenu.h>
|
||||||
#include <gtk/gtkmenuitem.h>
|
#include <gtk/gtkmenuitem.h>
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-util.h>
|
#include <libgnome/gnome-util.h>
|
||||||
#include <libgnomeui/gnome-pixmap.h>
|
#include <libgnomeui/gnome-pixmap.h>
|
||||||
#include <libnautilus-private/nautilus-file-utilities.h>
|
#include <libnautilus-private/nautilus-file-utilities.h>
|
||||||
|
@ -68,8 +67,8 @@ struct NautilusThrobberDetails {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void nautilus_throbber_initialize_class (NautilusThrobberClass *klass);
|
static void nautilus_throbber_class_init (NautilusThrobberClass *klass);
|
||||||
static void nautilus_throbber_initialize (NautilusThrobber *throbber);
|
static void nautilus_throbber_init (NautilusThrobber *throbber);
|
||||||
static void nautilus_throbber_destroy (GtkObject *object);
|
static void nautilus_throbber_destroy (GtkObject *object);
|
||||||
static void nautilus_throbber_draw (GtkWidget *widget,
|
static void nautilus_throbber_draw (GtkWidget *widget,
|
||||||
GdkRectangle *box);
|
GdkRectangle *box);
|
||||||
|
@ -96,7 +95,7 @@ static void nautilus_throbber_remove_update_callback (NautilusThrobber *thro
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusThrobber, nautilus_throbber, GTK_TYPE_EVENT_BOX)
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusThrobber, nautilus_throbber, GTK_TYPE_EVENT_BOX)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_throbber_initialize_class (NautilusThrobberClass *throbber_class)
|
nautilus_throbber_class_init (NautilusThrobberClass *throbber_class)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class = GTK_OBJECT_CLASS (throbber_class);
|
GtkObjectClass *object_class = GTK_OBJECT_CLASS (throbber_class);
|
||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (throbber_class);
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (throbber_class);
|
||||||
|
@ -269,7 +268,7 @@ null_pointer_callback (GtkObject *object,
|
||||||
|
|
||||||
/* initialize the throbber */
|
/* initialize the throbber */
|
||||||
static void
|
static void
|
||||||
nautilus_throbber_initialize (NautilusThrobber *throbber)
|
nautilus_throbber_init (NautilusThrobber *throbber)
|
||||||
{
|
{
|
||||||
char *delay_str;
|
char *delay_str;
|
||||||
GtkWidget *widget = GTK_WIDGET (throbber);
|
GtkWidget *widget = GTK_WIDGET (throbber);
|
||||||
|
@ -566,7 +565,7 @@ load_themed_image (const char *file_name, const char *image_theme, gboolean smal
|
||||||
}
|
}
|
||||||
|
|
||||||
if (image_path) {
|
if (image_path) {
|
||||||
pixbuf = gdk_pixbuf_new_from_file (image_path);
|
pixbuf = gdk_pixbuf_new_from_file (image_path, NULL);
|
||||||
|
|
||||||
if (small_mode && pixbuf) {
|
if (small_mode && pixbuf) {
|
||||||
temp_pixbuf = gdk_pixbuf_scale_simple (pixbuf,
|
temp_pixbuf = gdk_pixbuf_scale_simple (pixbuf,
|
||||||
|
|
|
@ -29,14 +29,14 @@
|
||||||
#include "nautilus-tree-view-iids.h"
|
#include "nautilus-tree-view-iids.h"
|
||||||
#include "nautilus-tree-view.h"
|
#include "nautilus-tree-view.h"
|
||||||
#include <bonobo.h>
|
#include <bonobo.h>
|
||||||
#include <liboaf/liboaf.h>
|
#include <bonobo-activation/bonobo-activation.h>
|
||||||
|
|
||||||
/* FIXME bugzilla.gnome.org 42736: oaf_plugin_unuse can't possibly work! this sucks */
|
/* FIXME bugzilla.gnome.org 42736: bonobo_activation_plugin_unuse can't possibly work! this sucks */
|
||||||
#if 0
|
#if 0
|
||||||
static void
|
static void
|
||||||
tree_shlib_object_destroyed (GtkObject *object)
|
tree_shlib_object_destroyed (GtkObject *object)
|
||||||
{
|
{
|
||||||
oaf_plugin_unuse (gtk_object_get_user_data (object));
|
bonobo_activation_plugin_unuse (gtk_object_get_user_data (object));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ tree_shlib_make_object (PortableServer_POA poa,
|
||||||
gtk_signal_connect (GTK_OBJECT (view), "destroy", tree_shlib_object_destroyed, NULL);
|
gtk_signal_connect (GTK_OBJECT (view), "destroy", tree_shlib_object_destroyed, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
oaf_plugin_use (poa, impl_ptr);
|
bonobo_activation_plugin_use (poa, impl_ptr);
|
||||||
|
|
||||||
return CORBA_Object_duplicate (bonobo_object_corba_objref
|
return CORBA_Object_duplicate (bonobo_object_corba_objref
|
||||||
(BONOBO_OBJECT (view)), ev);
|
(BONOBO_OBJECT (view)), ev);
|
||||||
|
|
|
@ -37,9 +37,9 @@ struct NautilusTreeChangeQueueDetails {
|
||||||
|
|
||||||
|
|
||||||
static void nautilus_tree_change_queue_destroy (GtkObject *object);
|
static void nautilus_tree_change_queue_destroy (GtkObject *object);
|
||||||
static void nautilus_tree_change_queue_initialize (gpointer object,
|
static void nautilus_tree_change_queue_init (gpointer object,
|
||||||
gpointer klass);
|
gpointer klass);
|
||||||
static void nautilus_tree_change_queue_initialize_class (gpointer klass);
|
static void nautilus_tree_change_queue_class_init (gpointer klass);
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusTreeChangeQueue, nautilus_tree_change_queue, GTK_TYPE_OBJECT)
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusTreeChangeQueue, nautilus_tree_change_queue, GTK_TYPE_OBJECT)
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ static NautilusTreeChange *nautilus_tree_change_new (NautilusTreeChangeType
|
||||||
/* type system infrastructure code */
|
/* type system infrastructure code */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_tree_change_queue_initialize_class (gpointer klass)
|
nautilus_tree_change_queue_class_init (gpointer klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ nautilus_tree_change_queue_initialize_class (gpointer klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_tree_change_queue_initialize (gpointer object,
|
nautilus_tree_change_queue_init (gpointer object,
|
||||||
gpointer klass)
|
gpointer klass)
|
||||||
{
|
{
|
||||||
NautilusTreeChangeQueue *change_queue;
|
NautilusTreeChangeQueue *change_queue;
|
||||||
|
|
|
@ -37,9 +37,9 @@ struct NautilusTreeExpansionStateDetails {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void nautilus_tree_expansion_state_destroy (GtkObject *object);
|
static void nautilus_tree_expansion_state_destroy (GtkObject *object);
|
||||||
static void nautilus_tree_expansion_state_initialize (gpointer object,
|
static void nautilus_tree_expansion_state_init (gpointer object,
|
||||||
gpointer klass);
|
gpointer klass);
|
||||||
static void nautilus_tree_expansion_state_initialize_class (gpointer klass);
|
static void nautilus_tree_expansion_state_class_init (gpointer klass);
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusTreeExpansionState, nautilus_tree_expansion_state, GTK_TYPE_OBJECT)
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusTreeExpansionState, nautilus_tree_expansion_state, GTK_TYPE_OBJECT)
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ static void nautilus_tree_expansion_state_expand_node_internal (Nautil
|
||||||
/* infrastructure stuff */
|
/* infrastructure stuff */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_tree_expansion_state_initialize_class (gpointer klass)
|
nautilus_tree_expansion_state_class_init (gpointer klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ nautilus_tree_expansion_state_save_to_preferences (NautilusTreeExpansionState *e
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_tree_expansion_state_initialize (gpointer object, gpointer klass)
|
nautilus_tree_expansion_state_init (gpointer object, gpointer klass)
|
||||||
{
|
{
|
||||||
NautilusTreeExpansionState *expansion_state;
|
NautilusTreeExpansionState *expansion_state;
|
||||||
|
|
||||||
|
|
|
@ -65,9 +65,9 @@ struct NautilusTreeModelDetails {
|
||||||
|
|
||||||
|
|
||||||
static void nautilus_tree_model_destroy (GtkObject *object);
|
static void nautilus_tree_model_destroy (GtkObject *object);
|
||||||
static void nautilus_tree_model_initialize (gpointer object,
|
static void nautilus_tree_model_init (gpointer object,
|
||||||
gpointer klass);
|
gpointer klass);
|
||||||
static void nautilus_tree_model_initialize_class (gpointer klass);
|
static void nautilus_tree_model_class_init (gpointer klass);
|
||||||
static void remove_all_nodes (NautilusTreeModel *model);
|
static void remove_all_nodes (NautilusTreeModel *model);
|
||||||
static void nautilus_tree_model_set_root_uri (NautilusTreeModel *model,
|
static void nautilus_tree_model_set_root_uri (NautilusTreeModel *model,
|
||||||
const char *root_uri);
|
const char *root_uri);
|
||||||
|
@ -98,7 +98,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusTreeModel, nautilus_tree_model, GTK_TYPE_O
|
||||||
/* infrastructure stuff */
|
/* infrastructure stuff */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_tree_model_initialize_class (gpointer klass)
|
nautilus_tree_model_class_init (gpointer klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -107,43 +107,44 @@ nautilus_tree_model_initialize_class (gpointer klass)
|
||||||
object_class->destroy = nautilus_tree_model_destroy;
|
object_class->destroy = nautilus_tree_model_destroy;
|
||||||
|
|
||||||
signals[NODE_CHANGED] =
|
signals[NODE_CHANGED] =
|
||||||
gtk_signal_new ("node_changed",
|
g_signal_new ("node_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusTreeModelClass, node_changed),
|
G_STRUCT_OFFSET (NautilusTreeModelClass, node_changed),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
||||||
|
|
||||||
signals[NODE_REMOVED] =
|
signals[NODE_REMOVED] =
|
||||||
gtk_signal_new ("node_removed",
|
g_signal_new ("node_removed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusTreeModelClass, node_removed),
|
G_STRUCT_OFFSET (NautilusTreeModelClass, node_removed),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
||||||
|
|
||||||
signals[NODE_BEING_RENAMED] =
|
signals[NODE_BEING_RENAMED] =
|
||||||
gtk_signal_new ("node_being_renamed",
|
g_signal_new ("node_being_renamed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusTreeModelClass, node_removed),
|
G_STRUCT_OFFSET (NautilusTreeModelClass, node_removed),
|
||||||
gtk_marshal_NONE__POINTER_POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 2, GTK_TYPE_STRING, GTK_TYPE_STRING);
|
gtk_marshal_NONE__POINTER_POINTER,
|
||||||
|
G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
|
||||||
|
|
||||||
signals[DONE_LOADING_CHILDREN] =
|
signals[DONE_LOADING_CHILDREN] =
|
||||||
gtk_signal_new ("done_loading_children",
|
g_signal_new ("done_loading_children",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusTreeModelClass, done_loading_children),
|
G_STRUCT_OFFSET (NautilusTreeModelClass, done_loading_children),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_tree_model_initialize (gpointer object, gpointer klass)
|
nautilus_tree_model_init (gpointer object, gpointer klass)
|
||||||
{
|
{
|
||||||
NautilusTreeModel *model;
|
NautilusTreeModel *model;
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,9 @@
|
||||||
|
|
||||||
|
|
||||||
static void nautilus_tree_node_destroy (GtkObject *object);
|
static void nautilus_tree_node_destroy (GtkObject *object);
|
||||||
static void nautilus_tree_node_initialize (gpointer object,
|
static void nautilus_tree_node_init (gpointer object,
|
||||||
gpointer klass);
|
gpointer klass);
|
||||||
static void nautilus_tree_node_initialize_class (gpointer klass);
|
static void nautilus_tree_node_class_init (gpointer klass);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusTreeNode, nautilus_tree_node, GTK_TYPE_OBJ
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_tree_node_initialize_class (gpointer klass)
|
nautilus_tree_node_class_init (gpointer klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ nautilus_tree_node_initialize_class (gpointer klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_tree_node_initialize (gpointer object, gpointer klass)
|
nautilus_tree_node_init (gpointer object, gpointer klass)
|
||||||
{
|
{
|
||||||
NautilusTreeNode *node;
|
NautilusTreeNode *node;
|
||||||
|
|
||||||
|
|
|
@ -196,14 +196,14 @@ nautilus_tree_view_init_dnd (NautilusTreeView *view)
|
||||||
view->details->dnd->drag_info = g_new0 (EelDragInfo, 1);
|
view->details->dnd->drag_info = g_new0 (EelDragInfo, 1);
|
||||||
eel_drag_init (view->details->dnd->drag_info,
|
eel_drag_init (view->details->dnd->drag_info,
|
||||||
nautilus_tree_view_dnd_target_table,
|
nautilus_tree_view_dnd_target_table,
|
||||||
EEL_N_ELEMENTS (nautilus_tree_view_dnd_target_table),
|
G_N_ELEMENTS (nautilus_tree_view_dnd_target_table),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
|
||||||
gtk_drag_dest_set (GTK_WIDGET (view->details->tree),
|
gtk_drag_dest_set (GTK_WIDGET (view->details->tree),
|
||||||
0,
|
0,
|
||||||
nautilus_tree_view_dnd_target_table,
|
nautilus_tree_view_dnd_target_table,
|
||||||
EEL_N_ELEMENTS (nautilus_tree_view_dnd_target_table),
|
G_N_ELEMENTS (nautilus_tree_view_dnd_target_table),
|
||||||
GDK_ACTION_COPY
|
GDK_ACTION_COPY
|
||||||
| GDK_ACTION_MOVE
|
| GDK_ACTION_MOVE
|
||||||
| GDK_ACTION_LINK
|
| GDK_ACTION_LINK
|
||||||
|
@ -395,7 +395,7 @@ get_data_on_first_target_we_support (GtkWidget *widget, GdkDragContext *context,
|
||||||
|
|
||||||
if (nautilus_tree_view_dnd_target_list == NULL)
|
if (nautilus_tree_view_dnd_target_list == NULL)
|
||||||
nautilus_tree_view_dnd_target_list = gtk_target_list_new (nautilus_tree_view_dnd_target_table,
|
nautilus_tree_view_dnd_target_list = gtk_target_list_new (nautilus_tree_view_dnd_target_table,
|
||||||
EEL_N_ELEMENTS (nautilus_tree_view_dnd_target_table));
|
G_N_ELEMENTS (nautilus_tree_view_dnd_target_table));
|
||||||
|
|
||||||
for (target = context->targets; target != NULL; target = target->next) {
|
for (target = context->targets; target != NULL; target = target->next) {
|
||||||
guint dummy_info;
|
guint dummy_info;
|
||||||
|
|
|
@ -83,8 +83,8 @@ static void nautilus_tree_view_update_all_icons (NautilusTreeView *vie
|
||||||
static void cancel_possible_activation (NautilusTreeView *view);
|
static void cancel_possible_activation (NautilusTreeView *view);
|
||||||
static void nautilus_tree_view_update_model_node (NautilusTreeView *view,
|
static void nautilus_tree_view_update_model_node (NautilusTreeView *view,
|
||||||
NautilusTreeNode *node);
|
NautilusTreeNode *node);
|
||||||
static void nautilus_tree_view_initialize_class (NautilusTreeViewClass *klass);
|
static void nautilus_tree_view_class_init (NautilusTreeViewClass *klass);
|
||||||
static void nautilus_tree_view_initialize (NautilusTreeView *view);
|
static void nautilus_tree_view_init (NautilusTreeView *view);
|
||||||
static void register_unparented_node (NautilusTreeView *view,
|
static void register_unparented_node (NautilusTreeView *view,
|
||||||
NautilusTreeNode *node);
|
NautilusTreeNode *node);
|
||||||
static void forget_unparented_node (NautilusTreeView *view,
|
static void forget_unparented_node (NautilusTreeView *view,
|
||||||
|
@ -1031,7 +1031,7 @@ tree_unmap_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_tree_view_initialize (NautilusTreeView *view)
|
nautilus_tree_view_init (NautilusTreeView *view)
|
||||||
{
|
{
|
||||||
view->details = g_new0 (NautilusTreeViewDetails, 1);
|
view->details = g_new0 (NautilusTreeViewDetails, 1);
|
||||||
|
|
||||||
|
@ -1619,7 +1619,7 @@ nautilus_tree_view_update_all_icons (NautilusTreeView *view)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_tree_view_initialize_class (NautilusTreeViewClass *klass)
|
nautilus_tree_view_class_init (NautilusTreeViewClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
|
33
configure.in
33
configure.in
|
@ -87,6 +87,7 @@ LIBNAUTILUS_MODULES="\
|
||||||
glib-2.0 \
|
glib-2.0 \
|
||||||
gnome-vfs-2.0 \
|
gnome-vfs-2.0 \
|
||||||
gtk+-2.0 \
|
gtk+-2.0 \
|
||||||
|
libgnomecanvas-2.0 \
|
||||||
libbonobo-2.0 \
|
libbonobo-2.0 \
|
||||||
libbonoboui-2.0"
|
libbonoboui-2.0"
|
||||||
LIBNAUTILUS_CFLAGS="`$PKG_CONFIG --cflags $LIBNAUTILUS_MODULES`"
|
LIBNAUTILUS_CFLAGS="`$PKG_CONFIG --cflags $LIBNAUTILUS_MODULES`"
|
||||||
|
@ -96,7 +97,39 @@ AC_SUBST(LIBNAUTILUS_LIBS)
|
||||||
LIBNAUTILUS_IDL_INCLUDES="`$PKG_CONFIG --variable=idldir $LIBNAUTILUS_MODULES | $srcdir/add-include-prefix`"
|
LIBNAUTILUS_IDL_INCLUDES="`$PKG_CONFIG --variable=idldir $LIBNAUTILUS_MODULES | $srcdir/add-include-prefix`"
|
||||||
AC_SUBST(LIBNAUTILUS_IDL_INCLUDES)
|
AC_SUBST(LIBNAUTILUS_IDL_INCLUDES)
|
||||||
|
|
||||||
|
dnl libnautilus-adapter
|
||||||
|
LIBNAUTILUS_ADAPTER_MODULES="\
|
||||||
|
bonobo-activation-2.0 \
|
||||||
|
eel-2.0 \
|
||||||
|
glib-2.0 \
|
||||||
|
gnome-vfs-2.0 \
|
||||||
|
gtk+-2.0 \
|
||||||
|
libgnomecanvas-2.0 \
|
||||||
|
libbonobo-2.0 \
|
||||||
|
libbonoboui-2.0"
|
||||||
|
LIBNAUTILUS_ADAPTER_CFLAGS="`$PKG_CONFIG --cflags $LIBNAUTILUS_MODULES`"
|
||||||
|
AC_SUBST(LIBNAUTILUS_ADAPTER_CFLAGS)
|
||||||
|
LIBNAUTILUS_ADAPTER_LIBS="`$PKG_CONFIG --libs $LIBNAUTILUS_MODULES`"
|
||||||
|
AC_SUBST(LIBNAUTILUS_ADAPTER_LIBS)
|
||||||
|
LIBNAUTILUS_ADAPTER_IDL_INCLUDES="`$PKG_CONFIG --variable=idldir $LIBNAUTILUS_ADAPTER_MODULES | $srcdir/add-include-prefix`"
|
||||||
|
AC_SUBST(LIBNAUTILUS_ADAPTER_IDL_INCLUDES)
|
||||||
|
|
||||||
dnl libnautilus-private
|
dnl libnautilus-private
|
||||||
|
LIBNAUTILUS_PRIVATE_MODULES="\
|
||||||
|
bonobo-activation-2.0 \
|
||||||
|
eel-2.0 \
|
||||||
|
glib-2.0 \
|
||||||
|
gnome-vfs-2.0 \
|
||||||
|
gtk+-2.0 \
|
||||||
|
libgnomecanvas-2.0 \
|
||||||
|
libbonobo-2.0 \
|
||||||
|
libbonoboui-2.0"
|
||||||
|
LIBNAUTILUS_PRIVATE_CFLAGS="`$PKG_CONFIG --cflags $LIBNAUTILUS_MODULES`"
|
||||||
|
AC_SUBST(LIBNAUTILUS_PRIVATE_CFLAGS)
|
||||||
|
LIBNAUTILUS_PRIVATE_LIBS="`$PKG_CONFIG --libs $LIBNAUTILUS_MODULES`"
|
||||||
|
AC_SUBST(LIBNAUTILUS_PRIVATE_LIBS)
|
||||||
|
LIBNAUTILUS_PRIVATE_IDL_INCLUDES="`$PKG_CONFIG --variable=idldir $LIBNAUTILUS_PRIVATE_MODULES | $srcdir/add-include-prefix`"
|
||||||
|
AC_SUBST(LIBNAUTILUS_PRIVATE_IDL_INCLUDES)
|
||||||
|
|
||||||
dnl ====================================
|
dnl ====================================
|
||||||
dnl = Begin profiling support
|
dnl = Begin profiling support
|
||||||
|
|
|
@ -177,16 +177,15 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
||||||
gtk_container_add_child_arg_type ("GtkWrapBox::forcebreak",
|
gtk_container_add_child_arg_type ("GtkWrapBox::forcebreak",
|
||||||
GTK_TYPE_BOOL, GTK_ARG_READWRITE, CHILD_ARG_FORCED_BREAK);
|
GTK_TYPE_BOOL, GTK_ARG_READWRITE, CHILD_ARG_FORCED_BREAK);
|
||||||
|
|
||||||
signals[NEED_REALLOCATION] = gtk_signal_new
|
signals[NEED_REALLOCATION] = g_signal_new
|
||||||
("need_reallocation",
|
("need_reallocation",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (GtkWrapBoxClass,
|
G_STRUCT_OFFSET (GtkWrapBoxClass,
|
||||||
need_reallocation),
|
need_reallocation),
|
||||||
|
NULL, NULL,
|
||||||
gtk_marshal_NONE__NONE,
|
gtk_marshal_NONE__NONE,
|
||||||
GTK_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnomeui/gnome-messagebox.h>
|
#include <libgnomeui/gnome-messagebox.h>
|
||||||
#include <libgnomeui/gnome-stock.h>
|
#include <libgnomeui/gnome-stock-icons.h>
|
||||||
#include <libgnomeui/gnome-uidefs.h>
|
#include <libgnomeui/gnome-uidefs.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -5,7 +5,7 @@ lib_LTLIBRARIES=libnautilus-adapter.la
|
||||||
|
|
||||||
INCLUDES=\
|
INCLUDES=\
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
$(NAUTILUS_PRIVATE_CFLAGS) \
|
$(LIBNAUTILUS_ADAPTER_CFLAGS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
libnautilus_adapter_la_LDFLAGS= \
|
libnautilus_adapter_la_LDFLAGS= \
|
||||||
|
@ -30,8 +30,8 @@ libnautilus_adapter_la_SOURCES = \
|
||||||
|
|
||||||
$(nautilus_adapter_factory_idl_sources): nautilus_adapter_factory_idl_stamp
|
$(nautilus_adapter_factory_idl_sources): nautilus_adapter_factory_idl_stamp
|
||||||
nautilus_adapter_factory_idl_stamp: nautilus-adapter-factory.idl
|
nautilus_adapter_factory_idl_stamp: nautilus-adapter-factory.idl
|
||||||
$(ORBIT_IDL) $(IDL_CFLAGS) $(srcdir)/nautilus-adapter-factory.idl
|
$(ORBIT_IDL) -I$(top_srcdir) $(LIBNAUTILUS_ADAPTER_IDL_INCLUDES) $<
|
||||||
touch nautilus_adapter_factory_idl_stamp
|
touch $@
|
||||||
|
|
||||||
|
|
||||||
CLEANFILES = \
|
CLEANFILES = \
|
||||||
|
@ -43,3 +43,4 @@ EXTRA_DIST = \
|
||||||
|
|
||||||
dist-hook:
|
dist-hook:
|
||||||
cd $(distdir); rm -f $(CLEANFILES)
|
cd $(distdir); rm -f $(CLEANFILES)
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,7 @@ INCLUDES = \
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
-I$(top_builddir) \
|
-I$(top_builddir) \
|
||||||
-I$(top_srcdir)/cut-n-paste-code/widgets/e-paned \
|
-I$(top_srcdir)/cut-n-paste-code/widgets/e-paned \
|
||||||
$(NAUTILUS_PRIVATE_CFLAGS) \
|
$(LIBNAUTILUS_PRIVATE_CFLAGS) \
|
||||||
$(ESD_CFLAGS) \
|
|
||||||
$(MEDUSA_CFLAGS) \
|
|
||||||
$(LIBRSVG_CFLAGS) \
|
|
||||||
-DDATADIR=\""$(datadir)"\" \
|
-DDATADIR=\""$(datadir)"\" \
|
||||||
-DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \
|
-DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
@ -27,10 +24,7 @@ endif
|
||||||
|
|
||||||
libnautilus_private_la_LDFLAGS = \
|
libnautilus_private_la_LDFLAGS = \
|
||||||
$(dependency_static_libs) \
|
$(dependency_static_libs) \
|
||||||
$(ESD_LIBS) \
|
$(LIBNAUTILUS_PRIVATE_LIBS) \
|
||||||
$(LIBJPEG) \
|
|
||||||
$(MEDUSA_LIBS) \
|
|
||||||
$(FAM_LIBS) \
|
|
||||||
$(CDDALIBADD) \
|
$(CDDALIBADD) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
@ -55,8 +49,6 @@ libnautilus_private_la_SOURCES = \
|
||||||
nautilus-directory-metafile.c \
|
nautilus-directory-metafile.c \
|
||||||
nautilus-directory.c \
|
nautilus-directory.c \
|
||||||
nautilus-drag-window.c \
|
nautilus-drag-window.c \
|
||||||
nautilus-druid-page-eazel.c \
|
|
||||||
nautilus-druid.c \
|
|
||||||
nautilus-entry.c \
|
nautilus-entry.c \
|
||||||
nautilus-file-changes-queue.c \
|
nautilus-file-changes-queue.c \
|
||||||
nautilus-file-dnd.c \
|
nautilus-file-dnd.c \
|
||||||
|
@ -184,8 +176,8 @@ $(lib_LTLIBRARIES): $(dependency_static_libs)
|
||||||
|
|
||||||
$(nautilus_metafile_server_idl_sources): nautilus_metafile_server_idl_stamp
|
$(nautilus_metafile_server_idl_sources): nautilus_metafile_server_idl_stamp
|
||||||
nautilus_metafile_server_idl_stamp: nautilus-metafile-server.idl $(ORBIT_IDL)
|
nautilus_metafile_server_idl_stamp: nautilus-metafile-server.idl $(ORBIT_IDL)
|
||||||
$(ORBIT_IDL) $(IDL_CFLAGS) $(srcdir)/nautilus-metafile-server.idl
|
$(ORBIT_IDL) -I$(top_srcdir) $(LIBNAUTILUS_PRIVATE_IDL_INCLUDES) $<
|
||||||
touch nautilus_metafile_server_idl_stamp
|
touch $@
|
||||||
|
|
||||||
$(libnautilus_private_la_OBJECTS): nautilus_metafile_server_idl_stamp
|
$(libnautilus_private_la_OBJECTS): nautilus_metafile_server_idl_stamp
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ vfs_authentication_callback (gconstpointer in, size_t in_size,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nautilus_authentication_manager_initialize (void)
|
nautilus_authentication_manager_init (void)
|
||||||
{
|
{
|
||||||
callback_cond = g_cond_new ();
|
callback_cond = g_cond_new ();
|
||||||
callback_mutex = g_mutex_new ();
|
callback_mutex = g_mutex_new ();
|
||||||
|
|
|
@ -25,6 +25,6 @@
|
||||||
#ifndef NAUTILUS_AUTHN_MANAGER_H
|
#ifndef NAUTILUS_AUTHN_MANAGER_H
|
||||||
#define NAUTILUS_AUTHN_MANAGER_H
|
#define NAUTILUS_AUTHN_MANAGER_H
|
||||||
|
|
||||||
void nautilus_authentication_manager_initialize (void);
|
void nautilus_authentication_manager_init (void);
|
||||||
|
|
||||||
#endif /* NAUTILUS_AUTHN_MANAGER_H */
|
#endif /* NAUTILUS_AUTHN_MANAGER_H */
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include <bonobo/bonobo-ui-util.h>
|
#include <bonobo/bonobo-ui-util.h>
|
||||||
#include <gtk/gtkmain.h>
|
#include <gtk/gtkmain.h>
|
||||||
#include <libgnomevfs/gnome-vfs-utils.h>
|
#include <libgnomevfs/gnome-vfs-utils.h>
|
||||||
#include <liboaf/oaf-async.h>
|
|
||||||
|
|
||||||
struct NautilusBonoboActivationHandle {
|
struct NautilusBonoboActivationHandle {
|
||||||
NautilusBonoboActivationHandle **early_completion_hook;
|
NautilusBonoboActivationHandle **early_completion_hook;
|
||||||
|
@ -548,7 +547,7 @@ activation_cancel (NautilusBonoboActivationHandle *handle)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
oaf_activation_callback (Bonobo_Unknown activated_object,
|
bonobo_activation_activation_callback (Bonobo_Unknown activated_object,
|
||||||
const char *error_reason,
|
const char *error_reason,
|
||||||
gpointer callback_data)
|
gpointer callback_data)
|
||||||
{
|
{
|
||||||
|
@ -591,8 +590,8 @@ nautilus_bonobo_activate_from_id (const char *iid,
|
||||||
handle->callback = callback;
|
handle->callback = callback;
|
||||||
handle->callback_data = callback_data;
|
handle->callback_data = callback_data;
|
||||||
|
|
||||||
oaf_activate_from_id_async ((char *) iid, 0,
|
bonobo_activation_activate_from_id_async ((char *) iid, 0,
|
||||||
oaf_activation_callback,
|
bonobo_activation_activation_callback,
|
||||||
handle, NULL);
|
handle, NULL);
|
||||||
|
|
||||||
if (handle != NULL) {
|
if (handle != NULL) {
|
||||||
|
|
|
@ -33,9 +33,7 @@
|
||||||
#include <eel/eel-vfs-extensions.h>
|
#include <eel/eel-vfs-extensions.h>
|
||||||
#include <gtk/gtkaccellabel.h>
|
#include <gtk/gtkaccellabel.h>
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-util.h>
|
#include <libgnome/gnome-util.h>
|
||||||
#include <libgnomeui/gtkpixmapmenuitem.h>
|
|
||||||
#include <libgnomevfs/gnome-vfs-types.h>
|
#include <libgnomevfs/gnome-vfs-types.h>
|
||||||
#include <libgnomevfs/gnome-vfs-uri.h>
|
#include <libgnomevfs/gnome-vfs-uri.h>
|
||||||
#include <libgnomevfs/gnome-vfs-utils.h>
|
#include <libgnomevfs/gnome-vfs-utils.h>
|
||||||
|
@ -61,8 +59,8 @@ struct NautilusBookmarkDetails
|
||||||
|
|
||||||
static void nautilus_bookmark_connect_file (NautilusBookmark *file);
|
static void nautilus_bookmark_connect_file (NautilusBookmark *file);
|
||||||
static void nautilus_bookmark_disconnect_file (NautilusBookmark *file);
|
static void nautilus_bookmark_disconnect_file (NautilusBookmark *file);
|
||||||
static void nautilus_bookmark_initialize_class (NautilusBookmarkClass *class);
|
static void nautilus_bookmark_class_init (NautilusBookmarkClass *class);
|
||||||
static void nautilus_bookmark_initialize (NautilusBookmark *bookmark);
|
static void nautilus_bookmark_init (NautilusBookmark *bookmark);
|
||||||
static GtkWidget *create_pixmap_widget_for_bookmark (NautilusBookmark *bookmark);
|
static GtkWidget *create_pixmap_widget_for_bookmark (NautilusBookmark *bookmark);
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusBookmark, nautilus_bookmark, GTK_TYPE_OBJECT)
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusBookmark, nautilus_bookmark, GTK_TYPE_OBJECT)
|
||||||
|
@ -91,7 +89,7 @@ nautilus_bookmark_destroy (GtkObject *object)
|
||||||
/* Initialization. */
|
/* Initialization. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_bookmark_initialize_class (NautilusBookmarkClass *class)
|
nautilus_bookmark_class_init (NautilusBookmarkClass *class)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -100,27 +98,27 @@ nautilus_bookmark_initialize_class (NautilusBookmarkClass *class)
|
||||||
object_class->destroy = nautilus_bookmark_destroy;
|
object_class->destroy = nautilus_bookmark_destroy;
|
||||||
|
|
||||||
signals[APPEARANCE_CHANGED] =
|
signals[APPEARANCE_CHANGED] =
|
||||||
gtk_signal_new ("appearance_changed",
|
g_signal_new ("appearance_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusBookmarkClass, appearance_changed),
|
G_STRUCT_OFFSET (NautilusBookmarkClass, appearance_changed),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
signals[CONTENTS_CHANGED] =
|
signals[CONTENTS_CHANGED] =
|
||||||
gtk_signal_new ("contents_changed",
|
g_signal_new ("contents_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusBookmarkClass, contents_changed),
|
G_STRUCT_OFFSET (NautilusBookmarkClass, contents_changed),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_bookmark_initialize (NautilusBookmark *bookmark)
|
nautilus_bookmark_init (NautilusBookmark *bookmark)
|
||||||
{
|
{
|
||||||
bookmark->details = g_new0 (NautilusBookmarkDetails, 1);
|
bookmark->details = g_new0 (NautilusBookmarkDetails, 1);
|
||||||
}
|
}
|
||||||
|
@ -472,7 +470,7 @@ nautilus_bookmark_disconnect_file (NautilusBookmark *bookmark)
|
||||||
|
|
||||||
if (bookmark->details->file != NULL) {
|
if (bookmark->details->file != NULL) {
|
||||||
gtk_signal_disconnect_by_func (GTK_OBJECT (bookmark->details->file),
|
gtk_signal_disconnect_by_func (GTK_OBJECT (bookmark->details->file),
|
||||||
bookmark_file_changed_callback,
|
G_CALLBACK (bookmark_file_changed_callback),
|
||||||
bookmark);
|
bookmark);
|
||||||
nautilus_file_unref (bookmark->details->file);
|
nautilus_file_unref (bookmark->details->file);
|
||||||
bookmark->details->file = NULL;
|
bookmark->details->file = NULL;
|
||||||
|
@ -499,7 +497,7 @@ nautilus_bookmark_connect_file (NautilusBookmark *bookmark)
|
||||||
|
|
||||||
gtk_signal_connect (GTK_OBJECT (bookmark->details->file),
|
gtk_signal_connect (GTK_OBJECT (bookmark->details->file),
|
||||||
"changed",
|
"changed",
|
||||||
bookmark_file_changed_callback,
|
G_CALLBACK (bookmark_file_changed_callback),
|
||||||
bookmark);
|
bookmark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -572,12 +570,18 @@ nautilus_bookmark_menu_item_new (NautilusBookmark *bookmark)
|
||||||
* user data. For now let's not let them be turn-offable and see if
|
* user data. For now let's not let them be turn-offable and see if
|
||||||
* anyone objects strenuously.
|
* anyone objects strenuously.
|
||||||
*/
|
*/
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
menu_item = gtk_pixmap_menu_item_new ();
|
menu_item = gtk_pixmap_menu_item_new ();
|
||||||
|
#else
|
||||||
|
menu_item = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
pixmap_widget = create_pixmap_widget_for_bookmark (bookmark);
|
pixmap_widget = create_pixmap_widget_for_bookmark (bookmark);
|
||||||
if (pixmap_widget != NULL) {
|
if (pixmap_widget != NULL) {
|
||||||
gtk_widget_show (pixmap_widget);
|
gtk_widget_show (pixmap_widget);
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
gtk_pixmap_menu_item_set_pixmap (GTK_PIXMAP_MENU_ITEM (menu_item), pixmap_widget);
|
gtk_pixmap_menu_item_set_pixmap (GTK_PIXMAP_MENU_ITEM (menu_item), pixmap_widget);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
display_name = eel_truncate_text_for_menu_item (bookmark->details->name);
|
display_name = eel_truncate_text_for_menu_item (bookmark->details->name);
|
||||||
label = gtk_label_new (display_name);
|
label = gtk_label_new (display_name);
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-util.h>
|
#include <libgnome/gnome-util.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
|
|
||||||
|
@ -40,7 +39,6 @@
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <libgnomevfs/gnome-vfs.h>
|
#include <libgnomevfs/gnome-vfs.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "nautilus-customization-data.h"
|
#include "nautilus-customization-data.h"
|
||||||
|
@ -110,7 +108,7 @@ nautilus_customization_data_new (const char *customization_name,
|
||||||
public_result = gnome_vfs_directory_list_load (&data->public_file_list,
|
public_result = gnome_vfs_directory_list_load (&data->public_file_list,
|
||||||
public_directory_uri,
|
public_directory_uri,
|
||||||
GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
||||||
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS, NULL);
|
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
|
||||||
g_free (public_directory_uri);
|
g_free (public_directory_uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +116,7 @@ nautilus_customization_data_new (const char *customization_name,
|
||||||
private_result = gnome_vfs_directory_list_load (&data->private_file_list,
|
private_result = gnome_vfs_directory_list_load (&data->private_file_list,
|
||||||
private_directory_uri,
|
private_directory_uri,
|
||||||
GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
||||||
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS, NULL);
|
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
|
||||||
g_free (private_directory_uri);
|
g_free (private_directory_uri);
|
||||||
if (public_result != GNOME_VFS_OK &&
|
if (public_result != GNOME_VFS_OK &&
|
||||||
private_result != GNOME_VFS_OK) {
|
private_result != GNOME_VFS_OK) {
|
||||||
|
@ -138,7 +136,7 @@ nautilus_customization_data_new (const char *customization_name,
|
||||||
/* load the frame if necessary */
|
/* load the frame if necessary */
|
||||||
if (!strcmp(customization_name, "patterns")) {
|
if (!strcmp(customization_name, "patterns")) {
|
||||||
temp_str = nautilus_pixmap_file ("chit_frame.png");
|
temp_str = nautilus_pixmap_file ("chit_frame.png");
|
||||||
data->pattern_frame = gdk_pixbuf_new_from_file (temp_str);
|
data->pattern_frame = gdk_pixbuf_new_from_file (temp_str, NULL);
|
||||||
g_free (temp_str);
|
g_free (temp_str);
|
||||||
} else {
|
} else {
|
||||||
data->pattern_frame = NULL;
|
data->pattern_frame = NULL;
|
||||||
|
@ -208,7 +206,7 @@ nautilus_customization_data_get_next_element_for_display (NautilusCustomizationD
|
||||||
|
|
||||||
image_file_name = get_file_path_for_mode (data,
|
image_file_name = get_file_path_for_mode (data,
|
||||||
current_file_info->name);
|
current_file_info->name);
|
||||||
orig_pixbuf = gdk_pixbuf_new_from_file (image_file_name);
|
orig_pixbuf = gdk_pixbuf_new_from_file (image_file_name, NULL);
|
||||||
g_free (image_file_name);
|
g_free (image_file_name);
|
||||||
|
|
||||||
is_reset_image = eel_strcmp(current_file_info->name, RESET_IMAGE_NAME) == 0;
|
is_reset_image = eel_strcmp(current_file_info->name, RESET_IMAGE_NAME) == 0;
|
||||||
|
@ -266,7 +264,7 @@ nautilus_customization_data_destroy (NautilusCustomizationData *data)
|
||||||
gnome_vfs_file_info_list_free (data->private_file_list);
|
gnome_vfs_file_info_list_free (data->private_file_list);
|
||||||
|
|
||||||
if (data->name_map_hash != NULL) {
|
if (data->name_map_hash != NULL) {
|
||||||
eel_g_hash_table_destroy_deep (data->name_map_hash);
|
g_hash_table_destroy (data->name_map_hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (data->customization_name);
|
g_free (data->customization_name);
|
||||||
|
@ -454,7 +452,7 @@ load_name_map_hash_table (NautilusCustomizationData *data)
|
||||||
xmlNodePtr category_node, current_node;
|
xmlNodePtr category_node, current_node;
|
||||||
|
|
||||||
/* allocate the hash table */
|
/* allocate the hash table */
|
||||||
data->name_map_hash = g_hash_table_new (g_str_hash, g_str_equal);
|
data->name_map_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
|
||||||
|
|
||||||
/* build the path name to the browser.xml file and load it */
|
/* build the path name to the browser.xml file and load it */
|
||||||
xml_path = nautilus_make_path (NAUTILUS_DATADIR, "browser.xml");
|
xml_path = nautilus_make_path (NAUTILUS_DATADIR, "browser.xml");
|
||||||
|
@ -465,14 +463,14 @@ load_name_map_hash_table (NautilusCustomizationData *data)
|
||||||
if (browser_data) {
|
if (browser_data) {
|
||||||
/* get the category node */
|
/* get the category node */
|
||||||
category_node = eel_xml_get_root_child_by_name_and_property (browser_data, "category", "name", data->customization_name);
|
category_node = eel_xml_get_root_child_by_name_and_property (browser_data, "category", "name", data->customization_name);
|
||||||
current_node = category_node->childs;
|
current_node = category_node->children;
|
||||||
|
|
||||||
/* loop through the entries, adding a mapping to the hash table */
|
/* loop through the entries, adding a mapping to the hash table */
|
||||||
while (current_node != NULL) {
|
while (current_node != NULL) {
|
||||||
display_name = eel_xml_get_property_translated (current_node, "display_name");
|
display_name = eel_xml_get_property_translated (current_node, "display_name");
|
||||||
filename = xmlGetProp (current_node, "filename");
|
filename = xmlGetProp (current_node, "filename");
|
||||||
if (display_name && filename) {
|
if (display_name && filename) {
|
||||||
g_hash_table_insert (data->name_map_hash, g_strdup (filename), g_strdup (display_name));
|
g_hash_table_replace (data->name_map_hash, g_strdup (filename), g_strdup (display_name));
|
||||||
}
|
}
|
||||||
xmlFree (filename);
|
xmlFree (filename);
|
||||||
xmlFree (display_name);
|
xmlFree (display_name);
|
||||||
|
|
|
@ -1172,7 +1172,7 @@ nautilus_desktop_file_launch (NautilusDesktopFile *df)
|
||||||
nautilus_desktop_file_get_string (df, NULL, "URL", &url);
|
nautilus_desktop_file_get_string (df, NULL, "URL", &url);
|
||||||
|
|
||||||
if (url != NULL) {
|
if (url != NULL) {
|
||||||
gnome_url_show (url);
|
gnome_url_show (url, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (url);
|
g_free (url);
|
||||||
|
|
|
@ -38,8 +38,6 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <libxml/parser.h>
|
#include <libxml/parser.h>
|
||||||
#include <libxml/xmlmemory.h>
|
#include <libxml/xmlmemory.h>
|
||||||
#include <libgnome/gnome-metadata.h>
|
|
||||||
#include <libgnome/gnome-mime-info.h>
|
|
||||||
#include <gtk/gtkmain.h>
|
#include <gtk/gtkmain.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -133,7 +131,7 @@ static void move_file_to_low_priority_queue (NautilusDirectory *directory
|
||||||
static gboolean
|
static gboolean
|
||||||
istr_equal (gconstpointer v, gconstpointer v2)
|
istr_equal (gconstpointer v, gconstpointer v2)
|
||||||
{
|
{
|
||||||
return g_strcasecmp (v, v2) == 0;
|
return g_ascii_strcasecmp (v, v2) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static guint
|
static guint
|
||||||
|
@ -144,7 +142,7 @@ istr_hash (gconstpointer key)
|
||||||
|
|
||||||
h = 0;
|
h = 0;
|
||||||
for (p = key; *p != '\0'; p++) {
|
for (p = key; *p != '\0'; p++) {
|
||||||
h = (h << 5) - h + tolower ((guchar) *p);
|
h = (h << 5) - h + g_ascii_tolower (*p);
|
||||||
}
|
}
|
||||||
|
|
||||||
return h;
|
return h;
|
||||||
|
@ -153,7 +151,7 @@ istr_hash (gconstpointer key)
|
||||||
static GHashTable *
|
static GHashTable *
|
||||||
istr_set_new (void)
|
istr_set_new (void)
|
||||||
{
|
{
|
||||||
return g_hash_table_new (istr_hash, istr_equal);
|
return g_hash_table_new_full (istr_hash, istr_equal, g_free, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -161,10 +159,8 @@ istr_set_insert (GHashTable *table, const char *istr)
|
||||||
{
|
{
|
||||||
char *key;
|
char *key;
|
||||||
|
|
||||||
if (g_hash_table_lookup (table, istr) == NULL) {
|
key = g_strdup (istr);
|
||||||
key = g_strdup (istr);
|
g_hash_table_replace (table, key, key);
|
||||||
g_hash_table_insert (table, key, key);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -189,7 +185,7 @@ istr_set_get_as_list (GHashTable *table)
|
||||||
static void
|
static void
|
||||||
istr_set_destroy (GHashTable *table)
|
istr_set_destroy (GHashTable *table)
|
||||||
{
|
{
|
||||||
eel_g_hash_table_destroy_deep (table);
|
g_hash_table_destroy (table);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start a job. This is really just a way of limiting the number of
|
/* Start a job. This is really just a way of limiting the number of
|
||||||
|
@ -676,6 +672,8 @@ set_file_unconfirmed (NautilusFile *file, gboolean unconfirmed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
|
|
||||||
static gboolean show_hidden_files = TRUE;
|
static gboolean show_hidden_files = TRUE;
|
||||||
static gboolean show_backup_files = TRUE;
|
static gboolean show_backup_files = TRUE;
|
||||||
|
|
||||||
|
@ -733,6 +731,8 @@ get_filter_options_for_directory_count (void)
|
||||||
return filter_options;
|
return filter_options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
load_directory_state_destroy (NautilusDirectory *directory)
|
load_directory_state_destroy (NautilusDirectory *directory)
|
||||||
{
|
{
|
||||||
|
@ -754,9 +754,6 @@ load_directory_state_destroy (NautilusDirectory *directory)
|
||||||
|
|
||||||
nautilus_file_unref (file);
|
nautilus_file_unref (file);
|
||||||
}
|
}
|
||||||
|
|
||||||
gnome_vfs_directory_filter_destroy (directory->details->load_file_count_filter);
|
|
||||||
directory->details->load_file_count_filter = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -806,10 +803,11 @@ dequeue_pending_idle_callback (gpointer callback_data)
|
||||||
* moving this into the actual callback instead of
|
* moving this into the actual callback instead of
|
||||||
* waiting for the idle function.
|
* waiting for the idle function.
|
||||||
*/
|
*/
|
||||||
if (gnome_vfs_directory_filter_apply (directory->details->load_file_count_filter,
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
file_info)) {
|
/* if (gnome_vfs_directory_filter_apply (directory->details->load_file_count_filter,
|
||||||
directory->details->load_file_count += 1;
|
file_info)) */
|
||||||
}
|
#endif
|
||||||
|
directory->details->load_file_count += 1;
|
||||||
|
|
||||||
/* Add the MIME type to the set. */
|
/* Add the MIME type to the set. */
|
||||||
if ((file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE) != 0
|
if ((file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE) != 0
|
||||||
|
@ -1434,6 +1432,7 @@ nautilus_directory_get_info_for_new_files (NautilusDirectory *directory,
|
||||||
vfs_uri_list,
|
vfs_uri_list,
|
||||||
(GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
(GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
||||||
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS),
|
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS),
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
new_files_callback,
|
new_files_callback,
|
||||||
directory);
|
directory);
|
||||||
|
|
||||||
|
@ -1779,6 +1778,8 @@ mark_all_files_unconfirmed (NautilusDirectory *directory)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
should_display_file_name (const char *name,
|
should_display_file_name (const char *name,
|
||||||
GnomeVFSDirectoryFilterOptions options)
|
GnomeVFSDirectoryFilterOptions options)
|
||||||
|
@ -1842,6 +1843,8 @@ get_file_count_filter (NautilusDirectory *directory)
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Start monitoring the file list if it isn't already. */
|
/* Start monitoring the file list if it isn't already. */
|
||||||
static void
|
static void
|
||||||
start_monitoring_file_list (NautilusDirectory *directory)
|
start_monitoring_file_list (NautilusDirectory *directory)
|
||||||
|
@ -1869,7 +1872,9 @@ start_monitoring_file_list (NautilusDirectory *directory)
|
||||||
|
|
||||||
directory->details->load_directory_file->details->loading_directory = TRUE;
|
directory->details->load_directory_file->details->loading_directory = TRUE;
|
||||||
directory->details->load_file_count = 0;
|
directory->details->load_file_count = 0;
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
directory->details->load_file_count_filter = get_file_count_filter (directory);
|
directory->details->load_file_count_filter = get_file_count_filter (directory);
|
||||||
|
#endif
|
||||||
directory->details->load_mime_list_hash = istr_set_new ();
|
directory->details->load_mime_list_hash = istr_set_new ();
|
||||||
#ifdef DEBUG_LOAD_DIRECTORY
|
#ifdef DEBUG_LOAD_DIRECTORY
|
||||||
g_message ("load_directory called to monitor file list of %s", directory->details->uri);
|
g_message ("load_directory called to monitor file list of %s", directory->details->uri);
|
||||||
|
@ -1879,11 +1884,8 @@ start_monitoring_file_list (NautilusDirectory *directory)
|
||||||
directory->details->uri, /* uri */
|
directory->details->uri, /* uri */
|
||||||
(GNOME_VFS_FILE_INFO_GET_MIME_TYPE /* options */
|
(GNOME_VFS_FILE_INFO_GET_MIME_TYPE /* options */
|
||||||
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS),
|
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS),
|
||||||
GNOME_VFS_DIRECTORY_FILTER_NONE, /* filter_type */
|
|
||||||
(GNOME_VFS_DIRECTORY_FILTER_NOSELFDIR /* filter_options */
|
|
||||||
| GNOME_VFS_DIRECTORY_FILTER_NOPARENTDIR),
|
|
||||||
NULL, /* filter_pattern */
|
|
||||||
DIRECTORY_LOAD_ITEMS_PER_CALLBACK, /* items_per_notification */
|
DIRECTORY_LOAD_ITEMS_PER_CALLBACK, /* items_per_notification */
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
directory_load_callback, /* callback */
|
directory_load_callback, /* callback */
|
||||||
directory);
|
directory);
|
||||||
}
|
}
|
||||||
|
@ -2102,10 +2104,8 @@ directory_count_start (NautilusDirectory *directory,
|
||||||
(&directory->details->count_in_progress,
|
(&directory->details->count_in_progress,
|
||||||
uri,
|
uri,
|
||||||
GNOME_VFS_FILE_INFO_DEFAULT,
|
GNOME_VFS_FILE_INFO_DEFAULT,
|
||||||
GNOME_VFS_DIRECTORY_FILTER_NONE,
|
|
||||||
get_filter_options_for_directory_count (),
|
|
||||||
NULL,
|
|
||||||
G_MAXINT,
|
G_MAXINT,
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
directory_count_callback,
|
directory_count_callback,
|
||||||
directory);
|
directory);
|
||||||
g_free (uri);
|
g_free (uri);
|
||||||
|
@ -2213,11 +2213,8 @@ deep_count_load (NautilusDirectory *directory, const char *uri)
|
||||||
(&directory->details->deep_count_in_progress,
|
(&directory->details->deep_count_in_progress,
|
||||||
uri,
|
uri,
|
||||||
GNOME_VFS_FILE_INFO_DEFAULT,
|
GNOME_VFS_FILE_INFO_DEFAULT,
|
||||||
GNOME_VFS_DIRECTORY_FILTER_NONE,
|
|
||||||
(GNOME_VFS_DIRECTORY_FILTER_NOSELFDIR
|
|
||||||
| GNOME_VFS_DIRECTORY_FILTER_NOPARENTDIR),
|
|
||||||
NULL,
|
|
||||||
G_MAXINT,
|
G_MAXINT,
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
deep_count_callback,
|
deep_count_callback,
|
||||||
directory);
|
directory);
|
||||||
}
|
}
|
||||||
|
@ -2360,11 +2357,8 @@ mime_list_load (NautilusDirectory *directory, const char *uri)
|
||||||
(&directory->details->mime_list_in_progress,
|
(&directory->details->mime_list_in_progress,
|
||||||
uri,
|
uri,
|
||||||
GNOME_VFS_FILE_INFO_GET_MIME_TYPE,
|
GNOME_VFS_FILE_INFO_GET_MIME_TYPE,
|
||||||
GNOME_VFS_DIRECTORY_FILTER_NONE,
|
|
||||||
(GNOME_VFS_DIRECTORY_FILTER_NOSELFDIR
|
|
||||||
| GNOME_VFS_DIRECTORY_FILTER_NOPARENTDIR),
|
|
||||||
NULL,
|
|
||||||
DIRECTORY_LOAD_ITEMS_PER_CALLBACK,
|
DIRECTORY_LOAD_ITEMS_PER_CALLBACK,
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
mime_list_callback,
|
mime_list_callback,
|
||||||
directory);
|
directory);
|
||||||
}
|
}
|
||||||
|
@ -2558,6 +2552,7 @@ top_left_start (NautilusDirectory *directory,
|
||||||
uri = nautilus_file_get_uri (file);
|
uri = nautilus_file_get_uri (file);
|
||||||
directory->details->top_left_read_state->handle = eel_read_file_async
|
directory->details->top_left_read_state->handle = eel_read_file_async
|
||||||
(uri,
|
(uri,
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
top_left_read_callback,
|
top_left_read_callback,
|
||||||
top_left_read_more_callback,
|
top_left_read_more_callback,
|
||||||
directory);
|
directory);
|
||||||
|
@ -2687,6 +2682,7 @@ file_info_start (NautilusDirectory *directory,
|
||||||
&fake_list,
|
&fake_list,
|
||||||
GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
||||||
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS,
|
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS,
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
get_info_callback,
|
get_info_callback,
|
||||||
directory);
|
directory);
|
||||||
gnome_vfs_uri_unref (vfs_uri);
|
gnome_vfs_uri_unref (vfs_uri);
|
||||||
|
@ -2755,7 +2751,7 @@ link_info_nautilus_link_read_callback (GnomeVFSResult result,
|
||||||
name = NULL;
|
name = NULL;
|
||||||
icon = NULL;
|
icon = NULL;
|
||||||
} else {
|
} else {
|
||||||
/* The gnome-xml parser requires a zero-terminated array. */
|
/* The libxml parser requires a zero-terminated array. */
|
||||||
buffer = g_realloc (file_contents, bytes_read + 1);
|
buffer = g_realloc (file_contents, bytes_read + 1);
|
||||||
buffer[bytes_read] = '\0';
|
buffer[bytes_read] = '\0';
|
||||||
uri = nautilus_link_get_link_uri_given_file_contents (buffer, bytes_read);
|
uri = nautilus_link_get_link_uri_given_file_contents (buffer, bytes_read);
|
||||||
|
@ -2789,12 +2785,14 @@ link_info_gmc_link_read_callback (GnomeVFSResult result,
|
||||||
|
|
||||||
nautilus_directory_ref (directory);
|
nautilus_directory_ref (directory);
|
||||||
|
|
||||||
|
uri = NULL;
|
||||||
|
name = NULL;
|
||||||
|
icon = NULL;
|
||||||
|
icon_path = NULL;
|
||||||
|
|
||||||
/* Handle the case where we read the GMC link. */
|
/* Handle the case where we read the GMC link. */
|
||||||
if (result != GNOME_VFS_OK || !eel_str_has_prefix (file_contents, "URL: ")) {
|
if (result != GNOME_VFS_OK || !eel_str_has_prefix (file_contents, "URL: ")) {
|
||||||
/* FIXME bugzilla.gnome.org 42433: We should report this error to the user. */
|
/* FIXME bugzilla.gnome.org 42433: We should report this error to the user. */
|
||||||
uri = NULL;
|
|
||||||
name = NULL;
|
|
||||||
icon = NULL;
|
|
||||||
} else {
|
} else {
|
||||||
/* Make sure we don't run off the end of the buffer. */
|
/* Make sure we don't run off the end of the buffer. */
|
||||||
end_of_line = memchr (file_contents, '\n', bytes_read);
|
end_of_line = memchr (file_contents, '\n', bytes_read);
|
||||||
|
@ -2811,21 +2809,29 @@ link_info_gmc_link_read_callback (GnomeVFSResult result,
|
||||||
* have it here where the results will at least be cached than in
|
* have it here where the results will at least be cached than in
|
||||||
* nautilus_file_get_display_name.
|
* nautilus_file_get_display_name.
|
||||||
*/
|
*/
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
res = gnome_metadata_get (path, "icon-name", &size, &name);
|
res = gnome_metadata_get (path, "icon-name", &size, &name);
|
||||||
|
if (res != 0) {
|
||||||
|
name = NULL;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
size = 0;
|
||||||
|
res = -1;
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
res = -1;
|
res = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res != 0) {
|
|
||||||
name = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (path != NULL) {
|
if (path != NULL) {
|
||||||
/* FIXME: this gnome_metata_get call is synchronous, but better to
|
/* FIXME: this gnome_metata_get call is synchronous, but better to
|
||||||
* have it here where the results will at least be cached than in
|
* have it here where the results will at least be cached than in
|
||||||
* nautilus_file_get_display_name.
|
* nautilus_file_get_display_name.
|
||||||
*/
|
*/
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
res = gnome_metadata_get (path, "icon-filename", &size, &icon_path);
|
res = gnome_metadata_get (path, "icon-filename", &size, &icon_path);
|
||||||
|
#else
|
||||||
|
res = -1;
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
res = -1;
|
res = -1;
|
||||||
}
|
}
|
||||||
|
@ -2954,18 +2960,21 @@ link_info_start (NautilusDirectory *directory,
|
||||||
if (gmc_style_link) {
|
if (gmc_style_link) {
|
||||||
directory->details->link_info_read_state->handle = eel_read_file_async
|
directory->details->link_info_read_state->handle = eel_read_file_async
|
||||||
(uri,
|
(uri,
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
link_info_gmc_link_read_callback,
|
link_info_gmc_link_read_callback,
|
||||||
link_info_gmc_link_read_more_callback,
|
link_info_gmc_link_read_more_callback,
|
||||||
directory);
|
directory);
|
||||||
} else if (is_directory) {
|
} else if (is_directory) {
|
||||||
directory->details->link_info_read_state->handle = eel_read_entire_file_async
|
directory->details->link_info_read_state->handle = eel_read_entire_file_async
|
||||||
(dot_directory_uri,
|
(dot_directory_uri,
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
link_info_nautilus_link_read_callback,
|
link_info_nautilus_link_read_callback,
|
||||||
directory);
|
directory);
|
||||||
g_free (dot_directory_uri);
|
g_free (dot_directory_uri);
|
||||||
} else {
|
} else {
|
||||||
directory->details->link_info_read_state->handle = eel_read_entire_file_async
|
directory->details->link_info_read_state->handle = eel_read_entire_file_async
|
||||||
(uri,
|
(uri,
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
link_info_nautilus_link_read_callback,
|
link_info_nautilus_link_read_callback,
|
||||||
directory);
|
directory);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,9 @@
|
||||||
#include <libgnome/gnome-util.h>
|
#include <libgnome/gnome-util.h>
|
||||||
#include <libgnomevfs/gnome-vfs-utils.h>
|
#include <libgnomevfs/gnome-vfs-utils.h>
|
||||||
|
|
||||||
|
/* FIXME: Is there a better way to do this? */
|
||||||
|
extern char *_gdk_display_name;
|
||||||
|
|
||||||
static void background_changed_callback (EelBackground *background,
|
static void background_changed_callback (EelBackground *background,
|
||||||
NautilusFile *file);
|
NautilusFile *file);
|
||||||
static void background_reset_callback (EelBackground *background,
|
static void background_reset_callback (EelBackground *background,
|
||||||
|
@ -493,7 +496,7 @@ nautilus_file_background_event_filter (GdkXEvent *gdk_xevent, GdkEvent *event, g
|
||||||
|
|
||||||
xevent = (XEvent *) gdk_xevent;
|
xevent = (XEvent *) gdk_xevent;
|
||||||
|
|
||||||
if (xevent->type == PropertyNotify && xevent->xproperty.atom == gdk_atom_intern("ESETROOT_PMAP_ID", TRUE)) {
|
if (xevent->type == PropertyNotify && xevent->xproperty.atom == gdk_x11_get_xatom_by_name ("ESETROOT_PMAP_ID")) {
|
||||||
|
|
||||||
/* If we caused it, ignore it.
|
/* If we caused it, ignore it.
|
||||||
*/
|
*/
|
||||||
|
@ -545,7 +548,7 @@ nautilus_file_background_receive_root_window_changes (EelBackground *background)
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a persistant pixmap. We create a separate display
|
/* Create a persistent pixmap. We create a separate display
|
||||||
* and set the closedown mode on it to RetainPermanent
|
* and set the closedown mode on it to RetainPermanent
|
||||||
* (copied from gnome-source/control-panels/capplets/background-properties/render-background.c)
|
* (copied from gnome-source/control-panels/capplets/background-properties/render-background.c)
|
||||||
*/
|
*/
|
||||||
|
@ -557,7 +560,7 @@ make_root_pixmap (gint width, gint height)
|
||||||
|
|
||||||
gdk_flush ();
|
gdk_flush ();
|
||||||
|
|
||||||
display = XOpenDisplay (gdk_display_name);
|
display = XOpenDisplay (_gdk_display_name);
|
||||||
|
|
||||||
XSetCloseDownMode (display, RetainPermanent);
|
XSetCloseDownMode (display, RetainPermanent);
|
||||||
|
|
||||||
|
@ -571,24 +574,6 @@ make_root_pixmap (gint width, gint height)
|
||||||
return gdk_pixmap_foreign_new (result);
|
return gdk_pixmap_foreign_new (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (copied from gnome-source/control-panels/capplets/background-properties/render-background.c)
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
dispose_root_pixmap (GdkPixmap *pixmap)
|
|
||||||
{
|
|
||||||
/* Unrefing a foreign pixmap causes it to be destroyed - so we include
|
|
||||||
* this bad hack, that will work for GTK+-1.2 until the problem
|
|
||||||
* is fixed in the next release
|
|
||||||
*/
|
|
||||||
|
|
||||||
GdkWindowPrivate *private = (GdkWindowPrivate *)pixmap;
|
|
||||||
|
|
||||||
gdk_xid_table_remove (private->xwindow);
|
|
||||||
g_dataset_destroy (private);
|
|
||||||
g_free (private);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set the root pixmap, and properties pointing to it. We
|
/* Set the root pixmap, and properties pointing to it. We
|
||||||
* do this atomically with XGrabServer to make sure that
|
* do this atomically with XGrabServer to make sure that
|
||||||
* we won't leak the pixmap if somebody else it setting
|
* we won't leak the pixmap if somebody else it setting
|
||||||
|
@ -605,14 +590,14 @@ set_root_pixmap (GdkPixmap *pixmap)
|
||||||
gulong bytes_after;
|
gulong bytes_after;
|
||||||
guchar *data_esetroot;
|
guchar *data_esetroot;
|
||||||
Pixmap pixmap_id;
|
Pixmap pixmap_id;
|
||||||
GdkAtom type;
|
Atom type;
|
||||||
|
|
||||||
data_esetroot = NULL;
|
data_esetroot = NULL;
|
||||||
|
|
||||||
XGrabServer (GDK_DISPLAY());
|
XGrabServer (GDK_DISPLAY());
|
||||||
|
|
||||||
result = XGetWindowProperty (GDK_DISPLAY(), GDK_ROOT_WINDOW(),
|
result = XGetWindowProperty (GDK_DISPLAY(), GDK_ROOT_WINDOW(),
|
||||||
gdk_atom_intern("ESETROOT_PMAP_ID", FALSE),
|
gdk_x11_get_xatom_by_name ("ESETROOT_PMAP_ID"),
|
||||||
0L, 1L, False, XA_PIXMAP,
|
0L, 1L, False, XA_PIXMAP,
|
||||||
&type, &format, &nitems, &bytes_after,
|
&type, &format, &nitems, &bytes_after,
|
||||||
&data_esetroot);
|
&data_esetroot);
|
||||||
|
@ -632,15 +617,15 @@ set_root_pixmap (GdkPixmap *pixmap)
|
||||||
pixmap_id = GDK_WINDOW_XWINDOW (pixmap);
|
pixmap_id = GDK_WINDOW_XWINDOW (pixmap);
|
||||||
|
|
||||||
XChangeProperty (GDK_DISPLAY(), GDK_ROOT_WINDOW(),
|
XChangeProperty (GDK_DISPLAY(), GDK_ROOT_WINDOW(),
|
||||||
gdk_atom_intern("ESETROOT_PMAP_ID", FALSE), XA_PIXMAP,
|
gdk_x11_get_xatom_by_name ("ESETROOT_PMAP_ID"), XA_PIXMAP,
|
||||||
32, PropModeReplace,
|
32, PropModeReplace,
|
||||||
(guchar *) &pixmap_id, 1);
|
(guchar *) &pixmap_id, 1);
|
||||||
XChangeProperty (GDK_DISPLAY(), GDK_ROOT_WINDOW(),
|
XChangeProperty (GDK_DISPLAY(), GDK_ROOT_WINDOW(),
|
||||||
gdk_atom_intern("_XROOTPMAP_ID", FALSE), XA_PIXMAP,
|
gdk_x11_get_xatom_by_name ("_XROOTPMAP_ID"), XA_PIXMAP,
|
||||||
32, PropModeReplace,
|
32, PropModeReplace,
|
||||||
(guchar *) &pixmap_id, 1);
|
(guchar *) &pixmap_id, 1);
|
||||||
|
|
||||||
XSetWindowBackgroundPixmap (GDK_DISPLAY(), GDK_ROOT_WINDOW(), pixmap_id);
|
XSetWindowBackgroundPixmap (GDK_DISPLAY (), GDK_ROOT_WINDOW (), pixmap_id);
|
||||||
XClearWindow (GDK_DISPLAY (), GDK_ROOT_WINDOW ());
|
XClearWindow (GDK_DISPLAY (), GDK_ROOT_WINDOW ());
|
||||||
|
|
||||||
XUngrabServer (GDK_DISPLAY());
|
XUngrabServer (GDK_DISPLAY());
|
||||||
|
@ -678,14 +663,7 @@ image_loading_done_callback (EelBackground *background, gboolean successful_load
|
||||||
gdk_window_set_back_pixmap (background_window, pixmap, FALSE);
|
gdk_window_set_back_pixmap (background_window, pixmap, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We'd like to simply unref pixmap here, but due to a bug in gdk's handling of
|
gdk_pixmap_unref (pixmap);
|
||||||
* foreign pixmaps, we can't - it would free the X resource.
|
|
||||||
*
|
|
||||||
* gdk_window_set_back_pixmap does not need the gdk pixmap object to stick around.
|
|
||||||
* It simply uses X resource inside it. dispose_root_pixmap free's the gdk object
|
|
||||||
* and not the X resource.
|
|
||||||
*/
|
|
||||||
dispose_root_pixmap (pixmap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -777,7 +755,7 @@ background_changed_callback (EelBackground *background,
|
||||||
* try to change the background.
|
* try to change the background.
|
||||||
*/
|
*/
|
||||||
gtk_signal_handler_block_by_func (GTK_OBJECT (file),
|
gtk_signal_handler_block_by_func (GTK_OBJECT (file),
|
||||||
saved_settings_changed_callback,
|
G_CALLBACK (saved_settings_changed_callback),
|
||||||
background);
|
background);
|
||||||
|
|
||||||
nautilus_file_set_metadata (file,
|
nautilus_file_set_metadata (file,
|
||||||
|
@ -792,7 +770,7 @@ background_changed_callback (EelBackground *background,
|
||||||
|
|
||||||
/* Unblock the handler. */
|
/* Unblock the handler. */
|
||||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (file),
|
gtk_signal_handler_unblock_by_func (GTK_OBJECT (file),
|
||||||
saved_settings_changed_callback,
|
G_CALLBACK (saved_settings_changed_callback),
|
||||||
background);
|
background);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -840,7 +818,7 @@ initialize_background_from_settings (NautilusFile *file,
|
||||||
* in the metadata so it doesn't try to change the metadata.
|
* in the metadata so it doesn't try to change the metadata.
|
||||||
*/
|
*/
|
||||||
gtk_signal_handler_block_by_func (GTK_OBJECT (background),
|
gtk_signal_handler_block_by_func (GTK_OBJECT (background),
|
||||||
background_changed_callback,
|
G_CALLBACK (background_changed_callback),
|
||||||
file);
|
file);
|
||||||
|
|
||||||
eel_background_set_color (background, color);
|
eel_background_set_color (background, color);
|
||||||
|
@ -849,7 +827,7 @@ initialize_background_from_settings (NautilusFile *file,
|
||||||
|
|
||||||
/* Unblock the handler. */
|
/* Unblock the handler. */
|
||||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (background),
|
gtk_signal_handler_unblock_by_func (GTK_OBJECT (background),
|
||||||
background_changed_callback,
|
G_CALLBACK (background_changed_callback),
|
||||||
file);
|
file);
|
||||||
|
|
||||||
g_free (color);
|
g_free (color);
|
||||||
|
@ -894,7 +872,7 @@ background_reset_callback (EelBackground *background,
|
||||||
* try to change the background.
|
* try to change the background.
|
||||||
*/
|
*/
|
||||||
gtk_signal_handler_block_by_func (GTK_OBJECT (file),
|
gtk_signal_handler_block_by_func (GTK_OBJECT (file),
|
||||||
saved_settings_changed_callback,
|
G_CALLBACK (saved_settings_changed_callback),
|
||||||
background);
|
background);
|
||||||
|
|
||||||
/* reset the metadata */
|
/* reset the metadata */
|
||||||
|
@ -909,7 +887,7 @@ background_reset_callback (EelBackground *background,
|
||||||
NULL);
|
NULL);
|
||||||
/* Unblock the handler. */
|
/* Unblock the handler. */
|
||||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (file),
|
gtk_signal_handler_unblock_by_func (GTK_OBJECT (file),
|
||||||
saved_settings_changed_callback,
|
G_CALLBACK (saved_settings_changed_callback),
|
||||||
background);
|
background);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ static void corba_metafile_changed (PortableServer_Servant servant,
|
||||||
static void corba_metafile_ready (PortableServer_Servant servant,
|
static void corba_metafile_ready (PortableServer_Servant servant,
|
||||||
CORBA_Environment *ev);
|
CORBA_Environment *ev);
|
||||||
|
|
||||||
NAUTILUS_BONOBO_X_BOILERPLATE (NautilusMetafileMonitor, Nautilus_MetafileMonitor, BONOBO_X_OBJECT_TYPE, nautilus_metafile_monitor)
|
EEL_DEFINE_BONOBO_BOILERPLATE (NautilusMetafileMonitor, nautilus_metafile_monitor, BONOBO_OBJECT_TYPE)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_metafile_monitor_class_init (NautilusMetafileMonitorClass *klass)
|
nautilus_metafile_monitor_class_init (NautilusMetafileMonitorClass *klass)
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "nautilus-directory-metafile-monitor.h"
|
#include "nautilus-directory-metafile-monitor.h"
|
||||||
#include "nautilus-metafile-server.h"
|
#include "nautilus-metafile-server.h"
|
||||||
#include <eel/eel-string.h>
|
#include <eel/eel-string.h>
|
||||||
#include <liboaf/liboaf.h>
|
#include <bonobo-activation/bonobo-activation.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
static Nautilus_MetafileFactory factory = CORBA_OBJECT_NIL;
|
static Nautilus_MetafileFactory factory = CORBA_OBJECT_NIL;
|
||||||
|
@ -61,7 +61,7 @@ die_on_failed_activation (const char *server_name,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const char *details;
|
const char *details;
|
||||||
OAF_GeneralError *general_error;
|
Bonobo_GeneralError *general_error;
|
||||||
|
|
||||||
switch (ev->_major) {
|
switch (ev->_major) {
|
||||||
case CORBA_NO_EXCEPTION:
|
case CORBA_NO_EXCEPTION:
|
||||||
|
@ -71,7 +71,7 @@ die_on_failed_activation (const char *server_name,
|
||||||
case CORBA_SYSTEM_EXCEPTION:
|
case CORBA_SYSTEM_EXCEPTION:
|
||||||
case CORBA_USER_EXCEPTION:
|
case CORBA_USER_EXCEPTION:
|
||||||
details = CORBA_exception_id (ev);
|
details = CORBA_exception_id (ev);
|
||||||
if (strcmp (details, "IDL:OAF/GeneralError:1.0") == 0) {
|
if (strcmp (details, "IDL:Bonobo/GeneralError:1.0") == 0) {
|
||||||
general_error = CORBA_exception_value (ev);
|
general_error = CORBA_exception_value (ev);
|
||||||
details = general_error->description;
|
details = general_error->description;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ die_on_failed_activation (const char *server_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
g_error ("Failed to activate the server %s; this may indicate a broken\n"
|
g_error ("Failed to activate the server %s; this may indicate a broken\n"
|
||||||
"Nautilus or OAF installation, or may reflect a bug in something,\n"
|
"Nautilus or Bonobo installation, or may reflect a bug in something,\n"
|
||||||
"or may mean that your PATH or LD_LIBRARY_PATH or the like is\n"
|
"or may mean that your PATH or LD_LIBRARY_PATH or the like is\n"
|
||||||
"incorrect. Nautilus will dump core and exit.\n"
|
"incorrect. Nautilus will dump core and exit.\n"
|
||||||
"Details: '%s'", server_name, details);
|
"Details: '%s'", server_name, details);
|
||||||
|
@ -99,7 +99,7 @@ get_factory (void)
|
||||||
if (get_factory_from_oaf) {
|
if (get_factory_from_oaf) {
|
||||||
CORBA_exception_init (&ev);
|
CORBA_exception_init (&ev);
|
||||||
|
|
||||||
factory = oaf_activate_from_id (METAFILE_FACTORY_IID, 0,
|
factory = bonobo_activation_activate_from_id (METAFILE_FACTORY_IID, 0,
|
||||||
NULL, &ev);
|
NULL, &ev);
|
||||||
if (ev._major != CORBA_NO_EXCEPTION || factory == CORBA_OBJECT_NIL) {
|
if (ev._major != CORBA_NO_EXCEPTION || factory == CORBA_OBJECT_NIL) {
|
||||||
die_on_failed_activation ("Nautilus_MetafileFactory", &ev);
|
die_on_failed_activation ("Nautilus_MetafileFactory", &ev);
|
||||||
|
|
|
@ -81,7 +81,6 @@ struct NautilusDirectoryDetails
|
||||||
|
|
||||||
NautilusFile *load_directory_file;
|
NautilusFile *load_directory_file;
|
||||||
int load_file_count;
|
int load_file_count;
|
||||||
GnomeVFSDirectoryFilter *load_file_count_filter;
|
|
||||||
GHashTable *load_mime_list_hash;
|
GHashTable *load_mime_list_hash;
|
||||||
|
|
||||||
GList *get_file_infos_in_progress; /* list of GnomeVFSAsyncHandle * */
|
GList *get_file_infos_in_progress; /* list of GnomeVFSAsyncHandle * */
|
||||||
|
|
|
@ -64,9 +64,9 @@ static guint signals[LAST_SIGNAL];
|
||||||
static GHashTable *directories;
|
static GHashTable *directories;
|
||||||
|
|
||||||
static void nautilus_directory_destroy (GtkObject *object);
|
static void nautilus_directory_destroy (GtkObject *object);
|
||||||
static void nautilus_directory_initialize (gpointer object,
|
static void nautilus_directory_init (gpointer object,
|
||||||
gpointer klass);
|
gpointer klass);
|
||||||
static void nautilus_directory_initialize_class (NautilusDirectoryClass *klass);
|
static void nautilus_directory_class_init (NautilusDirectoryClass *klass);
|
||||||
static NautilusDirectory *nautilus_directory_new (const char *uri);
|
static NautilusDirectory *nautilus_directory_new (const char *uri);
|
||||||
static char * real_get_name_for_self_as_new_file (NautilusDirectory *directory);
|
static char * real_get_name_for_self_as_new_file (NautilusDirectory *directory);
|
||||||
static void set_directory_uri (NautilusDirectory *directory,
|
static void set_directory_uri (NautilusDirectory *directory,
|
||||||
|
@ -77,7 +77,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusDirectory,
|
||||||
GTK_TYPE_OBJECT)
|
GTK_TYPE_OBJECT)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_directory_initialize_class (NautilusDirectoryClass *klass)
|
nautilus_directory_class_init (NautilusDirectoryClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -86,41 +86,43 @@ nautilus_directory_initialize_class (NautilusDirectoryClass *klass)
|
||||||
object_class->destroy = nautilus_directory_destroy;
|
object_class->destroy = nautilus_directory_destroy;
|
||||||
|
|
||||||
signals[FILES_ADDED] =
|
signals[FILES_ADDED] =
|
||||||
gtk_signal_new ("files_added",
|
g_signal_new ("files_added",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusDirectoryClass, files_added),
|
G_STRUCT_OFFSET (NautilusDirectoryClass, files_added),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
||||||
signals[FILES_CHANGED] =
|
signals[FILES_CHANGED] =
|
||||||
gtk_signal_new ("files_changed",
|
g_signal_new ("files_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusDirectoryClass, files_changed),
|
G_STRUCT_OFFSET (NautilusDirectoryClass, files_changed),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
||||||
signals[DONE_LOADING] =
|
signals[DONE_LOADING] =
|
||||||
gtk_signal_new ("done_loading",
|
g_signal_new ("done_loading",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusDirectoryClass, done_loading),
|
G_STRUCT_OFFSET (NautilusDirectoryClass, done_loading),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
signals[LOAD_ERROR] =
|
signals[LOAD_ERROR] =
|
||||||
gtk_signal_new ("load_error",
|
g_signal_new ("load_error",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusDirectoryClass, load_error),
|
G_STRUCT_OFFSET (NautilusDirectoryClass, load_error),
|
||||||
gtk_marshal_NONE__INT,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1, GTK_TYPE_INT);
|
gtk_marshal_NONE__INT,
|
||||||
|
G_TYPE_NONE, 1, GTK_TYPE_INT);
|
||||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_directory_initialize (gpointer object, gpointer klass)
|
nautilus_directory_init (gpointer object, gpointer klass)
|
||||||
{
|
{
|
||||||
NautilusDirectory *directory;
|
NautilusDirectory *directory;
|
||||||
|
|
||||||
|
@ -1562,7 +1564,7 @@ nautilus_directory_list_ref (GList *list)
|
||||||
void
|
void
|
||||||
nautilus_directory_list_unref (GList *list)
|
nautilus_directory_list_unref (GList *list)
|
||||||
{
|
{
|
||||||
eel_g_list_safe_for_each (list, (GFunc) nautilus_directory_unref, NULL);
|
g_list_foreach (list, (GFunc) nautilus_directory_unref, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -114,6 +114,8 @@ execute_pending_requests (GtkWindow *window,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
|
|
||||||
/* Called when no button-press event arrived occurred shortly after
|
/* Called when no button-press event arrived occurred shortly after
|
||||||
* receiving a TAKE_FOCUS or RAISE_WINDOW request. So just commit
|
* receiving a TAKE_FOCUS or RAISE_WINDOW request. So just commit
|
||||||
* the pending requests.
|
* the pending requests.
|
||||||
|
@ -137,6 +139,8 @@ focus_timeout_callback (gpointer data)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
remove_focus_timeout (GtkWindow *window)
|
remove_focus_timeout (GtkWindow *window)
|
||||||
{
|
{
|
||||||
|
@ -150,6 +154,8 @@ remove_focus_timeout (GtkWindow *window)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_focus_timeout (GtkWindow *window)
|
set_focus_timeout (GtkWindow *window)
|
||||||
{
|
{
|
||||||
|
@ -165,10 +171,12 @@ set_focus_timeout (GtkWindow *window)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Called for all button-press events; sets the `in_button_press' flag */
|
/* Called for all button-press events; sets the `in_button_press' flag */
|
||||||
static gboolean
|
static gboolean
|
||||||
button_press_emission_callback (GtkObject *object, guint signal_id,
|
button_press_emission_callback (GSignalInvocationHint *ihint,
|
||||||
guint n_params, GtkArg *params,
|
guint n_params, const GValue *params,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
|
@ -178,7 +186,7 @@ button_press_emission_callback (GtkObject *object, guint signal_id,
|
||||||
* otherwise we can get duped into counting unbalanced
|
* otherwise we can get duped into counting unbalanced
|
||||||
* press/release events, which isn't healthy
|
* press/release events, which isn't healthy
|
||||||
*/
|
*/
|
||||||
window = get_ancestor_blocked_by (GTK_WIDGET (object),
|
window = get_ancestor_blocked_by (GTK_WIDGET (g_value_get_object (¶ms[0])),
|
||||||
GTK_TYPE_WINDOW,
|
GTK_TYPE_WINDOW,
|
||||||
GTK_TYPE_MENU_SHELL);
|
GTK_TYPE_MENU_SHELL);
|
||||||
if (window != NULL) {
|
if (window != NULL) {
|
||||||
|
@ -204,14 +212,14 @@ button_press_emission_callback (GtkObject *object, guint signal_id,
|
||||||
|
|
||||||
/* Called for button-release events; commits any pending focus/raise */
|
/* Called for button-release events; commits any pending focus/raise */
|
||||||
static gboolean
|
static gboolean
|
||||||
button_release_emission_callback (GtkObject *object, guint signal_id,
|
button_release_emission_callback (GSignalInvocationHint *ihint,
|
||||||
guint n_params, GtkArg *params,
|
guint n_params, const GValue *params,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
NautilusDragWindowDetails *details;
|
NautilusDragWindowDetails *details;
|
||||||
|
|
||||||
window = get_ancestor_blocked_by (GTK_WIDGET (object),
|
window = get_ancestor_blocked_by (GTK_WIDGET (g_value_get_object (¶ms[0])),
|
||||||
GTK_TYPE_WINDOW,
|
GTK_TYPE_WINDOW,
|
||||||
GTK_TYPE_MENU_SHELL);
|
GTK_TYPE_MENU_SHELL);
|
||||||
if (window != NULL) {
|
if (window != NULL) {
|
||||||
|
@ -230,14 +238,14 @@ button_release_emission_callback (GtkObject *object, guint signal_id,
|
||||||
* widget emitting the signal, cancel any pending focus/raise requests
|
* widget emitting the signal, cancel any pending focus/raise requests
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
drag_begin_emission_callback (GtkObject *object, guint signal_id,
|
drag_begin_emission_callback (GSignalInvocationHint *ihint,
|
||||||
guint n_params, GtkArg *params,
|
guint n_params, const GValue *params,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
NautilusDragWindowDetails *details;
|
NautilusDragWindowDetails *details;
|
||||||
|
|
||||||
window = gtk_widget_get_ancestor (GTK_WIDGET (object),
|
window = gtk_widget_get_ancestor (GTK_WIDGET (g_value_get_object (¶ms[0])),
|
||||||
GTK_TYPE_WINDOW);
|
GTK_TYPE_WINDOW);
|
||||||
if (window != NULL) {
|
if (window != NULL) {
|
||||||
details = get_details (GTK_WINDOW (window));
|
details = get_details (GTK_WINDOW (window));
|
||||||
|
@ -250,6 +258,8 @@ drag_begin_emission_callback (GtkObject *object, guint signal_id,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
|
|
||||||
/* The process-wide filter for WM_PROTOCOLS client messages */
|
/* The process-wide filter for WM_PROTOCOLS client messages */
|
||||||
static GdkFilterReturn
|
static GdkFilterReturn
|
||||||
wm_protocols_filter (GdkXEvent *xev, GdkEvent *event, gpointer data)
|
wm_protocols_filter (GdkXEvent *xev, GdkEvent *event, gpointer data)
|
||||||
|
@ -313,6 +323,8 @@ wm_protocols_filter (GdkXEvent *xev, GdkEvent *event, gpointer data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_drag_window_destroy (GtkObject *object, gpointer data)
|
nautilus_drag_window_destroy (GtkObject *object, gpointer data)
|
||||||
{
|
{
|
||||||
|
@ -328,6 +340,7 @@ nautilus_drag_window_destroy (GtkObject *object, gpointer data)
|
||||||
static void
|
static void
|
||||||
nautilus_drag_window_realize (GtkWidget *widget, gpointer data)
|
nautilus_drag_window_realize (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
GdkAtom protocols[3];
|
GdkAtom protocols[3];
|
||||||
|
|
||||||
/* Tell the window manager _not_ to focus this window by itself */
|
/* Tell the window manager _not_ to focus this window by itself */
|
||||||
|
@ -342,9 +355,9 @@ nautilus_drag_window_realize (GtkWidget *widget, gpointer data)
|
||||||
protocols[1] = gdk_wm_take_focus;
|
protocols[1] = gdk_wm_take_focus;
|
||||||
protocols[2] = sawfish_wm_raise_window;
|
protocols[2] = sawfish_wm_raise_window;
|
||||||
eel_gdk_window_set_wm_protocols (widget->window, protocols, 3);
|
eel_gdk_window_set_wm_protocols (widget->window, protocols, 3);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Public entry point */
|
/* Public entry point */
|
||||||
|
|
||||||
/* initialize the instance's fields */
|
/* initialize the instance's fields */
|
||||||
|
@ -359,21 +372,18 @@ nautilus_drag_window_register (GtkWindow *window)
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
/* Add emission hooks for the signals we need to monitor
|
/* Add emission hooks for the signals we need to monitor
|
||||||
*/
|
*/
|
||||||
signal_id = gtk_signal_lookup ("button_press_event",
|
signal_id = g_signal_lookup ("button_press_event",
|
||||||
GTK_TYPE_WIDGET);
|
GTK_TYPE_WIDGET);
|
||||||
gtk_signal_add_emission_hook (signal_id,
|
g_signal_add_emission_hook (signal_id, 0,
|
||||||
button_press_emission_callback,
|
button_press_emission_callback, NULL, NULL);
|
||||||
NULL);
|
signal_id = g_signal_lookup ("button_release_event",
|
||||||
signal_id = gtk_signal_lookup ("button_release_event",
|
GTK_TYPE_WIDGET);
|
||||||
GTK_TYPE_WIDGET);
|
g_signal_add_emission_hook (signal_id, 0,
|
||||||
gtk_signal_add_emission_hook (signal_id,
|
button_release_emission_callback, NULL, NULL);
|
||||||
button_release_emission_callback,
|
signal_id = g_signal_lookup ("drag_begin",
|
||||||
NULL);
|
GTK_TYPE_WIDGET);
|
||||||
signal_id = gtk_signal_lookup ("drag_begin",
|
g_signal_add_emission_hook (signal_id, 0,
|
||||||
GTK_TYPE_WIDGET);
|
drag_begin_emission_callback, NULL, NULL);
|
||||||
gtk_signal_add_emission_hook (signal_id,
|
|
||||||
drag_begin_emission_callback,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
/* Intern the necessary X atoms
|
/* Intern the necessary X atoms
|
||||||
*/
|
*/
|
||||||
|
@ -381,11 +391,13 @@ nautilus_drag_window_register (GtkWindow *window)
|
||||||
"_SAWFISH_WM_RAISE_WINDOW",
|
"_SAWFISH_WM_RAISE_WINDOW",
|
||||||
False);
|
False);
|
||||||
|
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
/* Override the standard GTK filter for handling WM_PROTOCOLS
|
/* Override the standard GTK filter for handling WM_PROTOCOLS
|
||||||
* client messages
|
* client messages
|
||||||
*/
|
*/
|
||||||
gdk_add_client_message_filter (gdk_wm_protocols,
|
gdk_add_client_message_filter (gdk_wm_protocols,
|
||||||
wm_protocols_filter, NULL);
|
wm_protocols_filter, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
initialized = TRUE;
|
initialized = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -397,7 +409,7 @@ nautilus_drag_window_register (GtkWindow *window)
|
||||||
details, g_free);
|
details, g_free);
|
||||||
|
|
||||||
gtk_signal_connect (GTK_OBJECT (window), "realize",
|
gtk_signal_connect (GTK_OBJECT (window), "realize",
|
||||||
nautilus_drag_window_realize, NULL);
|
G_CALLBACK (nautilus_drag_window_realize), NULL);
|
||||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||||
nautilus_drag_window_destroy, NULL);
|
G_CALLBACK (nautilus_drag_window_destroy), NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,697 +0,0 @@
|
||||||
/* gnome-druid-page-eazel.c
|
|
||||||
* Copyright (C) 1999 Red Hat, Inc.
|
|
||||||
* Copyright (C) 2000 Eazel, Inc.
|
|
||||||
*
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Library General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Library General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Library General Public
|
|
||||||
* License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
* Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
@NOTATION@
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include "nautilus-druid-page-eazel.h"
|
|
||||||
|
|
||||||
#include <eel/eel-gtk-macros.h>
|
|
||||||
|
|
||||||
#include <libgnomeui/gnome-uidefs.h>
|
|
||||||
#include <libgnomeui/libgnomeui.h>
|
|
||||||
#include <libgnomeui/gnome-druid.h>
|
|
||||||
#include <libgnomeui/gnome-druid-page.h>
|
|
||||||
|
|
||||||
#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
|
|
||||||
#include "nautilus-druid.h"
|
|
||||||
#include <libgnome/gnome-i18n.h>
|
|
||||||
|
|
||||||
#include "nautilus-file-utilities.h"
|
|
||||||
|
|
||||||
struct NautilusDruidPageEazelDetails
|
|
||||||
{
|
|
||||||
GnomeCanvasItem *background_item;
|
|
||||||
GnomeCanvasItem *background_image_item;
|
|
||||||
GnomeCanvasItem *topbar_image_item;
|
|
||||||
int topbar_image_width;
|
|
||||||
GnomeCanvasItem *topbar_image_stretch_item;
|
|
||||||
GnomeCanvasItem *title_item;
|
|
||||||
GtkWidget *title_label;
|
|
||||||
guint title_label_signal_id;
|
|
||||||
GnomeCanvasItem *text_item;
|
|
||||||
GnomeCanvasItem *sidebar_image_item;
|
|
||||||
GnomeCanvasItem *title_image_item;
|
|
||||||
GnomeCanvasItem *widget_item;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void nautilus_druid_page_eazel_initialize (NautilusDruidPageEazel *druid_page_eazel);
|
|
||||||
static void nautilus_druid_page_eazel_initialize_class (NautilusDruidPageEazelClass *klass);
|
|
||||||
static void nautilus_druid_page_eazel_destroy (GtkObject *object);
|
|
||||||
static void nautilus_druid_page_eazel_finalize (GtkObject *object);
|
|
||||||
static void nautilus_druid_page_eazel_construct (NautilusDruidPageEazel *druid_page_eazel);
|
|
||||||
static void nautilus_druid_page_eazel_configure_size(NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
gint width,
|
|
||||||
gint height);
|
|
||||||
static void nautilus_druid_page_eazel_size_allocate (GtkWidget *widget,
|
|
||||||
GtkAllocation *allocation);
|
|
||||||
static void nautilus_druid_page_eazel_size_request (GtkWidget *widget,
|
|
||||||
GtkRequisition *requisition);
|
|
||||||
static void nautilus_druid_page_eazel_prepare (GnomeDruidPage *page,
|
|
||||||
GtkWidget *druid,
|
|
||||||
gpointer *data);
|
|
||||||
|
|
||||||
#define TITLE_X 60.0
|
|
||||||
#define TITLE_Y 60.0
|
|
||||||
#define CONTENT_PADDING 15.0
|
|
||||||
#define DEFAULT_CONTENT_X 34.0
|
|
||||||
#define DRUID_PAGE_MIN_HEIGHT 322
|
|
||||||
#define DRUID_PAGE_MIN_WIDTH 516
|
|
||||||
#define DRUID_PAGE_BORDER 24
|
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusDruidPageEazel, nautilus_druid_page_eazel, GNOME_TYPE_DRUID_PAGE)
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_page_eazel_initialize_class (NautilusDruidPageEazelClass *klass)
|
|
||||||
{
|
|
||||||
GtkObjectClass *object_class;
|
|
||||||
GtkWidgetClass *widget_class;
|
|
||||||
|
|
||||||
object_class = (GtkObjectClass*) klass;
|
|
||||||
widget_class = (GtkWidgetClass*) klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (gnome_druid_page_get_type ());
|
|
||||||
|
|
||||||
object_class->destroy = nautilus_druid_page_eazel_destroy;
|
|
||||||
object_class->finalize = nautilus_druid_page_eazel_finalize;
|
|
||||||
|
|
||||||
widget_class->size_allocate = nautilus_druid_page_eazel_size_allocate;
|
|
||||||
widget_class->size_request = nautilus_druid_page_eazel_size_request;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_page_eazel_initialize (NautilusDruidPageEazel *druid_page_eazel)
|
|
||||||
{
|
|
||||||
druid_page_eazel->details = g_new0(NautilusDruidPageEazelDetails, 1);
|
|
||||||
|
|
||||||
/* Set up the canvas */
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (druid_page_eazel), 0);
|
|
||||||
gtk_widget_push_visual (gdk_rgb_get_visual ());
|
|
||||||
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
|
|
||||||
druid_page_eazel->canvas = gnome_canvas_new_aa ();
|
|
||||||
gtk_widget_pop_visual ();
|
|
||||||
gtk_widget_pop_colormap ();
|
|
||||||
gtk_widget_show (druid_page_eazel->canvas);
|
|
||||||
gtk_container_add (GTK_CONTAINER (druid_page_eazel), druid_page_eazel->canvas);
|
|
||||||
nautilus_druid_page_eazel_configure_size (druid_page_eazel,
|
|
||||||
DRUID_PAGE_MIN_WIDTH,
|
|
||||||
DRUID_PAGE_MIN_HEIGHT);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_page_eazel_destroy(GtkObject *object)
|
|
||||||
{
|
|
||||||
NautilusDruidPageEazel *druid_page_eazel =
|
|
||||||
NAUTILUS_DRUID_PAGE_EAZEL(object);
|
|
||||||
|
|
||||||
druid_page_eazel->canvas = NULL;
|
|
||||||
druid_page_eazel->widget = NULL;
|
|
||||||
|
|
||||||
g_free (druid_page_eazel->title);
|
|
||||||
druid_page_eazel->title = NULL;
|
|
||||||
g_free (druid_page_eazel->text);
|
|
||||||
druid_page_eazel->text = NULL;
|
|
||||||
|
|
||||||
if (druid_page_eazel->title_image != NULL)
|
|
||||||
gdk_pixbuf_unref (druid_page_eazel->title_image);
|
|
||||||
druid_page_eazel->title_image = NULL;
|
|
||||||
if (druid_page_eazel->sidebar_image != NULL)
|
|
||||||
gdk_pixbuf_unref (druid_page_eazel->sidebar_image);
|
|
||||||
druid_page_eazel->sidebar_image = NULL;
|
|
||||||
|
|
||||||
if (druid_page_eazel->widget != NULL)
|
|
||||||
gtk_widget_unref (druid_page_eazel->widget);
|
|
||||||
druid_page_eazel->widget = NULL;
|
|
||||||
|
|
||||||
/* Chain destroy */
|
|
||||||
EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_page_eazel_finalize (GtkObject *object)
|
|
||||||
{
|
|
||||||
NautilusDruidPageEazel *druid_page_eazel =
|
|
||||||
NAUTILUS_DRUID_PAGE_EAZEL(object);
|
|
||||||
|
|
||||||
g_free(druid_page_eazel->details);
|
|
||||||
druid_page_eazel->details = NULL;
|
|
||||||
|
|
||||||
/* Chain finalize */
|
|
||||||
EEL_CALL_PARENT (GTK_OBJECT_CLASS, finalize, (object));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
get_content_xy (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
double *content_x, double *content_y)
|
|
||||||
{
|
|
||||||
double title_height;
|
|
||||||
|
|
||||||
if (druid_page_eazel->sidebar_image) {
|
|
||||||
*content_x = gdk_pixbuf_get_width (druid_page_eazel->sidebar_image);
|
|
||||||
} else {
|
|
||||||
*content_x = DEFAULT_CONTENT_X;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (druid_page_eazel->title_image) {
|
|
||||||
*content_y = gdk_pixbuf_get_height (druid_page_eazel->title_image) + TITLE_Y + CONTENT_PADDING;
|
|
||||||
} else {
|
|
||||||
*content_y = TITLE_Y;
|
|
||||||
}
|
|
||||||
|
|
||||||
title_height = 0.0;
|
|
||||||
if (druid_page_eazel->title && druid_page_eazel->title[0] != '\0') {
|
|
||||||
gtk_object_get (GTK_OBJECT (druid_page_eazel->details->title_item),
|
|
||||||
"height", &title_height,
|
|
||||||
NULL);
|
|
||||||
title_height += CONTENT_PADDING;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*content_y < title_height + TITLE_Y) {
|
|
||||||
*content_y = title_height + TITLE_Y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_page_eazel_configure_size (NautilusDruidPageEazel *druid_page_eazel, gint width, gint height)
|
|
||||||
{
|
|
||||||
double content_x;
|
|
||||||
double content_y;
|
|
||||||
|
|
||||||
g_return_if_fail (druid_page_eazel != NULL);
|
|
||||||
g_return_if_fail (NAUTILUS_IS_DRUID_PAGE_EAZEL (druid_page_eazel));
|
|
||||||
|
|
||||||
get_content_xy (druid_page_eazel, &content_x, &content_y);
|
|
||||||
|
|
||||||
gnome_canvas_set_scroll_region (GNOME_CANVAS (druid_page_eazel->canvas),
|
|
||||||
0.0, 0.0, width, height);
|
|
||||||
|
|
||||||
if (druid_page_eazel->details->background_item != NULL) {
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->background_item,
|
|
||||||
"x1", 0.0,
|
|
||||||
"y1", 0.0,
|
|
||||||
"x2", (gfloat) width,
|
|
||||||
"y2", (gfloat) height,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (druid_page_eazel->details->topbar_image_stretch_item != NULL) {
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->topbar_image_stretch_item,
|
|
||||||
"width", (double) (width - druid_page_eazel->details->topbar_image_width),
|
|
||||||
"width_set", TRUE,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (druid_page_eazel->details->widget_item != NULL) {
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->widget_item,
|
|
||||||
"x", content_x,
|
|
||||||
"y", content_y,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
/* Event boxes can handle not having the size set, and
|
|
||||||
* not doing so allows them to scale with their child
|
|
||||||
* widget. On the other hand, some other widgets require
|
|
||||||
* the size to be set, otherwise they won't appear on the
|
|
||||||
* canvas!
|
|
||||||
*/
|
|
||||||
if (druid_page_eazel->widget != NULL && !GTK_IS_EVENT_BOX (druid_page_eazel->widget)) {
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->widget_item,
|
|
||||||
"width", (gfloat) width - content_x,
|
|
||||||
"height", (gfloat) height - content_y,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (druid_page_eazel->details->text_item != NULL) {
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->text_item,
|
|
||||||
"x", content_x,
|
|
||||||
"y", content_y,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
set_image (GnomeCanvasItem *item, const char *file,
|
|
||||||
int *width, int *height)
|
|
||||||
{
|
|
||||||
char *fullname;
|
|
||||||
|
|
||||||
if (width != NULL)
|
|
||||||
*width = 0;
|
|
||||||
if (height != NULL)
|
|
||||||
*height = 0;
|
|
||||||
|
|
||||||
fullname = nautilus_pixmap_file (file);
|
|
||||||
if (fullname != NULL) {
|
|
||||||
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (fullname);
|
|
||||||
if (pixbuf != NULL) {
|
|
||||||
if (width != NULL)
|
|
||||||
*width = gdk_pixbuf_get_width (pixbuf);
|
|
||||||
if (height != NULL)
|
|
||||||
*height = gdk_pixbuf_get_height (pixbuf);
|
|
||||||
gnome_canvas_item_set (item,
|
|
||||||
"pixbuf", pixbuf,
|
|
||||||
NULL);
|
|
||||||
gdk_pixbuf_unref (pixbuf);
|
|
||||||
}
|
|
||||||
g_free (fullname);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
title_label_size_allocated (GtkWidget *widget, GtkAllocation *allocation, gpointer data)
|
|
||||||
{
|
|
||||||
NautilusDruidPageEazel *druid_page_eazel = NAUTILUS_DRUID_PAGE_EAZEL (data);
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->title_item,
|
|
||||||
"size_pixels", TRUE,
|
|
||||||
"height", (double) allocation->height,
|
|
||||||
"width", (double) allocation->width,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_page_eazel_construct (NautilusDruidPageEazel *druid_page_eazel)
|
|
||||||
{
|
|
||||||
druid_page_eazel->details->background_item =
|
|
||||||
gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_eazel->canvas)),
|
|
||||||
gnome_canvas_rect_get_type (),
|
|
||||||
"x1", 0.0,
|
|
||||||
"y1", 0.0,
|
|
||||||
"fill_color", "white",
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
druid_page_eazel->details->background_image_item =
|
|
||||||
gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_eazel->canvas)),
|
|
||||||
gnome_canvas_pixbuf_get_type (),
|
|
||||||
"x", 0.0,
|
|
||||||
"y", 0.0,
|
|
||||||
"x_in_pixels", TRUE,
|
|
||||||
"y_in_pixels", TRUE,
|
|
||||||
NULL);
|
|
||||||
if (druid_page_eazel->background_image)
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->background_image_item,
|
|
||||||
"pixbuf", druid_page_eazel->background_image,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
druid_page_eazel->details->sidebar_image_item =
|
|
||||||
gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_eazel->canvas)),
|
|
||||||
gnome_canvas_pixbuf_get_type (),
|
|
||||||
"x", 0.0,
|
|
||||||
"y", 0.0,
|
|
||||||
"x_in_pixels", TRUE,
|
|
||||||
"y_in_pixels", TRUE,
|
|
||||||
NULL);
|
|
||||||
if (druid_page_eazel->sidebar_image)
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->sidebar_image_item,
|
|
||||||
"pixbuf", druid_page_eazel->sidebar_image,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
druid_page_eazel->details->topbar_image_item =
|
|
||||||
gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_eazel->canvas)),
|
|
||||||
gnome_canvas_pixbuf_get_type (),
|
|
||||||
"x", 0.0,
|
|
||||||
"y", 0.0,
|
|
||||||
"x_in_pixels", TRUE,
|
|
||||||
"y_in_pixels", TRUE,
|
|
||||||
NULL);
|
|
||||||
set_image (druid_page_eazel->details->topbar_image_item,
|
|
||||||
"druid_header.png",
|
|
||||||
&druid_page_eazel->details->topbar_image_width,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
druid_page_eazel->details->topbar_image_stretch_item =
|
|
||||||
gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_eazel->canvas)),
|
|
||||||
gnome_canvas_pixbuf_get_type (),
|
|
||||||
"x", (double)druid_page_eazel->details->topbar_image_width,
|
|
||||||
"y", 0.0,
|
|
||||||
"x_in_pixels", TRUE,
|
|
||||||
"y_in_pixels", TRUE,
|
|
||||||
NULL);
|
|
||||||
set_image (druid_page_eazel->details->topbar_image_stretch_item,
|
|
||||||
"druid_header_stretch.png", NULL, NULL);
|
|
||||||
|
|
||||||
druid_page_eazel->details->title_image_item =
|
|
||||||
gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_eazel->canvas)),
|
|
||||||
gnome_canvas_pixbuf_get_type (),
|
|
||||||
"x", TITLE_X,
|
|
||||||
"y", TITLE_Y,
|
|
||||||
"x_in_pixels", TRUE,
|
|
||||||
"y_in_pixels", TRUE,
|
|
||||||
NULL);
|
|
||||||
if (druid_page_eazel->title_image)
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->title_image_item,
|
|
||||||
"pixbuf", druid_page_eazel->title_image,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
druid_page_eazel->details->title_item =
|
|
||||||
gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_eazel->canvas)),
|
|
||||||
gnome_canvas_widget_get_type (),
|
|
||||||
"x", TITLE_X,
|
|
||||||
"y", TITLE_Y,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
druid_page_eazel->details->text_item =
|
|
||||||
gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_eazel->canvas)),
|
|
||||||
gnome_canvas_text_get_type (),
|
|
||||||
"text", druid_page_eazel->text,
|
|
||||||
"fill_color", "black",
|
|
||||||
/* Note to localizers: this font is used for text items in Druid pages */
|
|
||||||
"fontset", _("-adobe-helvetica-bold-r-normal-*-*-120-*-*-p-*-*-*,*-r-*"),
|
|
||||||
"anchor", GTK_ANCHOR_NW,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
nautilus_druid_page_eazel_configure_size (druid_page_eazel, DRUID_PAGE_MIN_WIDTH, DRUID_PAGE_MIN_HEIGHT);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (druid_page_eazel),
|
|
||||||
"prepare",
|
|
||||||
nautilus_druid_page_eazel_prepare,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_page_eazel_prepare (GnomeDruidPage *page,
|
|
||||||
GtkWidget *druid,
|
|
||||||
gpointer *data)
|
|
||||||
{
|
|
||||||
switch (NAUTILUS_DRUID_PAGE_EAZEL (page)->position) {
|
|
||||||
case NAUTILUS_DRUID_PAGE_EAZEL_START:
|
|
||||||
gnome_druid_set_buttons_sensitive (GNOME_DRUID (druid), FALSE, TRUE, TRUE);
|
|
||||||
gnome_druid_set_show_finish (GNOME_DRUID (druid), FALSE);
|
|
||||||
gtk_widget_grab_default (GNOME_DRUID (druid)->next);
|
|
||||||
break;
|
|
||||||
case NAUTILUS_DRUID_PAGE_EAZEL_FINISH:
|
|
||||||
gnome_druid_set_buttons_sensitive (GNOME_DRUID (druid), TRUE, FALSE, TRUE);
|
|
||||||
gnome_druid_set_show_finish (GNOME_DRUID (druid), TRUE);
|
|
||||||
gtk_widget_grab_default (GNOME_DRUID (druid)->finish);
|
|
||||||
break;
|
|
||||||
case NAUTILUS_DRUID_PAGE_EAZEL_OTHER:
|
|
||||||
gnome_druid_set_buttons_sensitive (GNOME_DRUID (druid), TRUE, TRUE, TRUE);
|
|
||||||
gnome_druid_set_show_finish (GNOME_DRUID (druid), FALSE);
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_page_eazel_size_allocate(GtkWidget *widget,
|
|
||||||
GtkAllocation *allocation)
|
|
||||||
{
|
|
||||||
EEL_CALL_PARENT (GTK_WIDGET_CLASS, size_allocate,
|
|
||||||
(widget, allocation));
|
|
||||||
|
|
||||||
gnome_canvas_set_scroll_region (GNOME_CANVAS (NAUTILUS_DRUID_PAGE_EAZEL (widget)->canvas),
|
|
||||||
0.0, 0.0,
|
|
||||||
allocation->width,
|
|
||||||
allocation->height);
|
|
||||||
|
|
||||||
nautilus_druid_page_eazel_configure_size (NAUTILUS_DRUID_PAGE_EAZEL (widget),
|
|
||||||
allocation->width,
|
|
||||||
allocation->height);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_page_eazel_size_request(GtkWidget *widget,
|
|
||||||
GtkRequisition *requisition)
|
|
||||||
{
|
|
||||||
NautilusDruidPageEazel *druid_page_eazel;
|
|
||||||
|
|
||||||
druid_page_eazel = NAUTILUS_DRUID_PAGE_EAZEL (widget);
|
|
||||||
|
|
||||||
EEL_CALL_PARENT (GTK_WIDGET_CLASS, size_request,
|
|
||||||
(widget, requisition));
|
|
||||||
|
|
||||||
if (druid_page_eazel->widget) {
|
|
||||||
GtkRequisition child_requisition;
|
|
||||||
double x, y;
|
|
||||||
|
|
||||||
g_assert (druid_page_eazel->details->widget_item != NULL);
|
|
||||||
|
|
||||||
get_content_xy (druid_page_eazel, &x, &y);
|
|
||||||
|
|
||||||
gtk_widget_get_child_requisition (druid_page_eazel->widget,
|
|
||||||
&child_requisition);
|
|
||||||
|
|
||||||
if (child_requisition.width + x > requisition->width) {
|
|
||||||
requisition->width = child_requisition.width + x + DRUID_PAGE_BORDER;
|
|
||||||
}
|
|
||||||
if (child_requisition.height + y > requisition->height) {
|
|
||||||
requisition->height = child_requisition.height + y + DRUID_PAGE_BORDER;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* nautilus_druid_page_eazel_new:
|
|
||||||
*
|
|
||||||
* Creates a new NautilusDruidPageEazel widget.
|
|
||||||
*
|
|
||||||
* Return value: Pointer to new NautilusDruidPageEazel
|
|
||||||
**/
|
|
||||||
/* Public functions */
|
|
||||||
GtkWidget *
|
|
||||||
nautilus_druid_page_eazel_new (NautilusDruidPageEazelPosition position)
|
|
||||||
{
|
|
||||||
NautilusDruidPageEazel *page;
|
|
||||||
|
|
||||||
page = NAUTILUS_DRUID_PAGE_EAZEL (gtk_widget_new (nautilus_druid_page_eazel_get_type (), NULL));
|
|
||||||
|
|
||||||
page->position = position;
|
|
||||||
page->title = g_strdup ("");
|
|
||||||
page->text = g_strdup ("");
|
|
||||||
page->title_image = NULL;
|
|
||||||
page->sidebar_image = NULL;
|
|
||||||
page->background_image = NULL;
|
|
||||||
nautilus_druid_page_eazel_construct (page);
|
|
||||||
|
|
||||||
return GTK_WIDGET (page);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* nautilus_druid_page_eazel_new_with_vals:
|
|
||||||
* @title: The title.
|
|
||||||
* @text: The introduction text.
|
|
||||||
* @logo: The logo in the upper right corner.
|
|
||||||
* @watermark: The watermark on the left.
|
|
||||||
*
|
|
||||||
* This will create a new GNOME Druid Eazel page, with the values
|
|
||||||
* given. It is acceptable for any of them to be %NULL.
|
|
||||||
*
|
|
||||||
* Return value: GtkWidget pointer to new NautilusDruidPageEazel.
|
|
||||||
**/
|
|
||||||
GtkWidget *
|
|
||||||
nautilus_druid_page_eazel_new_with_vals (NautilusDruidPageEazelPosition position,
|
|
||||||
const gchar *title,
|
|
||||||
const gchar* text,
|
|
||||||
GdkPixbuf *title_image,
|
|
||||||
GdkPixbuf *sidebar_image,
|
|
||||||
GdkPixbuf *background_image)
|
|
||||||
{
|
|
||||||
NautilusDruidPageEazel *page;
|
|
||||||
|
|
||||||
page = NAUTILUS_DRUID_PAGE_EAZEL (gtk_widget_new (nautilus_druid_page_eazel_get_type (), NULL));
|
|
||||||
|
|
||||||
page->position = position;
|
|
||||||
page->title = g_strdup (title ? title : "");
|
|
||||||
page->text = g_strdup (text ? text : "");
|
|
||||||
|
|
||||||
if (title_image)
|
|
||||||
gdk_pixbuf_ref (title_image);
|
|
||||||
page->title_image = title_image;
|
|
||||||
|
|
||||||
if (sidebar_image)
|
|
||||||
gdk_pixbuf_ref (sidebar_image);
|
|
||||||
page->sidebar_image = sidebar_image;
|
|
||||||
|
|
||||||
if (background_image)
|
|
||||||
gdk_pixbuf_ref (background_image);
|
|
||||||
page->background_image = background_image;
|
|
||||||
|
|
||||||
nautilus_druid_page_eazel_construct (page);
|
|
||||||
|
|
||||||
return GTK_WIDGET (page);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
nautilus_druid_page_eazel_set_text (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
const gchar *text)
|
|
||||||
{
|
|
||||||
g_return_if_fail (druid_page_eazel != NULL);
|
|
||||||
g_return_if_fail (NAUTILUS_IS_DRUID_PAGE_EAZEL (druid_page_eazel));
|
|
||||||
|
|
||||||
g_free (druid_page_eazel->text);
|
|
||||||
druid_page_eazel->text = g_strdup (text ? text : "");
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->text_item,
|
|
||||||
"text", druid_page_eazel->text,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static GtkWidget *
|
|
||||||
make_title_label (const char *text)
|
|
||||||
{
|
|
||||||
GtkWidget *label;
|
|
||||||
GtkStyle *new_style;
|
|
||||||
GdkFont *font;
|
|
||||||
|
|
||||||
label = gtk_label_new (text);
|
|
||||||
|
|
||||||
/* Note to localizers: this font is used for page titles in Druid pages */
|
|
||||||
font = gdk_fontset_load (_("-adobe-helvetica-bold-r-normal-*-*-180-*-*-p-*-*-*,*-r-*"));
|
|
||||||
if (font != NULL) {
|
|
||||||
new_style = gtk_style_copy (gtk_widget_get_style (label));
|
|
||||||
gdk_font_unref (new_style->font);
|
|
||||||
new_style->font = font;
|
|
||||||
gtk_widget_set_style (label, new_style);
|
|
||||||
gtk_style_unref (new_style);
|
|
||||||
}
|
|
||||||
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
nautilus_druid_page_eazel_set_title (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
const gchar *title)
|
|
||||||
{
|
|
||||||
GtkWidget *label;
|
|
||||||
|
|
||||||
g_return_if_fail (druid_page_eazel != NULL);
|
|
||||||
g_return_if_fail (NAUTILUS_IS_DRUID_PAGE_EAZEL (druid_page_eazel));
|
|
||||||
|
|
||||||
g_free (druid_page_eazel->title);
|
|
||||||
druid_page_eazel->title = g_strdup (title ? title : "");
|
|
||||||
|
|
||||||
if (druid_page_eazel->details->title_label == NULL) {
|
|
||||||
label = make_title_label (druid_page_eazel->title);
|
|
||||||
nautilus_druid_page_eazel_set_title_label (druid_page_eazel, GTK_LABEL (label));
|
|
||||||
} else {
|
|
||||||
gtk_label_set_text (GTK_LABEL (druid_page_eazel->details->title_label), druid_page_eazel->title);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
nautilus_druid_page_eazel_set_title_label (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
GtkLabel *label)
|
|
||||||
{
|
|
||||||
g_return_if_fail (druid_page_eazel != NULL);
|
|
||||||
g_return_if_fail (NAUTILUS_IS_DRUID_PAGE_EAZEL (druid_page_eazel));
|
|
||||||
g_return_if_fail (GTK_IS_LABEL (label));
|
|
||||||
|
|
||||||
if (druid_page_eazel->details->title_label != NULL) {
|
|
||||||
gtk_signal_disconnect (GTK_OBJECT (druid_page_eazel->details->title_label),
|
|
||||||
druid_page_eazel->details->title_label_signal_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_widget_show (GTK_WIDGET (label));
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->title_item,
|
|
||||||
"widget", label,
|
|
||||||
NULL);
|
|
||||||
druid_page_eazel->details->title_label = GTK_WIDGET (label);
|
|
||||||
druid_page_eazel->details->title_label_signal_id =
|
|
||||||
gtk_signal_connect (GTK_OBJECT (label), "size_allocate",
|
|
||||||
title_label_size_allocated,
|
|
||||||
druid_page_eazel);
|
|
||||||
|
|
||||||
if (druid_page_eazel->title != NULL) {
|
|
||||||
g_free (druid_page_eazel->title);
|
|
||||||
}
|
|
||||||
druid_page_eazel->title = g_strdup (label->label);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
nautilus_druid_page_eazel_set_title_image (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
GdkPixbuf *title_image)
|
|
||||||
{
|
|
||||||
g_return_if_fail (druid_page_eazel != NULL);
|
|
||||||
g_return_if_fail (NAUTILUS_IS_DRUID_PAGE_EAZEL (druid_page_eazel));
|
|
||||||
|
|
||||||
if (druid_page_eazel->title_image)
|
|
||||||
gdk_pixbuf_unref (druid_page_eazel->title_image);
|
|
||||||
|
|
||||||
druid_page_eazel->title_image = title_image;
|
|
||||||
if (title_image != NULL)
|
|
||||||
gdk_pixbuf_ref (title_image);
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->title_image_item,
|
|
||||||
"pixbuf", druid_page_eazel->title_image, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
nautilus_druid_page_eazel_set_sidebar_image (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
GdkPixbuf *sidebar_image)
|
|
||||||
{
|
|
||||||
g_return_if_fail (druid_page_eazel != NULL);
|
|
||||||
g_return_if_fail (NAUTILUS_IS_DRUID_PAGE_EAZEL (druid_page_eazel));
|
|
||||||
|
|
||||||
if (druid_page_eazel->sidebar_image)
|
|
||||||
gdk_pixbuf_unref (druid_page_eazel->sidebar_image);
|
|
||||||
|
|
||||||
druid_page_eazel->sidebar_image = sidebar_image;
|
|
||||||
if (sidebar_image != NULL)
|
|
||||||
gdk_pixbuf_ref (sidebar_image);
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->sidebar_image_item,
|
|
||||||
"pixbuf", druid_page_eazel->sidebar_image, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
nautilus_druid_page_eazel_set_background_image (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
GdkPixbuf *background_image)
|
|
||||||
{
|
|
||||||
g_return_if_fail (druid_page_eazel != NULL);
|
|
||||||
g_return_if_fail (NAUTILUS_IS_DRUID_PAGE_EAZEL (druid_page_eazel));
|
|
||||||
|
|
||||||
if (druid_page_eazel->background_image)
|
|
||||||
gdk_pixbuf_unref (druid_page_eazel->background_image);
|
|
||||||
|
|
||||||
druid_page_eazel->background_image = background_image;
|
|
||||||
if (background_image != NULL)
|
|
||||||
gdk_pixbuf_ref (background_image);
|
|
||||||
gnome_canvas_item_set (druid_page_eazel->details->background_image_item,
|
|
||||||
"pixbuf", druid_page_eazel->background_image, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
nautilus_druid_page_eazel_put_widget (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
|
||||||
g_return_if_fail (druid_page_eazel != NULL);
|
|
||||||
g_return_if_fail (NAUTILUS_IS_DRUID_PAGE_EAZEL (druid_page_eazel));
|
|
||||||
|
|
||||||
if (druid_page_eazel->details->widget_item != NULL) {
|
|
||||||
gtk_object_destroy (GTK_OBJECT (druid_page_eazel->details->widget_item));
|
|
||||||
}
|
|
||||||
if (druid_page_eazel->widget != NULL) {
|
|
||||||
gtk_widget_unref (druid_page_eazel->widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
druid_page_eazel->widget = widget;
|
|
||||||
if (widget != NULL)
|
|
||||||
gtk_widget_ref (widget);
|
|
||||||
|
|
||||||
druid_page_eazel->details->widget_item =
|
|
||||||
gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (druid_page_eazel->canvas)),
|
|
||||||
gnome_canvas_widget_get_type (),
|
|
||||||
"widget", widget,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
gtk_widget_queue_resize (GTK_WIDGET (druid_page_eazel));
|
|
||||||
}
|
|
|
@ -1,100 +0,0 @@
|
||||||
/* nautilus-druid-page-eazel.h
|
|
||||||
* Copyright (C) 1999 Red Hat, Inc.
|
|
||||||
*
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Library General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Library General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Library General Public
|
|
||||||
* License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
* Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
@NOTATION@
|
|
||||||
*/
|
|
||||||
#ifndef NAUTILUS_DRUID_PAGE_EAZEL_H
|
|
||||||
#define NAUTILUS_DRUID_PAGE_EAZEL_H
|
|
||||||
|
|
||||||
#include <libgnomeui/gnome-canvas.h>
|
|
||||||
#include <libgnomeui/gnome-druid-page.h>
|
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define NAUTILUS_TYPE_DRUID_PAGE_EAZEL (nautilus_druid_page_eazel_get_type ())
|
|
||||||
#define NAUTILUS_DRUID_PAGE_EAZEL(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_DRUID_PAGE_EAZEL, NautilusDruidPageEazel))
|
|
||||||
#define NAUTILUS_DRUID_PAGE_EAZEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_DRUID_PAGE_EAZEL, NautilusDruidPageEazelClass))
|
|
||||||
#define NAUTILUS_IS_DRUID_PAGE_EAZEL(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_DRUID_PAGE_EAZEL))
|
|
||||||
#define NAUTILUS_IS_DRUID_PAGE_EAZEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_DRUID_PAGE_EAZEL))
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
/* update structure when adding enums */
|
|
||||||
NAUTILUS_DRUID_PAGE_EAZEL_START,
|
|
||||||
NAUTILUS_DRUID_PAGE_EAZEL_FINISH,
|
|
||||||
NAUTILUS_DRUID_PAGE_EAZEL_OTHER
|
|
||||||
} NautilusDruidPageEazelPosition;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct NautilusDruidPageEazel NautilusDruidPageEazel;
|
|
||||||
typedef struct NautilusDruidPageEazelDetails NautilusDruidPageEazelDetails;
|
|
||||||
typedef struct NautilusDruidPageEazelClass NautilusDruidPageEazelClass;
|
|
||||||
|
|
||||||
struct NautilusDruidPageEazel
|
|
||||||
{
|
|
||||||
GnomeDruidPage parent;
|
|
||||||
|
|
||||||
GtkWidget *canvas;
|
|
||||||
char *title;
|
|
||||||
char *text;
|
|
||||||
GdkPixbuf *title_image;
|
|
||||||
GdkPixbuf *sidebar_image;
|
|
||||||
GdkPixbuf *background_image;
|
|
||||||
|
|
||||||
GtkWidget *widget;
|
|
||||||
|
|
||||||
NautilusDruidPageEazelPosition position : 2;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
NautilusDruidPageEazelDetails *details;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct NautilusDruidPageEazelClass
|
|
||||||
{
|
|
||||||
GnomeDruidPageClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GtkType nautilus_druid_page_eazel_get_type (void);
|
|
||||||
GtkWidget *nautilus_druid_page_eazel_new (NautilusDruidPageEazelPosition position);
|
|
||||||
GtkWidget *nautilus_druid_page_eazel_new_with_vals (NautilusDruidPageEazelPosition position,
|
|
||||||
const gchar *title,
|
|
||||||
const gchar *text,
|
|
||||||
GdkPixbuf *title_image,
|
|
||||||
GdkPixbuf *sidebar_image,
|
|
||||||
GdkPixbuf *background_image);
|
|
||||||
void nautilus_druid_page_eazel_put_widget (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
GtkWidget *widget);
|
|
||||||
void nautilus_druid_page_eazel_set_text (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
const gchar *text);
|
|
||||||
void nautilus_druid_page_eazel_set_title (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
const gchar *title);
|
|
||||||
void nautilus_druid_page_eazel_set_title_label (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
GtkLabel *label);
|
|
||||||
void nautilus_druid_page_eazel_set_title_image (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
GdkPixbuf *title_image);
|
|
||||||
void nautilus_druid_page_eazel_set_sidebar_image (NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
GdkPixbuf *sidebar_image);
|
|
||||||
void nautilus_druid_page_eazel_set_background_image(NautilusDruidPageEazel *druid_page_eazel,
|
|
||||||
GdkPixbuf *background_image);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* NAUTILUS_DRUID_PAGE_EAZEL_H */
|
|
|
@ -1,204 +0,0 @@
|
||||||
/* gnome-druid.c
|
|
||||||
* Copyright (C) 1999 Red Hat, Inc.
|
|
||||||
* Copyright (C) 2000 Eazel, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Library General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Library General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Library General Public
|
|
||||||
* License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
* Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
@NOTATION@
|
|
||||||
*/
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include "nautilus-druid.h"
|
|
||||||
#include <libgnomeui/gnome-stock.h>
|
|
||||||
#include <libgnomeui/gnome-uidefs.h>
|
|
||||||
#include <libgnome/gnome-i18n.h>
|
|
||||||
|
|
||||||
#include <eel/eel-gtk-macros.h>
|
|
||||||
|
|
||||||
static void nautilus_druid_initialize (NautilusDruid *druid);
|
|
||||||
static void nautilus_druid_initialize_class(NautilusDruidClass *klass);
|
|
||||||
static void nautilus_druid_size_request (GtkWidget *widget,
|
|
||||||
GtkRequisition *requisition);
|
|
||||||
static void nautilus_druid_size_allocate(GtkWidget *widget,
|
|
||||||
GtkAllocation *allocation);
|
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusDruid, nautilus_druid, GNOME_TYPE_DRUID)
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_initialize_class (NautilusDruidClass *klass)
|
|
||||||
{
|
|
||||||
GtkWidgetClass *widget_class;
|
|
||||||
|
|
||||||
widget_class = (GtkWidgetClass*) klass;
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (gtk_container_get_type ());
|
|
||||||
|
|
||||||
widget_class->size_request = nautilus_druid_size_request;
|
|
||||||
widget_class->size_allocate = nautilus_druid_size_allocate;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_initialize (NautilusDruid *druid)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_size_request (GtkWidget *widget,
|
|
||||||
GtkRequisition *requisition)
|
|
||||||
{
|
|
||||||
guint16 temp_width, temp_height;
|
|
||||||
GList *list;
|
|
||||||
GnomeDruid *druid;
|
|
||||||
GtkRequisition child_requisition;
|
|
||||||
GnomeDruidPage *child;
|
|
||||||
int border;
|
|
||||||
|
|
||||||
g_return_if_fail (widget != NULL);
|
|
||||||
g_return_if_fail (NAUTILUS_IS_DRUID (widget));
|
|
||||||
|
|
||||||
border = GTK_CONTAINER(widget)->border_width;
|
|
||||||
|
|
||||||
druid = GNOME_DRUID (widget);
|
|
||||||
temp_height = temp_width = 0;
|
|
||||||
|
|
||||||
/* We find the maximum size of all children widgets */
|
|
||||||
for (list = druid->children; list; list = list->next) {
|
|
||||||
child = GNOME_DRUID_PAGE (list->data);
|
|
||||||
if (GTK_WIDGET_VISIBLE (child)) {
|
|
||||||
gtk_widget_size_request (GTK_WIDGET (child), &child_requisition);
|
|
||||||
temp_width = MAX (temp_width, child_requisition.width);
|
|
||||||
temp_height = MAX (temp_height, child_requisition.height);
|
|
||||||
if (GTK_WIDGET_MAPPED (child) && child != druid->current)
|
|
||||||
gtk_widget_unmap (GTK_WIDGET(child));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
requisition->width = temp_width + 2 * border;
|
|
||||||
requisition->height = temp_height + 2 * border;
|
|
||||||
|
|
||||||
/* In an Attempt to show how the widgets are packed,
|
|
||||||
* here's a little diagram.
|
|
||||||
*
|
|
||||||
* [ Cancel ] ------------- [ Back ] [ Next ]
|
|
||||||
* |
|
|
||||||
* This part needs to be at least 1 button width.
|
|
||||||
* In addition, there is a GNOME_PAD_SMALL between Next and Back.
|
|
||||||
*/
|
|
||||||
/* our_button width is temp_width and temp_height */
|
|
||||||
temp_height = 0;
|
|
||||||
temp_width = 0;
|
|
||||||
|
|
||||||
gtk_widget_size_request (druid->back, &child_requisition);
|
|
||||||
temp_width = MAX (temp_width, child_requisition.width);
|
|
||||||
temp_height = MAX (temp_height, child_requisition.height);
|
|
||||||
|
|
||||||
gtk_widget_size_request (druid->next, &child_requisition);
|
|
||||||
temp_width = MAX (temp_width, child_requisition.width);
|
|
||||||
temp_height = MAX (temp_height, child_requisition.height);
|
|
||||||
|
|
||||||
gtk_widget_size_request (druid->cancel, &child_requisition);
|
|
||||||
temp_width = MAX (temp_width, child_requisition.width);
|
|
||||||
temp_height = MAX (temp_height, child_requisition.height);
|
|
||||||
|
|
||||||
gtk_widget_size_request (druid->finish, &child_requisition);
|
|
||||||
temp_width = MAX (temp_width, child_requisition.width);
|
|
||||||
temp_height = MAX (temp_height, child_requisition.height);
|
|
||||||
|
|
||||||
temp_width += border * 2;
|
|
||||||
temp_height += GNOME_PAD_SMALL;
|
|
||||||
temp_width = temp_width * 4 + GNOME_PAD_SMALL * 3;
|
|
||||||
|
|
||||||
/* pick which is bigger, the buttons, or the NautilusDruidPages */
|
|
||||||
requisition->width = MAX (temp_width, requisition->width);
|
|
||||||
requisition->height += temp_height;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
nautilus_druid_size_allocate (GtkWidget *widget,
|
|
||||||
GtkAllocation *allocation)
|
|
||||||
{
|
|
||||||
GnomeDruid *druid;
|
|
||||||
GtkAllocation child_allocation;
|
|
||||||
gint button_height;
|
|
||||||
GList *list;
|
|
||||||
int border;
|
|
||||||
|
|
||||||
g_return_if_fail (widget != NULL);
|
|
||||||
g_return_if_fail (NAUTILUS_IS_DRUID (widget));
|
|
||||||
|
|
||||||
druid = GNOME_DRUID (widget);
|
|
||||||
widget->allocation = *allocation;
|
|
||||||
|
|
||||||
/* deal with the buttons */
|
|
||||||
child_allocation.width = child_allocation.height = 0;
|
|
||||||
child_allocation.width = druid->back->requisition.width;
|
|
||||||
child_allocation.height = druid->back->requisition.height;
|
|
||||||
child_allocation.width = MAX (child_allocation.width,
|
|
||||||
druid->next->requisition.width);
|
|
||||||
child_allocation.height = MAX (child_allocation.height,
|
|
||||||
druid->next->requisition.height);
|
|
||||||
child_allocation.width = MAX (child_allocation.width,
|
|
||||||
druid->cancel->requisition.width);
|
|
||||||
child_allocation.height = MAX (child_allocation.height,
|
|
||||||
druid->cancel->requisition.height);
|
|
||||||
|
|
||||||
child_allocation.height += GNOME_PAD_SMALL;
|
|
||||||
button_height = child_allocation.height;
|
|
||||||
child_allocation.width += 2 * GNOME_PAD_SMALL;
|
|
||||||
child_allocation.y = allocation->y + allocation->height -
|
|
||||||
GNOME_PAD_SMALL - child_allocation.height;
|
|
||||||
|
|
||||||
/* allocate cancel */
|
|
||||||
child_allocation.x = allocation->x + GNOME_PAD_SMALL;
|
|
||||||
gtk_widget_size_allocate (druid->cancel, &child_allocation);
|
|
||||||
|
|
||||||
|
|
||||||
/* Allocate next/finish */
|
|
||||||
child_allocation.x = allocation->x + allocation->width -
|
|
||||||
GNOME_PAD_SMALL - child_allocation.width;
|
|
||||||
gtk_widget_size_allocate (druid->next, &child_allocation);
|
|
||||||
gtk_widget_size_allocate (druid->finish, &child_allocation);
|
|
||||||
|
|
||||||
/* Allocate back */
|
|
||||||
child_allocation.x -= (GNOME_PAD_SMALL + child_allocation.width);
|
|
||||||
gtk_widget_size_allocate (druid->back, &child_allocation);
|
|
||||||
|
|
||||||
border = GTK_CONTAINER (widget)->border_width;
|
|
||||||
|
|
||||||
/* Put up the GnomeDruidPage */
|
|
||||||
child_allocation.x = allocation->x + border;
|
|
||||||
child_allocation.y = allocation->y + border;
|
|
||||||
child_allocation.width =
|
|
||||||
((allocation->width - 2 * border) > 0) ?
|
|
||||||
(allocation->width - 2 * border):0;
|
|
||||||
child_allocation.height =
|
|
||||||
((allocation->height - 2 * border - GNOME_PAD_SMALL - button_height) > 0) ?
|
|
||||||
(allocation->height - 2 * border - GNOME_PAD_SMALL - button_height):0;
|
|
||||||
for (list = druid->children; list; list=list->next) {
|
|
||||||
if (GTK_WIDGET_VISIBLE (list->data)) {
|
|
||||||
gtk_widget_size_allocate (GTK_WIDGET (list->data), &child_allocation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public methods */
|
|
||||||
GtkWidget *
|
|
||||||
nautilus_druid_new (void)
|
|
||||||
{
|
|
||||||
return gtk_widget_new (NAUTILUS_TYPE_DRUID, NULL);
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
/* nautilus-druid.h
|
|
||||||
* Copyright (C) 1999 Red Hat, Inc.
|
|
||||||
* Copyright (C) 2000 Eazel, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Library General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Library General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Library General Public
|
|
||||||
* License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
* Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
@NOTATION@
|
|
||||||
*/
|
|
||||||
#ifndef NAUTILUS_DRUID_H
|
|
||||||
#define NAUTILUS_DRUID_H
|
|
||||||
|
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnomeui/gnome-druid.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define NAUTILUS_TYPE_DRUID (nautilus_druid_get_type ())
|
|
||||||
#define NAUTILUS_DRUID(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_DRUID, NautilusDruid))
|
|
||||||
#define NAUTILUS_DRUID_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_DRUID, NautilusDruidClass))
|
|
||||||
#define NAUTILUS_IS_DRUID(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_DRUID))
|
|
||||||
#define NAUTILUS_IS_DRUID_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_DRUID))
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct NautilusDruid NautilusDruid;
|
|
||||||
typedef struct NautilusDruidClass NautilusDruidClass;
|
|
||||||
|
|
||||||
struct NautilusDruid
|
|
||||||
{
|
|
||||||
GnomeDruid gnome_druid;
|
|
||||||
};
|
|
||||||
struct NautilusDruidClass
|
|
||||||
{
|
|
||||||
GnomeDruidClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
GtkType nautilus_druid_get_type (void);
|
|
||||||
GtkWidget *nautilus_druid_new (void);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* NAUTILUS_DRUID_H */
|
|
|
@ -27,15 +27,15 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include "nautilus-entry.h"
|
#include "nautilus-entry.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include "nautilus-global-preferences.h"
|
||||||
|
#include "nautilus-undo-signal-handlers.h"
|
||||||
|
#include <eel/eel-gdk-extensions.h>
|
||||||
#include <eel/eel-gtk-macros.h>
|
#include <eel/eel-gtk-macros.h>
|
||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
#include <gtk/gtkmain.h>
|
#include <gtk/gtkmain.h>
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <eel/eel-gdk-extensions.h>
|
|
||||||
#include "nautilus-global-preferences.h"
|
|
||||||
#include "nautilus-undo-signal-handlers.h"
|
|
||||||
#include <orb/orbit.h>
|
|
||||||
|
|
||||||
struct NautilusEntryDetails {
|
struct NautilusEntryDetails {
|
||||||
gboolean use_emacs_shortcuts;
|
gboolean use_emacs_shortcuts;
|
||||||
|
@ -51,8 +51,8 @@ enum {
|
||||||
};
|
};
|
||||||
static guint signals[LAST_SIGNAL];
|
static guint signals[LAST_SIGNAL];
|
||||||
|
|
||||||
static void nautilus_entry_initialize (NautilusEntry *entry);
|
static void nautilus_entry_init (NautilusEntry *entry);
|
||||||
static void nautilus_entry_initialize_class (NautilusEntryClass *class);
|
static void nautilus_entry_class_init (NautilusEntryClass *class);
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusEntry,
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusEntry,
|
||||||
nautilus_entry,
|
nautilus_entry,
|
||||||
|
@ -70,7 +70,7 @@ emacs_shortcuts_preference_changed_callback (gpointer callback_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_entry_initialize (NautilusEntry *entry)
|
nautilus_entry_init (NautilusEntry *entry)
|
||||||
{
|
{
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
|
|
||||||
|
@ -140,13 +140,13 @@ nautilus_entry_key_press (GtkWidget *widget, GdkEventKey *event)
|
||||||
NautilusEntry *entry;
|
NautilusEntry *entry;
|
||||||
GtkEditable *editable;
|
GtkEditable *editable;
|
||||||
int position;
|
int position;
|
||||||
gboolean had_selection;
|
gboolean old_has, new_has;
|
||||||
gboolean result;
|
gboolean result;
|
||||||
|
|
||||||
entry = NAUTILUS_ENTRY (widget);
|
entry = NAUTILUS_ENTRY (widget);
|
||||||
editable = GTK_EDITABLE (widget);
|
editable = GTK_EDITABLE (widget);
|
||||||
|
|
||||||
if (!editable->editable) {
|
if (!gtk_editable_get_editable (editable)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ nautilus_entry_key_press (GtkWidget *widget, GdkEventKey *event)
|
||||||
* should position the insertion point at the end of
|
* should position the insertion point at the end of
|
||||||
* the selection.
|
* the selection.
|
||||||
*/
|
*/
|
||||||
if (entry->details->special_tab_handling && editable->has_selection) {
|
if (entry->details->special_tab_handling && gtk_editable_get_selection_bounds (editable, NULL, NULL)) {
|
||||||
position = strlen (gtk_entry_get_text (GTK_ENTRY (editable)));
|
position = strlen (gtk_entry_get_text (GTK_ENTRY (editable)));
|
||||||
gtk_entry_select_region (GTK_ENTRY (editable), position, position);
|
gtk_entry_select_region (GTK_ENTRY (editable), position, position);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -189,7 +189,7 @@ nautilus_entry_key_press (GtkWidget *widget, GdkEventKey *event)
|
||||||
|
|
||||||
obscure_cursor (entry);
|
obscure_cursor (entry);
|
||||||
|
|
||||||
had_selection = editable->has_selection;
|
old_has = gtk_editable_get_selection_bounds (editable, NULL, NULL);
|
||||||
|
|
||||||
result = EEL_CALL_PARENT_WITH_RETURN_VALUE
|
result = EEL_CALL_PARENT_WITH_RETURN_VALUE
|
||||||
(GTK_WIDGET_CLASS, key_press_event, (widget, event));
|
(GTK_WIDGET_CLASS, key_press_event, (widget, event));
|
||||||
|
@ -197,8 +197,11 @@ nautilus_entry_key_press (GtkWidget *widget, GdkEventKey *event)
|
||||||
/* Pressing a key usually changes the selection if there is a selection.
|
/* Pressing a key usually changes the selection if there is a selection.
|
||||||
* If there is not selection, we can save work by not emitting a signal.
|
* If there is not selection, we can save work by not emitting a signal.
|
||||||
*/
|
*/
|
||||||
if (result && (had_selection || editable->has_selection)) {
|
if (result) {
|
||||||
gtk_signal_emit (GTK_OBJECT (widget), signals[SELECTION_CHANGED]);
|
new_has = gtk_editable_get_selection_bounds (editable, NULL, NULL);
|
||||||
|
if (old_has || new_has) {
|
||||||
|
gtk_signal_emit (GTK_OBJECT (widget), signals[SELECTION_CHANGED]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -209,7 +212,8 @@ static gboolean
|
||||||
nautilus_entry_motion_notify (GtkWidget *widget, GdkEventMotion *event)
|
nautilus_entry_motion_notify (GtkWidget *widget, GdkEventMotion *event)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
guint old_start_pos, old_end_pos;
|
gboolean old_had, new_had;
|
||||||
|
int old_start, old_end, new_start, new_end;
|
||||||
GdkCursor *cursor;
|
GdkCursor *cursor;
|
||||||
NautilusEntry *entry;
|
NautilusEntry *entry;
|
||||||
GtkEditable *editable;
|
GtkEditable *editable;
|
||||||
|
@ -225,16 +229,17 @@ nautilus_entry_motion_notify (GtkWidget *widget, GdkEventMotion *event)
|
||||||
entry->details->cursor_obscured = FALSE;
|
entry->details->cursor_obscured = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
old_start_pos = editable->selection_start_pos;
|
old_had = gtk_editable_get_selection_bounds (editable, &old_start, &old_end);
|
||||||
old_end_pos = editable->selection_end_pos;
|
|
||||||
|
|
||||||
result = EEL_CALL_PARENT_WITH_RETURN_VALUE
|
result = EEL_CALL_PARENT_WITH_RETURN_VALUE
|
||||||
(GTK_WIDGET_CLASS, motion_notify_event, (widget, event));
|
(GTK_WIDGET_CLASS, motion_notify_event, (widget, event));
|
||||||
|
|
||||||
/* Send a signal if dragging the mouse caused the selection to change. */
|
/* Send a signal if dragging the mouse caused the selection to change. */
|
||||||
if (result && (old_start_pos != editable->selection_start_pos
|
if (result) {
|
||||||
|| old_end_pos != editable->selection_end_pos)) {
|
new_had = gtk_editable_get_selection_bounds (editable, &new_start, &new_end);
|
||||||
gtk_signal_emit (GTK_OBJECT (widget), signals[SELECTION_CHANGED]);
|
if (old_had != new_had || (old_had && (old_start != new_start || old_end != new_end))) {
|
||||||
|
gtk_signal_emit (GTK_OBJECT (widget), signals[SELECTION_CHANGED]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -317,12 +322,12 @@ nautilus_entry_set_text (NautilusEntry *entry, const gchar *text)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_entry_set_selection (GtkEditable *editable,
|
nautilus_entry_set_selection_bounds (GtkEditable *editable,
|
||||||
int start_pos,
|
int start_pos,
|
||||||
int end_pos)
|
int end_pos)
|
||||||
{
|
{
|
||||||
EEL_CALL_PARENT (GTK_EDITABLE_CLASS, set_selection,
|
EEL_CALL_PARENT (GTK_EDITABLE_CLASS, set_selection_bounds,
|
||||||
(editable, start_pos, end_pos));
|
(editable, start_pos, end_pos));
|
||||||
|
|
||||||
gtk_signal_emit (GTK_OBJECT (editable), signals[SELECTION_CHANGED]);
|
gtk_signal_emit (GTK_OBJECT (editable), signals[SELECTION_CHANGED]);
|
||||||
}
|
}
|
||||||
|
@ -419,7 +424,7 @@ nautilus_entry_selection_clear (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_entry_initialize_class (NautilusEntryClass *class)
|
nautilus_entry_class_init (NautilusEntryClass *class)
|
||||||
{
|
{
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
@ -439,26 +444,27 @@ nautilus_entry_initialize_class (NautilusEntryClass *class)
|
||||||
|
|
||||||
editable_class->insert_text = nautilus_entry_insert_text;
|
editable_class->insert_text = nautilus_entry_insert_text;
|
||||||
editable_class->delete_text = nautilus_entry_delete_text;
|
editable_class->delete_text = nautilus_entry_delete_text;
|
||||||
editable_class->set_selection = nautilus_entry_set_selection;
|
editable_class->set_selection_bounds = nautilus_entry_set_selection_bounds;
|
||||||
|
|
||||||
/* Set up signals */
|
/* Set up signals */
|
||||||
signals[USER_CHANGED] = gtk_signal_new
|
signals[USER_CHANGED] = g_signal_new
|
||||||
("user_changed",
|
("user_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusEntryClass,
|
G_STRUCT_OFFSET (NautilusEntryClass,
|
||||||
user_changed),
|
user_changed),
|
||||||
|
NULL, NULL,
|
||||||
gtk_marshal_NONE__NONE,
|
gtk_marshal_NONE__NONE,
|
||||||
GTK_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
signals[SELECTION_CHANGED] = gtk_signal_new
|
signals[SELECTION_CHANGED] = g_signal_new
|
||||||
("selection_changed",
|
("selection_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusEntryClass,
|
G_STRUCT_OFFSET (NautilusEntryClass,
|
||||||
selection_changed),
|
selection_changed),
|
||||||
|
NULL, NULL,
|
||||||
gtk_marshal_NONE__NONE,
|
gtk_marshal_NONE__NONE,
|
||||||
GTK_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#ifndef NAUTILUS_ENTRY_H
|
#ifndef NAUTILUS_ENTRY_H
|
||||||
#define NAUTILUS_ENTRY_H
|
#define NAUTILUS_ENTRY_H
|
||||||
|
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <gtk/gtkentry.h>
|
#include <gtk/gtkentry.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#include <gtk/gtkprogressbar.h>
|
#include <gtk/gtkprogressbar.h>
|
||||||
#include <gtk/gtktable.h>
|
#include <gtk/gtktable.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnomeui/gnome-stock.h>
|
#include <libgnomeui/gnome-stock-icons.h>
|
||||||
#include <libgnomevfs/gnome-vfs-utils.h>
|
#include <libgnomevfs/gnome-vfs-utils.h>
|
||||||
|
|
||||||
/* The width of the progress bar determines the minimum width of the
|
/* The width of the progress bar determines the minimum width of the
|
||||||
|
@ -53,8 +53,8 @@
|
||||||
|
|
||||||
#define MINIMUM_TIME_UP 1000
|
#define MINIMUM_TIME_UP 1000
|
||||||
|
|
||||||
static void nautilus_file_operations_progress_initialize_class (NautilusFileOperationsProgressClass *klass);
|
static void nautilus_file_operations_progress_class_init (NautilusFileOperationsProgressClass *klass);
|
||||||
static void nautilus_file_operations_progress_initialize (NautilusFileOperationsProgress *dialog);
|
static void nautilus_file_operations_progress_init (NautilusFileOperationsProgress *dialog);
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusFileOperationsProgress,
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusFileOperationsProgress,
|
||||||
nautilus_file_operations_progress,
|
nautilus_file_operations_progress,
|
||||||
|
@ -193,7 +193,7 @@ delete_event_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_file_operations_progress_initialize (NautilusFileOperationsProgress *progress)
|
nautilus_file_operations_progress_init (NautilusFileOperationsProgress *progress)
|
||||||
{
|
{
|
||||||
GtkBox *vbox;
|
GtkBox *vbox;
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
|
@ -256,7 +256,7 @@ nautilus_file_operations_progress_initialize (NautilusFileOperationsProgress *pr
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_file_operations_progress_initialize_class (NautilusFileOperationsProgressClass *klass)
|
nautilus_file_operations_progress_class_init (NautilusFileOperationsProgressClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
|
|
|
@ -102,8 +102,7 @@ transfer_info_destroy (TransferInfo *transfer_info)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transfer_info->debuting_uris != NULL) {
|
if (transfer_info->debuting_uris != NULL) {
|
||||||
eel_g_hash_table_destroy_deep_custom
|
g_hash_table_destroy (transfer_info->debuting_uris);
|
||||||
(transfer_info->debuting_uris, (GFunc) g_free, NULL, NULL, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (transfer_info);
|
g_free (transfer_info);
|
||||||
|
@ -196,14 +195,8 @@ icon_position_iterator_get_next (IconPositionIterator *position_iterator,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hack to get the GdkFont used by a GtkLabel in an error dialog.
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
* We need to do this because the string truncation needs to be
|
|
||||||
* done before a dialog is instantiated.
|
|
||||||
*
|
|
||||||
* This is probably not super fast but it is not a problem in the
|
|
||||||
* context we are using it, truncating a string while displaying an
|
|
||||||
* error dialog.
|
|
||||||
*/
|
|
||||||
static GdkFont *
|
static GdkFont *
|
||||||
get_label_font (void)
|
get_label_font (void)
|
||||||
{
|
{
|
||||||
|
@ -225,12 +218,15 @@ get_label_font (void)
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
ellipsize_string_for_dialog (const char *str)
|
ellipsize_string_for_dialog (const char *str)
|
||||||
{
|
{
|
||||||
|
char *result;
|
||||||
|
#ifdef GNOME2_CONVERSION_COMPLETE
|
||||||
GdkFont *font;
|
GdkFont *font;
|
||||||
int maximum_width;
|
int maximum_width;
|
||||||
char *result;
|
|
||||||
|
|
||||||
/* get a nice length to ellipsize to, based on the font */
|
/* get a nice length to ellipsize to, based on the font */
|
||||||
font = get_label_font ();
|
font = get_label_font ();
|
||||||
|
@ -238,6 +234,9 @@ ellipsize_string_for_dialog (const char *str)
|
||||||
|
|
||||||
result = eel_string_ellipsize (str, font, maximum_width, EEL_ELLIPSIZE_MIDDLE);
|
result = eel_string_ellipsize (str, font, maximum_width, EEL_ELLIPSIZE_MIDDLE);
|
||||||
gdk_font_unref (font);
|
gdk_font_unref (font);
|
||||||
|
#else
|
||||||
|
result = g_strdup (str);
|
||||||
|
#endif
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1619,9 +1618,9 @@ sync_transfer_callback (GnomeVFSXferProgressInfo *progress_info, gpointer data)
|
||||||
progress_info->target_name);
|
progress_info->target_name);
|
||||||
}
|
}
|
||||||
if (debuting_uris != NULL) {
|
if (debuting_uris != NULL) {
|
||||||
g_hash_table_insert (debuting_uris,
|
g_hash_table_replace (debuting_uris,
|
||||||
g_strdup (progress_info->target_name),
|
g_strdup (progress_info->target_name),
|
||||||
GINT_TO_POINTER (TRUE));
|
GINT_TO_POINTER (TRUE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nautilus_file_changes_queue_file_added (progress_info->target_name);
|
nautilus_file_changes_queue_file_added (progress_info->target_name);
|
||||||
|
@ -1652,9 +1651,9 @@ sync_transfer_callback (GnomeVFSXferProgressInfo *progress_info, gpointer data)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debuting_uris != NULL) {
|
if (debuting_uris != NULL) {
|
||||||
g_hash_table_insert (debuting_uris,
|
g_hash_table_replace (debuting_uris,
|
||||||
g_strdup (progress_info->target_name),
|
g_strdup (progress_info->target_name),
|
||||||
GINT_TO_POINTER (really_moved));
|
GINT_TO_POINTER (really_moved));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (really_moved) {
|
if (really_moved) {
|
||||||
|
@ -2036,7 +2035,7 @@ nautilus_file_operations_copy_move (const GList *item_uris,
|
||||||
transfer_info->overwrite_mode = GNOME_VFS_XFER_OVERWRITE_MODE_QUERY;
|
transfer_info->overwrite_mode = GNOME_VFS_XFER_OVERWRITE_MODE_QUERY;
|
||||||
transfer_info->done_callback = done_callback;
|
transfer_info->done_callback = done_callback;
|
||||||
transfer_info->done_callback_data = done_callback_data;
|
transfer_info->done_callback_data = done_callback_data;
|
||||||
transfer_info->debuting_uris = g_hash_table_new (g_str_hash, g_str_equal);
|
transfer_info->debuting_uris = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
||||||
|
|
||||||
sync_transfer_info = g_new (SyncTransferInfo, 1);
|
sync_transfer_info = g_new (SyncTransferInfo, 1);
|
||||||
sync_transfer_info->iterator = icon_position_iterator;
|
sync_transfer_info->iterator = icon_position_iterator;
|
||||||
|
@ -2046,6 +2045,7 @@ nautilus_file_operations_copy_move (const GList *item_uris,
|
||||||
gnome_vfs_async_xfer (&transfer_info->handle, source_uri_list, target_uri_list,
|
gnome_vfs_async_xfer (&transfer_info->handle, source_uri_list, target_uri_list,
|
||||||
move_options, GNOME_VFS_XFER_ERROR_MODE_QUERY,
|
move_options, GNOME_VFS_XFER_ERROR_MODE_QUERY,
|
||||||
GNOME_VFS_XFER_OVERWRITE_MODE_QUERY,
|
GNOME_VFS_XFER_OVERWRITE_MODE_QUERY,
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
update_transfer_callback, transfer_info,
|
update_transfer_callback, transfer_info,
|
||||||
sync_transfer_callback, sync_transfer_info);
|
sync_transfer_callback, sync_transfer_info);
|
||||||
}
|
}
|
||||||
|
@ -2178,6 +2178,7 @@ nautilus_file_operations_new_folder (GtkWidget *parent_view,
|
||||||
GNOME_VFS_XFER_NEW_UNIQUE_DIRECTORY,
|
GNOME_VFS_XFER_NEW_UNIQUE_DIRECTORY,
|
||||||
GNOME_VFS_XFER_ERROR_MODE_QUERY,
|
GNOME_VFS_XFER_ERROR_MODE_QUERY,
|
||||||
GNOME_VFS_XFER_OVERWRITE_MODE_QUERY,
|
GNOME_VFS_XFER_OVERWRITE_MODE_QUERY,
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
new_folder_transfer_callback, state,
|
new_folder_transfer_callback, state,
|
||||||
sync_transfer_callback, NULL);
|
sync_transfer_callback, NULL);
|
||||||
|
|
||||||
|
@ -2220,6 +2221,7 @@ nautilus_file_operations_delete (const GList *item_uris,
|
||||||
GNOME_VFS_XFER_DELETE_ITEMS | GNOME_VFS_XFER_RECURSIVE,
|
GNOME_VFS_XFER_DELETE_ITEMS | GNOME_VFS_XFER_RECURSIVE,
|
||||||
GNOME_VFS_XFER_ERROR_MODE_QUERY,
|
GNOME_VFS_XFER_ERROR_MODE_QUERY,
|
||||||
GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
|
GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
update_transfer_callback, transfer_info,
|
update_transfer_callback, transfer_info,
|
||||||
sync_transfer_callback, NULL);
|
sync_transfer_callback, NULL);
|
||||||
|
|
||||||
|
@ -2254,6 +2256,7 @@ do_empty_trash (GtkWidget *parent_view)
|
||||||
GNOME_VFS_XFER_EMPTY_DIRECTORIES,
|
GNOME_VFS_XFER_EMPTY_DIRECTORIES,
|
||||||
GNOME_VFS_XFER_ERROR_MODE_QUERY,
|
GNOME_VFS_XFER_ERROR_MODE_QUERY,
|
||||||
GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
|
GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
update_transfer_callback, transfer_info,
|
update_transfer_callback, transfer_info,
|
||||||
sync_transfer_callback, NULL);
|
sync_transfer_callback, NULL);
|
||||||
}
|
}
|
||||||
|
@ -2264,7 +2267,7 @@ do_empty_trash (GtkWidget *parent_view)
|
||||||
static gboolean
|
static gboolean
|
||||||
confirm_empty_trash (GtkWidget *parent_view)
|
confirm_empty_trash (GtkWidget *parent_view)
|
||||||
{
|
{
|
||||||
GnomeDialog *dialog;
|
GtkDialog *dialog;
|
||||||
GtkWindow *parent_window;
|
GtkWindow *parent_window;
|
||||||
|
|
||||||
/* Just Say Yes if the preference says not to confirm. */
|
/* Just Say Yes if the preference says not to confirm. */
|
||||||
|
@ -2282,9 +2285,9 @@ confirm_empty_trash (GtkWidget *parent_view)
|
||||||
GNOME_STOCK_BUTTON_CANCEL,
|
GNOME_STOCK_BUTTON_CANCEL,
|
||||||
parent_window);
|
parent_window);
|
||||||
|
|
||||||
gnome_dialog_set_default (dialog, GNOME_CANCEL);
|
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_CANCEL);
|
||||||
|
|
||||||
return gnome_dialog_run (dialog) == GNOME_OK;
|
return gtk_dialog_run (dialog) == GTK_RESPONSE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include <libgnomevfs/gnome-vfs-ops.h>
|
#include <libgnomevfs/gnome-vfs-ops.h>
|
||||||
#include <libgnomevfs/gnome-vfs-uri.h>
|
#include <libgnomevfs/gnome-vfs-uri.h>
|
||||||
#include <libgnomevfs/gnome-vfs-utils.h>
|
#include <libgnomevfs/gnome-vfs-utils.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#define NAUTILUS_USER_DIRECTORY_NAME ".nautilus"
|
#define NAUTILUS_USER_DIRECTORY_NAME ".nautilus"
|
||||||
#define DEFAULT_NAUTILUS_DIRECTORY_MODE (0755)
|
#define DEFAULT_NAUTILUS_DIRECTORY_MODE (0755)
|
||||||
|
|
|
@ -46,11 +46,7 @@
|
||||||
#include <libxml/parser.h>
|
#include <libxml/parser.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-dentry.h>
|
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnome/gnome-metadata.h>
|
|
||||||
#include <libgnome/gnome-mime.h>
|
|
||||||
#include <libgnomevfs/gnome-vfs-file-info.h>
|
#include <libgnomevfs/gnome-vfs-file-info.h>
|
||||||
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
|
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
|
||||||
#include <libgnomevfs/gnome-vfs-mime-info.h>
|
#include <libgnomevfs/gnome-vfs-mime-info.h>
|
||||||
|
@ -59,6 +55,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
/* Time in seconds to cache getpwuid results */
|
/* Time in seconds to cache getpwuid results */
|
||||||
#define GETPWUID_CACHE_TIME (5*60)
|
#define GETPWUID_CACHE_TIME (5*60)
|
||||||
|
@ -104,8 +101,8 @@ static guint signals[LAST_SIGNAL];
|
||||||
|
|
||||||
static GHashTable *symbolic_links;
|
static GHashTable *symbolic_links;
|
||||||
|
|
||||||
static void nautilus_file_initialize_class (NautilusFileClass *klass);
|
static void nautilus_file_class_init (NautilusFileClass *klass);
|
||||||
static void nautilus_file_initialize (NautilusFile *file);
|
static void nautilus_file_init (NautilusFile *file);
|
||||||
static void destroy (GtkObject *object);
|
static void destroy (GtkObject *object);
|
||||||
static char * nautilus_file_get_owner_as_string (NautilusFile *file,
|
static char * nautilus_file_get_owner_as_string (NautilusFile *file,
|
||||||
gboolean include_real_name);
|
gboolean include_real_name);
|
||||||
|
@ -116,7 +113,7 @@ static gboolean update_info_and_name (NautilusFile *file,
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusFile, nautilus_file, GTK_TYPE_OBJECT)
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusFile, nautilus_file, GTK_TYPE_OBJECT)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_file_initialize_class (NautilusFileClass *klass)
|
nautilus_file_class_init (NautilusFileClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -125,26 +122,26 @@ nautilus_file_initialize_class (NautilusFileClass *klass)
|
||||||
object_class->destroy = destroy;
|
object_class->destroy = destroy;
|
||||||
|
|
||||||
signals[CHANGED] =
|
signals[CHANGED] =
|
||||||
gtk_signal_new ("changed",
|
g_signal_new ("changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusFileClass, changed),
|
G_STRUCT_OFFSET (NautilusFileClass, changed),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
signals[UPDATED_DEEP_COUNT_IN_PROGRESS] =
|
signals[UPDATED_DEEP_COUNT_IN_PROGRESS] =
|
||||||
gtk_signal_new ("updated_deep_count_in_progress",
|
g_signal_new ("updated_deep_count_in_progress",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusFileClass, updated_deep_count_in_progress),
|
G_STRUCT_OFFSET (NautilusFileClass, updated_deep_count_in_progress),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_file_initialize (NautilusFile *file)
|
nautilus_file_init (NautilusFile *file)
|
||||||
{
|
{
|
||||||
file->details = g_new0 (NautilusFileDetails, 1);
|
file->details = g_new0 (NautilusFileDetails, 1);
|
||||||
}
|
}
|
||||||
|
@ -1013,7 +1010,9 @@ nautilus_file_rename (NautilusFile *file,
|
||||||
g_free (uri);
|
g_free (uri);
|
||||||
|
|
||||||
if (path != NULL) {
|
if (path != NULL) {
|
||||||
|
#ifdef GNOME2_CONVERSION_COMPLETE
|
||||||
gnome_metadata_set (path, "icon-caption", strlen (new_name) + 1, new_name);
|
gnome_metadata_set (path, "icon-caption", strlen (new_name) + 1, new_name);
|
||||||
|
#endif
|
||||||
g_free (path);
|
g_free (path);
|
||||||
|
|
||||||
(* callback) (file, GNOME_VFS_OK, callback_data);
|
(* callback) (file, GNOME_VFS_OK, callback_data);
|
||||||
|
@ -1078,6 +1077,7 @@ nautilus_file_rename (NautilusFile *file,
|
||||||
GNOME_VFS_SET_FILE_INFO_NAME,
|
GNOME_VFS_SET_FILE_INFO_NAME,
|
||||||
(GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
(GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
||||||
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS),
|
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS),
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
rename_callback, op);
|
rename_callback, op);
|
||||||
gnome_vfs_file_info_unref (partial_file_info);
|
gnome_vfs_file_info_unref (partial_file_info);
|
||||||
gnome_vfs_uri_unref (vfs_uri);
|
gnome_vfs_uri_unref (vfs_uri);
|
||||||
|
@ -2144,7 +2144,9 @@ nautilus_file_set_metadata (NautilusFile *file,
|
||||||
icon_path = gnome_vfs_get_local_path_from_uri (metadata);
|
icon_path = gnome_vfs_get_local_path_from_uri (metadata);
|
||||||
|
|
||||||
if (local_path != NULL && icon_path != NULL) {
|
if (local_path != NULL && icon_path != NULL) {
|
||||||
|
#ifdef GNOME2_CONVERSION_COMPLETE
|
||||||
gnome_metadata_set (local_path, "icon-filename", strlen (icon_path)+1, icon_path);
|
gnome_metadata_set (local_path, "icon-filename", strlen (icon_path)+1, icon_path);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (icon_path);
|
g_free (icon_path);
|
||||||
|
@ -3027,6 +3029,7 @@ nautilus_file_set_permissions (NautilusFile *file,
|
||||||
GNOME_VFS_SET_FILE_INFO_PERMISSIONS,
|
GNOME_VFS_SET_FILE_INFO_PERMISSIONS,
|
||||||
(GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
(GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
||||||
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS),
|
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS),
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
set_permissions_callback, op);
|
set_permissions_callback, op);
|
||||||
gnome_vfs_file_info_unref (partial_file_info);
|
gnome_vfs_file_info_unref (partial_file_info);
|
||||||
gnome_vfs_uri_unref (vfs_uri);
|
gnome_vfs_uri_unref (vfs_uri);
|
||||||
|
@ -3285,6 +3288,7 @@ set_owner_and_group (NautilusFile *file,
|
||||||
GNOME_VFS_SET_FILE_INFO_OWNER,
|
GNOME_VFS_SET_FILE_INFO_OWNER,
|
||||||
(GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
(GNOME_VFS_FILE_INFO_GET_MIME_TYPE
|
||||||
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS),
|
| GNOME_VFS_FILE_INFO_FOLLOW_LINKS),
|
||||||
|
GNOME_VFS_PRIORITY_DEFAULT,
|
||||||
set_owner_and_group_callback, op);
|
set_owner_and_group_callback, op);
|
||||||
gnome_vfs_file_info_unref (partial_file_info);
|
gnome_vfs_file_info_unref (partial_file_info);
|
||||||
gnome_vfs_uri_unref (uri);
|
gnome_vfs_uri_unref (uri);
|
||||||
|
@ -5036,7 +5040,7 @@ nautilus_file_list_ref (GList *list)
|
||||||
void
|
void
|
||||||
nautilus_file_list_unref (GList *list)
|
nautilus_file_list_unref (GList *list)
|
||||||
{
|
{
|
||||||
eel_g_list_safe_for_each (list, (GFunc) nautilus_file_unref, NULL);
|
g_list_foreach (list, (GFunc) nautilus_file_unref, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5161,8 +5165,8 @@ nautilus_self_check_file (void)
|
||||||
|
|
||||||
file_1 = nautilus_file_get ("file:///home/");
|
file_1 = nautilus_file_get ("file:///home/");
|
||||||
|
|
||||||
EEL_CHECK_INTEGER_RESULT (GTK_OBJECT (file_1)->ref_count, 1);
|
EEL_CHECK_INTEGER_RESULT (G_OBJECT (file_1)->ref_count, 1);
|
||||||
EEL_CHECK_INTEGER_RESULT (GTK_OBJECT (file_1->details->directory)->ref_count, 1);
|
EEL_CHECK_INTEGER_RESULT (G_OBJECT (file_1->details->directory)->ref_count, 1);
|
||||||
EEL_CHECK_INTEGER_RESULT (nautilus_directory_number_outstanding (), 1);
|
EEL_CHECK_INTEGER_RESULT (nautilus_directory_number_outstanding (), 1);
|
||||||
|
|
||||||
nautilus_file_unref (file_1);
|
nautilus_file_unref (file_1);
|
||||||
|
@ -5178,13 +5182,13 @@ nautilus_self_check_file (void)
|
||||||
|
|
||||||
nautilus_file_list_ref (list);
|
nautilus_file_list_ref (list);
|
||||||
|
|
||||||
EEL_CHECK_INTEGER_RESULT (GTK_OBJECT (file_1)->ref_count, 2);
|
EEL_CHECK_INTEGER_RESULT (G_OBJECT (file_1)->ref_count, 2);
|
||||||
EEL_CHECK_INTEGER_RESULT (GTK_OBJECT (file_2)->ref_count, 2);
|
EEL_CHECK_INTEGER_RESULT (G_OBJECT (file_2)->ref_count, 2);
|
||||||
|
|
||||||
nautilus_file_list_unref (list);
|
nautilus_file_list_unref (list);
|
||||||
|
|
||||||
EEL_CHECK_INTEGER_RESULT (GTK_OBJECT (file_1)->ref_count, 1);
|
EEL_CHECK_INTEGER_RESULT (G_OBJECT (file_1)->ref_count, 1);
|
||||||
EEL_CHECK_INTEGER_RESULT (GTK_OBJECT (file_2)->ref_count, 1);
|
EEL_CHECK_INTEGER_RESULT (G_OBJECT (file_2)->ref_count, 1);
|
||||||
|
|
||||||
nautilus_file_list_free (list);
|
nautilus_file_list_free (list);
|
||||||
|
|
||||||
|
@ -5224,8 +5228,8 @@ nautilus_self_check_file (void)
|
||||||
file_1 = nautilus_file_get ("file:///etc");
|
file_1 = nautilus_file_get ("file:///etc");
|
||||||
file_2 = nautilus_file_get ("file:///usr");
|
file_2 = nautilus_file_get ("file:///usr");
|
||||||
|
|
||||||
EEL_CHECK_INTEGER_RESULT (GTK_OBJECT (file_1)->ref_count, 1);
|
EEL_CHECK_INTEGER_RESULT (G_OBJECT (file_1)->ref_count, 1);
|
||||||
EEL_CHECK_INTEGER_RESULT (GTK_OBJECT (file_2)->ref_count, 1);
|
EEL_CHECK_INTEGER_RESULT (G_OBJECT (file_2)->ref_count, 1);
|
||||||
|
|
||||||
EEL_CHECK_BOOLEAN_RESULT (nautilus_file_compare_for_sort (file_1, file_2, NAUTILUS_FILE_SORT_BY_DISPLAY_NAME, FALSE, FALSE) < 0, TRUE);
|
EEL_CHECK_BOOLEAN_RESULT (nautilus_file_compare_for_sort (file_1, file_2, NAUTILUS_FILE_SORT_BY_DISPLAY_NAME, FALSE, FALSE) < 0, TRUE);
|
||||||
EEL_CHECK_BOOLEAN_RESULT (nautilus_file_compare_for_sort (file_1, file_2, NAUTILUS_FILE_SORT_BY_DISPLAY_NAME, FALSE, TRUE) > 0, TRUE);
|
EEL_CHECK_BOOLEAN_RESULT (nautilus_file_compare_for_sort (file_1, file_2, NAUTILUS_FILE_SORT_BY_DISPLAY_NAME, FALSE, TRUE) > 0, TRUE);
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include <eel/eel-glib-extensions.h>
|
#include <eel/eel-glib-extensions.h>
|
||||||
#include <eel/eel-string.h>
|
#include <eel/eel-string.h>
|
||||||
#include <eel/eel-xml-extensions.h>
|
#include <eel/eel-xml-extensions.h>
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-util.h>
|
#include <libgnome/gnome-util.h>
|
||||||
#include <libxml/parser.h>
|
#include <libxml/parser.h>
|
||||||
#include <libxml/xmlmemory.h>
|
#include <libxml/xmlmemory.h>
|
||||||
|
@ -197,7 +196,7 @@ get_themed_icon_file_path (const NautilusIconTheme *icon_theme,
|
||||||
include_size = icon_size != NAUTILUS_ICON_SIZE_STANDARD;
|
include_size = icon_size != NAUTILUS_ICON_SIZE_STANDARD;
|
||||||
|
|
||||||
/* Try each suffix. */
|
/* Try each suffix. */
|
||||||
for (i = 0; i < EEL_N_ELEMENTS (icon_file_name_suffixes); i++) {
|
for (i = 0; i < G_N_ELEMENTS (icon_file_name_suffixes); i++) {
|
||||||
if (include_size && g_strcasecmp (icon_file_name_suffixes[i], ".svg") != 0) {
|
if (include_size && g_strcasecmp (icon_file_name_suffixes[i], ".svg") != 0) {
|
||||||
/* Build a path for this icon. */
|
/* Build a path for this icon. */
|
||||||
partial_path = g_strdup_printf ("%s-%u",
|
partial_path = g_strdup_printf ("%s-%u",
|
||||||
|
@ -314,7 +313,7 @@ get_user_emblem_path (const char *name, guint icon_size)
|
||||||
|
|
||||||
user_directory = nautilus_get_user_directory ();
|
user_directory = nautilus_get_user_directory ();
|
||||||
path = NULL;
|
path = NULL;
|
||||||
for (i = 0; i < EEL_N_ELEMENTS (icon_file_name_suffixes); i++) {
|
for (i = 0; i < G_N_ELEMENTS (icon_file_name_suffixes); i++) {
|
||||||
path = g_strdup_printf ("%s/emblems/%s%s",
|
path = g_strdup_printf ("%s/emblems/%s%s",
|
||||||
user_directory,
|
user_directory,
|
||||||
name + strlen (NAUTILUS_EMBLEM_NAME_PREFIX),
|
name + strlen (NAUTILUS_EMBLEM_NAME_PREFIX),
|
||||||
|
@ -387,7 +386,7 @@ nautilus_remove_icon_file_name_suffix (const char *icon_name)
|
||||||
guint i;
|
guint i;
|
||||||
const char *suffix;
|
const char *suffix;
|
||||||
|
|
||||||
for (i = 0; i < EEL_N_ELEMENTS (icon_file_name_suffixes); i++) {
|
for (i = 0; i < G_N_ELEMENTS (icon_file_name_suffixes); i++) {
|
||||||
suffix = icon_file_name_suffixes[i];
|
suffix = icon_file_name_suffixes[i];
|
||||||
if (eel_str_has_suffix (icon_name, suffix)) {
|
if (eel_str_has_suffix (icon_name, suffix)) {
|
||||||
return eel_str_strip_trailing_str (icon_name, suffix);
|
return eel_str_strip_trailing_str (icon_name, suffix);
|
||||||
|
|
|
@ -66,8 +66,8 @@ typedef struct {
|
||||||
static NautilusFontFactory *global_font_factory = NULL;
|
static NautilusFontFactory *global_font_factory = NULL;
|
||||||
|
|
||||||
static GtkType nautilus_font_factory_get_type (void);
|
static GtkType nautilus_font_factory_get_type (void);
|
||||||
static void nautilus_font_factory_initialize_class (NautilusFontFactoryClass *class);
|
static void nautilus_font_factory_class_init (NautilusFontFactoryClass *class);
|
||||||
static void nautilus_font_factory_initialize (NautilusFontFactory *factory);
|
static void nautilus_font_factory_init (NautilusFontFactory *factory);
|
||||||
static void destroy (GtkObject *object);
|
static void destroy (GtkObject *object);
|
||||||
|
|
||||||
EEL_DEFINE_CLASS_BOILERPLATE (NautilusFontFactory,
|
EEL_DEFINE_CLASS_BOILERPLATE (NautilusFontFactory,
|
||||||
|
@ -101,13 +101,13 @@ nautilus_font_factory_get (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_font_factory_initialize (NautilusFontFactory *factory)
|
nautilus_font_factory_init (NautilusFontFactory *factory)
|
||||||
{
|
{
|
||||||
factory->fonts = g_hash_table_new (g_str_hash, g_str_equal);
|
factory->fonts = g_hash_table_new (g_str_hash, g_str_equal);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_font_factory_initialize_class (NautilusFontFactoryClass *class)
|
nautilus_font_factory_class_init (NautilusFontFactoryClass *class)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
|
@ -115,6 +115,8 @@ nautilus_font_factory_initialize_class (NautilusFontFactoryClass *class)
|
||||||
object_class->destroy = destroy;
|
object_class->destroy = destroy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
|
|
||||||
static FontHashNode *
|
static FontHashNode *
|
||||||
font_hash_node_alloc (const char *name)
|
font_hash_node_alloc (const char *name)
|
||||||
{
|
{
|
||||||
|
@ -128,6 +130,8 @@ font_hash_node_alloc (const char *name)
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
font_hash_node_free (FontHashNode *node)
|
font_hash_node_free (FontHashNode *node)
|
||||||
{
|
{
|
||||||
|
@ -168,6 +172,8 @@ destroy (GtkObject *object)
|
||||||
EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
|
EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GNOME2_CONVERSION_COMPLETE
|
||||||
|
|
||||||
static FontHashNode *
|
static FontHashNode *
|
||||||
font_hash_node_lookup (const char *name)
|
font_hash_node_lookup (const char *name)
|
||||||
{
|
{
|
||||||
|
@ -276,7 +282,7 @@ nautilus_font_factory_get_font_from_preferences (guint size_in_pixels)
|
||||||
static gboolean icon_view_font_auto_value_registered;
|
static gboolean icon_view_font_auto_value_registered;
|
||||||
static const char *icon_view_font_auto_value;
|
static const char *icon_view_font_auto_value;
|
||||||
|
|
||||||
/* Can't initialize this in initialize_class, because no font factory
|
/* Can't initialize this in class_init, because no font factory
|
||||||
* instance may yet exist when this is called.
|
* instance may yet exist when this is called.
|
||||||
*/
|
*/
|
||||||
if (!icon_view_font_auto_value_registered) {
|
if (!icon_view_font_auto_value_registered) {
|
||||||
|
@ -290,3 +296,5 @@ nautilus_font_factory_get_font_from_preferences (guint size_in_pixels)
|
||||||
*/
|
*/
|
||||||
return nautilus_font_factory_get_font_by_family (icon_view_font_auto_value, size_in_pixels);
|
return nautilus_font_factory_get_font_by_family (icon_view_font_auto_value, size_in_pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -882,18 +882,18 @@ get_default_folder_viewer_preference_from_iid (const char *iid)
|
||||||
static gpointer
|
static gpointer
|
||||||
default_default_folder_viewer_callback (int user_level)
|
default_default_folder_viewer_callback (int user_level)
|
||||||
{
|
{
|
||||||
OAF_ServerInfo *oaf_info;
|
Bonobo_ServerInfo *bonobo_activation_info;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
oaf_info = gnome_vfs_mime_get_default_component ("x-directory/normal");
|
bonobo_activation_info = gnome_vfs_mime_get_default_component ("x-directory/normal");
|
||||||
if (oaf_info == NULL) {
|
if (bonobo_activation_info == NULL) {
|
||||||
result = NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW;
|
result = NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW;
|
||||||
} else {
|
} else {
|
||||||
result = get_default_folder_viewer_preference_from_iid (oaf_info->iid);
|
result = get_default_folder_viewer_preference_from_iid (bonobo_activation_info->iid);
|
||||||
if (result == NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER) {
|
if (result == NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER) {
|
||||||
result = NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW;
|
result = NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW;
|
||||||
}
|
}
|
||||||
CORBA_free (oaf_info);
|
CORBA_free (bonobo_activation_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
return GINT_TO_POINTER (result);
|
return GINT_TO_POINTER (result);
|
||||||
|
@ -1072,7 +1072,7 @@ default_icon_view_sort_order_or_manual_layout_changed_callback (gpointer callbac
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nautilus_global_preferences_initialize (void)
|
nautilus_global_preferences_init (void)
|
||||||
{
|
{
|
||||||
static gboolean initialized = FALSE;
|
static gboolean initialized = FALSE;
|
||||||
|
|
||||||
|
@ -1082,7 +1082,7 @@ nautilus_global_preferences_initialize (void)
|
||||||
|
|
||||||
initialized = TRUE;
|
initialized = TRUE;
|
||||||
|
|
||||||
eel_preferences_initialize ("/apps/nautilus");
|
eel_preferences_init ("/apps/nautilus");
|
||||||
|
|
||||||
/* Install defaults */
|
/* Install defaults */
|
||||||
global_preferences_install_defaults ();
|
global_preferences_install_defaults ();
|
||||||
|
|
|
@ -188,7 +188,7 @@ typedef enum
|
||||||
#define NAUTILUS_PREFERENCES_ADD_TO_SESSION "preferences/add_to_session"
|
#define NAUTILUS_PREFERENCES_ADD_TO_SESSION "preferences/add_to_session"
|
||||||
|
|
||||||
|
|
||||||
void nautilus_global_preferences_initialize (void);
|
void nautilus_global_preferences_init (void);
|
||||||
|
|
||||||
/* Sidebar */
|
/* Sidebar */
|
||||||
struct EelScalableFont *nautilus_global_preferences_get_icon_view_smooth_font (void);
|
struct EelScalableFont *nautilus_global_preferences_get_icon_view_smooth_font (void);
|
||||||
|
|
|
@ -44,8 +44,8 @@ struct NautilusHorizontalSplitterDetails {
|
||||||
#define SPLITTER_CLICK_TIMEOUT 400
|
#define SPLITTER_CLICK_TIMEOUT 400
|
||||||
|
|
||||||
/* NautilusHorizontalSplitterClass methods */
|
/* NautilusHorizontalSplitterClass methods */
|
||||||
static void nautilus_horizontal_splitter_initialize_class (NautilusHorizontalSplitterClass *horizontal_splitter_class);
|
static void nautilus_horizontal_splitter_class_init (NautilusHorizontalSplitterClass *horizontal_splitter_class);
|
||||||
static void nautilus_horizontal_splitter_initialize (NautilusHorizontalSplitter *horizontal_splitter);
|
static void nautilus_horizontal_splitter_init (NautilusHorizontalSplitter *horizontal_splitter);
|
||||||
static gboolean nautilus_horizontal_splitter_button_press (GtkWidget *widget,
|
static gboolean nautilus_horizontal_splitter_button_press (GtkWidget *widget,
|
||||||
GdkEventButton *event);
|
GdkEventButton *event);
|
||||||
static gboolean nautilus_horizontal_splitter_button_release (GtkWidget *widget,
|
static gboolean nautilus_horizontal_splitter_button_release (GtkWidget *widget,
|
||||||
|
@ -66,7 +66,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusHorizontalSplitter,
|
||||||
|
|
||||||
/* GtkObjectClass methods */
|
/* GtkObjectClass methods */
|
||||||
static void
|
static void
|
||||||
nautilus_horizontal_splitter_initialize_class (NautilusHorizontalSplitterClass *horizontal_splitter_class)
|
nautilus_horizontal_splitter_class_init (NautilusHorizontalSplitterClass *horizontal_splitter_class)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
|
@ -86,7 +86,7 @@ nautilus_horizontal_splitter_initialize_class (NautilusHorizontalSplitterClass *
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_horizontal_splitter_initialize (NautilusHorizontalSplitter *horizontal_splitter)
|
nautilus_horizontal_splitter_init (NautilusHorizontalSplitter *horizontal_splitter)
|
||||||
{
|
{
|
||||||
horizontal_splitter->details = g_new0 (NautilusHorizontalSplitterDetails, 1);
|
horizontal_splitter->details = g_new0 (NautilusHorizontalSplitterDetails, 1);
|
||||||
e_paned_set_handle_size (E_PANED (horizontal_splitter), BAR_WIDTH);
|
e_paned_set_handle_size (E_PANED (horizontal_splitter), BAR_WIDTH);
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#ifndef NAUTILUS_HORIZONTAL_SPLITTER_H
|
#ifndef NAUTILUS_HORIZONTAL_SPLITTER_H
|
||||||
#define NAUTILUS_HORIZONTAL_SPLITTER_H
|
#define NAUTILUS_HORIZONTAL_SPLITTER_H
|
||||||
|
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include "e-hpaned.h"
|
#include "e-hpaned.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnomeui/gnome-canvas-util.h>
|
#include <libgnomecanvas/gnome-canvas-util.h>
|
||||||
#include <libgnomeui/gnome-icon-text.h>
|
#include <libgnomecanvas/gnome-icon-text.h>
|
||||||
#include <libart_lgpl/art_rgb.h>
|
#include <libart_lgpl/art_rgb.h>
|
||||||
#include <libart_lgpl/art_rgb_affine.h>
|
#include <libart_lgpl/art_rgb_affine.h>
|
||||||
#include <libart_lgpl/art_rgb_rgba_affine.h>
|
#include <libart_lgpl/art_rgb_rgba_affine.h>
|
||||||
|
@ -156,8 +156,8 @@ static guint32 highlight_text_info_color = EEL_RGBA_COLOR_PACK (0xCC, 0xCC, 0x
|
||||||
static int click_policy_auto_value;
|
static int click_policy_auto_value;
|
||||||
|
|
||||||
/* GtkObject */
|
/* GtkObject */
|
||||||
static void nautilus_icon_canvas_item_initialize_class (NautilusIconCanvasItemClass *class);
|
static void nautilus_icon_canvas_item_class_init (NautilusIconCanvasItemClass *class);
|
||||||
static void nautilus_icon_canvas_item_initialize (NautilusIconCanvasItem *item);
|
static void nautilus_icon_canvas_item_init (NautilusIconCanvasItem *item);
|
||||||
static void nautilus_icon_canvas_item_destroy (GtkObject *object);
|
static void nautilus_icon_canvas_item_destroy (GtkObject *object);
|
||||||
static int nautilus_icon_canvas_item_event (GnomeCanvasItem *item,
|
static int nautilus_icon_canvas_item_event (GnomeCanvasItem *item,
|
||||||
GdkEvent *event);
|
GdkEvent *event);
|
||||||
|
@ -235,7 +235,7 @@ free_layout_cache (void)
|
||||||
|
|
||||||
/* Class initialization function for the icon canvas item. */
|
/* Class initialization function for the icon canvas item. */
|
||||||
static void
|
static void
|
||||||
nautilus_icon_canvas_item_initialize_class (NautilusIconCanvasItemClass *class)
|
nautilus_icon_canvas_item_class_init (NautilusIconCanvasItemClass *class)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GnomeCanvasItemClass *item_class;
|
GnomeCanvasItemClass *item_class;
|
||||||
|
@ -249,9 +249,9 @@ nautilus_icon_canvas_item_initialize_class (NautilusIconCanvasItemClass *class)
|
||||||
item_class = GNOME_CANVAS_ITEM_CLASS (class);
|
item_class = GNOME_CANVAS_ITEM_CLASS (class);
|
||||||
|
|
||||||
gtk_object_add_arg_type ("NautilusIconCanvasItem::editable_text",
|
gtk_object_add_arg_type ("NautilusIconCanvasItem::editable_text",
|
||||||
GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_EDITABLE_TEXT);
|
G_TYPE_STRING, GTK_ARG_READWRITE, ARG_EDITABLE_TEXT);
|
||||||
gtk_object_add_arg_type ("NautilusIconCanvasItem::additional_text",
|
gtk_object_add_arg_type ("NautilusIconCanvasItem::additional_text",
|
||||||
GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ADDITIONAL_TEXT);
|
G_TYPE_STRING, GTK_ARG_READWRITE, ARG_ADDITIONAL_TEXT);
|
||||||
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",
|
||||||
|
@ -270,15 +270,14 @@ nautilus_icon_canvas_item_initialize_class (NautilusIconCanvasItemClass *class)
|
||||||
object_class->get_arg = nautilus_icon_canvas_item_get_arg;
|
object_class->get_arg = nautilus_icon_canvas_item_get_arg;
|
||||||
|
|
||||||
signals[BOUNDS_CHANGED]
|
signals[BOUNDS_CHANGED]
|
||||||
= gtk_signal_new ("bounds_changed",
|
= g_signal_new ("bounds_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconCanvasItemClass,
|
G_STRUCT_OFFSET (NautilusIconCanvasItemClass,
|
||||||
bounds_changed),
|
bounds_changed),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
|
||||||
|
|
||||||
item_class->update = nautilus_icon_canvas_item_update;
|
item_class->update = nautilus_icon_canvas_item_update;
|
||||||
item_class->draw = nautilus_icon_canvas_item_draw;
|
item_class->draw = nautilus_icon_canvas_item_draw;
|
||||||
|
@ -293,7 +292,7 @@ nautilus_icon_canvas_item_initialize_class (NautilusIconCanvasItemClass *class)
|
||||||
|
|
||||||
/* Object initialization function for the icon item. */
|
/* Object initialization function for the icon item. */
|
||||||
static void
|
static void
|
||||||
nautilus_icon_canvas_item_initialize (NautilusIconCanvasItem *icon_item)
|
nautilus_icon_canvas_item_init (NautilusIconCanvasItem *icon_item)
|
||||||
{
|
{
|
||||||
NautilusIconCanvasItemDetails *details;
|
NautilusIconCanvasItemDetails *details;
|
||||||
|
|
||||||
|
@ -981,7 +980,7 @@ draw_stretch_handles (NautilusIconCanvasItem *item, GdkDrawable *drawable,
|
||||||
gc = gdk_gc_new (drawable);
|
gc = gdk_gc_new (drawable);
|
||||||
|
|
||||||
knob_filename = nautilus_theme_get_image_path ("knob.png");
|
knob_filename = nautilus_theme_get_image_path ("knob.png");
|
||||||
knob_pixbuf = gdk_pixbuf_new_from_file (knob_filename);
|
knob_pixbuf = gdk_pixbuf_new_from_file (knob_filename, NULL);
|
||||||
knob_width = gdk_pixbuf_get_width (knob_pixbuf);
|
knob_width = gdk_pixbuf_get_width (knob_pixbuf);
|
||||||
knob_height = gdk_pixbuf_get_height (knob_pixbuf);
|
knob_height = gdk_pixbuf_get_height (knob_pixbuf);
|
||||||
|
|
||||||
|
@ -1084,7 +1083,7 @@ draw_stretch_handles_aa (NautilusIconCanvasItem *item, GnomeCanvasBuf *buf,
|
||||||
canvas_item = GNOME_CANVAS_ITEM (item);
|
canvas_item = GNOME_CANVAS_ITEM (item);
|
||||||
|
|
||||||
knob_filename = nautilus_theme_get_image_path ("knob.png");
|
knob_filename = nautilus_theme_get_image_path ("knob.png");
|
||||||
knob_pixbuf = gdk_pixbuf_new_from_file (knob_filename);
|
knob_pixbuf = gdk_pixbuf_new_from_file (knob_filename, NULL);
|
||||||
knob_width = gdk_pixbuf_get_width (knob_pixbuf);
|
knob_width = gdk_pixbuf_get_width (knob_pixbuf);
|
||||||
knob_height = gdk_pixbuf_get_height (knob_pixbuf);
|
knob_height = gdk_pixbuf_get_height (knob_pixbuf);
|
||||||
|
|
||||||
|
@ -1292,7 +1291,7 @@ real_map_pixbuf (NautilusIconCanvasItem *icon_item)
|
||||||
/* Load the audio symbol. */
|
/* Load the audio symbol. */
|
||||||
audio_filename = nautilus_pixmap_file ("audio.png");
|
audio_filename = nautilus_pixmap_file ("audio.png");
|
||||||
if (audio_filename != NULL) {
|
if (audio_filename != NULL) {
|
||||||
audio_pixbuf = gdk_pixbuf_new_from_file (audio_filename);
|
audio_pixbuf = gdk_pixbuf_new_from_file (audio_filename, NULL);
|
||||||
} else {
|
} else {
|
||||||
audio_pixbuf = NULL;
|
audio_pixbuf = NULL;
|
||||||
}
|
}
|
||||||
|
@ -2104,7 +2103,7 @@ hit_test_stretch_handle (NautilusIconCanvasItem *item,
|
||||||
}
|
}
|
||||||
|
|
||||||
knob_filename = nautilus_theme_get_image_path ("knob.png");
|
knob_filename = nautilus_theme_get_image_path ("knob.png");
|
||||||
knob_pixbuf = gdk_pixbuf_new_from_file (knob_filename);
|
knob_pixbuf = gdk_pixbuf_new_from_file (knob_filename, NULL);
|
||||||
knob_width = gdk_pixbuf_get_width (knob_pixbuf);
|
knob_width = gdk_pixbuf_get_width (knob_pixbuf);
|
||||||
knob_height = gdk_pixbuf_get_height (knob_pixbuf);
|
knob_height = gdk_pixbuf_get_height (knob_pixbuf);
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,7 @@
|
||||||
#ifndef NAUTILUS_ICON_CANVAS_ITEM_H
|
#ifndef NAUTILUS_ICON_CANVAS_ITEM_H
|
||||||
#define NAUTILUS_ICON_CANVAS_ITEM_H
|
#define NAUTILUS_ICON_CANVAS_ITEM_H
|
||||||
|
|
||||||
#include <libgnome/gnome-defs.h>
|
#include <libgnomecanvas/gnome-canvas.h>
|
||||||
#include <libgnomeui/gnome-canvas.h>
|
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
#include "nautilus-icon-factory.h"
|
#include "nautilus-icon-factory.h"
|
||||||
#include <eel/eel-scalable-font.h>
|
#include <eel/eel-scalable-font.h>
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
#include <eel/eel-gtk-extensions.h>
|
#include <eel/eel-gtk-extensions.h>
|
||||||
#include <eel/eel-gtk-macros.h>
|
#include <eel/eel-gtk-macros.h>
|
||||||
#include <eel/eel-string.h>
|
#include <eel/eel-string.h>
|
||||||
#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
|
#include <libgnomecanvas/gnome-canvas-pixbuf.h>
|
||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
#include <gtk/gtklayout.h>
|
#include <gtk/gtklayout.h>
|
||||||
#include <gtk/gtkmain.h>
|
#include <gtk/gtkmain.h>
|
||||||
|
@ -120,8 +120,8 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void activate_selected_items (NautilusIconContainer *container);
|
static void activate_selected_items (NautilusIconContainer *container);
|
||||||
static void nautilus_icon_container_initialize_class (NautilusIconContainerClass *class);
|
static void nautilus_icon_container_class_init (NautilusIconContainerClass *class);
|
||||||
static void nautilus_icon_container_initialize (NautilusIconContainer *container);
|
static void nautilus_icon_container_init (NautilusIconContainer *container);
|
||||||
static void nautilus_icon_container_theme_changed (gpointer user_data);
|
static void nautilus_icon_container_theme_changed (gpointer user_data);
|
||||||
|
|
||||||
static void compute_stretch (StretchState *start,
|
static void compute_stretch (StretchState *start,
|
||||||
|
@ -2314,7 +2314,7 @@ destroy (GtkObject *object)
|
||||||
gtk_idle_remove (container->details->stretch_idle_id);
|
gtk_idle_remove (container->details->stretch_idle_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < EEL_N_ELEMENTS (container->details->label_font); i++) {
|
for (i = 0; i < G_N_ELEMENTS (container->details->label_font); i++) {
|
||||||
if (container->details->label_font[i] != NULL)
|
if (container->details->label_font[i] != NULL)
|
||||||
gdk_font_unref (container->details->label_font[i]);
|
gdk_font_unref (container->details->label_font[i]);
|
||||||
}
|
}
|
||||||
|
@ -3031,7 +3031,7 @@ key_press_event (GtkWidget *widget,
|
||||||
/* Initialization. */
|
/* Initialization. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_icon_container_initialize_class (NautilusIconContainerClass *class)
|
nautilus_icon_container_class_init (NautilusIconContainerClass *class)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
|
@ -3048,173 +3048,191 @@ nautilus_icon_container_initialize_class (NautilusIconContainerClass *class)
|
||||||
/* Signals. */
|
/* Signals. */
|
||||||
|
|
||||||
signals[SELECTION_CHANGED]
|
signals[SELECTION_CHANGED]
|
||||||
= gtk_signal_new ("selection_changed",
|
= g_signal_new ("selection_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
selection_changed),
|
selection_changed),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
signals[BUTTON_PRESS]
|
signals[BUTTON_PRESS]
|
||||||
= gtk_signal_new ("button_press",
|
= g_signal_new ("button_press",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
button_press),
|
button_press),
|
||||||
gtk_marshal_BOOL__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_BOOL, 1,
|
gtk_marshal_BOOL__POINTER,
|
||||||
GTK_TYPE_GDK_EVENT);
|
GTK_TYPE_BOOL, 1,
|
||||||
|
GDK_TYPE_EVENT);
|
||||||
signals[ACTIVATE]
|
signals[ACTIVATE]
|
||||||
= gtk_signal_new ("activate",
|
= g_signal_new ("activate",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
activate),
|
activate),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1,
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[CONTEXT_CLICK_SELECTION]
|
signals[CONTEXT_CLICK_SELECTION]
|
||||||
= gtk_signal_new ("context_click_selection",
|
= g_signal_new ("context_click_selection",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
context_click_selection),
|
context_click_selection),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1,
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[CONTEXT_CLICK_BACKGROUND]
|
signals[CONTEXT_CLICK_BACKGROUND]
|
||||||
= gtk_signal_new ("context_click_background",
|
= g_signal_new ("context_click_background",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
context_click_background),
|
context_click_background),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1,
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[MIDDLE_CLICK]
|
signals[MIDDLE_CLICK]
|
||||||
= gtk_signal_new ("middle_click",
|
= g_signal_new ("middle_click",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
middle_click),
|
middle_click),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1,
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[ICON_POSITION_CHANGED]
|
signals[ICON_POSITION_CHANGED]
|
||||||
= gtk_signal_new ("icon_position_changed",
|
= g_signal_new ("icon_position_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
icon_position_changed),
|
icon_position_changed),
|
||||||
gtk_marshal_NONE__POINTER_POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 2,
|
gtk_marshal_NONE__POINTER_POINTER,
|
||||||
|
G_TYPE_NONE, 2,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[ICON_TEXT_CHANGED]
|
signals[ICON_TEXT_CHANGED]
|
||||||
= gtk_signal_new ("icon_text_changed",
|
= g_signal_new ("icon_text_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
icon_text_changed),
|
icon_text_changed),
|
||||||
gtk_marshal_NONE__POINTER_POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 2,
|
gtk_marshal_NONE__POINTER_POINTER,
|
||||||
|
G_TYPE_NONE, 2,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
GTK_TYPE_STRING);
|
G_TYPE_STRING);
|
||||||
signals[ICON_STRETCH_STARTED]
|
signals[ICON_STRETCH_STARTED]
|
||||||
= gtk_signal_new ("icon_stretch_started",
|
= g_signal_new ("icon_stretch_started",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
icon_stretch_started),
|
icon_stretch_started),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1,
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[ICON_STRETCH_ENDED]
|
signals[ICON_STRETCH_ENDED]
|
||||||
= gtk_signal_new ("icon_stretch_ended",
|
= g_signal_new ("icon_stretch_ended",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
icon_stretch_ended),
|
icon_stretch_ended),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1,
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[RENAMING_ICON]
|
signals[RENAMING_ICON]
|
||||||
= gtk_signal_new ("renaming_icon",
|
= g_signal_new ("renaming_icon",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
renaming_icon),
|
renaming_icon),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1,
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[GET_ICON_IMAGES]
|
signals[GET_ICON_IMAGES]
|
||||||
= gtk_signal_new ("get_icon_images",
|
= g_signal_new ("get_icon_images",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
get_icon_images),
|
get_icon_images),
|
||||||
eel_gtk_marshal_POINTER__POINTER_STRING_POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_POINTER, 3,
|
eel_gtk_marshal_POINTER__POINTER_STRING_POINTER,
|
||||||
|
GTK_TYPE_POINTER, 3,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
GTK_TYPE_STRING,
|
G_TYPE_STRING,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[GET_ICON_TEXT]
|
signals[GET_ICON_TEXT]
|
||||||
= gtk_signal_new ("get_icon_text",
|
= g_signal_new ("get_icon_text",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
get_icon_text),
|
get_icon_text),
|
||||||
eel_gtk_marshal_NONE__POINTER_STRING_STRING,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 3,
|
eel_gtk_marshal_NONE__POINTER_STRING_STRING,
|
||||||
|
G_TYPE_NONE, 3,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
GTK_TYPE_STRING,
|
G_TYPE_STRING,
|
||||||
GTK_TYPE_STRING);
|
G_TYPE_STRING);
|
||||||
signals[GET_ICON_URI]
|
signals[GET_ICON_URI]
|
||||||
= gtk_signal_new ("get_icon_uri",
|
= g_signal_new ("get_icon_uri",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
get_icon_uri),
|
get_icon_uri),
|
||||||
eel_gtk_marshal_STRING__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_STRING, 1,
|
eel_gtk_marshal_STRING__POINTER,
|
||||||
|
G_TYPE_STRING, 1,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[GET_ICON_DROP_TARGET_URI]
|
signals[GET_ICON_DROP_TARGET_URI]
|
||||||
= gtk_signal_new ("get_icon_drop_target_uri",
|
= g_signal_new ("get_icon_drop_target_uri",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
get_icon_drop_target_uri),
|
get_icon_drop_target_uri),
|
||||||
eel_gtk_marshal_STRING__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_STRING, 1,
|
eel_gtk_marshal_STRING__POINTER,
|
||||||
|
G_TYPE_STRING, 1,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[COMPARE_ICONS]
|
signals[COMPARE_ICONS]
|
||||||
= gtk_signal_new ("compare_icons",
|
= g_signal_new ("compare_icons",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
compare_icons),
|
compare_icons),
|
||||||
eel_gtk_marshal_INT__POINTER_POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_INT, 2,
|
eel_gtk_marshal_INT__POINTER_POINTER,
|
||||||
|
GTK_TYPE_INT, 2,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[COMPARE_ICONS_BY_NAME]
|
signals[COMPARE_ICONS_BY_NAME]
|
||||||
= gtk_signal_new ("compare_icons_by_name",
|
= g_signal_new ("compare_icons_by_name",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
compare_icons_by_name),
|
compare_icons_by_name),
|
||||||
eel_gtk_marshal_INT__POINTER_POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_INT, 2,
|
eel_gtk_marshal_INT__POINTER_POINTER,
|
||||||
|
GTK_TYPE_INT, 2,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[MOVE_COPY_ITEMS]
|
signals[MOVE_COPY_ITEMS]
|
||||||
= gtk_signal_new ("move_copy_items",
|
= g_signal_new ("move_copy_items",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
move_copy_items),
|
move_copy_items),
|
||||||
eel_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_INT,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 6,
|
eel_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_INT,
|
||||||
|
G_TYPE_NONE, 6,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
|
@ -3222,82 +3240,88 @@ nautilus_icon_container_initialize_class (NautilusIconContainerClass *class)
|
||||||
GTK_TYPE_INT,
|
GTK_TYPE_INT,
|
||||||
GTK_TYPE_INT);
|
GTK_TYPE_INT);
|
||||||
signals[HANDLE_URI_LIST]
|
signals[HANDLE_URI_LIST]
|
||||||
= gtk_signal_new ("handle_uri_list",
|
= g_signal_new ("handle_uri_list",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
handle_uri_list),
|
handle_uri_list),
|
||||||
eel_gtk_marshal_NONE__POINTER_INT_INT_INT,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 4,
|
eel_gtk_marshal_NONE__POINTER_INT_INT_INT,
|
||||||
|
G_TYPE_NONE, 4,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
GTK_TYPE_INT,
|
GTK_TYPE_INT,
|
||||||
GTK_TYPE_INT,
|
GTK_TYPE_INT,
|
||||||
GTK_TYPE_INT);
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
signals[GET_CONTAINER_URI]
|
signals[GET_CONTAINER_URI]
|
||||||
= gtk_signal_new ("get_container_uri",
|
= g_signal_new ("get_container_uri",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
get_container_uri),
|
get_container_uri),
|
||||||
eel_gtk_marshal_STRING__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_STRING, 0);
|
eel_gtk_marshal_STRING__NONE,
|
||||||
|
G_TYPE_STRING, 0);
|
||||||
signals[CAN_ACCEPT_ITEM]
|
signals[CAN_ACCEPT_ITEM]
|
||||||
= gtk_signal_new ("can_accept_item",
|
= g_signal_new ("can_accept_item",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
can_accept_item),
|
can_accept_item),
|
||||||
eel_gtk_marshal_INT__POINTER_STRING,
|
NULL, NULL,
|
||||||
GTK_TYPE_INT, 2,
|
eel_gtk_marshal_INT__POINTER_STRING,
|
||||||
|
GTK_TYPE_INT, 2,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
GTK_TYPE_STRING);
|
G_TYPE_STRING);
|
||||||
signals[GET_STORED_ICON_POSITION]
|
signals[GET_STORED_ICON_POSITION]
|
||||||
= gtk_signal_new ("get_stored_icon_position",
|
= g_signal_new ("get_stored_icon_position",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
get_stored_icon_position),
|
get_stored_icon_position),
|
||||||
eel_gtk_marshal_BOOL__POINTER_POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_BOOL, 2,
|
eel_gtk_marshal_BOOL__POINTER_POINTER,
|
||||||
|
GTK_TYPE_BOOL, 2,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
GTK_TYPE_POINTER);
|
GTK_TYPE_POINTER);
|
||||||
signals[LAYOUT_CHANGED]
|
signals[LAYOUT_CHANGED]
|
||||||
= gtk_signal_new ("layout_changed",
|
= g_signal_new ("layout_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
layout_changed),
|
layout_changed),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
signals[PREVIEW]
|
signals[PREVIEW]
|
||||||
= gtk_signal_new ("preview",
|
= g_signal_new ("preview",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
preview),
|
preview),
|
||||||
eel_gtk_marshal_INT__POINTER_INT,
|
NULL, NULL,
|
||||||
GTK_TYPE_INT, 2,
|
eel_gtk_marshal_INT__POINTER_INT,
|
||||||
|
GTK_TYPE_INT, 2,
|
||||||
GTK_TYPE_POINTER,
|
GTK_TYPE_POINTER,
|
||||||
GTK_TYPE_BOOL);
|
GTK_TYPE_BOOL);
|
||||||
signals[BAND_SELECT_STARTED]
|
signals[BAND_SELECT_STARTED]
|
||||||
= gtk_signal_new ("band_select_started",
|
= g_signal_new ("band_select_started",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
band_select_started),
|
band_select_started),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
signals[BAND_SELECT_ENDED]
|
signals[BAND_SELECT_ENDED]
|
||||||
= gtk_signal_new ("band_select_ended",
|
= g_signal_new ("band_select_ended",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconContainerClass,
|
G_STRUCT_OFFSET (NautilusIconContainerClass,
|
||||||
band_select_ended),
|
band_select_ended),
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
|
||||||
|
|
||||||
/* GtkWidget class. */
|
/* GtkWidget class. */
|
||||||
|
|
||||||
|
@ -3327,7 +3351,7 @@ handle_focus_out_event (GtkWidget *widget, GdkEventFocus *event, gpointer user_d
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_icon_container_initialize (NautilusIconContainer *container)
|
nautilus_icon_container_init (NautilusIconContainer *container)
|
||||||
{
|
{
|
||||||
NautilusIconContainerDetails *details;
|
NautilusIconContainerDetails *details;
|
||||||
EelBackground *background;
|
EelBackground *background;
|
||||||
|
@ -5128,7 +5152,7 @@ nautilus_icon_container_theme_changed (gpointer user_data)
|
||||||
gdk_pixbuf_unref (container->details->highlight_frame);
|
gdk_pixbuf_unref (container->details->highlight_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
container->details->highlight_frame = gdk_pixbuf_new_from_file (text_frame_path);
|
container->details->highlight_frame = gdk_pixbuf_new_from_file (text_frame_path, NULL);
|
||||||
g_free (text_frame_path);
|
g_free (text_frame_path);
|
||||||
|
|
||||||
/* load the highlight color */
|
/* load the highlight color */
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#ifndef NAUTILUS_ICON_CONTAINER_H
|
#ifndef NAUTILUS_ICON_CONTAINER_H
|
||||||
#define NAUTILUS_ICON_CONTAINER_H
|
#define NAUTILUS_ICON_CONTAINER_H
|
||||||
|
|
||||||
#include <libgnomeui/gnome-canvas.h>
|
#include <libgnomecanvas/gnome-canvas.h>
|
||||||
#include "nautilus-icon-factory.h"
|
#include "nautilus-icon-factory.h"
|
||||||
#include <eel/eel-scalable-font.h>
|
#include <eel/eel-scalable-font.h>
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,8 @@
|
||||||
#include <gtk/gtkmain.h>
|
#include <gtk/gtkmain.h>
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnomeui/gnome-canvas-rect-ellipse.h>
|
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
|
||||||
#include <libgnomeui/gnome-stock.h>
|
#include <libgnomeui/gnome-stock-icons.h>
|
||||||
#include <libgnomeui/gnome-uidefs.h>
|
#include <libgnomeui/gnome-uidefs.h>
|
||||||
#include <libgnomevfs/gnome-vfs-uri.h>
|
#include <libgnomevfs/gnome-vfs-uri.h>
|
||||||
#include <libgnomevfs/gnome-vfs-utils.h>
|
#include <libgnomevfs/gnome-vfs-utils.h>
|
||||||
|
@ -496,7 +496,7 @@ get_data_on_first_target_we_support (GtkWidget *widget, GdkDragContext *context,
|
||||||
|
|
||||||
if (drop_types_list == NULL)
|
if (drop_types_list == NULL)
|
||||||
drop_types_list = gtk_target_list_new (drop_types,
|
drop_types_list = gtk_target_list_new (drop_types,
|
||||||
EEL_N_ELEMENTS (drop_types));
|
G_N_ELEMENTS (drop_types));
|
||||||
|
|
||||||
for (target = context->targets; target != NULL; target = target->next) {
|
for (target = context->targets; target != NULL; target = target->next) {
|
||||||
guint dummy_info;
|
guint dummy_info;
|
||||||
|
@ -1211,7 +1211,7 @@ nautilus_icon_dnd_init (NautilusIconContainer *container,
|
||||||
|
|
||||||
container->details->dnd_info = g_new0 (NautilusIconDndInfo, 1);
|
container->details->dnd_info = g_new0 (NautilusIconDndInfo, 1);
|
||||||
eel_drag_init (&container->details->dnd_info->drag_info,
|
eel_drag_init (&container->details->dnd_info->drag_info,
|
||||||
drag_types, EEL_N_ELEMENTS (drag_types), stipple);
|
drag_types, G_N_ELEMENTS (drag_types), stipple);
|
||||||
|
|
||||||
/* Set up the widget as a drag destination.
|
/* Set up the widget as a drag destination.
|
||||||
* (But not a source, as drags starting from this widget will be
|
* (But not a source, as drags starting from this widget will be
|
||||||
|
@ -1219,7 +1219,7 @@ nautilus_icon_dnd_init (NautilusIconContainer *container,
|
||||||
*/
|
*/
|
||||||
gtk_drag_dest_set (GTK_WIDGET (container),
|
gtk_drag_dest_set (GTK_WIDGET (container),
|
||||||
0,
|
0,
|
||||||
drop_types, EEL_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
|
||||||
| GDK_ACTION_ASK);
|
| GDK_ACTION_ASK);
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,6 @@
|
||||||
#include <eel/eel-string.h>
|
#include <eel/eel-string.h>
|
||||||
#include <eel/eel-vfs-extensions.h>
|
#include <eel/eel-vfs-extensions.h>
|
||||||
#include <gtk/gtksignal.h>
|
#include <gtk/gtksignal.h>
|
||||||
#include <libgnome/gnome-dentry.h>
|
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnome/gnome-util.h>
|
#include <libgnome/gnome-util.h>
|
||||||
#include <libgnomevfs/gnome-vfs-file-info.h>
|
#include <libgnomevfs/gnome-vfs-file-info.h>
|
||||||
|
@ -232,8 +231,8 @@ static int cached_thumbnail_limit;
|
||||||
/* forward declarations */
|
/* forward declarations */
|
||||||
|
|
||||||
static guint nautilus_icon_factory_get_type (void);
|
static guint nautilus_icon_factory_get_type (void);
|
||||||
static void nautilus_icon_factory_initialize_class (NautilusIconFactoryClass *class);
|
static void nautilus_icon_factory_class_init (NautilusIconFactoryClass *class);
|
||||||
static void nautilus_icon_factory_initialize (NautilusIconFactory *factory);
|
static void nautilus_icon_factory_init (NautilusIconFactory *factory);
|
||||||
static void nautilus_icon_factory_destroy (GtkObject *object);
|
static void nautilus_icon_factory_destroy (GtkObject *object);
|
||||||
static void icon_theme_changed_callback (gpointer user_data);
|
static void icon_theme_changed_callback (gpointer user_data);
|
||||||
static void thumbnail_limit_changed_callback (gpointer user_data);
|
static void thumbnail_limit_changed_callback (gpointer user_data);
|
||||||
|
@ -346,19 +345,19 @@ load_thumbnail_frames (NautilusIconFactory *factory)
|
||||||
if (factory->thumbnail_frame != NULL) {
|
if (factory->thumbnail_frame != NULL) {
|
||||||
gdk_pixbuf_unref (factory->thumbnail_frame);
|
gdk_pixbuf_unref (factory->thumbnail_frame);
|
||||||
}
|
}
|
||||||
factory->thumbnail_frame = gdk_pixbuf_new_from_file (image_path);
|
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);
|
gdk_pixbuf_unref (factory->thumbnail_frame_aa);
|
||||||
}
|
}
|
||||||
factory->thumbnail_frame_aa = gdk_pixbuf_new_from_file (image_path);
|
factory->thumbnail_frame_aa = gdk_pixbuf_new_from_file (image_path, NULL);
|
||||||
g_free (image_path);
|
g_free (image_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_icon_factory_initialize (NautilusIconFactory *factory)
|
nautilus_icon_factory_init (NautilusIconFactory *factory)
|
||||||
{
|
{
|
||||||
factory->scalable_icons = g_hash_table_new (nautilus_scalable_icon_hash,
|
factory->scalable_icons = g_hash_table_new (nautilus_scalable_icon_hash,
|
||||||
nautilus_scalable_icon_equal);
|
nautilus_scalable_icon_equal);
|
||||||
|
@ -374,21 +373,20 @@ nautilus_icon_factory_initialize (NautilusIconFactory *factory)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_icon_factory_initialize_class (NautilusIconFactoryClass *class)
|
nautilus_icon_factory_class_init (NautilusIconFactoryClass *class)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (class);
|
object_class = GTK_OBJECT_CLASS (class);
|
||||||
|
|
||||||
signals[ICONS_CHANGED]
|
signals[ICONS_CHANGED]
|
||||||
= gtk_signal_new ("icons_changed",
|
= g_signal_new ("icons_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
gtk_marshal_NONE__NONE,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 0);
|
gtk_marshal_NONE__NONE,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
|
||||||
|
|
||||||
object_class->destroy = nautilus_icon_factory_destroy;
|
object_class->destroy = nautilus_icon_factory_destroy;
|
||||||
}
|
}
|
||||||
|
@ -1537,7 +1535,7 @@ load_icon_from_path (const char *path,
|
||||||
return nautilus_thumbnail_load_framed_image (path, optimized_for_aa);
|
return nautilus_thumbnail_load_framed_image (path, optimized_for_aa);
|
||||||
}
|
}
|
||||||
|
|
||||||
return gdk_pixbuf_new_from_file (path);
|
return gdk_pixbuf_new_from_file (path, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkPixbuf *
|
static GdkPixbuf *
|
||||||
|
@ -1664,7 +1662,7 @@ load_icon_for_scaling (NautilusScalableIcon *scalable_icon,
|
||||||
size_request.maximum_height = size_request.maximum_width;
|
size_request.maximum_height = size_request.maximum_width;
|
||||||
size_request.optimized_for_aa = optimized_for_aa;
|
size_request.optimized_for_aa = optimized_for_aa;
|
||||||
|
|
||||||
for (i = 0; i < EEL_N_ELEMENTS (requests); i++) {
|
for (i = 0; i < G_N_ELEMENTS (requests); i++) {
|
||||||
actual_size = 0;
|
actual_size = 0;
|
||||||
while (get_next_icon_size_to_try (requested_size, &actual_size)) {
|
while (get_next_icon_size_to_try (requested_size, &actual_size)) {
|
||||||
size_request.nominal_width = actual_size;
|
size_request.nominal_width = actual_size;
|
||||||
|
|
|
@ -26,10 +26,11 @@
|
||||||
#ifndef NAUTILUS_ICON_FACTORY_H
|
#ifndef NAUTILUS_ICON_FACTORY_H
|
||||||
#define NAUTILUS_ICON_FACTORY_H
|
#define NAUTILUS_ICON_FACTORY_H
|
||||||
|
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
|
||||||
#include <libnautilus-private/nautilus-file.h>
|
|
||||||
#include <eel/eel-string-list.h>
|
#include <eel/eel-string-list.h>
|
||||||
|
#include <gdk/gdktypes.h>
|
||||||
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
#include <gtk/gtkobject.h>
|
#include <gtk/gtkobject.h>
|
||||||
|
#include <libnautilus-private/nautilus-file.h>
|
||||||
|
|
||||||
/* NautilusIconFactory is a class that knows how to hand out icons to be
|
/* NautilusIconFactory is a class that knows how to hand out icons to be
|
||||||
* used for representing files and some other objects. It was designed
|
* used for representing files and some other objects. It was designed
|
||||||
|
|
|
@ -1170,71 +1170,77 @@ iti_class_init (NautilusIconTextItemClass *text_item_class)
|
||||||
|
|
||||||
parent_class = gtk_type_class (gnome_canvas_item_get_type ());
|
parent_class = gtk_type_class (gnome_canvas_item_get_type ());
|
||||||
|
|
||||||
iti_signals [TEXT_CHANGED] = gtk_signal_new
|
iti_signals [TEXT_CHANGED] = g_signal_new
|
||||||
("text_changed",
|
("text_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconTextItemClass, text_changed),
|
G_STRUCT_OFFSET (NautilusIconTextItemClass, text_changed),
|
||||||
|
NULL, NULL,
|
||||||
gtk_marshal_BOOL__NONE,
|
gtk_marshal_BOOL__NONE,
|
||||||
GTK_TYPE_BOOL, 0);
|
GTK_TYPE_BOOL, 0);
|
||||||
|
|
||||||
iti_signals [TEXT_EDITED] = gtk_signal_new
|
iti_signals [TEXT_EDITED] = g_signal_new
|
||||||
("text_edited",
|
("text_edited",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconTextItemClass, text_edited),
|
G_STRUCT_OFFSET (NautilusIconTextItemClass, text_edited),
|
||||||
|
NULL, NULL,
|
||||||
gtk_marshal_NONE__NONE,
|
gtk_marshal_NONE__NONE,
|
||||||
GTK_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
iti_signals [HEIGHT_CHANGED] = gtk_signal_new
|
iti_signals [HEIGHT_CHANGED] = g_signal_new
|
||||||
("height_changed",
|
("height_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconTextItemClass, height_changed),
|
G_STRUCT_OFFSET (NautilusIconTextItemClass, height_changed),
|
||||||
|
NULL, NULL,
|
||||||
gtk_marshal_NONE__NONE,
|
gtk_marshal_NONE__NONE,
|
||||||
GTK_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
iti_signals [WIDTH_CHANGED] = gtk_signal_new
|
iti_signals [WIDTH_CHANGED] = g_signal_new
|
||||||
("width_changed",
|
("width_changed",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconTextItemClass, width_changed),
|
G_STRUCT_OFFSET (NautilusIconTextItemClass, width_changed),
|
||||||
|
NULL, NULL,
|
||||||
gtk_marshal_NONE__NONE,
|
gtk_marshal_NONE__NONE,
|
||||||
GTK_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
iti_signals[EDITING_STARTED] = gtk_signal_new
|
iti_signals[EDITING_STARTED] = g_signal_new
|
||||||
("editing_started",
|
("editing_started",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconTextItemClass, editing_started),
|
G_STRUCT_OFFSET (NautilusIconTextItemClass, editing_started),
|
||||||
|
NULL, NULL,
|
||||||
gtk_marshal_NONE__NONE,
|
gtk_marshal_NONE__NONE,
|
||||||
GTK_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
iti_signals[EDITING_STOPPED] = gtk_signal_new
|
iti_signals[EDITING_STOPPED] = g_signal_new
|
||||||
("editing_stopped",
|
("editing_stopped",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconTextItemClass, editing_stopped),
|
G_STRUCT_OFFSET (NautilusIconTextItemClass, editing_stopped),
|
||||||
|
NULL, NULL,
|
||||||
gtk_marshal_NONE__NONE,
|
gtk_marshal_NONE__NONE,
|
||||||
GTK_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
iti_signals[SELECTION_STARTED] = gtk_signal_new
|
iti_signals[SELECTION_STARTED] = g_signal_new
|
||||||
("selection_started",
|
("selection_started",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconTextItemClass, selection_started),
|
G_STRUCT_OFFSET (NautilusIconTextItemClass, selection_started),
|
||||||
|
NULL, NULL,
|
||||||
gtk_marshal_NONE__NONE,
|
gtk_marshal_NONE__NONE,
|
||||||
GTK_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
iti_signals[SELECTION_STOPPED] = gtk_signal_new
|
iti_signals[SELECTION_STOPPED] = g_signal_new
|
||||||
("selection_stopped",
|
("selection_stopped",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusIconTextItemClass, selection_stopped),
|
G_STRUCT_OFFSET (NautilusIconTextItemClass, selection_stopped),
|
||||||
|
NULL, NULL,
|
||||||
gtk_marshal_NONE__NONE,
|
gtk_marshal_NONE__NONE,
|
||||||
GTK_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, iti_signals, LAST_SIGNAL);
|
|
||||||
|
|
||||||
object_class->destroy = iti_destroy;
|
object_class->destroy = iti_destroy;
|
||||||
object_class->set_arg = iti_set_arg;
|
object_class->set_arg = iti_set_arg;
|
||||||
|
|
|
@ -11,9 +11,8 @@
|
||||||
#define NAUTILUS_ICON_TEXT_ITEM_H
|
#define NAUTILUS_ICON_TEXT_ITEM_H
|
||||||
|
|
||||||
#include <gtk/gtkeditable.h>
|
#include <gtk/gtkeditable.h>
|
||||||
#include <libgnome/gnome-defs.h>
|
#include <libgnomecanvas/gnome-canvas.h>
|
||||||
#include <libgnomeui/gnome-canvas.h>
|
#include <libgnomecanvas/gnome-icon-text.h>
|
||||||
#include <libgnomeui/gnome-icon-text.h>
|
|
||||||
|
|
||||||
#define NAUTILUS_ICON_TEXT_ITEM(obj) (GTK_CHECK_CAST((obj), \
|
#define NAUTILUS_ICON_TEXT_ITEM(obj) (GTK_CHECK_CAST((obj), \
|
||||||
nautilus_icon_text_item_get_type (), NautilusIconTextItem))
|
nautilus_icon_text_item_get_type (), NautilusIconTextItem))
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
|
|
||||||
#include <eel/eel-gtk-macros.h>
|
#include <eel/eel-gtk-macros.h>
|
||||||
|
|
||||||
static void nautilus_keep_last_vertical_box_initialize_class (NautilusKeepLastVerticalBoxClass *class);
|
static void nautilus_keep_last_vertical_box_class_init (NautilusKeepLastVerticalBoxClass *class);
|
||||||
static void nautilus_keep_last_vertical_box_initialize (NautilusKeepLastVerticalBox *box);
|
static void nautilus_keep_last_vertical_box_init (NautilusKeepLastVerticalBox *box);
|
||||||
static void nautilus_keep_last_vertical_box_size_allocate (GtkWidget *widget,
|
static void nautilus_keep_last_vertical_box_size_allocate (GtkWidget *widget,
|
||||||
GtkAllocation *allocation);
|
GtkAllocation *allocation);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusKeepLastVerticalBox, nautilus_keep_last_ve
|
||||||
|
|
||||||
/* Standard class initialization function */
|
/* Standard class initialization function */
|
||||||
static void
|
static void
|
||||||
nautilus_keep_last_vertical_box_initialize_class (NautilusKeepLastVerticalBoxClass *klass)
|
nautilus_keep_last_vertical_box_class_init (NautilusKeepLastVerticalBoxClass *klass)
|
||||||
{
|
{
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ nautilus_keep_last_vertical_box_initialize_class (NautilusKeepLastVerticalBoxCla
|
||||||
|
|
||||||
/* Standard object initialization function */
|
/* Standard object initialization function */
|
||||||
static void
|
static void
|
||||||
nautilus_keep_last_vertical_box_initialize (NautilusKeepLastVerticalBox *box)
|
nautilus_keep_last_vertical_box_init (NautilusKeepLastVerticalBox *box)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,8 @@
|
||||||
#include <eel/eel-stock-dialogs.h>
|
#include <eel/eel-stock-dialogs.h>
|
||||||
#include <eel/eel-string.h>
|
#include <eel/eel-string.h>
|
||||||
#include <eel/eel-xml-extensions.h>
|
#include <eel/eel-xml-extensions.h>
|
||||||
#include <gnome-xml/parser.h>
|
#include <libxml/parser.h>
|
||||||
#include <gnome-xml/xmlmemory.h>
|
#include <libxml/xmlmemory.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnome/gnome-util.h>
|
#include <libgnome/gnome-util.h>
|
||||||
#include <libgnomevfs/gnome-vfs-mime.h>
|
#include <libgnomevfs/gnome-vfs-mime.h>
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
|
|
||||||
#include "nautilus-file.h"
|
#include "nautilus-file.h"
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-dentry.h>
|
|
||||||
|
|
||||||
|
|
||||||
gboolean nautilus_link_desktop_file_local_create (const char *directory_path,
|
gboolean nautilus_link_desktop_file_local_create (const char *directory_path,
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
#include <eel/eel-string.h>
|
#include <eel/eel-string.h>
|
||||||
#include <eel/eel-vfs-extensions.h>
|
#include <eel/eel-vfs-extensions.h>
|
||||||
#include <eel/eel-xml-extensions.h>
|
#include <eel/eel-xml-extensions.h>
|
||||||
#include <gnome-xml/parser.h>
|
#include <libxml/parser.h>
|
||||||
#include <gnome-xml/xmlmemory.h>
|
#include <libxml/xmlmemory.h>
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <libgnome/gnome-util.h>
|
#include <libgnome/gnome-util.h>
|
||||||
#include <libgnomevfs/gnome-vfs-mime.h>
|
#include <libgnomevfs/gnome-vfs-mime.h>
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
|
|
||||||
#include "nautilus-file.h"
|
#include "nautilus-file.h"
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-dentry.h>
|
|
||||||
|
|
||||||
gboolean nautilus_link_historical_local_create (const char *directory_path,
|
gboolean nautilus_link_historical_local_create (const char *directory_path,
|
||||||
const char *name,
|
const char *name,
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
|
|
||||||
#include "nautilus-file.h"
|
#include "nautilus-file.h"
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-dentry.h>
|
|
||||||
|
|
||||||
/* Link types */
|
/* Link types */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -112,8 +110,11 @@ char * nautilus_link_get_link_name_given_file_contents (const char
|
||||||
int link_file_size);
|
int link_file_size);
|
||||||
char * nautilus_link_get_link_icon_given_file_contents (const char *file_contents,
|
char * nautilus_link_get_link_icon_given_file_contents (const char *file_contents,
|
||||||
int link_file_size);
|
int link_file_size);
|
||||||
|
|
||||||
|
#ifdef GNOME2_CONVERSION_COMPLETE
|
||||||
void nautilus_link_local_create_from_gnome_entry (GnomeDesktopEntry *entry,
|
void nautilus_link_local_create_from_gnome_entry (GnomeDesktopEntry *entry,
|
||||||
const char *dest_path,
|
const char *dest_path,
|
||||||
const GdkPoint *position);
|
const GdkPoint *position);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* NAUTILUS_LINK_H */
|
#endif /* NAUTILUS_LINK_H */
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include "nautilus-medusa-support.h"
|
#include "nautilus-medusa-support.h"
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
|
|
||||||
#include <eel/eel-glib-extensions.h>
|
#include <eel/eel-glib-extensions.h>
|
||||||
|
|
|
@ -68,9 +68,9 @@ enum {
|
||||||
|
|
||||||
static guint signals[LAST_SIGNAL];
|
static guint signals[LAST_SIGNAL];
|
||||||
|
|
||||||
static void nautilus_merged_directory_initialize (gpointer object,
|
static void nautilus_merged_directory_init (gpointer object,
|
||||||
gpointer klass);
|
gpointer klass);
|
||||||
static void nautilus_merged_directory_initialize_class (gpointer klass);
|
static void nautilus_merged_directory_class_init (gpointer klass);
|
||||||
static void remove_all_real_directories (NautilusMergedDirectory *merged);
|
static void remove_all_real_directories (NautilusMergedDirectory *merged);
|
||||||
static guint merged_callback_hash (gconstpointer merged_callback);
|
static guint merged_callback_hash (gconstpointer merged_callback);
|
||||||
static gboolean merged_callback_equal (gconstpointer merged_callback,
|
static gboolean merged_callback_equal (gconstpointer merged_callback,
|
||||||
|
@ -81,7 +81,7 @@ EEL_DEFINE_CLASS_BOILERPLATE (NautilusMergedDirectory,
|
||||||
NAUTILUS_TYPE_DIRECTORY)
|
NAUTILUS_TYPE_DIRECTORY)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_merged_directory_initialize (gpointer object, gpointer klass)
|
nautilus_merged_directory_init (gpointer object, gpointer klass)
|
||||||
{
|
{
|
||||||
NautilusMergedDirectory *merged;
|
NautilusMergedDirectory *merged;
|
||||||
|
|
||||||
|
@ -622,7 +622,7 @@ remove_all_real_directories (NautilusMergedDirectory *merged)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_merged_directory_initialize_class (gpointer klass)
|
nautilus_merged_directory_class_init (gpointer klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
NautilusDirectoryClass *directory_class;
|
NautilusDirectoryClass *directory_class;
|
||||||
|
@ -647,21 +647,21 @@ nautilus_merged_directory_initialize_class (gpointer klass)
|
||||||
merged_directory_class->remove_real_directory = merged_remove_real_directory;
|
merged_directory_class->remove_real_directory = merged_remove_real_directory;
|
||||||
|
|
||||||
signals[ADD_REAL_DIRECTORY]
|
signals[ADD_REAL_DIRECTORY]
|
||||||
= gtk_signal_new ("add_real_directory",
|
= g_signal_new ("add_real_directory",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusMergedDirectoryClass,
|
G_STRUCT_OFFSET (NautilusMergedDirectoryClass,
|
||||||
add_real_directory),
|
add_real_directory),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
||||||
signals[REMOVE_REAL_DIRECTORY]
|
signals[REMOVE_REAL_DIRECTORY]
|
||||||
= gtk_signal_new ("remove_real_directory",
|
= g_signal_new ("remove_real_directory",
|
||||||
GTK_RUN_LAST,
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
object_class->type,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (NautilusMergedDirectoryClass,
|
G_STRUCT_OFFSET (NautilusMergedDirectoryClass,
|
||||||
remove_real_directory),
|
remove_real_directory),
|
||||||
gtk_marshal_NONE__POINTER,
|
NULL, NULL,
|
||||||
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
G_TYPE_NONE, 1, GTK_TYPE_POINTER);
|
||||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1852,7 +1852,7 @@ metafile_read_done_callback (GnomeVFSResult result,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The gnome-xml parser requires a zero-terminated array. */
|
/* The libxml parser requires a zero-terminated array. */
|
||||||
buffer = g_realloc (file_contents, size + 1);
|
buffer = g_realloc (file_contents, size + 1);
|
||||||
buffer[size] = '\0';
|
buffer[size] = '\0';
|
||||||
nautilus_metafile_set_metafile_contents (metafile,
|
nautilus_metafile_set_metafile_contents (metafile,
|
||||||
|
|
|
@ -46,7 +46,7 @@ static gboolean string_not_in_list (const char
|
||||||
GList *list);
|
GList *list);
|
||||||
static char *mime_type_get_supertype (const char *mime_type);
|
static char *mime_type_get_supertype (const char *mime_type);
|
||||||
static GList *get_explicit_content_view_iids_from_metafile (NautilusFile *file);
|
static GList *get_explicit_content_view_iids_from_metafile (NautilusFile *file);
|
||||||
static gboolean server_has_content_requirements (OAF_ServerInfo *server);
|
static gboolean server_has_content_requirements (Bonobo_ServerInfo *server);
|
||||||
static gboolean application_supports_uri_scheme (gpointer data,
|
static gboolean application_supports_uri_scheme (gpointer data,
|
||||||
gpointer uri_scheme);
|
gpointer uri_scheme);
|
||||||
static GList *nautilus_do_component_query (const char *mime_type,
|
static GList *nautilus_do_component_query (const char *mime_type,
|
||||||
|
@ -297,10 +297,10 @@ nautilus_mime_get_default_component_sort_conditions (NautilusFile *file, char *d
|
||||||
prev = sort_conditions[1];
|
prev = sort_conditions[1];
|
||||||
|
|
||||||
if (p->next != NULL) {
|
if (p->next != NULL) {
|
||||||
sort_conditions[1] = g_strconcat (prev, ((OAF_ServerInfo *) (p->data))->iid,
|
sort_conditions[1] = g_strconcat (prev, ((Bonobo_ServerInfo *) (p->data))->iid,
|
||||||
"','", NULL);
|
"','", NULL);
|
||||||
} else {
|
} else {
|
||||||
sort_conditions[1] = g_strconcat (prev, ((OAF_ServerInfo *) (p->data))->iid,
|
sort_conditions[1] = g_strconcat (prev, ((Bonobo_ServerInfo *) (p->data))->iid,
|
||||||
"'])", NULL);
|
"'])", NULL);
|
||||||
}
|
}
|
||||||
g_free (prev);
|
g_free (prev);
|
||||||
|
@ -334,18 +334,18 @@ nautilus_mime_get_default_component_sort_conditions (NautilusFile *file, char *d
|
||||||
return sort_conditions;
|
return sort_conditions;
|
||||||
}
|
}
|
||||||
|
|
||||||
static OAF_ServerInfo *
|
static Bonobo_ServerInfo *
|
||||||
nautilus_mime_get_default_component_for_file_internal (NautilusFile *file,
|
nautilus_mime_get_default_component_for_file_internal (NautilusFile *file,
|
||||||
gboolean *user_chosen)
|
gboolean *user_chosen)
|
||||||
{
|
{
|
||||||
GList *info_list;
|
GList *info_list;
|
||||||
OAF_ServerInfo *mime_default;
|
Bonobo_ServerInfo *mime_default;
|
||||||
char *default_component_string;
|
char *default_component_string;
|
||||||
char *mime_type;
|
char *mime_type;
|
||||||
char *uri_scheme;
|
char *uri_scheme;
|
||||||
GList *item_mime_types;
|
GList *item_mime_types;
|
||||||
GList *explicit_iids;
|
GList *explicit_iids;
|
||||||
OAF_ServerInfo *server;
|
Bonobo_ServerInfo *server;
|
||||||
char **sort_conditions;
|
char **sort_conditions;
|
||||||
char *extra_requirements;
|
char *extra_requirements;
|
||||||
gboolean used_user_chosen_info;
|
gboolean used_user_chosen_info;
|
||||||
|
@ -408,7 +408,7 @@ nautilus_mime_get_default_component_for_file_internal (NautilusFile *file,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info_list != NULL) {
|
if (info_list != NULL) {
|
||||||
server = OAF_ServerInfo_duplicate (info_list->data);
|
server = Bonobo_ServerInfo_duplicate (info_list->data);
|
||||||
gnome_vfs_mime_component_list_free (info_list);
|
gnome_vfs_mime_component_list_free (info_list);
|
||||||
|
|
||||||
if (default_component_string != NULL && strcmp (server->iid, default_component_string) == 0) {
|
if (default_component_string != NULL && strcmp (server->iid, default_component_string) == 0) {
|
||||||
|
@ -433,7 +433,7 @@ nautilus_mime_get_default_component_for_file_internal (NautilusFile *file,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OAF_ServerInfo *
|
Bonobo_ServerInfo *
|
||||||
nautilus_mime_get_default_component_for_file (NautilusFile *file)
|
nautilus_mime_get_default_component_for_file (NautilusFile *file)
|
||||||
{
|
{
|
||||||
return nautilus_mime_get_default_component_for_file_internal (file, NULL);
|
return nautilus_mime_get_default_component_for_file_internal (file, NULL);
|
||||||
|
@ -442,7 +442,7 @@ nautilus_mime_get_default_component_for_file (NautilusFile *file)
|
||||||
gboolean
|
gboolean
|
||||||
nautilus_mime_is_default_component_for_file_user_chosen (NautilusFile *file)
|
nautilus_mime_is_default_component_for_file_user_chosen (NautilusFile *file)
|
||||||
{
|
{
|
||||||
OAF_ServerInfo *component;
|
Bonobo_ServerInfo *component;
|
||||||
gboolean user_chosen;
|
gboolean user_chosen;
|
||||||
|
|
||||||
component = nautilus_mime_get_default_component_for_file_internal (file, &user_chosen);
|
component = nautilus_mime_get_default_component_for_file_internal (file, &user_chosen);
|
||||||
|
@ -557,7 +557,7 @@ nautilus_mime_get_short_list_components_for_file (NautilusFile *file)
|
||||||
GList *metadata_component_add_ids;
|
GList *metadata_component_add_ids;
|
||||||
GList *metadata_component_remove_ids;
|
GList *metadata_component_remove_ids;
|
||||||
GList *p;
|
GList *p;
|
||||||
OAF_ServerInfo *component;
|
Bonobo_ServerInfo *component;
|
||||||
GList *explicit_iids;
|
GList *explicit_iids;
|
||||||
char *extra_sort_conditions[2];
|
char *extra_sort_conditions[2];
|
||||||
char *extra_requirements;
|
char *extra_requirements;
|
||||||
|
@ -589,7 +589,7 @@ nautilus_mime_get_short_list_components_for_file (NautilusFile *file)
|
||||||
iids = NULL;
|
iids = NULL;
|
||||||
|
|
||||||
for (p = servers; p != NULL; p = p->next) {
|
for (p = servers; p != NULL; p = p->next) {
|
||||||
component = (OAF_ServerInfo *) p->data;
|
component = (Bonobo_ServerInfo *) p->data;
|
||||||
|
|
||||||
iids = g_list_prepend (iids, component->iid);
|
iids = g_list_prepend (iids, component->iid);
|
||||||
}
|
}
|
||||||
|
@ -751,7 +751,7 @@ nautilus_mime_actions_file_needs_full_file_attributes (NautilusFile *file)
|
||||||
needs_full_attributes = FALSE;
|
needs_full_attributes = FALSE;
|
||||||
|
|
||||||
for (p = info_list; p != NULL; p = p->next) {
|
for (p = info_list; p != NULL; p = p->next) {
|
||||||
needs_full_attributes |= server_has_content_requirements ((OAF_ServerInfo *) (p->data));
|
needs_full_attributes |= server_has_content_requirements ((Bonobo_ServerInfo *) (p->data));
|
||||||
}
|
}
|
||||||
|
|
||||||
gnome_vfs_mime_component_list_free (info_list);
|
gnome_vfs_mime_component_list_free (info_list);
|
||||||
|
@ -968,7 +968,7 @@ nautilus_mime_set_short_list_components_for_file (NautilusFile *file,
|
||||||
|
|
||||||
normal_short_list_ids = NULL;
|
normal_short_list_ids = NULL;
|
||||||
for (p = normal_short_list; p != NULL; p = p->next) {
|
for (p = normal_short_list; p != NULL; p = p->next) {
|
||||||
normal_short_list_ids = g_list_prepend (normal_short_list_ids, ((OAF_ServerInfo *) p->data)->iid);
|
normal_short_list_ids = g_list_prepend (normal_short_list_ids, ((Bonobo_ServerInfo *) p->data)->iid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* compute delta */
|
/* compute delta */
|
||||||
|
@ -1241,7 +1241,7 @@ get_explicit_content_view_iids_from_metafile (NautilusFile *file)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
make_oaf_query_for_explicit_content_view_iids (GList *view_iids)
|
make_bonobo_activation_query_for_explicit_content_view_iids (GList *view_iids)
|
||||||
{
|
{
|
||||||
GList *p;
|
GList *p;
|
||||||
char *iid;
|
char *iid;
|
||||||
|
@ -1278,7 +1278,7 @@ make_oaf_query_for_explicit_content_view_iids (GList *view_iids)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
make_oaf_query_with_known_mime_type (const char *mime_type,
|
make_bonobo_activation_query_with_known_mime_type (const char *mime_type,
|
||||||
const char *uri_scheme,
|
const char *uri_scheme,
|
||||||
GList *explicit_iids,
|
GList *explicit_iids,
|
||||||
const char *extra_requirements)
|
const char *extra_requirements)
|
||||||
|
@ -1289,7 +1289,7 @@ make_oaf_query_with_known_mime_type (const char *mime_type,
|
||||||
|
|
||||||
mime_supertype = mime_type_get_supertype (mime_type);
|
mime_supertype = mime_type_get_supertype (mime_type);
|
||||||
|
|
||||||
explicit_iid_query = make_oaf_query_for_explicit_content_view_iids (explicit_iids);
|
explicit_iid_query = make_bonobo_activation_query_for_explicit_content_view_iids (explicit_iids);
|
||||||
|
|
||||||
result = g_strdup_printf
|
result = g_strdup_printf
|
||||||
(
|
(
|
||||||
|
@ -1380,14 +1380,14 @@ make_oaf_query_with_known_mime_type (const char *mime_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
make_oaf_query_with_uri_scheme_only (const char *uri_scheme,
|
make_bonobo_activation_query_with_uri_scheme_only (const char *uri_scheme,
|
||||||
GList *explicit_iids,
|
GList *explicit_iids,
|
||||||
const char *extra_requirements)
|
const char *extra_requirements)
|
||||||
{
|
{
|
||||||
char *result;
|
char *result;
|
||||||
char *explicit_iid_query;
|
char *explicit_iid_query;
|
||||||
|
|
||||||
explicit_iid_query = make_oaf_query_for_explicit_content_view_iids (explicit_iids);
|
explicit_iid_query = make_bonobo_activation_query_for_explicit_content_view_iids (explicit_iids);
|
||||||
|
|
||||||
result = g_strdup_printf
|
result = g_strdup_printf
|
||||||
(
|
(
|
||||||
|
@ -1495,11 +1495,11 @@ mime_type_hash_table_destroy (GHashTable *table)
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
server_has_content_requirements (OAF_ServerInfo *server)
|
server_has_content_requirements (Bonobo_ServerInfo *server)
|
||||||
{
|
{
|
||||||
OAF_Property *prop;
|
OAF_Property *prop;
|
||||||
|
|
||||||
prop = oaf_server_info_prop_find (server, "nautilus:required_directory_content_mime_types");
|
prop = bonobo_activation_server_info_prop_find (server, "nautilus:required_directory_content_mime_types");
|
||||||
|
|
||||||
if (prop == NULL || prop->v._d != OAF_P_STRINGV) {
|
if (prop == NULL || prop->v._d != OAF_P_STRINGV) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1509,7 +1509,7 @@ server_has_content_requirements (OAF_ServerInfo *server)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
server_matches_content_requirements (OAF_ServerInfo *server,
|
server_matches_content_requirements (Bonobo_ServerInfo *server,
|
||||||
GHashTable *type_table,
|
GHashTable *type_table,
|
||||||
GList *explicit_iids)
|
GList *explicit_iids)
|
||||||
{
|
{
|
||||||
|
@ -1525,7 +1525,7 @@ server_matches_content_requirements (OAF_ServerInfo *server,
|
||||||
if (!server_has_content_requirements (server)) {
|
if (!server_has_content_requirements (server)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
prop = oaf_server_info_prop_find (server, "nautilus:required_directory_content_mime_types");
|
prop = bonobo_activation_server_info_prop_find (server, "nautilus:required_directory_content_mime_types");
|
||||||
|
|
||||||
types = prop->v._u.value_stringv;
|
types = prop->v._u.value_stringv;
|
||||||
|
|
||||||
|
@ -1560,42 +1560,42 @@ nautilus_do_component_query (const char *mime_type,
|
||||||
char **extra_sort_criteria,
|
char **extra_sort_criteria,
|
||||||
char *extra_requirements)
|
char *extra_requirements)
|
||||||
{
|
{
|
||||||
OAF_ServerInfoList *oaf_result;
|
Bonobo_ServerInfoList *bonobo_activation_result;
|
||||||
char *query;
|
char *query;
|
||||||
GList *retval;
|
GList *retval;
|
||||||
char **all_sort_criteria;
|
char **all_sort_criteria;
|
||||||
CORBA_Environment ev;
|
CORBA_Environment ev;
|
||||||
|
|
||||||
oaf_result = NULL;
|
bonobo_activation_result = NULL;
|
||||||
query = NULL;
|
query = NULL;
|
||||||
|
|
||||||
if (is_known_mime_type (mime_type)) {
|
if (is_known_mime_type (mime_type)) {
|
||||||
query = make_oaf_query_with_known_mime_type (mime_type, uri_scheme, explicit_iids, extra_requirements);
|
query = make_bonobo_activation_query_with_known_mime_type (mime_type, uri_scheme, explicit_iids, extra_requirements);
|
||||||
} else {
|
} else {
|
||||||
query = make_oaf_query_with_uri_scheme_only (uri_scheme, explicit_iids, extra_requirements);
|
query = make_bonobo_activation_query_with_uri_scheme_only (uri_scheme, explicit_iids, extra_requirements);
|
||||||
}
|
}
|
||||||
|
|
||||||
all_sort_criteria = strv_concat (extra_sort_criteria, nautilus_sort_criteria);
|
all_sort_criteria = strv_concat (extra_sort_criteria, nautilus_sort_criteria);
|
||||||
|
|
||||||
CORBA_exception_init (&ev);
|
CORBA_exception_init (&ev);
|
||||||
|
|
||||||
oaf_result = oaf_query (query, all_sort_criteria, &ev);
|
bonobo_activation_result = bonobo_activation_query (query, all_sort_criteria, &ev);
|
||||||
|
|
||||||
g_free (all_sort_criteria);
|
g_free (all_sort_criteria);
|
||||||
g_free (query);
|
g_free (query);
|
||||||
|
|
||||||
retval = NULL;
|
retval = NULL;
|
||||||
|
|
||||||
if (ev._major == CORBA_NO_EXCEPTION && oaf_result != NULL && oaf_result->_length > 0) {
|
if (ev._major == CORBA_NO_EXCEPTION && bonobo_activation_result != NULL && bonobo_activation_result->_length > 0) {
|
||||||
GHashTable *content_types;
|
GHashTable *content_types;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
content_types = mime_type_list_to_hash_table (item_mime_types);
|
content_types = mime_type_list_to_hash_table (item_mime_types);
|
||||||
|
|
||||||
for (i = 0; i < oaf_result->_length; i++) {
|
for (i = 0; i < bonobo_activation_result->_length; i++) {
|
||||||
OAF_ServerInfo *server;
|
Bonobo_ServerInfo *server;
|
||||||
|
|
||||||
server = &oaf_result->_buffer[i];
|
server = &bonobo_activation_result->_buffer[i];
|
||||||
|
|
||||||
if (ignore_content_mime_types ||
|
if (ignore_content_mime_types ||
|
||||||
server_matches_content_requirements (server, content_types, explicit_iids)) {
|
server_matches_content_requirements (server, content_types, explicit_iids)) {
|
||||||
|
@ -1605,7 +1605,7 @@ nautilus_do_component_query (const char *mime_type,
|
||||||
if (server->iid != NULL && strcmp (server->iid, "OAFIID:Bonobo_Sample_Text") != 0) {
|
if (server->iid != NULL && strcmp (server->iid, "OAFIID:Bonobo_Sample_Text") != 0) {
|
||||||
retval = g_list_prepend
|
retval = g_list_prepend
|
||||||
(retval,
|
(retval,
|
||||||
OAF_ServerInfo_duplicate (server));
|
Bonobo_ServerInfo_duplicate (server));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1613,7 +1613,7 @@ nautilus_do_component_query (const char *mime_type,
|
||||||
mime_type_hash_table_destroy (content_types);
|
mime_type_hash_table_destroy (content_types);
|
||||||
}
|
}
|
||||||
|
|
||||||
CORBA_free (oaf_result);
|
CORBA_free (bonobo_activation_result);
|
||||||
|
|
||||||
CORBA_exception_free (&ev);
|
CORBA_exception_free (&ev);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#include <fam.h>
|
#include <fam.h>
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
#include <gmodule.h>
|
#include <gmodule.h>
|
||||||
#include <libgnome/gnome-defs.h>
|
|
||||||
#include <libgnome/gnome-util.h>
|
#include <libgnome/gnome-util.h>
|
||||||
#include <libgnomevfs/gnome-vfs-utils.h>
|
#include <libgnomevfs/gnome-vfs-utils.h>
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue