Skip to content

Instantly share code, notes, and snippets.

View codebrainz's full-sized avatar

Matthew Brush codebrainz

View GitHub Profile
Commands
========
Configure:
time ../configure --prefix=/opt/geany --disable-api-docs --disable-gtkdoc-header --disable-pdf-docs --disable-html-docs --disable-gtk3
Make:
time make -j12
Incremental:
@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
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 / 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")
/*
* 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.
[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
struct A {
uint8_t x:4;
uint8_t :4;
};
struct B {
uint16_t x:4;
uint16_t :12; // ...
};
$ 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/
@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
#
# 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