Commit 61657b35 authored by winckel's avatar winckel

Put dialog box in the center of main window.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4985 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 6720a1d7
...@@ -41,6 +41,9 @@ int ui_notification_dialog(GtkMessageType type, gboolean cancel, const char *tit ...@@ -41,6 +41,9 @@ int ui_notification_dialog(GtkMessageType type, gboolean cancel, const char *tit
dialogbox = gtk_message_dialog_new (GTK_WINDOW(ui_main_data.window), GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL, type, dialogbox = gtk_message_dialog_new (GTK_WINDOW(ui_main_data.window), GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL, type,
cancel ? GTK_BUTTONS_OK_CANCEL : GTK_BUTTONS_OK, "%s", cancel ? GTK_BUTTONS_OK_CANCEL : GTK_BUTTONS_OK, "%s",
buffer); buffer);
/* Set the window at center of main window */
gtk_window_set_position (GTK_WINDOW(dialogbox), GTK_WIN_POS_CENTER_ON_PARENT);
gtk_dialog_set_default_response (GTK_DIALOG(dialogbox), GTK_RESPONSE_OK); gtk_dialog_set_default_response (GTK_DIALOG(dialogbox), GTK_RESPONSE_OK);
snprintf (buffer, sizeof(buffer), "%s: %s", title_type_strings[type], title); snprintf (buffer, sizeof(buffer), "%s: %s", title_type_strings[type], title);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment