mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-25 02:36:07 +00:00
![Darin Adler](/assets/img/avatar_default.png)
* Makefile.am: Remove nautilus-launch-icon.png. * components/hardware/nautilus-hardware-view.c: (setup_form_title), (setup_overview_form): Port from EelImage to GtkImage. * components/music/nautilus-music-view.c: Remove unused include. * src/nautilus-theme-selector.c: Remove unused includes. * libnautilus-private/nautilus-bonobo-extensions.c: (bonobo_activation_activation_callback): Add warning message so we get to see the error from bonobo-activation. * libnautilus-private/nautilus-directory-metafile.c: (get_factory): * libnautilus-private/nautilus-icon-factory.c: (get_icon_factory), (load_icon_for_scaling), (embed_text): * libnautilus-private/nautilus-metafile-factory.c: (nautilus_metafile_factory_get_instance): * libnautilus-private/nautilus-theme.c: (nautilus_theme_get_theme_data_from_theme): * libnautilus-private/nautilus-trash-monitor.c: (nautilus_trash_monitor_get): * libnautilus-private/nautilus-volume-monitor.c: (nautilus_volume_monitor_get): * src/file-manager/nautilus-indexing-info.c: (show_indexing_info_dialog): * src/nautilus-preferences-dialog.c: (global_preferences_get_dialog): * src/nautilus-window.c: (nautilus_window_class_init), (add_to_history_list): Use eel_debug_call_at_shutdown instead of g_atexit. * libnautilus-private/nautilus-file.c: (nautilus_file_get_display_name): Add G_BROKEN_FILENAMES support. * libnautilus-private/nautilus-global-preferences.c: (nautilus_global_preferences_init): Remove eel_smooth_widget code. * libnautilus/Makefile.am: Add missing ORBIT_IDL dependency. * libnautilus/nautilus-view-standard-main.c: (nautilus_view_standard_main_multi): Remove bonobo_ui_debug_shutdown for now. It does us no good unless we also do eel_debug_shut_down, but libnautilus can't depend on eel. * nautilus-launch-icon.png: Remove. * src/file-manager/fm-properties-window.c: (update_properties_window_icon), (fm_properties_window_drag_data_received), (create_image_widget_for_file): Port from EelImage to GtkImage. * src/nautilus-component-adapter-factory.c: (nautilus_component_adapter_factory_get): Use eel_debug_call_at_shutdown instead of g_atexit. (nautilus_component_adapter_factory_create_adapter): Look at exceptions before looking at return values from CORBA calls. * src/nautilus-main.c: (main): Add a call to eel_debug_shut_down. * src/nautilus-property-browser.c: (nautilus_property_browser_init), (element_clicked_callback), (nautilus_property_browser_update_contents): Port from EelViewport to GtkViewport. * src/nautilus-search-bar-criterion.c: (nautilus_search_bar_criterion_destroy), (nautilus_search_bar_criterion_new_from_values): Fix for change that made NautilusSignaller no longer a GtkObject. * src/nautilus-sidebar-title.c: (nautilus_sidebar_title_init), (update_icon), (add_emblem): Port from EelImage to GtkImage. * src/nautilus-signaller.h: * src/nautilus-signaller.c: (nautilus_signaller_get_current): Use eel_debug_call_at_shutdown instead of g_atexit. (nautilus_signaller_instance_init), (nautilus_signaller_class_init): Change to GObject, not GtkObject. * src/nautilus-window-menus.c: (get_bookmark_list): Use eel_debug_call_at_shutdown instead of g_atexit. (nautilus_window_initialize_go_menu): Fix for change that made NautilusSignaller no longer a GtkObject. * test/test-nautilus-preferences-change.c: Remove unused include. * test/test-nautilus-preferences-display.c: Remove unused includes. * test/test-nautilus-wrap-table.c: Remove unused includes. * test/test.c: Remove unused function. * test/test.h: Remove unused function.
122 lines
3.7 KiB
C
122 lines
3.7 KiB
C
#include "test.h"
|
|
|
|
#include <eel/eel-string-picker.h>
|
|
#include <libnautilus-private/nautilus-global-preferences.h>
|
|
#include <unistd.h>
|
|
|
|
static void
|
|
fruits_changed_callback (gpointer callback_data)
|
|
{
|
|
g_print ("Something underneath 'fruits' changed, dunno what\n");
|
|
}
|
|
|
|
static void
|
|
int_picker_changed_callback (EelStringPicker *string_picker,
|
|
gpointer callback_data)
|
|
{
|
|
char *selected_string;
|
|
int new_value;
|
|
|
|
g_return_if_fail (EEL_IS_STRING_PICKER (string_picker));
|
|
g_return_if_fail (callback_data != NULL);
|
|
|
|
selected_string = eel_string_picker_get_selected_string (string_picker);
|
|
|
|
new_value = eel_string_picker_get_index_for_string (string_picker, selected_string);
|
|
|
|
eel_preferences_set_integer ((const char *) callback_data, new_value);
|
|
|
|
g_free (selected_string);
|
|
}
|
|
|
|
static GtkWidget *
|
|
picker_new (const char *name,
|
|
const EelStringList *entries)
|
|
{
|
|
GtkWidget *string_picker;
|
|
|
|
g_return_val_if_fail (name != NULL, NULL);
|
|
g_return_val_if_fail (entries != NULL, NULL);
|
|
|
|
string_picker = eel_string_picker_new ();
|
|
eel_caption_set_title_label (EEL_CAPTION (string_picker), name);
|
|
g_signal_connect (string_picker, "changed", G_CALLBACK (int_picker_changed_callback),
|
|
(gpointer) name);
|
|
|
|
eel_string_picker_set_string_list (EEL_STRING_PICKER (string_picker), entries);
|
|
eel_string_picker_set_selected_string_index (EEL_STRING_PICKER (string_picker),
|
|
eel_preferences_get_integer (name));
|
|
|
|
return string_picker;
|
|
}
|
|
|
|
int
|
|
main (int argc, char *argv[])
|
|
{
|
|
GtkWidget *window;
|
|
GtkWidget *green_picker;
|
|
GtkWidget *yellow_picker;
|
|
GtkWidget *red_picker;
|
|
GtkWidget *fruits_apple_picker;
|
|
GtkWidget *fruits_orange_picker;
|
|
GtkWidget *fruits_pear_picker;
|
|
|
|
GtkWidget *vbox;
|
|
|
|
EelStringList *user_level_entries;
|
|
EelStringList *color_entries;
|
|
EelStringList *fruits_entries;
|
|
|
|
test_init (&argc, &argv);
|
|
|
|
nautilus_global_preferences_init ();
|
|
|
|
user_level_entries = eel_string_list_new_from_tokens ("Beginner,Intermediate,Advanced", ",", TRUE);
|
|
color_entries = eel_string_list_new_from_tokens ("0,1,2,3,4,5,6,7,8,9,10", ",", TRUE);
|
|
fruits_entries = eel_string_list_new_from_tokens ("0,1,2,3", ",", TRUE);
|
|
|
|
eel_preferences_set_emergency_fallback_integer ("green", 3);
|
|
|
|
eel_preferences_set_emergency_fallback_integer ("yellow", 9);
|
|
|
|
eel_preferences_set_emergency_fallback_integer ("red", 7);
|
|
|
|
eel_preferences_set_emergency_fallback_integer ("fruits/apple", 1);
|
|
eel_preferences_set_emergency_fallback_integer ("fruits/orange", 2);
|
|
eel_preferences_set_emergency_fallback_integer ("fruits/pear", 3);
|
|
|
|
//sleep (10);
|
|
|
|
window = test_window_new (NULL, 4);
|
|
test_window_set_title_with_pid (GTK_WINDOW (window), "Preferences Change");
|
|
|
|
vbox = gtk_vbox_new (FALSE, 2);
|
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
|
|
|
green_picker = picker_new ("green", color_entries);
|
|
yellow_picker = picker_new ("yellow", color_entries);
|
|
red_picker = picker_new ("red", color_entries);
|
|
fruits_apple_picker = picker_new ("fruits/apple", fruits_entries);
|
|
fruits_orange_picker = picker_new ("fruits/orange", fruits_entries);
|
|
fruits_pear_picker = picker_new ("fruits/pear", fruits_entries);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), green_picker, FALSE, FALSE, 0);
|
|
gtk_box_pack_start (GTK_BOX (vbox), yellow_picker, FALSE, FALSE, 0);
|
|
gtk_box_pack_start (GTK_BOX (vbox), red_picker, FALSE, FALSE, 0);
|
|
gtk_box_pack_start (GTK_BOX (vbox), fruits_apple_picker, FALSE, FALSE, 20);
|
|
gtk_box_pack_start (GTK_BOX (vbox), fruits_orange_picker, FALSE, FALSE, 20);
|
|
gtk_box_pack_start (GTK_BOX (vbox), fruits_pear_picker, FALSE, FALSE, 20);
|
|
|
|
eel_string_list_free (user_level_entries);
|
|
eel_string_list_free (color_entries);
|
|
eel_string_list_free (fruits_entries);
|
|
|
|
eel_preferences_add_callback ("fruits", fruits_changed_callback, NULL);
|
|
|
|
gtk_widget_show_all (window);
|
|
|
|
gtk_main ();
|
|
|
|
return 0;
|
|
}
|