Author: colossus Date: 2009-02-23 14:21:56 +0000 (Mon, 23 Feb 2009) New Revision: 29545
Modified: xarchiver/trunk/src/add_dialog.c xarchiver/trunk/src/add_dialog.h xarchiver/trunk/src/extract_dialog.c Log: Reduced useless radiobutton code in extract.c and add.c. Modified: xarchiver/trunk/src/add_dialog.c =================================================================== --- xarchiver/trunk/src/add_dialog.c 2009-02-23 13:36:27 UTC (rev 29544) +++ xarchiver/trunk/src/add_dialog.c 2009-02-23 14:21:56 UTC (rev 29545) @@ -30,7 +30,6 @@ Add_dialog_data *add_dialog; add_dialog = g_new0 (Add_dialog_data, 1); - add_dialog->path_group = NULL; add_dialog->option_tooltip = gtk_tooltips_new (); add_dialog->dialog1 = gtk_dialog_new (); @@ -72,14 +71,10 @@ add_dialog->store_path = gtk_radio_button_new_with_mnemonic (NULL, _("Store full paths")); gtk_box_pack_start (GTK_BOX (hbox1), add_dialog->store_path, FALSE, FALSE, 0); - gtk_radio_button_set_group (GTK_RADIO_BUTTON (add_dialog->store_path), add_dialog->path_group); - add_dialog->path_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (add_dialog->store_path)); gtk_button_set_focus_on_click (GTK_BUTTON (add_dialog->store_path), FALSE); - add_dialog->no_store_path = gtk_radio_button_new_with_mnemonic (NULL, _("Do not store paths")); + add_dialog->no_store_path = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(add_dialog->store_path), _("Do not store paths")); gtk_box_pack_start (GTK_BOX (hbox1), add_dialog->no_store_path, FALSE, FALSE, 0); - gtk_radio_button_set_group (GTK_RADIO_BUTTON (add_dialog->no_store_path), add_dialog->path_group); - add_dialog->path_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (add_dialog->no_store_path)); gtk_button_set_focus_on_click (GTK_BUTTON (add_dialog->no_store_path), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(add_dialog->no_store_path),TRUE); Modified: xarchiver/trunk/src/add_dialog.h =================================================================== --- xarchiver/trunk/src/add_dialog.h 2009-02-23 13:36:27 UTC (rev 29544) +++ xarchiver/trunk/src/add_dialog.h 2009-02-23 14:21:56 UTC (rev 29545) @@ -29,7 +29,6 @@ GtkWidget *notebook1; GtkWidget *filechooserwidget1; GtkWidget *frame1; - GSList *path_group; GtkWidget *store_path; GtkWidget *no_store_path; GtkWidget *option_notebook_vbox; Modified: xarchiver/trunk/src/extract_dialog.c =================================================================== --- xarchiver/trunk/src/extract_dialog.c 2009-02-23 13:36:27 UTC (rev 29544) +++ xarchiver/trunk/src/extract_dialog.c 2009-02-23 14:21:56 UTC (rev 29545) @@ -44,7 +44,6 @@ Extract_dialog_data *xa_create_extract_dialog() { - GSList *radiobutton1_group = NULL; Extract_dialog_data *dialog_data; dialog_data = g_new0 (Extract_dialog_data,1); @@ -90,21 +89,18 @@ dialog_data->all_files_radio = gtk_radio_button_new_with_mnemonic (NULL,_("All files")); gtk_box_pack_start (GTK_BOX (vbox3),dialog_data->all_files_radio,FALSE,FALSE,0); - gtk_radio_button_set_group (GTK_RADIO_BUTTON (dialog_data->all_files_radio),radiobutton1_group); - radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (dialog_data->all_files_radio)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog_data->all_files_radio), TRUE); - dialog_data->selected_radio = gtk_radio_button_new_with_mnemonic (NULL,_("Selected files")); + dialog_data->selected_radio = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (dialog_data->all_files_radio),_("Selected files")); gtk_box_pack_start (GTK_BOX (vbox3),dialog_data->selected_radio,FALSE,FALSE,0); - gtk_radio_button_set_group (GTK_RADIO_BUTTON (dialog_data->selected_radio),radiobutton1_group); - radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (dialog_data->selected_radio)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog_data->selected_radio), TRUE); hbox2 = gtk_hbox_new (FALSE,0); gtk_box_pack_start (GTK_BOX (vbox3),hbox2,FALSE,FALSE,0); - dialog_data->files_radio = gtk_radio_button_new_with_mnemonic (NULL,_("Files: ")); + dialog_data->files_radio = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (dialog_data->all_files_radio),_("Files: ")); gtk_box_pack_start (GTK_BOX (hbox2),dialog_data->files_radio,FALSE,FALSE,0); - gtk_radio_button_set_group (GTK_RADIO_BUTTON (dialog_data->files_radio),radiobutton1_group); - radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (dialog_data->files_radio)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog_data->files_radio), TRUE); dialog_data->entry2 = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox2),dialog_data->entry2,TRUE,TRUE,0); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits