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
7127a460
Commit
7127a460
authored
Aug 30, 2013
by
Sebastian Ramacher
Browse files
Fix deprecated gdk thread function calls
Signed-off-by:
Sebastian Ramacher
<
sebastian+dev@ramacher.at
>
parent
16fbefa5
Changes
2
Hide whitespace changes
Inline
Side-by-side
callbacks.c
View file @
7127a460
...
...
@@ -107,7 +107,7 @@ cb_view_vadjustment_value_changed(GtkAdjustment* GIRARA_UNUSED(adjustment), gpoi
}
}
else
{
zathura_page_set_visibility
(
page
,
false
);
/* If a page becomes invisible, abort
all
render request
s
. */
/* If a page becomes invisible, abort
the
render request. */
zathura_page_widget_abort_render_request
(
zathura_page_widget
);
/* if the page is not visible and not cached, but still has a surface, we
* need to get rid of the surface */
...
...
@@ -370,6 +370,13 @@ cb_sc_display_link(GtkEntry* entry, girara_session_t* session)
return
handle_link
(
entry
,
session
,
ZATHURA_LINK_ACTION_DISPLAY
);
}
static
gboolean
file_monitor_reload
(
void
*
data
)
{
sc_reload
((
girara_session_t
*
)
data
,
NULL
,
NULL
,
0
);
return
FALSE
;
}
void
cb_file_monitor
(
GFileMonitor
*
monitor
,
GFile
*
file
,
GFile
*
UNUSED
(
other_file
),
GFileMonitorEvent
event
,
girara_session_t
*
session
)
{
...
...
@@ -380,9 +387,7 @@ cb_file_monitor(GFileMonitor* monitor, GFile* file, GFile* UNUSED(other_file), G
switch
(
event
)
{
case
G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT
:
case
G_FILE_MONITOR_EVENT_CREATED
:
gdk_threads_enter
();
sc_reload
(
session
,
NULL
,
NULL
,
0
);
gdk_threads_leave
();
g_main_context_invoke
(
NULL
,
file_monitor_reload
,
session
);
break
;
default:
return
;
...
...
main.c
View file @
7127a460
...
...
@@ -25,7 +25,9 @@ main(int argc, char* argv[])
#if !GLIB_CHECK_VERSION(2, 31, 0)
g_thread_init
(
NULL
);
#endif
#if !GTK_CHECK_VERSION(3, 6, 0)
gdk_threads_init
();
#endif
gtk_init
(
&
argc
,
&
argv
);
/* create zathura session */
...
...
@@ -46,7 +48,7 @@ main(int argc, char* argv[])
bool
synctex
=
false
;
int
page_number
=
ZATHURA_PAGE_NUMBER_UNSPECIFIED
;
#if
(
GTK_
MAJOR
_VERSION
== 3
)
#if GTK_
CHECK
_VERSION
(3, 0, 0
)
Window
embed
=
0
;
#else
GdkNativeWindow
embed
=
0
;
...
...
@@ -148,9 +150,13 @@ main(int argc, char* argv[])
}
/* run zathura */
#if !GTK_CHECK_VERSION(3, 6, 0)
gdk_threads_enter
();
#endif
gtk_main
();
#if !GTK_CHECK_VERSION(3, 6, 0)
gdk_threads_leave
();
#endif
/* free zathura */
zathura_free
(
zathura
);
...
...
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