mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Bind bookmark functions in main.c
This commit is contained in:
parent
581f58e47f
commit
c001f0e7cb
@ -40,6 +40,7 @@ static void
|
|||||||
_init_modules(void)
|
_init_modules(void)
|
||||||
{
|
{
|
||||||
jabber_init_module();
|
jabber_init_module();
|
||||||
|
bookmark_init_module();
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -71,7 +71,6 @@ _bookmark_add(const char *jid, const char *nick, gboolean autojoin)
|
|||||||
autocomplete_remove(bookmark_ac, jid);
|
autocomplete_remove(bookmark_ac, jid);
|
||||||
autocomplete_add(bookmark_ac, jid);
|
autocomplete_add(bookmark_ac, jid);
|
||||||
}
|
}
|
||||||
void (*bookmark_add)(const char *, const char *, gboolean) = _bookmark_add;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_bookmark_remove(const char *jid, gboolean autojoin)
|
_bookmark_remove(const char *jid, gboolean autojoin)
|
||||||
@ -84,21 +83,18 @@ _bookmark_remove(const char *jid, gboolean autojoin)
|
|||||||
autocomplete_remove(bookmark_ac, jid);
|
autocomplete_remove(bookmark_ac, jid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void (*bookmark_remove)(const char *, gboolean) = _bookmark_remove;
|
|
||||||
|
|
||||||
static const GList *
|
static const GList *
|
||||||
_bookmark_get_list(void)
|
_bookmark_get_list(void)
|
||||||
{
|
{
|
||||||
return bookmark_list;
|
return bookmark_list;
|
||||||
}
|
}
|
||||||
const GList * (*bookmark_get_list)(void) = _bookmark_get_list;
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_bookmark_find(char *search_str)
|
_bookmark_find(char *search_str)
|
||||||
{
|
{
|
||||||
return autocomplete_complete(bookmark_ac, search_str);
|
return autocomplete_complete(bookmark_ac, search_str);
|
||||||
}
|
}
|
||||||
char * (*bookmark_find)(char *) = _bookmark_find;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_bookmark_autocomplete_reset(void)
|
_bookmark_autocomplete_reset(void)
|
||||||
@ -107,7 +103,6 @@ _bookmark_autocomplete_reset(void)
|
|||||||
autocomplete_reset(bookmark_ac);
|
autocomplete_reset(bookmark_ac);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void (*bookmark_autocomplete_reset)(void) = _bookmark_autocomplete_reset;
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_bookmark_handle_result(xmpp_conn_t * const conn,
|
_bookmark_handle_result(xmpp_conn_t * const conn,
|
||||||
@ -248,3 +243,13 @@ _bookmark_item_destroy(gpointer item)
|
|||||||
free(p->nick);
|
free(p->nick);
|
||||||
free(p);
|
free(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
bookmark_init_module(void)
|
||||||
|
{
|
||||||
|
bookmark_add = _bookmark_add;
|
||||||
|
bookmark_remove = _bookmark_remove;
|
||||||
|
bookmark_get_list = _bookmark_get_list;
|
||||||
|
bookmark_find = _bookmark_find;
|
||||||
|
bookmark_autocomplete_reset = _bookmark_autocomplete_reset;
|
||||||
|
}
|
||||||
|
@ -75,6 +75,7 @@ typedef struct disco_identity_t {
|
|||||||
} DiscoIdentity;
|
} DiscoIdentity;
|
||||||
|
|
||||||
void jabber_init_module(void);
|
void jabber_init_module(void);
|
||||||
|
void bookmark_init_module(void);
|
||||||
|
|
||||||
// connection functions
|
// connection functions
|
||||||
void (*jabber_init)(const int disable_tls);
|
void (*jabber_init)(const int disable_tls);
|
||||||
|
Loading…
Reference in New Issue
Block a user