Re: question about gtk_dialog (gtk2)



nobody have idea?


On 2018.06.15 13:43, Wojciech Puchar wrote:
how to make dialogs appear on center of screen not on left corner. tried multiple things no results. For normal windows gtk_window_set_position works

for dialog it doesn't

below is example routine to ask a yes/no question from my program.


i've tried gtk_window_set_position(GTK_WINDOW(dialog),GTK_WIN_POS_CENTER_ALWAYS);

but it doesn't work


nt pytanie(const char *txt) {
 GtkWidget *dialog,*lab;
 int odpowiedz;
dialog=gtk_dialog_new_with_buttons(TEXT_QUESTION,NULL,GTK_DIALOG_DESTROY_WITH_PARENT,
 TEXT_TAK,GTK_RESPONSE_ACCEPT,TEXT_NIE,GTK_RESPONSE_NONE,NULL);
 lab=new_label(txt);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), lab);
 odpowiedz=gtk_dialog_run(GTK_DIALOG(dialog));
 gtk_widget_destroy(dialog);
 return (odpowiedz==GTK_RESPONSE_ACCEPT);
}




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]