|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
Nautilus' FM-props Emblem tab improvementsHello Everyone,
I've made 2 patches, one against nautilus' fm-properties-window.c and another against eel's eel-labeled-image.c to give better layouting for the properties window's emblems tab. The patches are very simple and short. The one thing i am not entirey sure about is if we want default centering for the EelLabeledImage. If no one disagrees, I'll commit these. Cheers, M. -- Please note that according to the German law on data retention, information on every electronic information exchange with me is retained for a period of six months. [Bitte beachten Sie, dass dem Gesetz zur Vorratsdatenspeicherung zufolge jeder elektronische Kontakt mit mir sechs Monate lang gespeichert wird.] [fm-properties-window.c.diff] Index: fm-properties-window.c =================================================================== --- fm-properties-window.c (revision 14648) +++ fm-properties-window.c (working copy) @@ -116,6 +116,7 @@ GList *emblem_buttons; GHashTable *initial_emblems; + GtkSizeGroup *emblems_size_group; NautilusFile *group_change_file; char *group_change_group; @@ -3434,6 +3435,11 @@ return FALSE; } +static gint +compare_icons_func(gconstpointer a, gconstpointer b) +{ + return g_strcmp0((char*)a,(char*)b); +} static void create_emblems_page (FMPropertiesWindow *window) @@ -3459,6 +3465,10 @@ window->details->initial_emblems = get_initial_emblems (window->details->original_files); + window->details->emblems_size_group = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); + + icons = g_list_sort(icons, (GCompareFunc)(compare_icons_func)); + l = icons; while (l != NULL) { emblem_name = l->data; @@ -3502,6 +3512,7 @@ G_OBJECT (window), 0); + gtk_size_group_add_widget(window->details->emblems_size_group, gtk_bin_get_child(GTK_BIN(button))); gtk_container_add (GTK_CONTAINER (emblems_table), button); } eel_g_list_free_deep (icons); @@ -5497,6 +5508,9 @@ g_list_free (window->details->emblem_buttons); window->details->emblem_buttons = NULL; + g_object_unref(window->details->emblems_size_group); + window->details->emblems_size_group = NULL; + if (window->details->initial_emblems) { g_hash_table_destroy (window->details->initial_emblems); window->details->initial_emblems = NULL; [eel-labeled-image.c.diff] Index: eel-labeled-image.c =================================================================== --- eel-labeled-image.c (revision 2176) +++ eel-labeled-image.c (working copy) @@ -1202,6 +1202,7 @@ } labeled_image->details->image = gtk_image_new (); + gtk_misc_set_alignment(GTK_MISC(labeled_image->details->image), 0.5, 0.5); gtk_container_add (GTK_CONTAINER (labeled_image), labeled_image->details->image); gtk_widget_show (labeled_image->details->image); } -- nautilus-list mailing list nautilus-list@... http://mail.gnome.org/mailman/listinfo/nautilus-list |
| Free Forum Powered by Nabble | Forum Help |