Commit 639ce8e4 authored by Darin Adler's avatar Darin Adler
Browse files

Remove unneeded code and restore display-specific registration. This gets

	* components/hardware/main.c: (main):
	* components/image-viewer/nautilus-image-view.c:
	(init_server_factory):
	* components/loser/content/main.c: (main):
	* components/loser/sidebar/main.c: (main):
	* components/throbber/main.c: (main):
	* libnautilus/nautilus-view-standard-main.c:
	(nautilus_view_standard_main_multi),
	(nautilus_view_create_from_get_type_function):
	* src/nautilus-main.c: (main):
	Remove unneeded code and restore display-specific registration.
	This gets rid of a bunch of GNOME2_CONVERSION_COMPLETE ifdefs.

	* libnautilus-private/nautilus-directory-metafile-monitor.h:
	* libnautilus-private/nautilus-metafile-factory.c:
	* libnautilus-private/nautilus-metafile-factory.h:
	* libnautilus-private/nautilus-metafile.h:
	These had emacs mode lines that said they were IDL files.

	* libnautilus-private/nautilus-directory-metafile-monitor.c:
	* libnautilus-private/nautilus-metafile-factory.c:
	* libnautilus-private/nautilus-metafile.c:
	* libnautilus-private/nautilus-undo-context.c:
	* libnautilus-private/nautilus-undo-manager.c:
	* libnautilus/nautilus-undo-transaction.c:
	* src/nautilus-application.c:
	* src/nautilus-shell.c:
	* src/nautilus-view-frame-corba.c:
	Use BONOBO_CLASS_BOILERPLATE_FULL instead of EEL_BONOBO_BOILERPLATE_FULL.

	* src/nautilus-sidebar-title.c: (measure_width_callback),
	(update_more_info): First cut at implementing date that fits into
	sidebar. Not working yet.

	* src/nautilus-theme-selector.c:
	(install_theme_button_clicked_callback):
	Remove eel_gtk_window_set_up_close_accelerator call, since this is a
	GtkDialog that comes its own close accelerator.
