2010-11-10 20:31:15 +01:00
|
|
|
/* See LICENSE file for license and copyright information */
|
2010-11-12 13:48:18 +01:00
|
|
|
|
|
|
|
#include <callbacks.h>
|
|
|
|
#include <girara.h>
|
2010-11-13 12:40:48 +01:00
|
|
|
#include <stdlib.h>
|
2010-11-12 13:48:18 +01:00
|
|
|
|
|
|
|
#include "zathura.h"
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
cb_destroy(GtkWidget* widget, gpointer data)
|
|
|
|
{
|
2010-11-13 12:40:48 +01:00
|
|
|
if(Zathura.UI.session) {
|
2010-11-12 13:48:18 +01:00
|
|
|
girara_session_destroy(Zathura.UI.session);
|
2010-11-13 12:40:48 +01:00
|
|
|
}
|
2010-11-12 13:48:18 +01:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
2010-11-13 12:40:48 +01:00
|
|
|
|
|
|
|
void
|
|
|
|
buffer_changed(girara_session_t* session)
|
|
|
|
{
|
|
|
|
g_return_if_fail(session != NULL);
|
2010-11-18 21:22:43 +01:00
|
|
|
g_return_if_fail(Zathura.UI.statusbar.buffer != NULL);
|
2010-11-13 12:40:48 +01:00
|
|
|
|
|
|
|
char* buffer = girara_buffer_get(session);
|
|
|
|
|
|
|
|
if(buffer) {
|
2010-11-18 21:22:43 +01:00
|
|
|
girara_statusbar_item_set_text(session, Zathura.UI.statusbar.buffer, buffer);
|
2010-11-13 12:40:48 +01:00
|
|
|
free(buffer);
|
|
|
|
}
|
|
|
|
}
|