diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-11-13 16:27:50 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-11-16 16:45:56 -0500 |
commit | 96778fca9215935e6f54de0010eb6ef441bcb1a8 (patch) | |
tree | dc7f63b4be997b48d27aa99810e22756a0f8c039 /demos | |
parent | 0c53b608f96315d8508b17f76b52dd203e03cc7d (diff) | |
download | gtk+-96778fca9215935e6f54de0010eb6ef441bcb1a8.tar.gz |
Fix formatting error in demo about dialogs
Try harder to format things nicely.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/main.c | 2 | ||||
-rw-r--r-- | demos/icon-browser/iconbrowserapp.c | 2 | ||||
-rw-r--r-- | demos/node-editor/node-editor-application.c | 2 | ||||
-rw-r--r-- | demos/print-editor/print-editor.c | 34 | ||||
-rw-r--r-- | demos/widget-factory/widget-factory.c | 2 |
5 files changed, 21 insertions, 21 deletions
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c index 3253131541..da6b5db73a 100644 --- a/demos/gtk-demo/main.c +++ b/demos/gtk-demo/main.c @@ -192,7 +192,7 @@ activate_about (GSimpleAction *action, glib_micro_version); g_string_append_printf (s, "\tPango\t%s\n", pango_version_string ()); - g_string_append_printf (s, "\tGTK\t%d.%d.%d\n", + g_string_append_printf (s, "\tGTK \t%d.%d.%d\n", gtk_get_major_version (), gtk_get_minor_version (), gtk_get_micro_version ()); diff --git a/demos/icon-browser/iconbrowserapp.c b/demos/icon-browser/iconbrowserapp.c index 3f08c8c36a..7bfd84ff3e 100644 --- a/demos/icon-browser/iconbrowserapp.c +++ b/demos/icon-browser/iconbrowserapp.c @@ -72,7 +72,7 @@ about_activated (GSimpleAction *action, glib_micro_version); g_string_append_printf (s, "\tPango\t%s\n", pango_version_string ()); - g_string_append_printf (s, "\tGTK\t%d.%d.%d\n", + g_string_append_printf (s, "\tGTK \t%d.%d.%d\n", gtk_get_major_version (), gtk_get_minor_version (), gtk_get_micro_version ()); diff --git a/demos/node-editor/node-editor-application.c b/demos/node-editor/node-editor-application.c index 22aa743391..42a83e911a 100644 --- a/demos/node-editor/node-editor-application.c +++ b/demos/node-editor/node-editor-application.c @@ -79,7 +79,7 @@ activate_about (GSimpleAction *action, glib_micro_version); g_string_append_printf (s, "\tPango\t%s\n", pango_version_string ()); - g_string_append_printf (s, "\tGTK\t%d.%d.%d\n", + g_string_append_printf (s, "\tGTK \t%d.%d.%d\n", gtk_get_major_version (), gtk_get_minor_version (), gtk_get_micro_version ()); diff --git a/demos/print-editor/print-editor.c b/demos/print-editor/print-editor.c index 3737affd49..bfadd5e494 100644 --- a/demos/print-editor/print-editor.c +++ b/demos/print-editor/print-editor.c @@ -42,7 +42,7 @@ update_statusbar (void) const char *print_str; gtk_statusbar_pop (GTK_STATUSBAR (statusbar), 0); - + gtk_text_buffer_get_iter_at_mark (buffer, &iter, gtk_text_buffer_get_insert (buffer)); @@ -56,7 +56,7 @@ update_statusbar (void) GtkPrintOperation *op = active_prints->data; print_str = gtk_print_operation_get_status_string (op); } - + msg = g_strdup_printf ("%d, %d%s %s", row, col, file_changed?" - Modified":"", @@ -188,10 +188,10 @@ save_file (GFile *save_filename) "Error saving to file %s:\n%s", display_name, error->message); - + g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL); gtk_widget_show (error_dialog); - + g_error_free (error); g_object_unref (info); } @@ -229,7 +229,7 @@ begin_print (GtkPrintOperation *operation, pango_font_description_free (desc); pango_layout_set_width (print_data->layout, width * PANGO_SCALE); - + pango_layout_set_text (print_data->layout, print_data->text, -1); num_lines = pango_layout_get_line_count (print_data->layout); @@ -241,7 +241,7 @@ begin_print (GtkPrintOperation *operation, { PangoRectangle ink_rect, logical_rect; double line_height; - + layout_line = pango_layout_get_line (print_data->layout, line); pango_layout_line_get_extents (layout_line, &ink_rect, &logical_rect); @@ -258,7 +258,7 @@ begin_print (GtkPrintOperation *operation, page_breaks = g_list_reverse (page_breaks); gtk_print_operation_set_n_pages (operation, g_list_length (page_breaks) + 1); - + print_data->page_breaks = page_breaks; } @@ -287,11 +287,11 @@ draw_page (GtkPrintOperation *operation, end = pango_layout_get_line_count (print_data->layout); else end = GPOINTER_TO_INT (pagebreak->data); - + cr = gtk_print_context_get_cairo_context (context); cairo_set_source_rgb (cr, 0, 0, 0); - + i = 0; start_pos = 0; iter = pango_layout_get_iter (print_data->layout); @@ -307,12 +307,12 @@ draw_page (GtkPrintOperation *operation, pango_layout_iter_get_line_extents (iter, NULL, &logical_rect); baseline = pango_layout_iter_get_baseline (iter); - + if (i == start) start_pos = logical_rect.y / 1024.0; - + cairo_move_to (cr, logical_rect.x / 1024.0, baseline / 1024.0 - start_pos); - + pango_cairo_show_layout_line (cr, line); } i++; @@ -383,9 +383,9 @@ print_done (GtkPrintOperation *op, { GtkWidget *error_dialog; - + gtk_print_operation_get_error (op, &error); - + error_dialog = gtk_message_dialog_new (GTK_WINDOW (main_window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, @@ -405,13 +405,13 @@ print_done (GtkPrintOperation *op, g_free (print_data->text); g_free (print_data->font); g_free (print_data); - + if (!gtk_print_operation_is_finished (op)) { g_object_ref (op); active_prints = g_list_append (active_prints, op); update_statusbar (); - + /* This ref is unref:ed when we get the final state change */ g_signal_connect (op, "status_changed", G_CALLBACK (status_changed_cb), NULL); @@ -628,7 +628,7 @@ activate_about (GSimpleAction *action, glib_micro_version); g_string_append_printf (sysinfo, "\tPango\t%s\n", pango_version_string ()); - g_string_append_printf (sysinfo, "\tGTK\t%d.%d.%d\n", + g_string_append_printf (sysinfo, "\tGTK \t%d.%d.%d\n", gtk_get_major_version (), gtk_get_minor_version (), gtk_get_micro_version ()); diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c index 0c4b21c81c..9783c8d23d 100644 --- a/demos/widget-factory/widget-factory.c +++ b/demos/widget-factory/widget-factory.c @@ -283,7 +283,7 @@ activate_about (GSimpleAction *action, glib_micro_version); g_string_append_printf (s, "\tPango\t%s\n", pango_version_string ()); - g_string_append_printf (s, "\tGTK\t%d.%d.%d\n", + g_string_append_printf (s, "\tGTK \t%d.%d.%d\n", gtk_get_major_version (), gtk_get_minor_version (), gtk_get_micro_version ()); |