-
Signal connections should be done using GtkBuilder/Glade where possible. If you're moving any manual GUI building code to the GtkBuilder file, you should ensure to move the signal connections there where possible (ex. where you don't need special user_data that cannot be set through Glade).
-
If you're making a callback handler for any non-GtkBuilder-related signals place the handler nearby (ex. directly above) the function that uses it. For
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace std | |
| { | |
| template <> | |
| struct hash<char *> | |
| { | |
| size_t operator()(const char *s) const | |
| { | |
| // http://www.cse.yorku.ca/~oz/hash.html | |
| size_t h = 5381; | |
| int c; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdint> | |
| #include <type_traits> | |
| /* | |
| * Encodes the value as bytes and inserts into the iterator. | |
| * | |
| * Example: | |
| * std::vector<uint8_t> buf; | |
| * int some_val = 0x12345678; | |
| * encode(some_val, back_inserter(buf)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0000000000040ce0 T build_activate_menu_item | |
| 000000000003f3c0 T build_get_current_menu_item | |
| 0000000000042a50 T build_get_group_count | |
| 000000000003f2a0 T build_remove_menu_item | |
| 000000000003fd60 T build_set_menu_item | |
| 00000000000489e0 T dialogs_show_input | |
| 0000000000048a60 T dialogs_show_input_numeric | |
| 00000000000474f0 T dialogs_show_msgbox | |
| 00000000000493c0 T dialogs_show_question | |
| 00000000000495c0 T dialogs_show_save_as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "foobar.h" | |
| G_DEFINE_TYPE (FooBar, foo_bar, G_TYPE_OBJECT) | |
| static void foo_bar_class_init (FooBarClass *klass) {} | |
| static void foo_bar_init (FooBar *self) {} | |
| // Test program, doesn't count :) | |
| int main() | |
| { | |
| g_type_init(); |
| Summary | Blah blah blah some stuff here |
|---|---|
| Original URL | https://sourceforge.net/p/geany/patches/4/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: tagmanager/python.c | |
| =================================================================== | |
| --- tagmanager/python.c (revision 5850) | |
| +++ tagmanager/python.c (working copy) | |
| @@ -478,6 +478,9 @@ | |
| for (; *cp; cp++) | |
| { | |
| + if (*cp == '#') | |
| + break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| int main() | |
| { | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0"?> | |
| <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
| <fontconfig> | |
| <!-- | |
| Disable "faked bold" done when font doesn't have bold style | |
| --> | |
| <match target="font"> | |
| <test name="spacing" compare="eq"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env make | |
| llt_cflags = $(CFLAGS) -g -Wall -Werror $(shell pkg-config --cflags geany) | |
| llt_ldflags = $(LDFLAGS) $(shell pkg-config --libs geany) | |
| all: llt.so | |
| llt.so: plugin.o | |
| $(CC) -shared $(llt_cflags) -o $@ $^ $(llt_ldflags) |