diff options
| author | Leandro Pereira <leandro@hardinfo.org> | 2019-06-27 20:53:40 -0700 | 
|---|---|---|
| committer | Leandro Pereira <leandro@hardinfo.org> | 2019-06-28 07:04:31 -0700 | 
| commit | 83de522ed44c719ba887935893b8c97b005d47fd (patch) | |
| tree | b7361f044581ec835d43308274d05f859491b42c /modules | |
| parent | 7aed9a5f167759869c543ca2d8a2efae516b503e (diff) | |
Better benchmark in progress dialog in GTK+3
While the shell isn't rewritten to take advantage of GTK+3 only, let's
just ignore these deprecation warnings.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/benchmark.c | 25 | 
1 files changed, 3 insertions, 22 deletions
| diff --git a/modules/benchmark.c b/modules/benchmark.c index 6af4d5c1..64f55e1f 100644 --- a/modules/benchmark.c +++ b/modules/benchmark.c @@ -520,27 +520,6 @@ static void do_benchmark(void (*benchmark_function)(void), int entry)         bench_image = icon_cache_get_image("benchmark.png");         gtk_widget_show(bench_image); -#if GTK_CHECK_VERSION(3, 0, 0) -       GtkWidget *button; -       GtkWidget *content_area; -       GtkWidget *hbox; -       GtkWidget *label; - -       bench_dialog = gtk_dialog_new_with_buttons("", -                                                  NULL, -                                                  GTK_DIALOG_MODAL, -                                                  _("Cancel"), -                                                  GTK_RESPONSE_ACCEPT, -                                                  NULL); -       content_area = gtk_dialog_get_content_area(GTK_DIALOG(bench_dialog)); -       label = gtk_label_new(_("Benchmarking. Please do not move your mouse " \ -                                             "or press any keys.")); -       hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5); -       gtk_box_pack_start(GTK_BOX(hbox), bench_image, TRUE, TRUE, 5); -       gtk_box_pack_end(GTK_BOX(hbox), label, TRUE, TRUE, 5); -       gtk_container_add(GTK_CONTAINER (content_area), hbox); -       gtk_widget_show_all(bench_dialog); -#else         bench_dialog = gtk_message_dialog_new(GTK_WINDOW(shell_get_main_shell()->window),                                               GTK_DIALOG_MODAL,                                               GTK_MESSAGE_INFO, @@ -549,8 +528,10 @@ static void do_benchmark(void (*benchmark_function)(void), int entry)                                               "or press any keys."));         gtk_dialog_add_buttons(GTK_DIALOG(bench_dialog),                                _("Cancel"), GTK_RESPONSE_ACCEPT, NULL); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS         gtk_message_dialog_set_image(GTK_MESSAGE_DIALOG(bench_dialog), bench_image); -#endif +G_GNUC_END_IGNORE_DEPRECATIONS         while (gtk_events_pending()) {           gtk_main_iteration(); | 
