Compare commits
5 Commits
fix/plugin
...
chore/untr
| Author | SHA1 | Date | |
|---|---|---|---|
|
d4fbc26fea
|
|||
|
5b45b35b3e
|
|||
|
57d79ecf9c
|
|||
|
bfd7064a40
|
|||
|
3f6b8f69fd
|
14
src/common.c
14
src/common.c
@@ -748,17 +748,17 @@ call_external(gchar** argv)
|
|||||||
*
|
*
|
||||||
* This function constructs an argument vector (argv) based on the provided template string, replacing placeholders ("%u" and "%p") with the provided URL and filename, respectively.
|
* This function constructs an argument vector (argv) based on the provided template string, replacing placeholders ("%u" and "%p") with the provided URL and filename, respectively.
|
||||||
*
|
*
|
||||||
* @param template The template string with placeholders.
|
* @param template_fmt The template string with placeholders.
|
||||||
* @param url The URL to replace "%u" (or NULL to skip).
|
* @param url The URL to replace "%u" (or NULL to skip).
|
||||||
* @param filename The filename to replace "%p" (or NULL to skip).
|
* @param filename The filename to replace "%p" (or NULL to skip).
|
||||||
* @return The constructed argument vector (argv) as a null-terminated array of strings.
|
* @return The constructed argument vector (argv) as a null-terminated array of strings.
|
||||||
*
|
*
|
||||||
* @note Remember to free the returned argument vector using `auto_gcharv` or `g_strfreev()`.
|
* @note Remember to free the returned argument vector using `auto_gcharv` or `g_strfreev()`.
|
||||||
*/
|
*/
|
||||||
gchar**
|
gchar**
|
||||||
format_call_external_argv(const char* template, const char* url, const char* filename)
|
format_call_external_argv(const char* template_fmt, const char* url, const char* filename)
|
||||||
{
|
{
|
||||||
gchar** argv = g_strsplit(template, " ", 0);
|
gchar** argv = g_strsplit(template_fmt, " ", 0);
|
||||||
|
|
||||||
guint num_args = 0;
|
guint num_args = 0;
|
||||||
while (argv[num_args]) {
|
while (argv[num_args]) {
|
||||||
@@ -767,7 +767,7 @@ format_call_external_argv(const char* template, const char* url, const char* fil
|
|||||||
argv[num_args] = g_strdup(url);
|
argv[num_args] = g_strdup(url);
|
||||||
} else if (0 == g_strcmp0(argv[num_args], "%p") && filename != NULL) {
|
} else if (0 == g_strcmp0(argv[num_args], "%p") && filename != NULL) {
|
||||||
g_free(argv[num_args]);
|
g_free(argv[num_args]);
|
||||||
argv[num_args] = strdup(filename);
|
argv[num_args] = g_strdup(filename);
|
||||||
}
|
}
|
||||||
num_args++;
|
num_args++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ void get_file_paths_recursive(const char* directory, GSList** contents);
|
|||||||
gchar* get_random_string(int length);
|
gchar* get_random_string(int length);
|
||||||
|
|
||||||
gboolean call_external(gchar** argv);
|
gboolean call_external(gchar** argv);
|
||||||
gchar** format_call_external_argv(const char* template, const char* url, const char* filename);
|
gchar** format_call_external_argv(const char* template_fmt, const char* url, const char* filename);
|
||||||
|
|
||||||
gchar* unique_filename_from_url(const char* url, const char* path);
|
gchar* unique_filename_from_url(const char* url, const char* path);
|
||||||
gchar* get_expanded_path(const char* path);
|
gchar* get_expanded_path(const char* path);
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
#ifndef EVENT_COMMON_H
|
#ifndef EVENT_COMMON_H
|
||||||
#define EVENT_COMMON_H
|
#define EVENT_COMMON_H
|
||||||
|
|
||||||
|
#include "glib.h"
|
||||||
|
|
||||||
void ev_disconnect_cleanup(void);
|
void ev_disconnect_cleanup(void);
|
||||||
void ev_inc_connection_counter(void);
|
void ev_inc_connection_counter(void);
|
||||||
void ev_reset_connection_counter(void);
|
void ev_reset_connection_counter(void);
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
#ifndef PROF_GIT_BRANCH
|
|
||||||
#define PROF_GIT_BRANCH @PROF_GIT_BRANCH@
|
|
||||||
#endif
|
|
||||||
#ifndef PROF_GIT_REVISION
|
|
||||||
#define PROF_GIT_REVISION @PROF_GIT_REVISION@
|
|
||||||
#endif
|
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
#ifndef PGP_GPG_H
|
#ifndef PGP_GPG_H
|
||||||
#define PGP_GPG_H
|
#define PGP_GPG_H
|
||||||
|
|
||||||
|
#include "glib.h"
|
||||||
|
|
||||||
typedef struct pgp_key_t
|
typedef struct pgp_key_t
|
||||||
{
|
{
|
||||||
gchar* id;
|
gchar* id;
|
||||||
|
|||||||
@@ -10,8 +10,10 @@
|
|||||||
#ifndef BOOKMARK_IGNORE_H
|
#ifndef BOOKMARK_IGNORE_H
|
||||||
#define BOOKMARK_IGNORE_H
|
#define BOOKMARK_IGNORE_H
|
||||||
|
|
||||||
|
#include "xmpp/xmpp.h"
|
||||||
|
|
||||||
void bookmark_ignore_on_connect(const char* const barejid);
|
void bookmark_ignore_on_connect(const char* const barejid);
|
||||||
void bookmark_ignore_on_disconnect(void);
|
void bookmark_ignore_on_disconnect();
|
||||||
gboolean bookmark_ignored(Bookmark* bookmark);
|
gboolean bookmark_ignored(Bookmark* bookmark);
|
||||||
gchar** bookmark_ignore_list(gsize* len);
|
gchar** bookmark_ignore_list(gsize* len);
|
||||||
void bookmark_ignore_add(const char* const barejid);
|
void bookmark_ignore_add(const char* const barejid);
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
#ifndef UI_TITLEBAR_H
|
#ifndef UI_TITLEBAR_H
|
||||||
#define UI_TITLEBAR_H
|
#define UI_TITLEBAR_H
|
||||||
|
|
||||||
|
#include "glib.h"
|
||||||
|
|
||||||
void create_title_bar(void);
|
void create_title_bar(void);
|
||||||
void free_title_bar(void);
|
void free_title_bar(void);
|
||||||
void title_bar_update_virtual(void);
|
void title_bar_update_virtual(void);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#include "ai/ai_client.h"
|
#include "ai/ai_client.h"
|
||||||
|
|
||||||
static const int PAD_MIN_HEIGHT = 100;
|
static const int PAD_MIN_HEIGHT = 100;
|
||||||
static const int PAD_THRESHOLD = 3000;
|
static const int PAD_THRESHOLD = 12000; // above buffer cap (~9000): reclaims dead pad space, never fires while scrolling
|
||||||
static gboolean _in_redraw = FALSE;
|
static gboolean _in_redraw = FALSE;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -2172,9 +2172,10 @@ win_redraw(ProfWin* window)
|
|||||||
unsigned int size = buffer_size(window->layout->buffer);
|
unsigned int size = buffer_size(window->layout->buffer);
|
||||||
_in_redraw = TRUE;
|
_in_redraw = TRUE;
|
||||||
|
|
||||||
// shrink pad back to minimum size and erase it
|
// size the pad to fit the whole buffer (plus headroom) and erase it
|
||||||
int cols = getmaxx(window->layout->win);
|
int cols = getmaxx(window->layout->win);
|
||||||
wresize(window->layout->win, PAD_MIN_HEIGHT, cols);
|
int needed = window->layout->buffer->lines + 100;
|
||||||
|
wresize(window->layout->win, MAX(needed, PAD_MIN_HEIGHT), cols);
|
||||||
werase(window->layout->win);
|
werase(window->layout->win);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < size; i++) {
|
for (unsigned int i = 0; i < size; i++) {
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
#ifndef XMPP_BLOCKING_H
|
#ifndef XMPP_BLOCKING_H
|
||||||
#define XMPP_BLOCKING_H
|
#define XMPP_BLOCKING_H
|
||||||
|
|
||||||
|
#include <strophe.h>
|
||||||
|
|
||||||
void blocking_request(void);
|
void blocking_request(void);
|
||||||
int blocked_set_handler(xmpp_stanza_t* stanza);
|
int blocked_set_handler(xmpp_stanza_t* stanza);
|
||||||
int reporting_set_handler(xmpp_stanza_t* stanza);
|
int reporting_set_handler(xmpp_stanza_t* stanza);
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
#ifndef XMPP_IQ_H
|
#ifndef XMPP_IQ_H
|
||||||
#define XMPP_IQ_H
|
#define XMPP_IQ_H
|
||||||
|
|
||||||
|
#include <strophe.h>
|
||||||
|
|
||||||
typedef int (*ProfIqCallback)(xmpp_stanza_t* const stanza, void* const userdata);
|
typedef int (*ProfIqCallback)(xmpp_stanza_t* const stanza, void* const userdata);
|
||||||
typedef void (*ProfIqFreeCallback)(void* userdata);
|
typedef void (*ProfIqFreeCallback)(void* userdata);
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
* SPDX-License-Identifier: GPL-3.0-or-later WITH OpenSSL-exception
|
* SPDX-License-Identifier: GPL-3.0-or-later WITH OpenSSL-exception
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "glib.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \page OX OX Implementation
|
* \page OX OX Implementation
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
#ifndef XMPP_ROSTER_H
|
#ifndef XMPP_ROSTER_H
|
||||||
#define XMPP_ROSTER_H
|
#define XMPP_ROSTER_H
|
||||||
|
|
||||||
|
#include "glib.h"
|
||||||
|
#include <strophe.h>
|
||||||
|
|
||||||
void roster_request(void);
|
void roster_request(void);
|
||||||
void roster_set_handler(xmpp_stanza_t* const stanza);
|
void roster_set_handler(xmpp_stanza_t* const stanza);
|
||||||
void roster_result_handler(xmpp_stanza_t* const stanza);
|
void roster_result_handler(xmpp_stanza_t* const stanza);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include "ui/win_types.h"
|
#include "ui/win_types.h"
|
||||||
#include "xmpp/vcard.h"
|
#include "xmpp/vcard.h"
|
||||||
|
#include <strophe.h>
|
||||||
|
|
||||||
vCard* vcard_new();
|
vCard* vcard_new();
|
||||||
void vcard_free(vCard* vcard);
|
void vcard_free(vCard* vcard);
|
||||||
|
|||||||
Reference in New Issue
Block a user