zathura/callbacks.c
2010-11-13 12:40:48 +01:00

31 lines
593 B
C

/* See LICENSE file for license and copyright information */
#include <callbacks.h>
#include <girara.h>
#include <stdlib.h>
#include "zathura.h"
gboolean
cb_destroy(GtkWidget* widget, gpointer data)
{
if(Zathura.UI.session) {
girara_session_destroy(Zathura.UI.session);
}
return TRUE;
}
void
buffer_changed(girara_session_t* session)
{
g_return_if_fail(session != NULL);
g_return_if_fail(Zathura.UI.buffer != NULL);
char* buffer = girara_buffer_get(session);
if(buffer) {
girara_statusbar_item_set_text(session, Zathura.UI.buffer, buffer);
free(buffer);
}
}