>  * [GTK1] Added a "remove file on mismatch" checkbutton in download pane.

This patch adds "remove file on mismatch" to the GTK2 download pane.

Cheers,
Russ
diff -ur gtk-gnutella-cvs/gtk2-gnutella.glade gtkg-fixed/gtk2-gnutella.glade
--- gtk-gnutella-cvs/gtk2-gnutella.glade        Thu Sep 11 22:10:12 2003
+++ gtkg-fixed/gtk2-gnutella.glade      Fri Sep 12 18:09:00 2003
@@ -12513,6 +12513,48 @@
                              </child>
 
                              <child>
+                               <widget class="GtkCheckButton" 
id="checkbutton_download_delete_aborted">
+                                 <property name="visible">True</property>
+                                 <property name="can_focus">True</property>
+                                 <property name="label" translatable="yes">Delete 
file on abort</property>
+                                 <property name="use_underline">True</property>
+                                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                                 <property name="active">False</property>
+                                 <property name="inconsistent">False</property>
+                                 <property name="draw_indicator">True</property>
+                               </widget>
+                               <packing>
+                                 <property name="left_attach">1</property>
+                                 <property name="right_attach">2</property>
+                                 <property name="top_attach">2</property>
+                                 <property name="bottom_attach">3</property>
+                                 <property name="x_options">shrink|fill</property>
+                                 <property name="y_options">shrink</property>
+                               </packing>
+                             </child>
+
+                             <child>
+                               <widget class="GtkCheckButton" 
id="checkbutton_downloads_never_push">
+                                 <property name="visible">True</property>
+                                 <property name="can_focus">True</property>
+                                 <property name="label" translatable="yes">Never send 
a push request</property>
+                                 <property name="use_underline">True</property>
+                                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                                 <property name="active">False</property>
+                                 <property name="inconsistent">False</property>
+                                 <property name="draw_indicator">True</property>
+                               </widget>
+                               <packing>
+                                 <property name="left_attach">0</property>
+                                 <property name="right_attach">1</property>
+                                 <property name="top_attach">2</property>
+                                 <property name="bottom_attach">3</property>
+                                 <property name="x_options">shrink|fill</property>
+                                 <property name="y_options">shrink</property>
+                               </packing>
+                             </child>
+
+                             <child>
                                <widget class="GtkButton" id="button25">
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
@@ -12576,41 +12618,20 @@
                                  </child>
                                </widget>
                                <packing>
-                                 <property name="left_attach">2</property>
-                                 <property name="right_attach">5</property>
-                                 <property name="top_attach">2</property>
-                                 <property name="bottom_attach">3</property>
-                                 <property name="x_options">shrink</property>
+                                 <property name="left_attach">3</property>
+                                 <property name="right_attach">4</property>
+                                 <property name="top_attach">1</property>
+                                 <property name="bottom_attach">2</property>
+                                 <property name="x_options">fill</property>
                                  <property name="y_options"></property>
                                </packing>
                              </child>
 
                              <child>
-                               <widget class="GtkCheckButton" 
id="checkbutton_download_delete_aborted">
-                                 <property name="visible">True</property>
-                                 <property name="can_focus">True</property>
-                                 <property name="label" translatable="yes">Delete 
file on abort</property>
-                                 <property name="use_underline">True</property>
-                                 <property name="relief">GTK_RELIEF_NORMAL</property>
-                                 <property name="active">False</property>
-                                 <property name="inconsistent">False</property>
-                                 <property name="draw_indicator">True</property>
-                               </widget>
-                               <packing>
-                                 <property name="left_attach">1</property>
-                                 <property name="right_attach">2</property>
-                                 <property name="top_attach">2</property>
-                                 <property name="bottom_attach">3</property>
-                                 <property name="x_options">shrink|fill</property>
-                                 <property name="y_options">shrink</property>
-                               </packing>
-                             </child>
-
-                             <child>
-                               <widget class="GtkCheckButton" 
id="checkbutton_downloads_never_push">
+                               <widget class="GtkCheckButton" 
id="checkbutton_dl_remove_file_on_mismatch">
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
-                                 <property name="label" translatable="yes">Never send 
a push request</property>
+                                 <property name="label" translatable="yes">Remove 
file on mismatch</property>
                                  <property name="use_underline">True</property>
                                  <property name="relief">GTK_RELIEF_NORMAL</property>
                                  <property name="active">False</property>
@@ -12618,12 +12639,12 @@
                                  <property name="draw_indicator">True</property>
                                </widget>
                                <packing>
