File gthumb-sizes.patch of Package gthumb

http://bugzilla.gnome.org/show_bug.cgi?id=313671

--- data/glade/gthumb_web_exporter.glade
+++ data/glade/gthumb_web_exporter.glade
@@ -777,6 +777,15 @@
 			  </child>
 
 			  <child>
+			    <widget class="GtkMenuItem" id="320x2">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">320 x 320</property>
+			      <property name="use_underline">True</property>
+			      <signal name="activate" handler="on_320x2_activate" last_modification_time="Thu, 15 May 2003 18:27:44 GMT"/>
+			    </widget>
+			  </child>
+
+			  <child>
 			    <widget class="GtkMenuItem" id="640x1">
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes">640 x 480</property>
@@ -786,6 +795,15 @@
 			  </child>
 
 			  <child>
+			    <widget class="GtkMenuItem" id="640x2">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">640 x 640</property>
+			      <property name="use_underline">True</property>
+			      <signal name="activate" handler="on_640x2_activate" last_modification_time="Thu, 15 May 2003 18:26:48 GMT"/>
+			    </widget>
+			  </child>
+
+			  <child>
 			    <widget class="GtkMenuItem" id="800x6">
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes">800 x 600</property>
@@ -795,6 +813,15 @@
 			  </child>
 
 			  <child>
+			    <widget class="GtkMenuItem" id="800x7">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">800 x 800</property>
+			      <property name="use_underline">True</property>
+			      <signal name="activate" handler="on_800x2_activate" last_modification_time="Thu, 15 May 2003 18:26:48 GMT"/>
+			    </widget>
+			  </child>
+
+			  <child>
 			    <widget class="GtkMenuItem" id="1024x1">
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes">1024 x 768</property>
@@ -804,6 +831,15 @@
 			  </child>
 
 			  <child>
+			    <widget class="GtkMenuItem" id="1024x2">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">1024 x 1024</property>
+			      <property name="use_underline">True</property>
+			      <signal name="activate" handler="on_1024x2_activate" last_modification_time="Thu, 15 May 2003 18:26:48 GMT"/>
+			    </widget>
+			  </child>
+
+			  <child>
 			    <widget class="GtkMenuItem" id="1280x1">
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes">1280 x 960</property>
@@ -811,6 +847,15 @@
 			      <signal name="activate" handler="on_1280x1_activate" last_modification_time="Thu, 15 May 2003 18:26:48 GMT"/>
 			    </widget>
 			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="1280x2">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">1280 x 1280</property>
+			      <property name="use_underline">True</property>
+			      <signal name="activate" handler="on_1280x2_activate" last_modification_time="Thu, 15 May 2003 18:26:48 GMT"/>
+			    </widget>
+			  </child>
 			</widget>
 		      </child>
 		    </widget>
--- src/dlg-web-exporter.c
+++ src/dlg-web-exporter.c
@@ -51,8 +51,8 @@
 					      GTH_SORT_METHOD_BY_SIZE, 
 					      GTH_SORT_METHOD_BY_TIME,
 					      GTH_SORT_METHOD_MANUAL};
-static int           idx_to_resize_width[] = { 320, 640, 800, 1024, 1280 };
-static int           idx_to_resize_height[] = { 200, 480, 600, 768, 960 };
+static int           idx_to_resize_width[] = { 320, 320, 640, 640, 800, 800, 1024, 1024, 1280, 1280 };
+static int           idx_to_resize_height[] = { 200, 320, 480, 640, 600, 800, 768, 1024, 960, 1280 };
 
 
 #define str_void(x) (((x) == NULL) || (*(x) == 0))
@@ -241,20 +241,22 @@
 
 
 static int
-get_idx_from_resize_width (int width)
+get_idx_from_size (int width, int height)
 {
+	int idx;
 	if (width == 320)
-		return 0;
+		idx = 0;
 	else if (width == 640)
-		return 1;
+		idx = 1;
 	else if (width == 800)
-		return 2;
+		idx = 2;
 	else if (width == 1024)
-		return 3;
+		idx = 3;
 	else if (width == 1280)
-		return 4;
+		idx = 4;
 	else
-		return 1;
+		idx = 1;
+	return 2 * idx + (width == height? 1 : 0);
 }
 
 
@@ -359,7 +361,7 @@
 
 	gtk_widget_set_sensitive (data->wa_resize_images_options_hbox, eel_gconf_get_boolean (PREF_WEB_ALBUM_RESIZE_IMAGES, FALSE));
 
-	gtk_option_menu_set_history (GTK_OPTION_MENU (data->wa_resize_images_optionmenu), get_idx_from_resize_width (eel_gconf_get_integer (PREF_WEB_ALBUM_RESIZE_WIDTH, 640)));
+	gtk_option_menu_set_history (GTK_OPTION_MENU (data->wa_resize_images_optionmenu), get_idx_from_size (eel_gconf_get_integer (PREF_WEB_ALBUM_RESIZE_WIDTH, 640), eel_gconf_get_integer (PREF_WEB_ALBUM_RESIZE_HEIGHT, 480)));
 
 	gtk_spin_button_set_value (GTK_SPIN_BUTTON (data->wa_rows_spinbutton), eel_gconf_get_integer (PREF_WEB_ALBUM_ROWS, 4));
 
openSUSE Build Service is sponsored by