Revision: 701 Author: ntrel Date: 2006-08-12 05:49:22 -0700 (Sat, 12 Aug 2006) ViewCVS: http://svn.sourceforge.net/geany/?rev=701&view=rev
Log Message: ----------- Auto destroy the open dialog size group
Modified Paths: -------------- trunk/src/dialogs.c Modified: trunk/src/dialogs.c =================================================================== --- trunk/src/dialogs.c 2006-08-12 12:04:14 UTC (rev 700) +++ trunk/src/dialogs.c 2006-08-12 12:49:22 UTC (rev 701) @@ -966,7 +966,7 @@ GtkWidget *ebox; GtkWidget *hbox; GtkWidget *file_entry; - GtkSizeGroup *sizegroup; + GtkSizeGroup *size_group; GtkWidget *align; GtkWidget *check_hidden; GtkWidget *filetype_label; @@ -974,12 +974,10 @@ GtkTooltips *tooltips = GTK_TOOLTIPS(lookup_widget(app->window, "tooltips"));
vbox = gtk_vbox_new(FALSE, 6); - sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
align = gtk_alignment_new(1.0, 0.0, 0.0, 0.0); check_hidden = gtk_check_button_new_with_mnemonic(_("Show _hidden files")); gtk_widget_show(check_hidden); - gtk_size_group_add_widget(GTK_SIZE_GROUP(sizegroup), check_hidden); gtk_container_add(GTK_CONTAINER(align), check_hidden); gtk_box_pack_start(GTK_BOX(vbox), align, FALSE, FALSE, 0); gtk_button_set_focus_on_click(GTK_BUTTON(check_hidden), FALSE); @@ -1000,12 +998,16 @@ _("Explicitly defines a filetype for the file, if it would not be detected by filename extension.\nNote if you choose multiple files, they will all be opened with the chosen filetype."), NULL); gtk_box_pack_start(GTK_BOX(hbox), filetype_label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), filetype_combo, FALSE, FALSE, 0); - gtk_size_group_add_widget(GTK_SIZE_GROUP(sizegroup), filetype_combo); gtk_container_add(GTK_CONTAINER(ebox), hbox); gtk_box_pack_start(GTK_BOX(lbox), ebox, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), lbox, FALSE, FALSE, 0); gtk_widget_show_all(vbox);
+ size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); + gtk_size_group_add_widget(GTK_SIZE_GROUP(size_group), check_hidden); + gtk_size_group_add_widget(GTK_SIZE_GROUP(size_group), filetype_combo); + g_object_unref(G_OBJECT(size_group)); // auto destroy the size group + g_signal_connect((gpointer) file_entry, "activate", G_CALLBACK(on_file_open_entry_activate), NULL); g_signal_connect((gpointer) check_hidden, "toggled",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.