all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 9a808a4bc35258c55878952f8063a97c8a532ad9 2832 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
 
From c05328185292d6f6a4459024cdb563c63bfad230 Mon Sep 17 00:00:00 2001
Message-ID: <c05328185292d6f6a4459024cdb563c63bfad230.1710315308.git.vivien@planete-kraus.eu>
From: Sebastian Ramacher <sebastian@ramacher.at>
Date: Mon, 29 Jan 2024 21:05:22 +0100
Subject: [PATCH] Use struct initializers

---
 zathura/page-widget.c |  4 ++--
 zathura/shortcuts.c   | 12 +++++-------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/zathura/page-widget.c b/zathura/page-widget.c
index 216381e..ac85dcf 100644
--- a/zathura/page-widget.c
+++ b/zathura/page-widget.c
@@ -1426,8 +1426,8 @@ cb_menu_image_save(GtkMenuItem* item, ZathuraPage* page)
   }
 
   /* set command */
-  char* export_command = g_strdup_printf(":export image-p%d-%d ", page_id, image_id);
-  girara_argument_t argument = { 0, export_command };
+  char* export_command       = g_strdup_printf(":export image-p%d-%d ", page_id, image_id);
+  girara_argument_t argument = {.n = 0, .data = export_command};
   sc_focus_inputbar(priv->zathura->ui.session, &argument, NULL, 0);
   g_free(export_command);
 
diff --git a/zathura/shortcuts.c b/zathura/shortcuts.c
index 8836cd2..35b5990 100644
--- a/zathura/shortcuts.c
+++ b/zathura/shortcuts.c
@@ -513,7 +513,7 @@ sc_rotate(girara_session_t* session, girara_argument_t* argument,
   zathura_document_set_rotation(zathura->document, (rotation + angle * t) % 360);
 
   /* update scale */
-  girara_argument_t new_argument = { zathura_document_get_adjust_mode(zathura->document), NULL };
+  girara_argument_t new_argument = {.n = zathura_document_get_adjust_mode(zathura->document), .data = NULL};
   sc_adjust_window(zathura->ui.session, &new_argument, NULL, 0);
 
   /* render all pages again */
@@ -1372,7 +1372,7 @@ sc_toggle_presentation(girara_session_t* session, girara_argument_t*
     zathura->shortcut.toggle_presentation_mode.zoom = zathura_document_get_zoom(zathura->document);
 
     /* adjust window */
-    girara_argument_t argument = { ZATHURA_ADJUST_BESTFIT, NULL };
+    girara_argument_t argument = {.n = ZATHURA_ADJUST_BESTFIT, .data = NULL};
     sc_adjust_window(session, &argument, NULL, 0);
 
     /* hide status and inputbar */
@@ -1390,13 +1390,11 @@ sc_toggle_presentation(girara_session_t* session, girara_argument_t*
   return false;
 }
 
-bool
-sc_quit(girara_session_t* session, girara_argument_t* UNUSED(argument),
-        girara_event_t* UNUSED(event), unsigned int UNUSED(t))
-{
+bool sc_quit(girara_session_t* session, girara_argument_t* UNUSED(argument), girara_event_t* UNUSED(event),
+             unsigned int UNUSED(t)) {
   g_return_val_if_fail(session != NULL, false);
 
-  girara_argument_t arg = { GIRARA_HIDE, NULL };
+  girara_argument_t arg = {.n = GIRARA_HIDE, .data = NULL};
   girara_isc_completion(session, &arg, NULL, 0);
 
   cb_destroy(NULL, NULL);
-- 
2.41.0


debug log:

solving 9a808a4bc3 ...
found 9a808a4bc3 in https://git.savannah.gnu.org/cgit/guix.git

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.