Move config.h

small updates

Tweak header a bit

[CI] Add lto build to sh ci.

[CI] Fix artifact upload

[CI] no wildcard for artifact
This commit is contained in:
Dave Davenport 2022-11-17 13:21:15 +01:00
parent 30d50e3bdc
commit 66d782e0e7
21 changed files with 47 additions and 30 deletions

View File

@ -27,7 +27,7 @@ sources:
tasks: tasks:
- setup: | - setup: |
cd rofi cd rofi
meson setup builddir . meson setup builddir . -Db_lto=true
- build: | - build: |
ninja -C rofi/builddir ninja -C rofi/builddir
- test: | - test: |
@ -38,4 +38,4 @@ tasks:
- dist: | - dist: |
ninja -C rofi/builddir dist ninja -C rofi/builddir dist
artifacts: artifacts:
- rofi/builddir/meson-dist/rofi-1.7.3-dev.tar.xz - rofi/builddir/meson-dist/rofi-1.7.5-dev.tar.xz

View File

@ -29,7 +29,6 @@
#define ROFI_XCB_H #define ROFI_XCB_H
#include <cairo.h> #include <cairo.h>
#include <config.h>
#ifdef XCB_IMDKIT #ifdef XCB_IMDKIT
#include <xcb-imdkit/imclient.h> #include <xcb-imdkit/imclient.h>
#endif #endif

View File

@ -24,6 +24,7 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
*/ */
#include "config.h"
#include "history.h" #include "history.h"
#include "rofi.h" #include "rofi.h"

View File

@ -24,11 +24,12 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
*/ */
#include "config.h"
#include "rofi.h" #include "rofi.h"
#include "xrmoptions.h" #include "xrmoptions.h"
#include <glib.h> #include <glib.h>
#include <nkutils-bindings.h>
#include <string.h> #include <string.h>
#include "nkutils-bindings.h"
typedef struct { typedef struct {
guint id; guint id;
@ -372,7 +373,7 @@ static const gchar *mouse_default_bindings[] = {
[MOUSE_DCLICK_UP] = "!MouseDPrimary", [MOUSE_DCLICK_UP] = "!MouseDPrimary",
}; };
void abe_list_all_bindings(gboolean is_term ) { void abe_list_all_bindings(gboolean is_term) {
int length = 0; int length = 0;
for (gsize i = 0; i < G_N_ELEMENTS(rofi_bindings); ++i) { for (gsize i = 0; i < G_N_ELEMENTS(rofi_bindings); ++i) {
@ -383,9 +384,10 @@ void abe_list_all_bindings(gboolean is_term ) {
for (gsize i = 0; i < G_N_ELEMENTS(rofi_bindings); ++i) { for (gsize i = 0; i < G_N_ELEMENTS(rofi_bindings); ++i) {
ActionBindingEntry *b = &rofi_bindings[i]; ActionBindingEntry *b = &rofi_bindings[i];
if (is_term) { if (is_term) {
printf("%s%*s%s - %s\n", color_bold,length, b->name, color_reset,b->binding); printf("%s%*s%s - %s\n", color_bold, length, b->name, color_reset,
b->binding);
} else { } else {
printf("%*s - %s\n", length, b->name, b->binding); printf("%*s - %s\n", length, b->name, b->binding);
} }
} }
} }
@ -439,22 +441,25 @@ gboolean parse_keys_abe(NkBindings *bindings) {
if (!nk_bindings_add_binding(bindings, b->scope, entry, if (!nk_bindings_add_binding(bindings, b->scope, entry,
binding_check_action, binding_trigger_action, binding_check_action, binding_trigger_action,
GUINT_TO_POINTER(b->id), NULL, &error)) { GUINT_TO_POINTER(b->id), NULL, &error)) {
if ( error->code == NK_BINDINGS_ERROR_ALREADY_REGISTERED && error->domain == NK_BINDINGS_ERROR){ if (error->code == NK_BINDINGS_ERROR_ALREADY_REGISTERED &&
char *str = g_markup_printf_escaped( error->domain == NK_BINDINGS_ERROR) {
"Failed to set binding <i>%s</i> for: <i>%s (%s)</i>:\n\t<span " char *str = g_markup_printf_escaped(
"size=\"smaller\" style=\"italic\">Binding `%s` is already bound.\n" "Failed to set binding <i>%s</i> for: <i>%s (%s)</i>:\n\t<span "
"\tExecute <b>rofi -list-keybindings</b> to get the current list of configured bindings.</span>\n", "size=\"smaller\" style=\"italic\">Binding `%s` is already "
b->binding, b->comment, b->name, entry); "bound.\n"
g_string_append(error_msg, str); "\tExecute <b>rofi -list-keybindings</b> to get the current list "
g_free(str); "of configured bindings.</span>\n",
} else { b->binding, b->comment, b->name, entry);
char *str = g_markup_printf_escaped( g_string_append(error_msg, str);
"Failed to set binding <i>%s</i> for: <i>%s (%s)</i>:\n\t<span " g_free(str);
"size=\"smaller\" style=\"italic\">%s</span>\n", } else {
b->binding, b->comment, b->name, error->message); char *str = g_markup_printf_escaped(
g_string_append(error_msg, str); "Failed to set binding <i>%s</i> for: <i>%s (%s)</i>:\n\t<span "
g_free(str); "size=\"smaller\" style=\"italic\">%s</span>\n",
} b->binding, b->comment, b->name, error->message);
g_string_append(error_msg, str);
g_free(str);
}
g_clear_error(&error); g_clear_error(&error);
} }
} }

View File

@ -27,6 +27,7 @@
/** The log domain of this dialog. */ /** The log domain of this dialog. */
#define G_LOG_DOMAIN "Modes.DMenu" #define G_LOG_DOMAIN "Modes.DMenu"
#include "config.h"
#include "modes/dmenu.h" #include "modes/dmenu.h"
#include "helper.h" #include "helper.h"

View File

@ -28,7 +28,7 @@
/** The log domain of this dialog. */ /** The log domain of this dialog. */
#define G_LOG_DOMAIN "Modes.DRun" #define G_LOG_DOMAIN "Modes.DRun"
#include <config.h> #include "config.h"
#ifdef ENABLE_DRUN #ifdef ENABLE_DRUN
#include <limits.h> #include <limits.h>
#include <stdio.h> #include <stdio.h>

View File

@ -23,6 +23,7 @@
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "config.h"
#include <errno.h> #include <errno.h>
#include <gio/gio.h> #include <gio/gio.h>
#include <gmodule.h> #include <gmodule.h>

View File

@ -25,7 +25,7 @@
* *
*/ */
#include <config.h> #include "config.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -33,7 +33,7 @@
/** The log domain of this dialog. */ /** The log domain of this dialog. */
#define G_LOG_DOMAIN "Modes.Run" #define G_LOG_DOMAIN "Modes.Run"
#include <config.h> #include "config.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -35,7 +35,7 @@
*/ */
#define G_LOG_DOMAIN "Modes.Ssh" #define G_LOG_DOMAIN "Modes.Ssh"
#include <config.h> #include "config.h"
#include <glib.h> #include <glib.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -28,7 +28,7 @@
/** The log domain of this dialog. */ /** The log domain of this dialog. */
#define G_LOG_DOMAIN "Modes.Window" #define G_LOG_DOMAIN "Modes.Window"
#include <config.h> #include "config.h"
#ifdef WINDOW_MODE #ifdef WINDOW_MODE

View File

@ -27,6 +27,7 @@
/** The log domain of this widget. */ /** The log domain of this widget. */
#define G_LOG_DOMAIN "Widgets.Container" #define G_LOG_DOMAIN "Widgets.Container"
#include "config.h"
#include "widgets/container.h" #include "widgets/container.h"
#include "theme.h" #include "theme.h"

View File

@ -27,6 +27,7 @@
/** The log domain of this widget. */ /** The log domain of this widget. */
#define G_LOG_DOMAIN "Widgets.Icon" #define G_LOG_DOMAIN "Widgets.Icon"
#include "config.h"
#include "widgets/icon.h" #include "widgets/icon.h"
#include "theme.h" #include "theme.h"

View File

@ -25,7 +25,7 @@
* *
*/ */
#include <config.h> #include "config.h"
#include <glib.h> #include <glib.h>
#include <widgets/box.h> #include <widgets/box.h>
#include <widgets/icon.h> #include <widgets/icon.h>

View File

@ -25,6 +25,7 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
*/ */
#include "config.h"
#include "widgets/textbox.h" #include "widgets/textbox.h"
#include "helper-theme.h" #include "helper-theme.h"

View File

@ -24,6 +24,7 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
*/ */
#include "config.h"
#include "widgets/widget.h" #include "widgets/widget.h"
#include "theme.h" #include "theme.h"

View File

@ -1187,6 +1187,7 @@ static gboolean x11_button_to_nk_bindings_scroll(guint32 x11_button,
static void rofi_key_press_event_handler(xcb_key_press_event_t *xkpe, static void rofi_key_press_event_handler(xcb_key_press_event_t *xkpe,
RofiViewState *state) { RofiViewState *state) {
gchar *text; gchar *text;
g_log("IMDKit", G_LOG_LEVEL_DEBUG, "press handler");
xcb->last_timestamp = xkpe->time; xcb->last_timestamp = xkpe->time;
if (config.xserver_i300_workaround) { if (config.xserver_i300_workaround) {
@ -1371,6 +1372,7 @@ static void main_loop_x11_event_handler_view(xcb_generic_event_t *event) {
xcb_key_press_event_t *xkpe = (xcb_key_press_event_t *)event; xcb_key_press_event_t *xkpe = (xcb_key_press_event_t *)event;
#ifdef XCB_IMDKIT #ifdef XCB_IMDKIT
if (xcb->ic) { if (xcb->ic) {
g_log("IMDKit", G_LOG_LEVEL_DEBUG, "input xim");
xcb_xim_forward_event(xcb->im, xcb->ic, xkpe); xcb_xim_forward_event(xcb->im, xcb->ic, xkpe);
} else } else
#endif #endif

View File

@ -24,6 +24,7 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
*/ */
#include "config.h"
#include "display.h" #include "display.h"
#include "rofi-icon-fetcher.h" #include "rofi-icon-fetcher.h"

View File

@ -24,7 +24,7 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
*/ */
#include "config.h"
#include "display.h" #include "display.h"
#include "rofi-icon-fetcher.h" #include "rofi-icon-fetcher.h"
#include "rofi.h" #include "rofi.h"

View File

@ -25,6 +25,8 @@
* *
*/ */
#include "config.h"
#include "display.h" #include "display.h"
#include "rofi-icon-fetcher.h" #include "rofi-icon-fetcher.h"
#include "rofi.h" #include "rofi.h"

View File

@ -25,6 +25,7 @@
* *
*/ */
#include "config.h"
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>