+static void stereo_mode_menu_cb(GtkWidget *combo, gpointer data)
+{
+ gint *option = data;
+
+ switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)))
+ {
+ case 0:
+ default:
+ *option = PR_STEREO_NONE;
+ break;
+ case 1:
+ *option = PR_STEREO_ANAGLYPH;
+ break;
+ case 2:
+ *option = PR_STEREO_HORIZ;
+ break;
+ case 3:
+ *option = PR_STEREO_VERT;
+ break;
+ case 4:
+ *option = PR_STEREO_FIXED;
+ break;
+ }
+}
+
+static void add_stereo_mode_menu(GtkWidget *table, gint column, gint row, const gchar *text,
+ guint option, guint *option_c, gboolean add_fixed)
+{
+ GtkWidget *combo;
+ gint current = 0;
+
+ *option_c = option;
+
+ pref_table_label(table, column, row, text, 0.0);
+
+ combo = gtk_combo_box_new_text();
+
+ gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Single image"));
+ if (option == PR_STEREO_NONE) current = 0;
+ gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Anaglyph"));
+ if (option == PR_STEREO_ANAGLYPH) current = 1;
+ gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Side by Side"));
+ if (option == PR_STEREO_HORIZ) current = 2;
+ gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Above - below"));
+ if (option == PR_STEREO_VERT) current = 3;
+
+ if (add_fixed)
+ {
+ gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Fixed position"));
+ if (option == PR_STEREO_FIXED) current = 4;
+ }
+
+ gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current);
+
+ g_signal_connect(G_OBJECT(combo), "changed",
+ G_CALLBACK(stereo_mode_menu_cb), option_c);
+
+ gtk_table_attach(GTK_TABLE(table), combo, column + 1, column + 2, row, row + 1,
+ GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_widget_show(combo);
+}
+