-                                 <property name="left_attach">0</property>
-                                 <property name="right_attach">1</property>
+                                 <property name="left_attach">2</property>
+                                 <property name="right_attach">5</property>
                                  <property name="top_attach">2</property>
                                  <property name="bottom_attach">3</property>
-                                 <property name="x_options">shrink|fill</property>
-                                 <property name="y_options">shrink</property>
+                                 <property name="x_options">fill</property>
+                                 <property name="y_options"></property>
                                </packing>
                              </child>
                            </widget>
diff -ur gtk-gnutella-cvs/src/interface-glade2.c gtkg-fixed/src/interface-glade2.c
--- gtk-gnutella-cvs/src/interface-glade2.c     Thu Sep 11 22:10:16 2003
+++ gtkg-fixed/src/interface-glade2.c   Fri Sep 12 18:09:01 2003
@@ -1547,7 +1547,7 @@
   gtk_container_set_border_width (GTK_CONTAINER (button_about_close), 6);
   GTK_WIDGET_SET_FLAGS (button_about_close, GTK_CAN_DEFAULT);
 
-  label538 = gtk_label_new (_("@(#) $Id: interface-glade2.c,v 1.76 2003/08/18 
20:25:47 rmanfredi Exp $"));
+  label538 = gtk_label_new (_("@(#) $Id: gtk2-gnutella.glade,v 1.75 2003/08/18 
20:25:47 rmanfredi Exp $"));
   gtk_widget_set_name (label538, "label538");
   gtk_box_pack_start (GTK_BOX (vbox67), label538, FALSE, FALSE, 0);
   gtk_widget_set_sensitive (label538, FALSE);
@@ -7254,13 +7254,14 @@
   GtkWidget *checkbutton_dl_clear_failed;
   GtkWidget *checkbutton_dl_clear_complete;
   GtkWidget *label64;
+  GtkWidget *checkbutton_download_delete_aborted;
+  GtkWidget *checkbutton_downloads_never_push;
   GtkWidget *button25;
   GtkWidget *alignment78;
   GtkWidget *hbox217;
   GtkWidget *image211;
   GtkWidget *label684;
-  GtkWidget *checkbutton_download_delete_aborted;
-  GtkWidget *checkbutton_downloads_never_push;
+  GtkWidget *checkbutton_dl_remove_file_on_mismatch;
   GtkWidget *label681;
   GtkWidget *table57;
   GtkWidget *button_downloads_abort;
@@ -7497,11 +7498,25 @@
                     (GtkAttachOptions) (GTK_FILL), 0, 0);
   gtk_misc_set_alignment (GTK_MISC (label64), 0, 0.5);
 
+  checkbutton_download_delete_aborted = gtk_check_button_new_with_mnemonic (_("Delete 
file on abort"));
+  gtk_widget_set_name (checkbutton_download_delete_aborted, 
"checkbutton_download_delete_aborted");
+  gtk_widget_show (checkbutton_download_delete_aborted);
+  gtk_table_attach (GTK_TABLE (table68), checkbutton_download_delete_aborted, 1, 2, 
2, 3,
+                    (GtkAttachOptions) (GTK_SHRINK | GTK_FILL),
+                    (GtkAttachOptions) (GTK_SHRINK), 0, 0);
+
+  checkbutton_downloads_never_push = gtk_check_button_new_with_mnemonic (_("Never 
send a push request"));
+  gtk_widget_set_name (checkbutton_downloads_never_push, 
"checkbutton_downloads_never_push");
+  gtk_widget_show (checkbutton_downloads_never_push);
+  gtk_table_attach (GTK_TABLE (table68), checkbutton_downloads_never_push, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_SHRINK | GTK_FILL),
+                    (GtkAttachOptions) (GTK_SHRINK), 0, 0);
+
   button25 = gtk_button_new ();
   gtk_widget_set_name (button25, "button25");
   gtk_widget_show (button25);
-  gtk_table_attach (GTK_TABLE (table68), button25, 2, 5, 2, 3,
-                    (GtkAttachOptions) (GTK_SHRINK),
+  gtk_table_attach (GTK_TABLE (table68), button25, 3, 4, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
 
   alignment78 = gtk_alignment_new (0.5, 0.5, 0, 0);
@@ -7525,19 +7540,12 @@
   gtk_box_pack_start (GTK_BOX (hbox217), label684, FALSE, FALSE, 0);
   gtk_label_set_justify (GTK_LABEL (label684), GTK_JUSTIFY_LEFT);
 
-  checkbutton_download_delete_aborted = gtk_check_button_new_with_mnemonic (_("Delete 
file on abort"));
-  gtk_widget_set_name (checkbutton_download_delete_aborted, 
"checkbutton_download_delete_aborted");
-  gtk_widget_show (checkbutton_download_delete_aborted);
-  gtk_table_attach (GTK_TABLE (table68), checkbutton_download_delete_aborted, 1, 2, 
2, 3,
-                    (GtkAttachOptions) (GTK_SHRINK | GTK_FILL),
-                    (GtkAttachOptions) (GTK_SHRINK), 0, 0);
-
-  checkbutton_downloads_never_push = gtk_check_button_new_with_mnemonic (_("Never 
send a push request"));
-  gtk_widget_set_name (checkbutton_downloads_never_push, 
"checkbutton_downloads_never_push");
-  gtk_widget_show (checkbutton_downloads_never_push);
-  gtk_table_attach (GTK_TABLE (table68), checkbutton_downloads_never_push, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_SHRINK | GTK_FILL),
-                    (GtkAttachOptions) (GTK_SHRINK), 0, 0);
+  checkbutton_dl_remove_file_on_mismatch = gtk_check_button_new_with_mnemonic 
(_("Remove file on mismatch"));
+  gtk_widget_set_name (checkbutton_dl_remove_file_on_mismatch, 
"checkbutton_dl_remove_file_on_mismatch");
+  gtk_widget_show (checkbutton_dl_remove_file_on_mismatch);
+  gtk_table_attach (GTK_TABLE (table68), checkbutton_dl_remove_file_on_mismatch, 2, 
5, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
 
   label681 = gtk_label_new (_("Download settings"));
   gtk_widget_set_name (label681, "label681");
@@ -8136,13 +8144,14 @@
   GLADE_HOOKUP_OBJECT (main_window_downloads_tab, checkbutton_dl_clear_failed, 
"checkbutton_dl_clear_failed");
   GLADE_HOOKUP_OBJECT (main_window_downloads_tab, checkbutton_dl_clear_complete, 
"checkbutton_dl_clear_complete");
   GLADE_HOOKUP_OBJECT (main_window_downloads_tab, label64, "label64");
+  GLADE_HOOKUP_OBJECT (main_window_downloads_tab, 
checkbutton_download_delete_aborted, "checkbutton_download_delete_aborted");
+  GLADE_HOOKUP_OBJECT (main_window_downloads_tab, checkbutton_downloads_never_push, 
"checkbutton_downloads_never_push");
   GLADE_HOOKUP_OBJECT (main_window_downloads_tab, button25, "button25");
   GLADE_HOOKUP_OBJECT (main_window_downloads_tab, alignment78, "alignment78");
   GLADE_HOOKUP_OBJECT (main_window_downloads_tab, hbox217, "hbox217");
   GLADE_HOOKUP_OBJECT (main_window_downloads_tab, image211, "image211");
   GLADE_HOOKUP_OBJECT (main_window_downloads_tab, label684, "label684");
-  GLADE_HOOKUP_OBJECT (main_window_downloads_tab, 
checkbutton_download_delete_aborted, "checkbutton_download_delete_aborted");
-  GLADE_HOOKUP_OBJECT (main_window_downloads_tab, checkbutton_downloads_never_push, 
"checkbutton_downloads_never_push");
+  GLADE_HOOKUP_OBJECT (main_window_downloads_tab, 
checkbutton_dl_remove_file_on_mismatch, "checkbutton_dl_remove_file_on_mismatch");
   GLADE_HOOKUP_OBJECT (main_window_downloads_tab, label681, "label681");
   GLADE_HOOKUP_OBJECT (main_window_downloads_tab, table57, "table57");
   GLADE_HOOKUP_OBJECT (main_window_downloads_tab, button_downloads_abort, 
"button_downloads_abort");
diff -ur gtk-gnutella-cvs/src/settings_gui.c gtkg-fixed/src/settings_gui.c
--- gtk-gnutella-cvs/src/settings_gui.c Thu Sep 11 22:10:17 2003
+++ gtkg-fixed/src/settings_gui.c       Fri Sep 12 18:10:19 2003
@@ -1005,7 +1005,6 @@
         "checkbutton_search_remove_downloaded",
         FREQ_UPDATES, 0
     },
-#ifdef USE_GTK1
     {
         get_main_window,
         PROP_DL_REMOVE_FILE_ON_MISMATCH,
@@ -1014,7 +1013,6 @@
         "checkbutton_dl_remove_file_on_mismatch",
         FREQ_UPDATES, 0
     },
-#endif /* USE_GTK1 */
     {
         get_main_window,
         PROP_SEARCH_HIDE_DOWNLOADED,

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to