Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
d79c2ba5
Commit
d79c2ba5
authored
Nov 07, 2014
by
Moritz Lipp
Browse files
Do not additionally reference PageWidget while removing from table
parent
b869d8ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
zathura.c
View file @
d79c2ba5
...
...
@@ -941,12 +941,8 @@ document_save(zathura_t* zathura, const char* path, bool overwrite)
}
static
void
remove_page_from_table
(
GtkWidget
*
page
,
gpointer
permanent
)
remove_page_from_table
(
GtkWidget
*
page
,
gpointer
UNUSED
(
permanent
)
)
{
if
((
bool
)
permanent
==
false
)
{
g_object_ref
(
G_OBJECT
(
page
));
}
gtk_container_remove
(
GTK_CONTAINER
(
gtk_widget_get_parent
(
page
)),
page
);
}
...
...
@@ -1022,7 +1018,7 @@ document_close(zathura_t* zathura, bool keep_monitor)
zathura
->
sync
.
render_thread
=
NULL
;
/* remove widgets */
gtk_container_foreach
(
GTK_CONTAINER
(
zathura
->
ui
.
page_widget
),
remove_page_from_table
,
(
gpointer
)
true
);
gtk_container_foreach
(
GTK_CONTAINER
(
zathura
->
ui
.
page_widget
),
remove_page_from_table
,
NULL
);
for
(
unsigned
int
i
=
0
;
i
<
zathura_document_get_number_of_pages
(
zathura
->
document
);
i
++
)
{
g_object_unref
(
zathura
->
pages
[
i
]);
}
...
...
@@ -1130,7 +1126,7 @@ page_widget_set_mode(zathura_t* zathura, unsigned int page_padding,
return
;
}
gtk_container_foreach
(
GTK_CONTAINER
(
zathura
->
ui
.
page_widget
),
remove_page_from_table
,
(
gpointer
)
0
);
gtk_container_foreach
(
GTK_CONTAINER
(
zathura
->
ui
.
page_widget
),
remove_page_from_table
,
NULL
);
unsigned
int
number_of_pages
=
zathura_document_get_number_of_pages
(
zathura
->
document
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment