Skip to content

Instantly share code, notes, and snippets.

View codebrainz's full-sized avatar

Matthew Brush codebrainz

View GitHub Profile
@codebrainz
codebrainz / 0001-Switch-to-using-recursive-make-for-build-system.patch
Created December 11, 2017 04:01
xfce4-notifyd build system (changes against 2476c93be821a5b2fe42ae5c656018dbb8b13bb2)
From cf2a87a156aeb14d09c4d04b4b8857185803d9d4 Mon Sep 17 00:00:00 2001
From: Matthew Brush <matt@xfce.org>
Date: Sun, 10 Dec 2017 19:09:54 -0800
Subject: [PATCH 1/2] Switch to using recursive make for build system
This makes it easier to grok what's going on since it puts related
rules into separate files and allows for cleaner path specifications.
As part of refactoring, various improvements where made to Autotools
practices. It now passes make distcheck and can be built out-of-tree.
#
# Copyright Bernhard Posselt <bernhard.posselt(at)gmx(dot)at>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@codebrainz
codebrainz / gtkevents.txt
Created January 15, 2018 14:00
grep -n -r '^.*gboolean.*GdkEvent.*$' *.c
callbacks.c:84:static gboolean on_window_delete_event(GtkWidget *widget, GdkEvent *event, gpointer gdata)
callbacks.c:551:gboolean toolbar_popup_menu(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
callbacks.c:1577:gboolean on_motion_event(GtkWidget *widget, GdkEventMotion *event, gpointer user_data)
callbacks.c:1639:gboolean on_escape_key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
callbacks.c:1736:static gboolean on_window_state_event(GtkWidget *widget, GdkEventWindowState *event, gpointer user_data)
document.c:3577:static gboolean on_sci_key(GtkWidget *widget, GdkEventKey *event, gpointer data)
editor.c:292:static gboolean on_editor_button_press_event(GtkWidget *widget, GdkEventButton *event,
editor.c:4793:static gboolean on_editor_focus_in(GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
editor.c:4802:static gboolean on_editor_expose_event(GtkWidget *widget, GdkEventExpose *event,
gb.c:177:static gboolean geany_pong_area_expose(GtkWidget *area, GdkEvent
$ cd /tmp
$ wget https://github.com/geany/geany-themes/archive/0409bce3da003f5def671a3be84c81359788114a.zip
$ unzip 0409bce3da003f5def671a3be84c81359788114a.zip
$ cd the-dir-it-extracted-to
$ cp colorschemes/*.conf ~/.config/geany/colorschemes/
struct A {
uint8_t x:4;
uint8_t :4;
};
struct B {
uint16_t x:4;
uint16_t :12; // ...
};
[theme_info]
name=Breeze
description=Breeze color scheme
version=1
author=M673MA
url=MMA
compat=1.22;1.23;1.23.1;1.24
[named_styles]
default=#000;#EFF0F1;false;false
/*
* document.c - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2005 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>,
* Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>, and others.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
@codebrainz
codebrainz / about-grt.patch
Created May 24, 2019 01:20
Add GTK+ and GLib runtime versions into Geany's about dialog.
diff --git a/src/about.c b/src/about.c
index 6c9a13896..7c31368a9 100644
--- a/src/about.c
+++ b/src/about.c
@@ -43,6 +43,7 @@
#define INFO "<span size=\"larger\" weight=\"bold\">%s</span>"
#define CODENAME "<span weight=\"bold\">\"" GEANY_CODENAME "\"</span>"
#define BUILDDATE "<span size=\"smaller\">%s</span>"
+#define RUNTIME BUILDDATE
#define COPYRIGHT _("Copyright (c) 2005\nThe Geany contributors")
if HAVE_DBUS
mousepad-dbus-infos.c: mousepad-dbus-infos.xml
$(AM_V_GEN)gdbus-codegen --interface-prefix org.xfce. --body --output $@ mousepad-dbus-infos.xml
mousepad-dbus-infos.h: mousepad-dbus-infos.xml
$(AM_V_GEN)gdbus-codegen --interface-prefix org.xfce. --header --output $@ mousepad-dbus-infos.xml
endif
@codebrainz
codebrainz / geany-gtk2.sh
Last active July 13, 2019 03:49
Compile Geany against GTK+ 2 on Debian-like distros.
#!/bin/sh
set -e
sudo apt-get install build-essential autotools-dev autoconf libgtk2.0-dev
mkdir -p ${HOME}/.local/src
cd ${HOME}/.local/src
git clone https://github.com/geany/geany.git
cd geany
./autogen.sh --prefix=${HOME}/.local --disable-gtk3
make
make install