mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 14:06:02 +01:00
Remove some unneeded stuff
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
fb000b9607
commit
f5983a8429
2 changed files with 2 additions and 29 deletions
|
@ -45,9 +45,6 @@ static const char SYNCTEX_DBUS_INTROSPECTION[] =
|
||||||
|
|
||||||
static const GDBusInterfaceVTable interface_vtable;
|
static const GDBusInterfaceVTable interface_vtable;
|
||||||
|
|
||||||
static bool synctex_dbus_view(ZathuraSynctexDbus* synctex_view,
|
|
||||||
const char* position);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
finalize(GObject* object)
|
finalize(GObject* object)
|
||||||
{
|
{
|
||||||
|
@ -72,9 +69,6 @@ finalize(GObject* object)
|
||||||
static void
|
static void
|
||||||
zathura_synctex_dbus_class_init(ZathuraSynctexDbusClass* class)
|
zathura_synctex_dbus_class_init(ZathuraSynctexDbusClass* class)
|
||||||
{
|
{
|
||||||
/* initialize methods */
|
|
||||||
class->view = synctex_dbus_view;
|
|
||||||
|
|
||||||
/* add private members */
|
/* add private members */
|
||||||
g_type_class_add_private(class, sizeof(private_t));
|
g_type_class_add_private(class, sizeof(private_t));
|
||||||
|
|
||||||
|
@ -162,23 +156,6 @@ zathura_synctex_dbus_new(zathura_t* zathura)
|
||||||
return synctex_dbus;
|
return synctex_dbus;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
synctex_dbus_view(ZathuraSynctexDbus* synctex_dbus, const char* position)
|
|
||||||
{
|
|
||||||
private_t* priv = GET_PRIVATE(synctex_dbus);
|
|
||||||
return synctex_view(priv->zathura, position);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
zathura_synctex_dbus_view(ZathuraSynctexDbus* synctex_dbus, const char* position)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail(ZATHURA_IS_SYNCTEX_DBUS(synctex_dbus), false);
|
|
||||||
g_return_val_if_fail(position != NULL, false);
|
|
||||||
|
|
||||||
return ZATHURA_SYNCTEX_DBUS_GET_CLASS(synctex_dbus)->view(synctex_dbus,
|
|
||||||
position);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* D-Bus handler */
|
/* D-Bus handler */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -189,12 +166,13 @@ handle_method_call(GDBusConnection* UNUSED(connection),
|
||||||
GDBusMethodInvocation* invocation, void* data)
|
GDBusMethodInvocation* invocation, void* data)
|
||||||
{
|
{
|
||||||
ZathuraSynctexDbus* synctex_dbus = data;
|
ZathuraSynctexDbus* synctex_dbus = data;
|
||||||
|
private_t* priv = GET_PRIVATE(synctex_dbus);
|
||||||
|
|
||||||
if (g_strcmp0(method_name, "View") == 0) {
|
if (g_strcmp0(method_name, "View") == 0) {
|
||||||
gchar* position = NULL;
|
gchar* position = NULL;
|
||||||
g_variant_get(parameters, "(s)", &position);
|
g_variant_get(parameters, "(s)", &position);
|
||||||
|
|
||||||
const bool ret = zathura_synctex_dbus_view(synctex_dbus, position);
|
const bool ret = synctex_view(priv->zathura, position);
|
||||||
g_free(position);
|
g_free(position);
|
||||||
|
|
||||||
GVariant* result = g_variant_new("(b)", ret);
|
GVariant* result = g_variant_new("(b)", ret);
|
||||||
|
|
|
@ -18,8 +18,6 @@ struct zathura_synctex_dbus_s
|
||||||
struct zathura_synctex_dbus_class_s
|
struct zathura_synctex_dbus_class_s
|
||||||
{
|
{
|
||||||
GObjectClass parent_class;
|
GObjectClass parent_class;
|
||||||
|
|
||||||
bool (*view)(ZathuraSynctexDbus* synctex_dbus, const char* position);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ZATHURA_TYPE_SYNCTEX_DBUS \
|
#define ZATHURA_TYPE_SYNCTEX_DBUS \
|
||||||
|
@ -42,9 +40,6 @@ GType zathura_synctex_dbus_get_type(void);
|
||||||
|
|
||||||
ZathuraSynctexDbus* zathura_synctex_dbus_new(zathura_t* zathura);
|
ZathuraSynctexDbus* zathura_synctex_dbus_new(zathura_t* zathura);
|
||||||
|
|
||||||
/* bool zathura_synctex_dbus_view(ZathuraSynctexDbus* synctex_dbus,
|
|
||||||
const char* position); */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forward synctex position to zathura instance having the right file open.
|
* Forward synctex position to zathura instance having the right file open.
|
||||||
* @param filename filename
|
* @param filename filename
|
||||||
|
|
Loading…
Reference in a new issue