parent be14640d
2002-01-16 Darin Adler <darin@bentspoon.com>
* components/hardware/main.c: (main):
* components/image-viewer/nautilus-image-view.c:
(init_server_factory):
* components/loser/content/main.c: (main):
* components/loser/sidebar/main.c: (main):
* components/throbber/main.c: (main):
* libnautilus/nautilus-view-standard-main.c:
(nautilus_view_standard_main_multi),
(nautilus_view_create_from_get_type_function):
* src/nautilus-main.c: (main):
Remove unneeded code and restore display-specific registration.
This gets rid of a bunch of GNOME2_CONVERSION_COMPLETE ifdefs.
* libnautilus-private/nautilus-directory-metafile-monitor.h:
* libnautilus-private/nautilus-metafile-factory.c:
* libnautilus-private/nautilus-metafile-factory.h:
* libnautilus-private/nautilus-metafile.h:
These had emacs mode lines that said they were IDL files.
* libnautilus-private/nautilus-directory-metafile-monitor.c:
* libnautilus-private/nautilus-metafile-factory.c:
* libnautilus-private/nautilus-metafile.c:
* libnautilus-private/nautilus-undo-context.c:
* libnautilus-private/nautilus-undo-manager.c:
* libnautilus/nautilus-undo-transaction.c:
* src/nautilus-application.c:
* src/nautilus-shell.c:
* src/nautilus-view-frame-corba.c:
Use BONOBO_CLASS_BOILERPLATE_FULL instead of EEL_BONOBO_BOILERPLATE_FULL.
* src/nautilus-sidebar-title.c: (measure_width_callback),
(update_more_info): First cut at implementing date that fits into
sidebar. Not working yet.
* src/nautilus-theme-selector.c:
(install_theme_button_clicked_callback):
Remove eel_gtk_window_set_up_close_accelerator call, since this is a
GtkDialog that comes its own close accelerator.
=== nautilus 1.1.2 ===
2002-01-16 Darin Adler <darin@bentspoon.com>
......
......@@ -68,10 +68,7 @@ hardware_view_make_object (BonoboGenericFactory *factory,
int main(int argc, char *argv[])
{
BonoboGenericFactory *factory;
CORBA_Environment ev;
#ifdef GNOME2_CONVERSION_COMPLETE
char *registration_id;
#endif
/* Initialize gettext support */
#ifdef ENABLE_NLS /* sadly we need this ifdef because otherwise the following get empty statement warnings */
......@@ -84,34 +81,11 @@ int main(int argc, char *argv[])
eel_make_warnings_and_criticals_stop_in_debugger ();
}
CORBA_exception_init(&ev);
#ifdef GNOME2_CONVERSION_COMPLETE
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
orb = bonobo_activation_init (argc, argv);
gnome_init ("nautilus-hardware-view", VERSION,
argc, argv);
bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL);
/* initialize gnome-vfs, etc */
g_thread_init (NULL);
gnome_vfs_init ();
#endif
bonobo_ui_init ("nautilus-hardware-view", VERSION, &argc, argv);
#ifdef GNOME2_CONVERSION_COMPLETE
registration_id = bonobo_activation_make_registration_id ("OAFIID:nautilus_hardware_view_factory:8c80e55a-5c03-4403-9e51-3a5711b8a5ce",
getenv ("DISPLAY"));
#endif
factory = bonobo_generic_factory_new (IID,
hardware_view_make_object,
NULL);
#ifdef GNOME2_CONVERSION_COMPLETE
registration_id = bonobo_activation_make_registration_id (IID, getenv ("DISPLAY"));
factory = bonobo_generic_factory_new (registration_id, hardware_view_make_object, NULL);
g_free (registration_id);
#endif
bonobo_activate ();
do {
......
......@@ -819,27 +819,13 @@ init_bonobo_image_generic_factory (void)
static void
init_server_factory (int argc, char **argv)
{
CORBA_Environment ev;
CORBA_exception_init (&ev);
/* Disable session manager connection */
#ifdef GNOME2_CONVERSION_COMPLETE
gnome_client_disable_master_connection ();
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
bonobo_activation_init (argc, argv);
gnome_init ("bonobo-image-generic", VERSION,
argc, argv);
gdk_rgb_init ();
if (!bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL))
g_error (_("I could not initialize Bonobo"));
#endif
if (!bonobo_ui_init ("bonobo-image-generic", VERSION, &argc, argv))
g_error (_("I could not initialize Bonobo"));
CORBA_exception_free (&ev);
}
int
......
......@@ -72,31 +72,19 @@ loser_make_object (BonoboGenericFactory *factory,
int main(int argc, char *argv[])
{
BonoboGenericFactory *factory;
CORBA_Environment ev;
#if GNOME2_CONVERSION_COMPLETE
char *registration_id;
#endif
CORBA_exception_init(&ev);
nautilus_content_loser_maybe_fail ("pre-init");
#if GNOME2_CONVERSION_COMPLETE
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
#endif
bonobo_ui_init ("nautilus-content-loser", VERSION, &argc, argv);
nautilus_content_loser_maybe_fail ("post-init");
#if GNOME2_CONVERSION_COMPLETE
registration_id = bonobo_activation_make_registration_id ("OAFIID:nautilus_content_loser_factory:adf30e75-3b63-4360-8784-a8e239390a69", getenv ("DISPLAY"));
#endif
factory = bonobo_generic_factory_new ("OAFIID:nautilus_content_loser_factory:adf30e75-3b63-4360-8784-a8e239390a69",
factory = bonobo_generic_factory_new (registration_id,
loser_make_object,
NULL);
#if GNOME2_CONVERSION_COMPLETE
g_free (registration_id);
#endif
nautilus_content_loser_maybe_fail ("post-factory-init");
......
......@@ -73,31 +73,21 @@ int main(int argc, char *argv[])
{
BonoboGenericFactory *factory;
CORBA_Environment ev;
#if GNOME2_CONVERSION_COMPLETE
char *registration_id;
#endif
CORBA_exception_init (&ev);
nautilus_sidebar_loser_maybe_fail ("pre-init");
#if GNOME2_CONVERSION_COMPLETE
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
#endif
bonobo_ui_init ("nautilus-sidebar-loser", VERSION, &argc, argv);
nautilus_sidebar_loser_maybe_fail ("post-init");
#if GNOME2_CONVERSION_COMPLETE
registration_id = bonobo_activation_make_registration_id ("OAFIID:nautilus_sidebar_loser_factory:5d9aadfa-a8a4-4ec0-8332-d6f806c211fa", getenv ("DISPLAY"));
#endif
factory = bonobo_generic_factory_new ("OAFIID:nautilus_sidebar_loser_factory:5d9aadfa-a8a4-4ec0-8332-d6f806c211fa",
loser_make_object,
NULL);
#if GNOME2_CONVERSION_COMPLETE
g_free (registration_id);
#endif
nautilus_sidebar_loser_maybe_fail ("post-factory-init");
......
......@@ -68,9 +68,7 @@ int
main (int argc, char *argv[])
{
BonoboGenericFactory *factory;
#ifdef GNOME2_CONVERSION_COMPLETE
char *registration_id;
#endif
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
eel_make_warnings_and_criticals_stop_in_debugger ();
......@@ -79,30 +77,16 @@ main (int argc, char *argv[])
/* Disable session manager connection */
#ifdef GNOME2_CONVERSION_COMPLETE
gnome_client_disable_master_connection ();
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
orb = bonobo_activation_init (argc, argv);
gnome_init ("nautilus-throbber", VERSION, argc, argv);
g_thread_init (NULL);
gdk_rgb_init ();
gnome_vfs_init ();
bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL);
#endif
bonobo_ui_init ("nautilus-throbber", VERSION, &argc, argv);
nautilus_global_preferences_init ();
#ifdef GNOME2_CONVERSION_COMPLETE
registration_id = bonobo_activation_make_registration_id ("OAFIID:nautilus_throbber_factory", g_getenv ("DISPLAY"));
#endif
factory = bonobo_generic_factory_new ("OAFIID:nautilus_throbber_factory",
throbber_make_object,
NULL);
#ifdef GNOME2_CONVERSION_COMPLETE
g_free (registration_id);
#endif
if (factory != NULL) {
bonobo_activate ();
......
......@@ -34,16 +34,12 @@ struct NautilusMetafileMonitorDetails {
NautilusDirectory *directory;
};
static void nautilus_metafile_monitor_init (NautilusMetafileMonitor *monitor);
static void nautilus_metafile_monitor_class_init (NautilusMetafileMonitorClass *klass);
EEL_BONOBO_BOILERPLATE_FULL (NautilusMetafileMonitor,
Nautilus_MetafileMonitor,
nautilus_metafile_monitor,
BONOBO_OBJECT_TYPE)
BONOBO_CLASS_BOILERPLATE_FULL (NautilusMetafileMonitor, nautilus_metafile_monitor,
Nautilus_MetafileMonitor,
BonoboObject, BONOBO_OBJECT_TYPE)
static void
nautilus_metafile_monitor_init (NautilusMetafileMonitor *monitor)
nautilus_metafile_monitor_instance_init (NautilusMetafileMonitor *monitor)
{
monitor->details = g_new0 (NautilusMetafileMonitorDetails, 1);
}
......
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
/* nautilus-directory-metafile-monitor.h
*
......
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
/* nautilus-metafile.c - server side of Nautilus::MetafileFactory
*
......@@ -31,16 +31,12 @@ struct NautilusMetafileFactoryDetails {
char dummy; /* ANSI C does not allow empty structs */
};
static void nautilus_metafile_factory_init (NautilusMetafileFactory *factory);
static void nautilus_metafile_factory_class_init (NautilusMetafileFactoryClass *klass);
EEL_BONOBO_BOILERPLATE_FULL (NautilusMetafileFactory,
Nautilus_MetafileFactory,
nautilus_metafile_factory,
BONOBO_OBJECT_TYPE)
BONOBO_CLASS_BOILERPLATE_FULL (NautilusMetafileFactory, nautilus_metafile_factory,
Nautilus_MetafileFactory,
BonoboObject, BONOBO_OBJECT_TYPE)
static void
nautilus_metafile_factory_init (NautilusMetafileFactory *factory)
nautilus_metafile_factory_instance_init (NautilusMetafileFactory *factory)
{
factory->details = g_new0 (NautilusMetafileFactoryDetails, 1);
}
......
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
/* nautilus-metafile.h - server side of Nautilus::MetafileFactory
*
......
......@@ -58,9 +58,6 @@
| GNOME_VFS_PERM_GROUP_ALL \
| GNOME_VFS_PERM_OTHER_ALL)
static void nautilus_metafile_init (NautilusMetafile *metafile);
static void nautilus_metafile_class_init (NautilusMetafileClass *klass);
static char *get_file_metadata (NautilusMetafile *metafile,
const char *file_name,
const char *key,
......@@ -104,10 +101,9 @@ static void async_read_cancel (NautilusMetafile *metafile);
static void nautilus_metafile_set_metafile_contents (NautilusMetafile *metafile,
xmlDocPtr metafile_contents);
EEL_BONOBO_BOILERPLATE_FULL (NautilusMetafile,
BONOBO_CLASS_BOILERPLATE_FULL (NautilusMetafile, nautilus_metafile,
Nautilus_Metafile,
nautilus_metafile,
BONOBO_OBJECT_TYPE)
BonoboObject, BONOBO_OBJECT_TYPE)
typedef struct MetafileReadState {
gboolean use_public_metafile;
......@@ -147,7 +143,7 @@ struct NautilusMetafileDetails {
static GHashTable *metafiles;
static void
nautilus_metafile_init (NautilusMetafile *metafile)
nautilus_metafile_instance_init (NautilusMetafile *metafile)
{
metafile->details = g_new0 (NautilusMetafileDetails, 1);
......
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
/* nautilus-metafile.h - server side of Nautilus::Metafile
*
......
......@@ -30,14 +30,9 @@
#include <bonobo/bonobo-main.h>
#include <gtk/gtksignal.h>
/* GtkObject */
static void nautilus_undo_context_class_init (NautilusUndoContextClass *class);
static void nautilus_undo_context_init (NautilusUndoContext *item);
EEL_BONOBO_BOILERPLATE_FULL (NautilusUndoContext,
BONOBO_CLASS_BOILERPLATE_FULL (NautilusUndoContext, nautilus_undo_context,
Nautilus_Undo_Context,
nautilus_undo_context,
BONOBO_OBJECT_TYPE)
BonoboObject, BONOBO_OBJECT_TYPE)
static Nautilus_Undo_Manager
impl_Nautilus_Undo_Context__get_undo_manager (PortableServer_Servant servant,
......@@ -66,7 +61,7 @@ nautilus_undo_context_new (Nautilus_Undo_Manager undo_manager)
}
static void
nautilus_undo_context_init (NautilusUndoContext *context)
nautilus_undo_context_instance_init (NautilusUndoContext *context)
{
}
......
......@@ -61,14 +61,9 @@ typedef struct {
char *no_undo_menu_item_hint;
} UndoMenuHandlerConnection;
/* GtkObject */
static void nautilus_undo_manager_class_init (NautilusUndoManagerClass *class);
static void nautilus_undo_manager_init (NautilusUndoManager *item);
EEL_BONOBO_BOILERPLATE_FULL (NautilusUndoManager,
BONOBO_CLASS_BOILERPLATE_FULL (NautilusUndoManager, nautilus_undo_manager,
Nautilus_Undo_Manager,
nautilus_undo_manager,
BONOBO_OBJECT_TYPE)
BonoboObject, BONOBO_OBJECT_TYPE)
static void
release_transaction (NautilusUndoManager *manager)
......@@ -162,7 +157,7 @@ nautilus_undo_manager_new (void)
}
static void
nautilus_undo_manager_init (NautilusUndoManager *manager)
nautilus_undo_manager_instance_init (NautilusUndoManager *manager)
{
manager->details = g_new0 (NautilusUndoManagerDetails, 1);
}
......
......@@ -34,18 +34,15 @@
#define NAUTILUS_UNDO_TRANSACTION_LIST_DATA "Nautilus undo transaction list"
static void nautilus_undo_transaction_class_init (NautilusUndoTransactionClass *class);
static void nautilus_undo_transaction_init (NautilusUndoTransaction *item);
static void nautilus_undo_transaction_undo (NautilusUndoTransaction *transaction);
/* undo atoms */
static void undo_atom_list_free (GList *list);
static void undo_atom_list_undo_and_free (GList *list);
EEL_BONOBO_BOILERPLATE_FULL (NautilusUndoTransaction,
Nautilus_Undo_Transaction,
nautilus_undo_transaction,
BONOBO_OBJECT_TYPE)
BONOBO_CLASS_BOILERPLATE_FULL (NautilusUndoTransaction, nautilus_undo_transaction,
Nautilus_Undo_Transaction,
BonoboObject, BONOBO_OBJECT_TYPE)
static Nautilus_Undo_MenuItem *
impl_Nautilus_Undo_Transaction__get_undo_menu_item (PortableServer_Servant servant,
......@@ -120,11 +117,10 @@ nautilus_undo_transaction_new (const char *operation_name,
}
static void
nautilus_undo_transaction_init (NautilusUndoTransaction *transaction)
nautilus_undo_transaction_instance_init (NautilusUndoTransaction *transaction)
{
}
static void
remove_transaction_from_object (gpointer list_data, gpointer callback_data)
{
......
......@@ -163,9 +163,7 @@ nautilus_view_standard_main_multi (const char *executable_name,
{
BonoboGenericFactory *factory;
CallbackData callback_data;
#ifdef GNOME2_CONVERSION_COMPLETE
char *registration_id;
#endif
g_return_val_if_fail (executable_name != NULL, EXIT_FAILURE);
g_return_val_if_fail (version != NULL, EXIT_FAILURE);
......@@ -198,9 +196,6 @@ nautilus_view_standard_main_multi (const char *executable_name,
gnome_client_disable_master_connection ();
#endif
#if GNOME2_CONVERSION_COMPLETE
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
#endif
/* Initialize libraries. */
g_thread_init (NULL);
gnome_vfs_init ();
......@@ -219,30 +214,22 @@ nautilus_view_standard_main_multi (const char *executable_name,
callback_data.delayed_quit_timeout_id = 0;
/* Create the factory. */
#ifdef GNOME2_CONVERSION_COMPLETE
registration_id = bonobo_activation_make_registration_id (factory_iid,
DisplayString (GDK_DISPLAY ()));
#endif
factory = bonobo_generic_factory_new (factory_iid,
registration_id = bonobo_activation_make_registration_id (factory_iid, DisplayString (gdk_display));
factory = bonobo_generic_factory_new (registration_id,
make_object,
&callback_data);
#ifdef GNOME2_CONVERSION_COMPLETE
g_free (registration_id);
#endif
if (factory != NULL) {
/* Loop until we have no more objects. */
do {
bonobo_main ();
gtk_main ();
} while (callback_data.object_count > 0 || callback_data.delayed_quit_timeout_id != 0);
/* Let the factory go. */
bonobo_object_unref (BONOBO_OBJECT (factory));
}
gnome_vfs_shutdown ();
bonobo_ui_debug_shutdown ();
return EXIT_SUCCESS;
}
......@@ -330,4 +317,3 @@ nautilus_view_create_from_get_type_function (const char *iid, void *user_data)
{
return NAUTILUS_VIEW (g_object_new (((TypeFunc) (user_data)) (), NULL));
}
......@@ -79,8 +79,6 @@ static NautilusDesktopWindow *nautilus_application_desktop_window;
/* Keeps track of all the nautilus windows. */
static GList *nautilus_application_window_list;
static void nautilus_application_init (NautilusApplication *application);
static void nautilus_application_class_init (NautilusApplicationClass *klass);
static gboolean need_to_show_first_time_druid (void);
static void desktop_changed_callback (gpointer user_data);
static void desktop_location_changed_callback (gpointer user_data);
......@@ -94,9 +92,8 @@ static void update_session (gpointer cal
static void init_session (void);
static gboolean is_kdesktop_present (void);
EEL_BONOBO_BOILERPLATE (NautilusApplication,
nautilus_application,
BONOBO_GENERIC_FACTORY_TYPE)
BONOBO_CLASS_BOILERPLATE (NautilusApplication, nautilus_application,
BonoboGenericFactory, BONOBO_GENERIC_FACTORY_TYPE)
static CORBA_Object
create_object (PortableServer_Servant servant,
......@@ -140,7 +137,7 @@ nautilus_application_get_window_list (void)
}
static void
nautilus_application_init (NautilusApplication *application)
nautilus_application_instance_init (NautilusApplication *application)
{
/* Create an undo manager */
application->undo_manager = nautilus_undo_manager_new ();
......
......@@ -277,6 +277,7 @@ main (int argc, char *argv[])
poptFreeContext (popt_context);
gnome_vfs_shutdown ();
bonobo_ui_debug_shutdown ();
/* If told to restart, exec() myself again. This is used when
* the program is told to restart with CORBA, for example when
......@@ -298,5 +299,5 @@ main (int argc, char *argv[])
execvp (argv[0], argv_copy);
}
return bonobo_ui_debug_shutdown ();
return EXIT_SUCCESS;
}
......@@ -57,8 +57,6 @@ struct NautilusShellDetails {
NautilusApplication *application;
};
static void nautilus_shell_init (NautilusShell *shell);
static void nautilus_shell_class_init (NautilusShellClass *klass);
static void finalize (GObject *shell);
static void corba_open_windows (PortableServer_Servant servant,
const Nautilus_URIList *list,
......@@ -77,10 +75,9 @@ static void corba_restart (PortableServer_Servant servant
CORBA_Environment *ev);
static gboolean restore_window_states (NautilusShell *shell);
EEL_BONOBO_BOILERPLATE_FULL (NautilusShell,
Nautilus_Shell,
nautilus_shell,
BONOBO_OBJECT_TYPE)
BONOBO_CLASS_BOILERPLATE_FULL (NautilusShell, nautilus_shell,
Nautilus_Shell,
BonoboObject, BONOBO_OBJECT_TYPE)
static void
nautilus_shell_class_init (NautilusShellClass *klass)
......@@ -96,7 +93,7 @@ nautilus_shell_class_init (NautilusShellClass *klass)
}
static void
nautilus_shell_init (NautilusShell *shell)
nautilus_shell_instance_init (NautilusShell *shell)
{
shell->details = g_new0 (NautilusShellDetails, 1);
}
......
......@@ -607,20 +607,15 @@ file_is_search_location (NautilusFile *file)
}
static int
measure_width_callback (const char *string, void *context)
measure_width_callback (const char *string, gpointer callback_data)
{
#if GNOME2_CONVERSION_COMPLETE
EelLabel *label;
EelScalableFont *smooth_font;
int smooth_font_size;
label = (EelLabel*) context;
smooth_font = eel_label_get_smooth_font (label);
smooth_font_size = eel_label_get_smooth_font_size (label);
return eel_scalable_font_text_width (smooth_font, smooth_font_size, string, strlen (string));
#else
return 0;
#endif
PangoLayout *layout;
int width;
layout = PANGO_LAYOUT (callback_data);
pango_layout_set_text (layout, string, -1);
pango_layout_get_pixel_size (layout, &width, NULL);
return width;
}
static void
......@@ -632,6 +627,7 @@ update_more_info (NautilusSidebarTitle *sidebar_title)
char *search_string, *search_uri;
char *date_modified_str;
int sidebar_width;
PangoLayout *layout;
file = sidebar_title->details->file;
......@@ -666,12 +662,12 @@ update_more_info (NautilusSidebarTitle *sidebar_title)
sidebar_width = GTK_WIDGET (sidebar_title)->allocation.width - 2 * SIDEBAR_INFO_MARGIN;
if (sidebar_width > MINIMUM_INFO_WIDTH) {
layout = pango_layout_copy (gtk_label_get_layout (GTK_LABEL (sidebar_title->details->more_info_label)));
pango_layout_set_width (layout, -1);
date_modified_str = nautilus_file_fit_modified_date_as_string
(file, sidebar_width,
measure_width_callback, NULL,
sidebar_title->details->more_info_label);
(file, sidebar_width, measure_width_callback, NULL, layout);
g_object_unref (layout);
append_and_eat (info_string, "\n", date_modified_str);
g_string_append_c (info_string, '\0');
}
}
}
......
......@@ -329,8 +329,6 @@ install_theme_button_clicked_callback (GtkWidget *button,
theme_selector = NAUTILUS_THEME_SELECTOR (callback_data);
file_selection_dialog = gtk_file_selection_new (_("Select a theme folder to add as a new theme:"));
eel_gtk_window_set_up_close_accelerator (GTK_WINDOW (file_selection_dialog));
g_object_set_data (G_OBJECT (file_selection_dialog),
THEME_SELECTOR_DATA_KEY,
callback_data);
......