#include "../funchandlers.h"
#include "../lists.h"
#include "../misc.h"
+#include <glib/gi18n.h>
/*--------------------------------
Callback Functions
{
GtkWidget *parent;
int *loop, *ret;
-
+
parent = gtk_widget_get_toplevel (widget);
loop = (int*)g_object_get_data (G_OBJECT (parent), "loop");
ret = (int*)g_object_get_data (G_OBJECT (parent), "ret");
-
+
*loop = 0;
*ret = (int)data;
}
-
+
static gint dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer data)
{
int *loop;
-
+
gtk_widget_hide (widget);
loop = (int*)g_object_get_data (G_OBJECT (widget), "loop");
*loop = 0;
{
GtkWidget *window, *w, *vbox, *hbox;
int mode = (uType & MB_TYPEMASK), ret, loop = 1;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
g_object_set_data (G_OBJECT (window), "loop", &loop);
g_object_set_data (G_OBJECT (window), "ret", &ret);
gtk_widget_realize (window);
-
+
vbox = gtk_vbox_new (FALSE, 10);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show (vbox);
-
+
w = gtk_label_new (lpText);
gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 2);
gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_LEFT);
gtk_widget_show (w);
-
+
w = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 2);
gtk_widget_show (w);
-
+
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
gtk_widget_show (hbox);
-
+
if (mode == MB_OK)
{
w = gtk_button_new_with_label ("Ok");
GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
gtk_widget_grab_default (w);
gtk_widget_show (w);
-
+
w = gtk_button_new_with_label ("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked",
GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
gtk_widget_grab_default (w);
gtk_widget_show (w);
-
+
w = gtk_button_new_with_label ("No");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked",
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDNO));
gtk_widget_show (w);
-
+
w = gtk_button_new_with_label ("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked",
GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
gtk_widget_grab_default (w);
gtk_widget_show (w);
-
+
w = gtk_button_new_with_label ("No");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked",
gtk_widget_show (w);
ret = IDNO;
}
-
+
gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
gtk_widget_show (window);
gtk_grab_add (window);
-
+
while (loop)
gtk_main_iteration ();
-
+
gtk_grab_remove (window);
gtk_widget_destroy (window);
-
+
return ret;
}
GtkWidget *radio1, *radio2;
GtkWidget *check1, *check2;
int ret, loop = 1;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
+
gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
g_object_set_data (G_OBJECT (window), "ret", &ret);
gtk_widget_realize (window);
-
-
+
+
vbox = gtk_vbox_new (FALSE, 10);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show (vbox);
-
+
// ---- vbox ----
radio1 = gtk_radio_button_new_with_label(NULL, "Use Whole Map");
check1 = gtk_check_button_new_with_label("Include Detail Brushes");
gtk_box_pack_start (GTK_BOX (vbox), check1, FALSE, FALSE, 0);
- gtk_widget_show (check1);
+ gtk_widget_show (check1);
check2 = gtk_check_button_new_with_label("Select Duplicate Brushes Only");
gtk_box_pack_start (GTK_BOX (vbox), check2, FALSE, FALSE, 0);
- gtk_widget_show (check2);
+ gtk_widget_show (check2);
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
gtk_widget_show (hbox);
-
+
// ---- hbox ---- ok/cancel buttons
w = gtk_button_new_with_label ("Ok");
GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
gtk_widget_grab_default (w);
gtk_widget_show (w);
-
+
w = gtk_button_new_with_label ("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked", GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDCANCEL));
ret = IDCANCEL;
// ---- /hbox ----
-
+
// ---- /vbox ----
gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
gtk_widget_show (window);
gtk_grab_add (window);
-
+
while (loop)
gtk_main_iteration ();
rs->bUseDetail = gtk_toggle_button_get_active((GtkToggleButton*)check1) ? true : false;
rs->bDuplicateOnly = gtk_toggle_button_get_active((GtkToggleButton*)check2) ? true : false;
-
+
gtk_grab_remove (window);
gtk_widget_destroy (window);
GtkWidget *text1, *text2;
int ret, loop = 1;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
+
gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
g_object_set_data (G_OBJECT (window), "ret", &ret);
gtk_widget_realize (window);
-
-
+
+
vbox = gtk_vbox_new (FALSE, 10);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show (vbox);
-
+
// ---- vbox ----
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
gtk_widget_show (hbox);
-
+
// ---- hbox ----
-
+
vbox2 = gtk_vbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 2);
gtk_widget_show (vbox2);
-
+
// ---- vbox2 ----
hbox2 = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (hbox2), w, FALSE, FALSE, 2);
gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_LEFT);
gtk_widget_show (w);
-
+
// ---- /hbox2 ----
// ---- /vbox2 ----
-
+
vbox2 = gtk_vbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 2);
gtk_widget_show (vbox2);
-
+
// ---- vbox2 ----
check1 = gtk_check_button_new_with_label("Use Border");
gtk_box_pack_start (GTK_BOX (vbox2), check1, FALSE, FALSE, 0);
gtk_widget_show (check1);
-
+
check2 = gtk_check_button_new_with_label("Inverse Polygon");
gtk_box_pack_start (GTK_BOX (vbox2), check2, FALSE, FALSE, 0);
gtk_widget_show (check2);
-
+
check3 = gtk_check_button_new_with_label("Align Top Edge");
gtk_box_pack_start (GTK_BOX (vbox2), check3, FALSE, FALSE, 0);
gtk_widget_show (check3);
-
+
// ---- /vbox2 ----
// ---- /hbox ----
-
+
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
gtk_widget_show (hbox);
-
+
// ---- hbox ----
w = gtk_button_new_with_label ("Ok");
GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
gtk_widget_grab_default (w);
gtk_widget_show (w);
-
+
w = gtk_button_new_with_label ("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked", GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDCANCEL));
ret = IDCANCEL;
// ---- /hbox ----
-
+
// ---- /vbox ----
gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
gtk_widget_show (window);
gtk_grab_add (window);
-
+
bool dialogError = TRUE;
while (dialogError)
{
loop = 1;
while (loop)
gtk_main_iteration ();
-
+
dialogError = FALSE;
if(ret == IDOK)
// obviously feel free to change it at will :)
int DoBuildStairsBox(BuildStairsRS* rs)
{
- // i made widgets for just about everything ... i think that's what i need to do dunno tho
+ // i made widgets for just about everything ... i think that's what i need to do dunno tho
GtkWidget *window, *w, *vbox, *hbox;
GtkWidget *textStairHeight, *textRiserTex, *textMainTex;
GtkWidget *radioNorth, *radioSouth, *radioEast, *radioWest; // i'm guessing we can't just abuse 'w' for these if we're getting a value
char *text = "Please set a value in the boxes below and press 'OK' to build the stairs";
window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
-
+
gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
gtk_window_set_title( GTK_WINDOW( window ), "Stair Builder" );
-
+
gtk_container_border_width( GTK_CONTAINER( window ), 10 );
g_object_set_data (G_OBJECT (window), "loop", &loop);
gtk_widget_realize (window);
- // new vbox
+ // new vbox
vbox = gtk_vbox_new( FALSE, 10 );
gtk_container_add( GTK_CONTAINER( window ), vbox );
gtk_widget_show( vbox );
hbox = gtk_hbox_new( FALSE, 10 );
gtk_container_add( GTK_CONTAINER( vbox ), hbox );
gtk_widget_show( hbox );
-
+
// dunno if you want this text or not ...
w = gtk_label_new( text );
gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 ); // not entirely sure on all the parameters / what they do ...
w = gtk_hseparator_new();
gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
gtk_widget_show( w );
-
+
// ------------------------- // indenting == good way of keeping track of lines :)
// new hbox
hbox = gtk_hbox_new( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
-
- textStairHeight = gtk_entry_new_with_max_length( 256 );
+
+ textStairHeight = gtk_entry_new_with_max_length( 256 );
gtk_box_pack_start( GTK_BOX( hbox ), textStairHeight, FALSE, FALSE, 1 );
gtk_widget_show( textStairHeight );
hbox = gtk_hbox_new( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
-
+
// radio buttons confuse me ...
// but this _looks_ right
gtk_widget_show( radioNorth );
radioDirection = gtk_radio_button_group( GTK_RADIO_BUTTON( radioNorth ) );
-
+
radioSouth = gtk_radio_button_new_with_label( radioDirection, "South" );
gtk_box_pack_start( GTK_BOX( hbox ), radioSouth, FALSE, FALSE, 2 );
gtk_widget_show( radioSouth );
hbox = gtk_hbox_new( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
-
+
radioOldStyle = gtk_radio_button_new_with_label( NULL, "Original" );
gtk_box_pack_start( GTK_BOX( hbox ), radioOldStyle, FALSE, FALSE, 0 );
gtk_widget_show( radioOldStyle );
radioBobStyle = gtk_radio_button_new_with_label( radioStyle, "Bob's Style" );
gtk_box_pack_start( GTK_BOX( hbox ), radioBobStyle, FALSE, FALSE, 0 );
gtk_widget_show( radioBobStyle );
-
+
radioStyle = gtk_radio_button_group( GTK_RADIO_BUTTON( radioBobStyle ) );
radioCornerStyle = gtk_radio_button_new_with_label( radioStyle, "Corner Style" );
gtk_box_pack_start( GTK_BOX( hbox ), radioCornerStyle, FALSE, FALSE, 0 );
gtk_widget_show( radioCornerStyle );
-
- // err, the q3r has an if or something so you need bob style checked before this
+
+ // err, the q3r has an if or something so you need bob style checked before this
// is "ungreyed out" but you'll need to do that, as i suck :)
// djbob: er.... yeah um, im not at all sure how i'm gonna sort this
gtk_box_pack_start( GTK_BOX( hbox ), checkUseDetail, FALSE, FALSE, 0 );
gtk_widget_show( checkUseDetail );
- // --------------------------- //
+ // --------------------------- //
hbox = gtk_hbox_new( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT );
gtk_widget_grab_default( w );
gtk_widget_show( w );
-
+
w = gtk_button_new_with_label( "Cancel" );
gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
gtk_widget_show( w );
-
+
ret = IDCANCEL;
// +djbob: need our "little" modal loop mars :P
gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
gtk_widget_show (window);
gtk_grab_add (window);
-
+
bool dialogError = TRUE;
while (dialogError)
{
loop = 1;
while (loop)
gtk_main_iteration ();
-
+
dialogError = FALSE;
if(ret == IDOK)
return ret;
// -djbob
-
+
// there we go, all done ... on my end at least, not bad for a night's work
}
GtkWidget *checkScaleMainH, *checkScaleMainV, *checkScaleTrimH, *checkScaleTrimV;
GtkWidget *comboMain, *comboTrim;
GtkWidget *buttonSetMain, *buttonSetTrim;
- GtkWidget *radioNS, *radioEW;
+ GtkWidget *radioNS, *radioEW;
GSList *radioOrientation;
TwinWidget tw1, tw2;
int ret, loop;
loop = 1;
-
+
window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
-
+
gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
gtk_window_set_title( GTK_WINDOW( window ), "Door Builder" );
-
+
gtk_container_border_width( GTK_CONTAINER( window ), 10 );
g_object_set_data( G_OBJECT( window ), "loop", &loop );
g_object_set_data( G_OBJECT( window ), "ret", &ret );
gtk_widget_realize (window);
-
+
char buffer[256];
GList *listMainTextures = NULL;
GList *listTrimTextures = NULL;
LoadGList(GetFilename(buffer, "plugins/bt/door-tex.txt"), &listMainTextures);
LoadGList(GetFilename(buffer, "plugins/bt/door-tex-trim.txt"), &listTrimTextures);
-
+
vbox = gtk_vbox_new( FALSE, 10 );
gtk_container_add( GTK_CONTAINER( window ), vbox );
gtk_widget_show( vbox );
checkScaleTrimV = gtk_check_button_new_with_label( "Scale Trim Texture Vertically" );
gtk_box_pack_start( GTK_BOX( hbox ), checkScaleTrimV, FALSE, FALSE, 0 );
gtk_widget_show( checkScaleTrimV );
-
- // --------------------- //
+
+ // --------------------- //
hbox = gtk_hbox_new( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
gtk_widget_show( buttonSetMain );
// ------------------- //
-
+
hbox = gtk_hbox_new( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
gtk_widget_show( w );
- // argh more radio buttons!
+ // argh more radio buttons!
radioNS = gtk_radio_button_new_with_label( NULL, "North - South" );
gtk_box_pack_start( GTK_BOX( hbox ), radioNS, FALSE, FALSE, 0 );
gtk_widget_show( radioNS );
GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT );
gtk_widget_grab_default( w );
gtk_widget_show( w );
-
+
w = gtk_button_new_with_label( "Cancel" );
gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
gtk_widget_show (window);
gtk_grab_add (window);
-
+
while (loop)
gtk_main_iteration ();
rs->nOrientation = DIRECTION_NS;
else if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radioEW)))
rs->nOrientation = DIRECTION_EW;
-
+
gtk_grab_remove (window);
gtk_widget_destroy (window);
GtkWidget *check1, *check2;
int ret, loop = 1;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
+
gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
g_object_set_data (G_OBJECT (window), "ret", &ret);
gtk_widget_realize (window);
-
-
+
+
vbox = gtk_vbox_new (FALSE, 10);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show (vbox);
-
+
// ---- vbox ----
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
gtk_widget_show (hbox);
-
+
// ---- hbox ----
text1 = gtk_entry_new_with_max_length(256);
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
gtk_widget_show (hbox);
-
+
// ---- hbox ----
text2 = gtk_entry_new_with_max_length(256);
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
gtk_widget_show (hbox);
-
+
// ---- hbox ----
text3 = gtk_entry_new_with_max_length(256);
gtk_widget_show (w);
// ---- /hbox ----
-
+
w = gtk_hseparator_new();
gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
gtk_widget_show( w );
gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0);
gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) );
gtk_widget_show( w );
-
+
GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT );
gtk_widget_grab_default( w );
gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0);
gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) );
gtk_widget_show( w );
-
+
w = gtk_button_new_with_label( "Cancel" );
gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
gtk_widget_show( w );
-
+
ret = IDCANCEL;
// ----------------- //
gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
gtk_widget_show (window);
gtk_grab_add (window);
-
+
bool dialogError = TRUE;
while (dialogError)
{
loop = 1;
while (loop)
gtk_main_iteration ();
-
+
dialogError = FALSE;
if(ret == IDYES)
{
GtkWidget *window, *w, *vbox, *hbox;
int ret, loop = 1;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
+
gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
g_object_set_data (G_OBJECT (window), "ret", &ret);
gtk_widget_realize (window);
-
-
+
+
vbox = gtk_vbox_new (FALSE, 10);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show (vbox);
-
+
// ---- vbox ----
hbox = gtk_hbox_new( FALSE, 10 );
GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
gtk_widget_grab_default (w);
gtk_widget_show (w);
-
+
w = gtk_button_new_with_label ("Blue->Red");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked", GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDYES));
ret = IDCANCEL;
// ---- /hbox ----
-
+
// ---- /vbox ----
gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
gtk_widget_show (window);
gtk_grab_add (window);
-
+
while (loop)
gtk_main_iteration ();
GtkWidget *window, *w, *vbox, *hbox, *frame, *table;
int ret, loop = 1;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
+
gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
g_object_set_data (G_OBJECT (window), "ret", &ret);
gtk_widget_realize (window);
-
+
vbox = gtk_vbox_new (FALSE, 10);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show (vbox);
-
+
// ---- vbox ----
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
gtk_widget_show (hbox);
-
+
// ---- hbox ----
texSelected = "Currently Selected Face: ";
// ---- /hbox ----
- frame = gtk_frame_new ("Reset Texture Names");
+ frame = gtk_frame_new (_("Reset Texture Names"));
gtk_widget_show (frame);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
// ---- /frame ----
- frame = gtk_frame_new ("Reset Scales");
+ frame = gtk_frame_new (_("Reset Scales"));
gtk_widget_show (frame);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
// ---- /frame ----
- frame = gtk_frame_new ("Reset Shift");
+ frame = gtk_frame_new (_("Reset Shift"));
gtk_widget_show (frame);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
// ---- /frame ----
- frame = gtk_frame_new ("Reset Rotation");
+ frame = gtk_frame_new (_("Reset Rotation"));
gtk_widget_show (frame);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
gtk_widget_show (hbox);
-
+
// ---- hbox ----
w = gtk_button_new_with_label ("Use Selected Brushes");
GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
gtk_widget_grab_default (w);
gtk_widget_show (w);
-
+
w = gtk_button_new_with_label ("Use All Brushes");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked", GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDYES));
ret = IDCANCEL;
// ---- /hbox ----
-
+
// ---- /vbox ----
gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
gtk_widget_show (window);
gtk_grab_add (window);
-
+
Update_TextureReseter();
bool dialogError = TRUE;
loop = 1;
while (loop)
gtk_main_iteration ();
-
+
dialogError = FALSE;
if(ret != IDCANCEL)
GtkWidget *numPoints;
int ret, loop = 1;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
+
gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
gtk_object_set_data (GTK_OBJECT (window), "ret", &ret);
gtk_widget_realize (window);
-
+
vbox = gtk_vbox_new (FALSE, 10);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show (vbox);
-
+
// ---- vbox ----
hbox = gtk_hbox_new (FALSE, 10);
// ---- /hbox ----
- frame = gtk_frame_new ("Radii");
+ frame = gtk_frame_new (_("Radii"));
gtk_widget_show (frame);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
- frame = gtk_frame_new ("Angles");
+ frame = gtk_frame_new (_("Angles"));
gtk_widget_show (frame);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
gtk_widget_show (angleEnd);
- frame = gtk_frame_new ("Height");
+ frame = gtk_frame_new (_("Height"));
gtk_widget_show (frame);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
- frame = gtk_frame_new ("Points");
+ frame = gtk_frame_new (_("Points"));
gtk_widget_show (frame);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
gtk_widget_show (hbox);
-
+
// ---- hbox ----
w = gtk_button_new_with_label ("Ok");
GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
gtk_widget_grab_default (w);
gtk_widget_show (w);
-
+
w = gtk_button_new_with_label ("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (w), "clicked", GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDCANCEL));
ret = IDCANCEL;
// ---- /hbox ----
-
+
gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
gtk_widget_show (window);
gtk_grab_add (window);
-
+
bool dialogError = TRUE;
while (dialogError)
{
loop = 1;
while (loop)
gtk_main_iteration ();
-
+
dialogError = FALSE;
if(ret != IDCANCEL)
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#include <glib/gi18n.h>
#include "surfdlg_plugin.h"
void SetFlagButtons_Heretic2(texdef_to_face_t *texdef_face_list, bool b_isListEmpty)
{
- int i;
int contents = 0;
int flags = 0;
int value = 0;
{
int i, count=0;
gchar *result;
- int entry_value;
- texdef_t *pt;
- brush_t *b;
- face_t *f;
// Limit input to digits, throwing out anything else
// Modified from Gtk FAQ for text filtering of GtkEntry
GtkWidget *frame2;
GtkWidget *hbox4;
GtkWidget *label4;
- GtkWidget *vbox4;
GtkWidget *table3;
GtkWidget *label5;
GtkWidget *label3;
- frame1 = gtk_frame_new ("Brush/Face Flags");
+ frame1 = gtk_frame_new (_("Brush/Face Flags"));
gtk_widget_show (frame1);
gtk_container_add (GTK_CONTAINER (surfacedialog_widget), frame1);
gtk_widget_show (table1);
gtk_box_pack_start (GTK_BOX (vbox3), table1, TRUE, TRUE, 0);
- surface_lightbutton = gtk_toggle_button_new_with_mnemonic ("Light");
+ surface_lightbutton = gtk_toggle_button_new_with_mnemonic (_("Light"));
gtk_widget_show (surface_lightbutton);
gtk_table_attach (GTK_TABLE (table1), surface_lightbutton, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- surface_slickbutton = gtk_toggle_button_new_with_mnemonic ("Slick");
+ surface_slickbutton = gtk_toggle_button_new_with_mnemonic (_("Slick"));
gtk_widget_show (surface_slickbutton);
gtk_table_attach (GTK_TABLE (table1), surface_slickbutton, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- surface_skybutton = gtk_toggle_button_new_with_mnemonic ("Sky");
+ surface_skybutton = gtk_toggle_button_new_with_mnemonic (_("Sky"));
gtk_widget_show (surface_skybutton);
gtk_table_attach (GTK_TABLE (table1), surface_skybutton, 2, 3, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- surface_warpbutton = gtk_toggle_button_new_with_mnemonic ("Warp");
+ surface_warpbutton = gtk_toggle_button_new_with_mnemonic (_("Warp"));
gtk_widget_show (surface_warpbutton);
gtk_table_attach (GTK_TABLE (table1), surface_warpbutton, 3, 4, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- surface_trans33button = gtk_toggle_button_new_with_mnemonic ("Trans33");
+ surface_trans33button = gtk_toggle_button_new_with_mnemonic (_("Trans33"));
gtk_widget_show (surface_trans33button);
gtk_table_attach (GTK_TABLE (table1), surface_trans33button, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- surface_trans66button = gtk_toggle_button_new_with_mnemonic ("Trans66");
+ surface_trans66button = gtk_toggle_button_new_with_mnemonic (_("Trans66"));
gtk_widget_show (surface_trans66button);
gtk_table_attach (GTK_TABLE (table1), surface_trans66button, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- surface_flowingbutton = gtk_toggle_button_new_with_mnemonic ("Flowing");
+ surface_flowingbutton = gtk_toggle_button_new_with_mnemonic (_("Flowing"));
gtk_widget_show (surface_flowingbutton);
gtk_table_attach (GTK_TABLE (table1), surface_flowingbutton, 2, 3, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- surface_nodrawbutton = gtk_toggle_button_new_with_mnemonic ("NoDraw");
+ surface_nodrawbutton = gtk_toggle_button_new_with_mnemonic (_("NoDraw"));
gtk_widget_show (surface_nodrawbutton);
gtk_table_attach (GTK_TABLE (table1), surface_nodrawbutton, 3, 4, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- surface_tallwallbutton = gtk_toggle_button_new_with_mnemonic ("TallWall");
+ surface_tallwallbutton = gtk_toggle_button_new_with_mnemonic (_("TallWall"));
gtk_widget_show (surface_tallwallbutton);
gtk_table_attach (GTK_TABLE (table1), surface_tallwallbutton, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- surface_alphatexbutton = gtk_toggle_button_new_with_mnemonic ("AlphaTex");
+ surface_alphatexbutton = gtk_toggle_button_new_with_mnemonic (_("AlphaTex"));
gtk_widget_show (surface_alphatexbutton);
gtk_table_attach (GTK_TABLE (table1), surface_alphatexbutton, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- surface_animspeedbutton = gtk_toggle_button_new_with_mnemonic ("AnimSpeed");
+ surface_animspeedbutton = gtk_toggle_button_new_with_mnemonic (_("AnimSpeed"));
gtk_widget_show (surface_animspeedbutton);
gtk_table_attach (GTK_TABLE (table1), surface_animspeedbutton, 2, 3, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- surface_undulatebutton = gtk_toggle_button_new_with_mnemonic ("Undulate");
+ surface_undulatebutton = gtk_toggle_button_new_with_mnemonic (_("Undulate"));
gtk_widget_show (surface_undulatebutton);
gtk_table_attach (GTK_TABLE (table1), surface_undulatebutton, 3, 4, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
gtk_widget_show (hbox4);
gtk_container_add (GTK_CONTAINER (frame2), hbox4);
- surf_gravel_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, "Gravel");
+ surf_gravel_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Gravel"));
gtk_widget_show (surf_gravel_radiobutton);
gtk_box_pack_start (GTK_BOX (hbox4), surf_gravel_radiobutton, TRUE, FALSE, 0);
- surf_metal_radiobutton = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON(surf_gravel_radiobutton), "Metal");
+ surf_metal_radiobutton = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON(surf_gravel_radiobutton), _("Metal"));
gtk_widget_show (surf_metal_radiobutton);
gtk_box_pack_start (GTK_BOX (hbox4), surf_metal_radiobutton, TRUE, FALSE, 0);
- surf_stone_radiobutton = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON(surf_metal_radiobutton), "Stone");
+ surf_stone_radiobutton = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON(surf_metal_radiobutton), _("Stone"));
gtk_widget_show (surf_stone_radiobutton);
gtk_box_pack_start (GTK_BOX (hbox4), surf_stone_radiobutton, TRUE, FALSE, 0);
- surf_wood_radiobutton = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON(surf_stone_radiobutton), "Wood");
+ surf_wood_radiobutton = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON(surf_stone_radiobutton), _("Wood"));
gtk_widget_show (surf_wood_radiobutton);
gtk_box_pack_start (GTK_BOX (hbox4), surf_wood_radiobutton, TRUE, FALSE, 0);
- label4 = gtk_label_new ("Material");
+ label4 = gtk_label_new (_("Material"));
gtk_widget_show (label4);
gtk_frame_set_label_widget (GTK_FRAME (frame2), label4);
gtk_label_set_justify (GTK_LABEL (label4), GTK_JUSTIFY_LEFT);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
- label5 = gtk_label_new ("Value: ");
+ label5 = gtk_label_new (_("Value: "));
gtk_widget_show (label5);
gtk_table_attach (GTK_TABLE (table3), label5, 1, 2, 0, 1,
(GtkAttachOptions) (0),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
- label2 = gtk_label_new ("Surface Flags");
+ label2 = gtk_label_new (_("Surface Flags"));
gtk_widget_show (label2);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label2);
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT);
gtk_widget_show (table2);
gtk_container_add (GTK_CONTAINER (notebook1), table2);
- content_solidbutton = gtk_toggle_button_new_with_mnemonic ("Solid");
+ content_solidbutton = gtk_toggle_button_new_with_mnemonic (_("Solid"));
gtk_widget_show (content_solidbutton);
gtk_table_attach (GTK_TABLE (table2), content_solidbutton, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_windowbutton = gtk_toggle_button_new_with_mnemonic ("Window");
+ content_windowbutton = gtk_toggle_button_new_with_mnemonic (_("Window"));
gtk_widget_show (content_windowbutton);
gtk_table_attach (GTK_TABLE (table2), content_windowbutton, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_illusbutton = gtk_toggle_button_new_with_mnemonic ("Illusion");
+ content_illusbutton = gtk_toggle_button_new_with_mnemonic (_("Illusion"));
gtk_widget_show (content_illusbutton);
gtk_table_attach (GTK_TABLE (table2), content_illusbutton, 2, 3, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_lavabutton = gtk_toggle_button_new_with_mnemonic ("Lava");
+ content_lavabutton = gtk_toggle_button_new_with_mnemonic (_("Lava"));
gtk_widget_show (content_lavabutton);
gtk_table_attach (GTK_TABLE (table2), content_lavabutton, 3, 4, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_slimebutton = gtk_toggle_button_new_with_mnemonic ("Slime");
+ content_slimebutton = gtk_toggle_button_new_with_mnemonic (_("Slime"));
gtk_widget_show (content_slimebutton);
gtk_table_attach (GTK_TABLE (table2), content_slimebutton, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_waterbutton = gtk_toggle_button_new_with_mnemonic ("Water");
+ content_waterbutton = gtk_toggle_button_new_with_mnemonic (_("Water"));
gtk_widget_show (content_waterbutton);
gtk_table_attach (GTK_TABLE (table2), content_waterbutton, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_mistbutton = gtk_toggle_button_new_with_mnemonic ("Mist");
+ content_mistbutton = gtk_toggle_button_new_with_mnemonic (_("Mist"));
gtk_widget_show (content_mistbutton);
gtk_table_attach (GTK_TABLE (table2), content_mistbutton, 2, 3, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_areaportalbutton = gtk_toggle_button_new_with_mnemonic ("AreaPortal");
+ content_areaportalbutton = gtk_toggle_button_new_with_mnemonic (_("AreaPortal"));
gtk_widget_show (content_areaportalbutton);
gtk_table_attach (GTK_TABLE (table2), content_areaportalbutton, 3, 4, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_playerclipbutton = gtk_toggle_button_new_with_mnemonic ("PlayerClip");
+ content_playerclipbutton = gtk_toggle_button_new_with_mnemonic (_("PlayerClip"));
gtk_widget_show (content_playerclipbutton);
gtk_table_attach (GTK_TABLE (table2), content_playerclipbutton, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_monsterclipbutton = gtk_toggle_button_new_with_mnemonic ("MonsterClip");
+ content_monsterclipbutton = gtk_toggle_button_new_with_mnemonic (_("MonsterClip"));
gtk_widget_show (content_monsterclipbutton);
gtk_table_attach (GTK_TABLE (table2), content_monsterclipbutton, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_current0button = gtk_toggle_button_new_with_mnemonic ("Current 0");
+ content_current0button = gtk_toggle_button_new_with_mnemonic (_("Current 0"));
gtk_widget_show (content_current0button);
gtk_table_attach (GTK_TABLE (table2), content_current0button, 2, 3, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_current90button = gtk_toggle_button_new_with_mnemonic ("Current 90");
+ content_current90button = gtk_toggle_button_new_with_mnemonic (_("Current 90"));
gtk_widget_show (content_current90button);
gtk_table_attach (GTK_TABLE (table2), content_current90button, 3, 4, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_current180button = gtk_toggle_button_new_with_mnemonic ("Current 180");
+ content_current180button = gtk_toggle_button_new_with_mnemonic (_("Current 180"));
gtk_widget_show (content_current180button);
gtk_table_attach (GTK_TABLE (table2), content_current180button, 0, 1, 3, 4,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_current270button = gtk_toggle_button_new_with_mnemonic ("Current 270");
+ content_current270button = gtk_toggle_button_new_with_mnemonic (_("Current 270"));
gtk_widget_show (content_current270button);
gtk_table_attach (GTK_TABLE (table2), content_current270button, 1, 2, 3, 4,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_currentUPbutton = gtk_toggle_button_new_with_mnemonic ("Current UP");
+ content_currentUPbutton = gtk_toggle_button_new_with_mnemonic (_("Current UP"));
gtk_widget_show (content_currentUPbutton);
gtk_table_attach (GTK_TABLE (table2), content_currentUPbutton, 2, 3, 3, 4,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_currentDOWNbutton = gtk_toggle_button_new_with_mnemonic ("Current DOWN");
+ content_currentDOWNbutton = gtk_toggle_button_new_with_mnemonic (_("Current DOWN"));
gtk_widget_show (content_currentDOWNbutton);
gtk_table_attach (GTK_TABLE (table2), content_currentDOWNbutton, 3, 4, 3, 4,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_originbutton = gtk_toggle_button_new_with_mnemonic ("Origin");
+ content_originbutton = gtk_toggle_button_new_with_mnemonic (_("Origin"));
gtk_widget_show (content_originbutton);
gtk_table_attach (GTK_TABLE (table2), content_originbutton, 0, 1, 4, 5,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_detailbutton = gtk_toggle_button_new_with_mnemonic ("Detail");
+ content_detailbutton = gtk_toggle_button_new_with_mnemonic (_("Detail"));
gtk_widget_show (content_detailbutton);
gtk_table_attach (GTK_TABLE (table2), content_detailbutton, 1, 2, 4, 5,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_ladderbutton = gtk_toggle_button_new_with_mnemonic ("Ladder");
+ content_ladderbutton = gtk_toggle_button_new_with_mnemonic (_("Ladder"));
gtk_widget_show (content_ladderbutton);
gtk_table_attach (GTK_TABLE (table2), content_ladderbutton, 2, 3, 4, 5,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- content_camnoblockbutton = gtk_toggle_button_new_with_mnemonic ("Cam No Block");
+ content_camnoblockbutton = gtk_toggle_button_new_with_mnemonic (_("Cam No Block"));
gtk_widget_show (content_camnoblockbutton);
gtk_table_attach (GTK_TABLE (table2), content_camnoblockbutton, 3, 4, 4, 5,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
- label3 = gtk_label_new ("Content Flags");
+ label3 = gtk_label_new (_("Content Flags"));
gtk_widget_show (label3);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label3);
gtk_label_set_justify (GTK_LABEL (label3), GTK_JUSTIFY_LEFT);
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#include <glib/gi18n.h>
#include "surfdlg_plugin.h"
inline void clear_inconsistent(GtkWidget *toggle_button)
{
- GtkWidget *button_label;
-
if ( gtk_toggle_button_get_inconsistent(GTK_TOGGLE_BUTTON (toggle_button)) )
{
gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON (toggle_button), FALSE);
}
-
}
void clear_all_inconsistent(void)
void SetFlagButtons_Quake2(texdef_to_face_t *texdef_face_list, bool b_isListEmpty)
{
- int i;
int contents = 0;
int flags = 0;
int value = 0;
{
int i, count=0;
gchar *result;
- int entry_value;
- texdef_t *pt;
- brush_t *b;
- face_t *f;
// Limit input to digits, throwing out anything else
// Modified from Gtk FAQ for text filtering of GtkEntry
GtkWidget *label5;
GtkWidget *table3;
GtkWidget *label6;
- GtkWidget *table1;
-
- frame1 = gtk_frame_new ("Flags");
+ frame1 = gtk_frame_new (_("Flags"));
gtk_widget_show (frame1);
gtk_container_add (GTK_CONTAINER (surfacedialog_widget), frame1);
gtk_widget_show (table4);
gtk_box_pack_start (GTK_BOX (vbox2), table4, TRUE, TRUE, 0);
- surface_lightbutton = gtk_toggle_button_new_with_label ("Light");
+ surface_lightbutton = gtk_toggle_button_new_with_label (_("Light"));
gtk_signal_connect (GTK_OBJECT (surface_lightbutton), "toggled",
GTK_SIGNAL_FUNC (on_surface_lightbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (surface_lightbutton), QUAKE2_FLAG_BUTTON_BORDER);
- surface_slickbutton = gtk_toggle_button_new_with_label ("Slick");
+ surface_slickbutton = gtk_toggle_button_new_with_label (_("Slick"));
gtk_signal_connect (GTK_OBJECT (surface_slickbutton), "toggled",
GTK_SIGNAL_FUNC (on_surface_slickbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (surface_slickbutton), QUAKE2_FLAG_BUTTON_BORDER);
- surface_skybutton = gtk_toggle_button_new_with_label ("Sky");
+ surface_skybutton = gtk_toggle_button_new_with_label (_("Sky"));
gtk_signal_connect (GTK_OBJECT (surface_skybutton), "toggled",
GTK_SIGNAL_FUNC (on_surface_skybutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (surface_skybutton), QUAKE2_FLAG_BUTTON_BORDER);
- surface_warpbutton = gtk_toggle_button_new_with_label ("Warp");
+ surface_warpbutton = gtk_toggle_button_new_with_label (_("Warp"));
gtk_signal_connect (GTK_OBJECT (surface_warpbutton), "toggled",
GTK_SIGNAL_FUNC (on_surface_warpbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (surface_warpbutton), QUAKE2_FLAG_BUTTON_BORDER);
- surface_trans33button = gtk_toggle_button_new_with_label ("Trans 33");
+ surface_trans33button = gtk_toggle_button_new_with_label (_("Trans 33"));
gtk_signal_connect (GTK_OBJECT (surface_trans33button), "toggled",
GTK_SIGNAL_FUNC (on_surface_trans33button_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (surface_trans33button), QUAKE2_FLAG_BUTTON_BORDER);
- surface_trans66button = gtk_toggle_button_new_with_label ("Trans 66");
+ surface_trans66button = gtk_toggle_button_new_with_label (_("Trans 66"));
gtk_signal_connect (GTK_OBJECT (surface_trans66button), "toggled",
GTK_SIGNAL_FUNC (on_surface_trans66button_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (surface_trans66button), QUAKE2_FLAG_BUTTON_BORDER);
- surface_flowingbutton = gtk_toggle_button_new_with_label ("Flowing");
+ surface_flowingbutton = gtk_toggle_button_new_with_label (_("Flowing"));
gtk_signal_connect (GTK_OBJECT (surface_flowingbutton), "toggled",
GTK_SIGNAL_FUNC (on_surface_flowingbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (surface_flowingbutton), QUAKE2_FLAG_BUTTON_BORDER);
- surface_nodrawbutton = gtk_toggle_button_new_with_label ("NoDraw");
+ surface_nodrawbutton = gtk_toggle_button_new_with_label (_("NoDraw"));
gtk_signal_connect (GTK_OBJECT (surface_nodrawbutton), "toggled",
GTK_SIGNAL_FUNC (on_surface_nodrawbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (surface_nodrawbutton), QUAKE2_FLAG_BUTTON_BORDER);
- surface_hintbutton = gtk_toggle_button_new_with_label ("Hint");
+ surface_hintbutton = gtk_toggle_button_new_with_label (_("Hint"));
gtk_signal_connect (GTK_OBJECT (surface_hintbutton), "toggled",
GTK_SIGNAL_FUNC (on_surface_hintbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (surface_hintbutton), QUAKE2_FLAG_BUTTON_BORDER);
- surface_skipbutton = gtk_toggle_button_new_with_label ("Skip");
+ surface_skipbutton = gtk_toggle_button_new_with_label (_("Skip"));
gtk_signal_connect (GTK_OBJECT (surface_skipbutton), "toggled",
GTK_SIGNAL_FUNC (on_surface_skipbutton_toggled),
NULL);
gtk_widget_show (vbox4);
gtk_box_pack_start (GTK_BOX (hbox3), vbox4, TRUE, TRUE, 0);
- value_label = gtk_label_new (" Value: ");
+ value_label = gtk_label_new (_("Value: "));
gtk_widget_show (value_label);
gtk_box_pack_start (GTK_BOX (hbox3), value_label, FALSE, FALSE, 0);
gtk_widget_show (vbox3);
gtk_box_pack_start (GTK_BOX (hbox3), vbox3, TRUE, TRUE, 0);
- label5 = gtk_label_new ("Surface Flags");
+ label5 = gtk_label_new (_("Surface Flags"));
gtk_widget_show (label5);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label5);
gtk_widget_show (table3);
gtk_container_add (GTK_CONTAINER (notebook1), table3);
- content_solidbutton = gtk_toggle_button_new_with_label ("Solid");
+ content_solidbutton = gtk_toggle_button_new_with_label (_("Solid"));
gtk_signal_connect (GTK_OBJECT (content_solidbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_solidbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_solidbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_windowbutton = gtk_toggle_button_new_with_label ("Window");
+ content_windowbutton = gtk_toggle_button_new_with_label (_("Window"));
gtk_signal_connect (GTK_OBJECT (content_windowbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_windowbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_windowbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_auxbutton = gtk_toggle_button_new_with_label ("Aux");
+ content_auxbutton = gtk_toggle_button_new_with_label (_("Aux"));
gtk_signal_connect (GTK_OBJECT (content_auxbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_auxbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_auxbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_lavabutton = gtk_toggle_button_new_with_label ("Lava");
+ content_lavabutton = gtk_toggle_button_new_with_label (_("Lava"));
gtk_signal_connect (GTK_OBJECT (content_lavabutton), "toggled",
GTK_SIGNAL_FUNC (on_content_lavabutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_lavabutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_slimebutton = gtk_toggle_button_new_with_label ("Slime");
+ content_slimebutton = gtk_toggle_button_new_with_label (_("Slime"));
gtk_signal_connect (GTK_OBJECT (content_slimebutton), "toggled",
GTK_SIGNAL_FUNC (on_content_slimebutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_slimebutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_waterbutton = gtk_toggle_button_new_with_label ("Water");
+ content_waterbutton = gtk_toggle_button_new_with_label (_("Water"));
gtk_signal_connect (GTK_OBJECT (content_waterbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_waterbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_waterbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_mistbutton = gtk_toggle_button_new_with_label ("Mist");
+ content_mistbutton = gtk_toggle_button_new_with_label (_("Mist"));
gtk_signal_connect (GTK_OBJECT (content_mistbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_mistbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_mistbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_areaportalbutton = gtk_toggle_button_new_with_label ("AreaPortal");
+ content_areaportalbutton = gtk_toggle_button_new_with_label (_("AreaPortal"));
gtk_signal_connect (GTK_OBJECT (content_areaportalbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_areaportalbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_areaportalbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_playerclipbutton = gtk_toggle_button_new_with_label ("PlayerClip");
+ content_playerclipbutton = gtk_toggle_button_new_with_label (_("PlayerClip"));
gtk_signal_connect (GTK_OBJECT (content_playerclipbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_playerclipbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_playerclipbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_monsterclipbutton = gtk_toggle_button_new_with_label ("MonsterClip");
+ content_monsterclipbutton = gtk_toggle_button_new_with_label (_("MonsterClip"));
gtk_signal_connect (GTK_OBJECT (content_monsterclipbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_monsterclipbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_monsterclipbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_current0button = gtk_toggle_button_new_with_label ("Current 0");
+ content_current0button = gtk_toggle_button_new_with_label (_("Current 0"));
gtk_signal_connect (GTK_OBJECT (content_current0button), "toggled",
GTK_SIGNAL_FUNC (on_content_current0button_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_current0button), QUAKE2_FLAG_BUTTON_BORDER);
- content_current90button = gtk_toggle_button_new_with_label ("Current 90");
+ content_current90button = gtk_toggle_button_new_with_label (_("Current 90"));
gtk_signal_connect (GTK_OBJECT (content_current90button), "toggled",
GTK_SIGNAL_FUNC (on_content_current90button_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_current90button), QUAKE2_FLAG_BUTTON_BORDER);
- content_current180button = gtk_toggle_button_new_with_label ("Current 180");
+ content_current180button = gtk_toggle_button_new_with_label (_("Current 180"));
gtk_signal_connect (GTK_OBJECT (content_current180button), "toggled",
GTK_SIGNAL_FUNC (on_content_current180button_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_current180button), QUAKE2_FLAG_BUTTON_BORDER);
- content_current270button = gtk_toggle_button_new_with_label ("Current 270");
+ content_current270button = gtk_toggle_button_new_with_label (_("Current 270"));
gtk_signal_connect (GTK_OBJECT (content_current270button), "toggled",
GTK_SIGNAL_FUNC (on_content_current270button_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_current270button), QUAKE2_FLAG_BUTTON_BORDER);
- content_currentUPbutton = gtk_toggle_button_new_with_label ("Current UP");
+ content_currentUPbutton = gtk_toggle_button_new_with_label (_("Current UP"));
gtk_signal_connect (GTK_OBJECT (content_currentUPbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_currentUPbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_currentUPbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_currentDOWNbutton = gtk_toggle_button_new_with_label ("Current DOWN");
+ content_currentDOWNbutton = gtk_toggle_button_new_with_label (_("Current DOWN"));
gtk_signal_connect (GTK_OBJECT (content_currentDOWNbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_currentDOWNbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_currentDOWNbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_originbutton = gtk_toggle_button_new_with_label ("Origin");
+ content_originbutton = gtk_toggle_button_new_with_label (_("Origin"));
gtk_signal_connect (GTK_OBJECT (content_originbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_originbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_originbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_detailbutton = gtk_toggle_button_new_with_label ("Detail");
+ content_detailbutton = gtk_toggle_button_new_with_label (_("Detail"));
gtk_signal_connect (GTK_OBJECT (content_detailbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_detailbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_detailbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_translucentbutton = gtk_toggle_button_new_with_label ("Translucent");
+ content_translucentbutton = gtk_toggle_button_new_with_label (_("Translucent"));
gtk_signal_connect (GTK_OBJECT (content_translucentbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_translucentbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_translucentbutton), QUAKE2_FLAG_BUTTON_BORDER);
- content_ladderbutton = gtk_toggle_button_new_with_label ("Ladder");
+ content_ladderbutton = gtk_toggle_button_new_with_label (_("Ladder"));
gtk_signal_connect (GTK_OBJECT (content_ladderbutton), "toggled",
GTK_SIGNAL_FUNC (on_content_ladderbutton_toggled),
NULL);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (content_ladderbutton), QUAKE2_FLAG_BUTTON_BORDER);
- label6 = gtk_label_new ("Content Flags");
+ label6 = gtk_label_new (_("Content Flags"));
gtk_widget_show (label6);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label6);