Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zathura
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
114
Issues
114
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwmt
zathura
Commits
b6778e39
Commit
b6778e39
authored
Jan 20, 2014
by
Sebastian Ramacher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'list-2014-01-20' into develop
parents
3e5d7816
bb47adb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
zathura.c
zathura.c
+13
-4
No files found.
zathura.c
View file @
b6778e39
...
...
@@ -717,6 +717,7 @@ document_open(zathura_t* zathura, const char* path, const char* password,
goto
error_free
;
}
g_object_ref
(
page_widget
);
zathura
->
pages
[
page_id
]
=
page_widget
;
g_signal_connect
(
G_OBJECT
(
page_widget
),
"text-selected"
,
...
...
@@ -951,7 +952,6 @@ document_close(zathura_t* zathura, bool keep_monitor)
gtk_container_foreach
(
GTK_CONTAINER
(
zathura
->
ui
.
page_widget
),
remove_page_from_table
,
(
gpointer
)
1
);
for
(
unsigned
int
i
=
0
;
i
<
zathura_document_get_number_of_pages
(
zathura
->
document
);
i
++
)
{
g_object_unref
(
zathura
->
pages
[
i
]);
g_object_unref
(
zathura
->
pages
[
i
]);
// FIXME
}
free
(
zathura
->
pages
);
zathura
->
pages
=
NULL
;
...
...
@@ -1068,9 +1068,18 @@ page_widget_set_mode(zathura_t* zathura, unsigned int page_padding,
int
x
=
(
i
+
first_page_column
-
1
)
%
pages_per_row
;
int
y
=
(
i
+
first_page_column
-
1
)
/
pages_per_row
;
zathura_page_t
*
page
=
zathura_document_get_page
(
zathura
->
document
,
i
);
GtkWidget
*
page_widget
=
zathura_page_get_widget
(
zathura
,
page
);
gtk_grid_attach
(
GTK_GRID
(
zathura
->
ui
.
page_widget
),
page_widget
,
x
,
y
,
1
,
1
);
GtkWidget
*
page_widget
=
zathura
->
pages
[
i
];
GtkWidget
*
align
=
gtk_alignment_new
(
0
.
5
,
0
.
5
,
0
,
0
);
GtkWidget
*
parent
=
gtk_widget_get_parent
(
page_widget
);
if
(
parent
)
{
gtk_container_remove
(
GTK_CONTAINER
(
parent
),
page_widget
);
g_object_unref
(
parent
);
}
gtk_container_add
(
GTK_CONTAINER
(
align
),
page_widget
);
gtk_grid_attach
(
GTK_GRID
(
zathura
->
ui
.
page_widget
),
align
,
x
,
y
,
1
,
1
);
}
gtk_widget_show_all
(
zathura
->
ui
.
page_widget
);
...
...
Write
Preview
Markdown
is supported
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