mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-02-03 15:11:45 +00:00
minor changes
This commit is contained in:
parent
9a8d530b09
commit
7b95e1bd6f
1 changed files with 7 additions and 1 deletions
|
@ -849,6 +849,7 @@ gint dialog_url_callback( GtkWidget *widget, GdkEvent* event, gpointer data ){
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// helper fcn for gtk_MessageBox
|
||||||
static GtkWidget * gtk_AddDlgButton( GtkWidget *container, const char *label,
|
static GtkWidget * gtk_AddDlgButton( GtkWidget *container, const char *label,
|
||||||
const int clickSignal, qboolean setGrabDefault ) {
|
const int clickSignal, qboolean setGrabDefault ) {
|
||||||
GtkWidget *btn = gtk_button_new_with_label( _( label ) );
|
GtkWidget *btn = gtk_button_new_with_label( _( label ) );
|
||||||
|
@ -856,7 +857,10 @@ static GtkWidget * gtk_AddDlgButton( GtkWidget *container, const char *label,
|
||||||
gtk_signal_connect( GTK_OBJECT( btn ), "clicked",
|
gtk_signal_connect( GTK_OBJECT( btn ), "clicked",
|
||||||
GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( clickSignal ) );
|
GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( clickSignal ) );
|
||||||
GTK_WIDGET_SET_FLAGS( btn, GTK_CAN_DEFAULT );
|
GTK_WIDGET_SET_FLAGS( btn, GTK_CAN_DEFAULT );
|
||||||
if( setGrabDefault ) gtk_widget_grab_default( btn );
|
|
||||||
|
if( setGrabDefault )
|
||||||
|
gtk_widget_grab_default( btn );
|
||||||
|
|
||||||
gtk_widget_show( btn );
|
gtk_widget_show( btn );
|
||||||
|
|
||||||
return btn;
|
return btn;
|
||||||
|
@ -975,6 +979,7 @@ int WINAPI gtk_MessageBoxNew( void *parent, const char *message,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MB_YESNOCANCEL: {
|
case MB_YESNOCANCEL: {
|
||||||
|
//! @todo accelerators?
|
||||||
gtk_AddDlgButton( buttons_hbox, "Yes", IDYES, TRUE );
|
gtk_AddDlgButton( buttons_hbox, "Yes", IDYES, TRUE );
|
||||||
gtk_AddDlgButton( buttons_hbox, "No", IDNO, FALSE );
|
gtk_AddDlgButton( buttons_hbox, "No", IDNO, FALSE );
|
||||||
gtk_AddDlgButton( buttons_hbox, "Cancel", IDCANCEL, FALSE );
|
gtk_AddDlgButton( buttons_hbox, "Cancel", IDCANCEL, FALSE );
|
||||||
|
@ -982,6 +987,7 @@ int WINAPI gtk_MessageBoxNew( void *parent, const char *message,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MB_YESNO: {
|
case MB_YESNO: {
|
||||||
|
//! @todo accelerators?
|
||||||
gtk_AddDlgButton( buttons_hbox, "Yes", IDYES, TRUE );
|
gtk_AddDlgButton( buttons_hbox, "Yes", IDYES, TRUE );
|
||||||
gtk_AddDlgButton( buttons_hbox, "No", IDNO, FALSE );
|
gtk_AddDlgButton( buttons_hbox, "No", IDNO, FALSE );
|
||||||
ret = IDNO;
|
ret = IDNO;
|
||||||
|
|
Loading…
Reference in a new issue