[evince/outline-collapse-all] Use a constant for GString init size
- From: Nelson Ben <nbenitez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/outline-collapse-all] Use a constant for GString init size
- Date: Sat, 26 Jun 2021 01:57:55 +0000 (UTC)
commit 651fdbcdd877ef6bf42c5805d1d7b5d68fad2389
Author: Nelson Benítez León <nbenitezl gmail com>
Date: Fri Jun 25 21:34:03 2021 -0400
Use a constant for GString init size
shell/ev-sidebar-links.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/shell/ev-sidebar-links.c b/shell/ev-sidebar-links.c
index 35da7801..0081562b 100644
--- a/shell/ev-sidebar-links.c
+++ b/shell/ev-sidebar-links.c
@@ -35,6 +35,8 @@
#include "ev-sidebar-page.h"
#include "ev-window.h"
+#define GSTRING_INIT_SIZE 4096
+
struct _EvSidebarLinksPrivate {
GtkWidget *tree_view;
@@ -858,7 +860,7 @@ collapse_all_cb (GtkWidget *menuitem, EvSidebarLinks *sidebar_links)
metadata = ev_window_get_metadata (EV_WINDOW (window));
if (metadata) {
ev_metadata_set_string (metadata, "index-expand", "");
- index_collapse = g_string_sized_new (4096);
+ index_collapse = g_string_sized_new (GSTRING_INIT_SIZE);
g_string_append (index_collapse, "|");
}
}
@@ -941,7 +943,7 @@ expand_all_cb (GtkWidget *menuitem, EvSidebarLinks *sidebar_links)
metadata = ev_window_get_metadata (EV_WINDOW (window));
if (metadata) {
ev_metadata_set_string (metadata, "index-collapse", "");
- index_expand = g_string_sized_new (4096);
+ index_expand = g_string_sized_new (GSTRING_INIT_SIZE);
g_string_append (index_expand, "|");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]