Thu, 23 Mar 2023 23:11:59 -0500
Fix several leaks in tests
All of these are specific to tests, not the library code.
For the moment, `protocol_xfer` still leaks connections (and anything they hold on to) because it is very difficult to disentangle them from the connection manager in the partially implemented state they are in.
This fixes leaks of options in the account option test (these two leaks occur for every test since they all leak the option):
```
61 (48 direct, 13 indirect) bytes in 1 blocks are definitely lost in loss record 133 of 276
at 0x4848464: calloc (vg_replace_malloc.c:1340)
by 0x49F75F0: g_malloc0 (gmem.c:163)
by 0x48C3B2E: purple_account_option_new (purpleaccountoption.c:78)
by 0x4014AF: test_purple_account_option_copy_int (test_account_option.c:67)
by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933)
by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021)
by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038)
by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038)
by 0x4A1D181: g_test_run_suite (gtestutils.c:3115)
by 0x4A156EC: UnknownInlinedFun (gtestutils.c:2234)
by 0x4A156EC: g_test_run (gtestutils.c:2221)
by 0x401721: main (test_account_option.c:157)
61 (48 direct, 13 indirect) bytes in 1 blocks are definitely lost in loss record 134 of 276
at 0x4848464: calloc (vg_replace_malloc.c:1340)
by 0x49F75F0: g_malloc0 (gmem.c:163)
by 0x48C3BC7: purple_account_option_copy (purpleaccountoption.c:93)
by 0x4014BF: test_purple_account_option_copy_int (test_account_option.c:68)
by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933)
by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021)
by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038)
by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038)
by 0x4A1D181: g_test_run_suite (gtestutils.c:3115)
by 0x4A156EC: UnknownInlinedFun (gtestutils.c:2234)
by 0x4A156EC: g_test_run (gtestutils.c:2221)
by 0x401721: main (test_account_option.c:157)
```
leaks in the credential manager test (times 3 for read/write/cancel tests):
```
69 (16 direct, 53 indirect) bytes in 1 blocks are definitely lost in loss record 2,427 of 3,503
at 0x484386F: malloc (vg_replace_malloc.c:393)
by 0x4A58168: g_malloc (gmem.c:130)
by 0x4A6FAB5: g_slice_alloc (gslice.c:1074)
by 0x4A700EC: g_slice_alloc0 (gslice.c:1100)
by 0x4A3BECB: g_error_allocate (gerror.c:710)
by 0x4A3C93F: UnknownInlinedFun (gerror.c:724)
by 0x4A3C93F: g_error_new_valist (gerror.c:766)
by 0x4BEE558: g_task_return_new_error (gtask.c:1941)
by 0x48D82C0: purple_credential_manager_read_password_async (purplecredentialmanager.c:492)
by 0x403634: test_purple_credential_manager_no_provider_read_password_idle (test_credential_manager.c:329)
by 0x4A4ECB1: g_idle_dispatch (gmain.c:6124)
by 0x4A4FCBE: UnknownInlinedFun (gmain.c:3444)
by 0x4A4FCBE: g_main_context_dispatch (gmain.c:4162)
by 0x4AA5597: g_main_context_iterate.constprop.0 (gmain.c:4238)
by 0x4A4F28E: g_main_loop_run (gmain.c:4438)
by 0x40369F: test_purple_credential_manager_no_provider_read_password_async (test_credential_manager.c:345)
by 0x4A7DC7D: UnknownInlinedFun (gtestutils.c:2933)
by 0x4A7DC7D: g_test_run_suite_internal (gtestutils.c:3021)
by 0x4A7D9E4: g_test_run_suite_internal (gtestutils.c:3038)
by 0x4A7D9E4: g_test_run_suite_internal (gtestutils.c:3038)
by 0x4A7E181: g_test_run_suite (gtestutils.c:3115)
by 0x4A766EC: UnknownInlinedFun (gtestutils.c:2234)
by 0x4A766EC: g_test_run (gtestutils.c:2221)
by 0x4048F6: main (test_credential_manager.c:695)
```
a leak in the image test:
```
161 bytes in 1 blocks are definitely lost in loss record 260 of 274
at 0x484386F: malloc (vg_replace_malloc.c:393)
by 0x4A55363: g_try_malloc (gmem.c:286)
by 0x4A3D630: UnknownInlinedFun (gfileutils.c:819)
by 0x4A3D630: UnknownInlinedFun (gfileutils.c:924)
by 0x4A3D630: g_file_get_contents (gfileutils.c:1027)
by 0x401890: test_image_new_from_file (test_image.c:144)
by 0x4A7DC7D: UnknownInlinedFun (gtestutils.c:2933)
by 0x4A7DC7D: g_test_run_suite_internal (gtestutils.c:3021)
by 0x4A7D9E4: g_test_run_suite_internal (gtestutils.c:3038)
by 0x4A7E181: g_test_run_suite (gtestutils.c:3115)
by 0x4A766EC: UnknownInlinedFun (gtestutils.c:2234)
by 0x4A766EC: g_test_run (gtestutils.c:2221)
by 0x40195D: main (test_image.c:172)
```
a leak in queued output stream test:
```
72 (40 direct, 32 indirect) bytes in 1 blocks are definitely lost in loss record 219 of 396
at 0x49D51EF: g_type_create_instance (gtype.c:1909)
by 0x49BAC1F: g_object_new_internal (gobject.c:2228)
by 0x49BC247: g_object_new_with_properties (gobject.c:2391)
by 0x49BCFF0: g_object_new (gobject.c:2037)
by 0x402003: test_queued_output_stream_push_bytes_async_error (test_queued_output_stream.c:219)
by 0x4A7DC7D: UnknownInlinedFun (gtestutils.c:2933)
by 0x4A7DC7D: g_test_run_suite_internal (gtestutils.c:3021)
by 0x4A7D9E4: g_test_run_suite_internal (gtestutils.c:3038)
by 0x4A7E181: g_test_run_suite (gtestutils.c:3115)
by 0x4A766EC: UnknownInlinedFun (gtestutils.c:2234)
by 0x4A766EC: g_test_run (gtestutils.c:2221)
by 0x402429: main (test_queued_output_stream.c:280)
```
and protocol xfer tests (times 3 for each test that creates a test protocol object):
```
112 (48 direct, 64 indirect) bytes in 1 blocks are definitely lost in loss record 3,430 of 3,698
at 0x49D51EF: g_type_create_instance (gtype.c:1909)
by 0x49BAC1F: g_object_new_internal (gobject.c:2228)
by 0x49BC247: g_object_new_with_properties (gobject.c:2391)
by 0x49BCFF0: g_object_new (gobject.c:2037)
by 0x40291C: test_purple_protocol_xfer_send_file_func (test_protocol_xfer.c:146)
by 0x4A7DC7D: UnknownInlinedFun (gtestutils.c:2933)
by 0x4A7DC7D: g_test_run_suite_internal (gtestutils.c:3021)
by 0x4A7D9E4: g_test_run_suite_internal (gtestutils.c:3038)
by 0x4A7E181: g_test_run_suite (gtestutils.c:3115)
by 0x4A766EC: UnknownInlinedFun (gtestutils.c:2234)
by 0x4A766EC: g_test_run (gtestutils.c:2221)
by 0x402B64: main (test_protocol_xfer.c:195)
```
and util tests (times 3 for each call to `purple_text_strip_mnemonic` in the test):
```
5 bytes in 1 blocks are definitely lost in loss record 5 of 247
at 0x484386F: malloc (vg_replace_malloc.c:393)
by 0x49F7168: g_malloc (gmem.c:130)
by 0x491975B: purple_text_strip_mnemonic (util.c:895)
by 0x4015B0: test_util_text_strip_mnemonic (test_util.c:49)
by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933)
by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021)
by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038)
by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038)
by 0x4A1D181: g_test_run_suite (gtestutils.c:3115)
by 0x4A156EC: UnknownInlinedFun (gtestutils.c:2234)
by 0x4A156EC: g_test_run (gtestutils.c:2221)
by 0x401901: main (test_util.c:224)
```
and these leaks in any test that initializes the test UI:
```
4,104 bytes in 1 blocks are possibly lost in loss record 3,451 of 3,457
at 0x484386F: malloc (vg_replace_malloc.c:393)
by 0x5235B67: sqlite3MemMalloc.lto_priv.0 (sqlite3.c:25493)
by 0x5232797: UnknownInlinedFun (sqlite3.c:29181)
by 0x5232797: UnknownInlinedFun (sqlite3.c:29227)
by 0x5232797: sqlite3Malloc.lto_priv.0 (sqlite3.c:29221)
by 0x523BD8B: pcache1Alloc.lto_priv.0 (sqlite3.c:53546)
by 0x5249A8B: UnknownInlinedFun (sqlite3.c:53675)
by 0x5249A8B: allocateTempSpace (sqlite3.c:70848)
by 0x52625A6: sqlite3VdbeExec.lto_priv.0 (sqlite3.c:93857)
by 0x525CBEE: UnknownInlinedFun (sqlite3.c:87995)
by 0x525CBEE: UnknownInlinedFun (sqlite3.c:88056)
by 0x525CBEE: sqlite3_step (sqlite3.c:88045)
by 0x529B324: sqlite3_exec (sqlite3.c:131002)
by 0x48FD558: purple_sqlite3_run_migration (purplesqlite3.c:37)
by 0x48FDBB4: purple_sqlite3_run_migrations_from_resources (purplesqlite3.c:195)
by 0x48FDED9: purple_sqlite_history_adapter_run_migrations (purplesqlitehistoryadapter.c:69)
by 0x48FE7F0: purple_sqlite_history_adapter_activate (purplesqlitehistoryadapter.c:287)
by 0x48DB656: purple_history_adapter_activate (purplehistoryadapter.c:181)
by 0x48DC9BC: purple_history_manager_set_active (purplehistorymanager.c:308)
by 0x402BA8: test_ui_init_history (test_ui.c:132)
by 0x402C80: test_ui_purple_init (test_ui.c:167)
by 0x4027BB: main (test_contact.c:88)
4,368 bytes in 1 blocks are possibly lost in loss record 3,453 of 3,457
at 0x484386F: malloc (vg_replace_malloc.c:393)
by 0x5235B67: sqlite3MemMalloc.lto_priv.0 (sqlite3.c:25493)
by 0x5232797: UnknownInlinedFun (sqlite3.c:29181)
by 0x5232797: UnknownInlinedFun (sqlite3.c:29227)
by 0x5232797: sqlite3Malloc.lto_priv.0 (sqlite3.c:29221)
by 0x523BD8B: pcache1Alloc.lto_priv.0 (sqlite3.c:53546)
by 0x5240077: UnknownInlinedFun (sqlite3.c:53634)
by 0x5240077: pcache1FetchStage2 (sqlite3.c:54104)
by 0x5243E9C: UnknownInlinedFun (sqlite3.c:52671)
by 0x5243E9C: getPageNormal.lto_priv.0 (sqlite3.c:60628)
by 0x524A510: UnknownInlinedFun (sqlite3.c:60805)
by 0x524A510: btreeGetPage.lto_priv.0 (sqlite3.c:70289)
by 0x524C2F6: UnknownInlinedFun (sqlite3.c:71257)
by 0x524C2F6: sqlite3BtreeBeginTrans.lto_priv.0 (sqlite3.c:71647)
by 0x5266B3A: sqlite3VdbeExec.lto_priv.0 (sqlite3.c:93532)
by 0x525CBEE: UnknownInlinedFun (sqlite3.c:87995)
by 0x525CBEE: UnknownInlinedFun (sqlite3.c:88056)
by 0x525CBEE: sqlite3_step (sqlite3.c:88045)
by 0x48FD715: purple_sqlite3_get_schema_version (purplesqlite3.c:79)
by 0x48FD9DD: purple_sqlite3_run_migrations_from_resources (purplesqlite3.c:146)
by 0x48FDED9: purple_sqlite_history_adapter_run_migrations (purplesqlitehistoryadapter.c:69)
by 0x48FE7F0: purple_sqlite_history_adapter_activate (purplesqlitehistoryadapter.c:287)
by 0x48DB656: purple_history_adapter_activate (purplehistoryadapter.c:181)
by 0x48DC9BC: purple_history_manager_set_active (purplehistorymanager.c:308)
by 0x402BA8: test_ui_init_history (test_ui.c:132)
by 0x402C80: test_ui_purple_init (test_ui.c:167)
by 0x4027BB: main (test_contact.c:88)
4,368 bytes in 1 blocks are possibly lost in loss record 3,454 of 3,457
at 0x484386F: malloc (vg_replace_malloc.c:393)
by 0x5235B67: sqlite3MemMalloc.lto_priv.0 (sqlite3.c:25493)
by 0x5232797: UnknownInlinedFun (sqlite3.c:29181)
by 0x5232797: UnknownInlinedFun (sqlite3.c:29227)
by 0x5232797: sqlite3Malloc.lto_priv.0 (sqlite3.c:29221)
by 0x523BD8B: pcache1Alloc.lto_priv.0 (sqlite3.c:53546)
by 0x5240077: UnknownInlinedFun (sqlite3.c:53634)
by 0x5240077: pcache1FetchStage2 (sqlite3.c:54104)
by 0x5243E9C: UnknownInlinedFun (sqlite3.c:52671)
by 0x5243E9C: getPageNormal.lto_priv.0 (sqlite3.c:60628)
by 0x52499BC: UnknownInlinedFun (sqlite3.c:60805)
by 0x52499BC: UnknownInlinedFun (sqlite3.c:70289)
by 0x52499BC: btreeGetUnusedPage (sqlite3.c:70432)
by 0x524F504: allocateBtreePage.lto_priv.0 (sqlite3.c:74604)
by 0x5256209: btreeCreateTable.lto_priv.0 (sqlite3.c:77830)
by 0x5265EB2: UnknownInlinedFun (sqlite3.c:77849)
by 0x5265EB2: sqlite3VdbeExec.lto_priv.0 (sqlite3.c:96382)
by 0x525CBEE: UnknownInlinedFun (sqlite3.c:87995)
by 0x525CBEE: UnknownInlinedFun (sqlite3.c:88056)
by 0x525CBEE: sqlite3_step (sqlite3.c:88045)
by 0x529B324: sqlite3_exec (sqlite3.c:131002)
by 0x48FD558: purple_sqlite3_run_migration (purplesqlite3.c:37)
by 0x48FDBB4: purple_sqlite3_run_migrations_from_resources (purplesqlite3.c:195)
by 0x48FDED9: purple_sqlite_history_adapter_run_migrations (purplesqlitehistoryadapter.c:69)
by 0x48FE7F0: purple_sqlite_history_adapter_activate (purplesqlitehistoryadapter.c:287)
by 0x48DB656: purple_history_adapter_activate (purplehistoryadapter.c:181)
by 0x48DC9BC: purple_history_manager_set_active (purplehistorymanager.c:308)
by 0x402BA8: test_ui_init_history (test_ui.c:132)
by 0x402C80: test_ui_purple_init (test_ui.c:167)
by 0x4027BB: main (test_contact.c:88)
```
Testing Done:
Ran tests in valgrind, and all above leaks were gone except for noted `protocol_xfer` issues, and a bunch of leaks of the `PurpleBuddy`-`PurpleContact` compatibility bindings, which will go away in their entirety eventually.
Reviewed at https://reviews.imfreedom.org/r/2385/
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
1 | /* |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
4 | * |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
38672
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
7 | * source distribution. |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
8 | * |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
12 | * (at your option) any later version. |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
13 | * |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
17 | * GNU General Public License for more details. |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
18 | * |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
40539
2941deda6d8d
Use an https link to gnu.org in the license file headers
Gary Kramlich <grim@reaperworld.com>
parents:
40530
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
38672
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
21 | */ |
|
40439
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
22 | |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
23 | #ifdef HAVE_CONFIG_H |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
24 | # include <config.h> |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
25 | #endif |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
26 | |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
27 | #ifdef HAVE_MESON_CONFIG |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
28 | #include "meson-config.h" |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
29 | #endif |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
30 | |
|
40439
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
31 | #include <glib/gi18n-lib.h> |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
39913
diff
changeset
|
32 | |
| 38659 | 33 | #include <gdk-pixbuf/gdk-pixbuf.h> |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
34 | |
| 38659 | 35 | #include <json-glib/json-glib.h> |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
36 | |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
37 | #include <adwaita.h> |
|
39216
f6ab17b953df
Replace the WebkitWebView with Talkatu widgets. There's some bugs, but it mostly works
Gary Kramlich <grim@reaperworld.com>
parents:
38682
diff
changeset
|
38 | #include <talkatu.h> |
| 38659 | 39 | |
|
40496
6941fece679b
phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
40 | #include "pidginabout.h" |
|
6941fece679b
phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
41 | |
|
38665
35676a9b7faa
Add the version to the application_name label and add the revision to build info
Gary Kramlich <grim@reaperworld.com>
parents:
38664
diff
changeset
|
42 | #include "package_revision.h" |
|
40496
6941fece679b
phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
43 | #include "gtkutils.h" |
|
6941fece679b
phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
44 | #include "pidgincore.h" |
| 38659 | 45 | #include "pidginresources.h" |
| 46 | ||
|
38682
898b14e03449
Hide the about window's structs since it's a final type
Gary Kramlich <grim@reaperworld.com>
parents:
38681
diff
changeset
|
47 | struct _PidginAboutDialog { |
|
898b14e03449
Hide the about window's structs since it's a final type
Gary Kramlich <grim@reaperworld.com>
parents:
38681
diff
changeset
|
48 | GtkDialog parent; |
|
898b14e03449
Hide the about window's structs since it's a final type
Gary Kramlich <grim@reaperworld.com>
parents:
38681
diff
changeset
|
49 | |
|
38664
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
50 | GtkWidget *application_name; |
| 38659 | 51 | |
|
39216
f6ab17b953df
Replace the WebkitWebView with Talkatu widgets. There's some bugs, but it mostly works
Gary Kramlich <grim@reaperworld.com>
parents:
38682
diff
changeset
|
52 | GtkTextBuffer *main_buffer; |
|
38664
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
53 | |
|
42020
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
54 | AdwPreferencesPage *developers_page; |
| 38662 | 55 | |
|
42020
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
56 | AdwPreferencesPage *translators_page; |
| 38659 | 57 | |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
58 | AdwPreferencesGroup *build_info_group; |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
59 | AdwPreferencesGroup *runtime_info_group; |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
60 | AdwPreferencesGroup *gtk_settings_group; |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
61 | AdwPreferencesGroup *plugin_search_paths_group; |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
62 | AdwPreferencesGroup *conf_path_info_group; |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
63 | AdwPreferencesGroup *build_args_group; |
| 38659 | 64 | }; |
| 65 | ||
| 66 | /****************************************************************************** | |
| 67 | * Helpers | |
| 68 | *****************************************************************************/ | |
| 69 | static void | |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
70 | pidgin_about_dialog_load_application_name(PidginAboutDialog *about) { |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
71 | gchar *label = g_strdup_printf("%s %s", PIDGIN_NAME, VERSION); |
|
38665
35676a9b7faa
Add the version to the application_name label and add the revision to build info
Gary Kramlich <grim@reaperworld.com>
parents:
38664
diff
changeset
|
72 | |
|
39855
7c9c4d700ed2
Get rid of the private struct in PidginAbout box and a few other cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
39533
diff
changeset
|
73 | gtk_label_set_text(GTK_LABEL(about->application_name), label); |
|
38665
35676a9b7faa
Add the version to the application_name label and add the revision to build info
Gary Kramlich <grim@reaperworld.com>
parents:
38664
diff
changeset
|
74 | |
|
35676a9b7faa
Add the version to the application_name label and add the revision to build info
Gary Kramlich <grim@reaperworld.com>
parents:
38664
diff
changeset
|
75 | g_free(label); |
|
35676a9b7faa
Add the version to the application_name label and add the revision to build info
Gary Kramlich <grim@reaperworld.com>
parents:
38664
diff
changeset
|
76 | } |
|
35676a9b7faa
Add the version to the application_name label and add the revision to build info
Gary Kramlich <grim@reaperworld.com>
parents:
38664
diff
changeset
|
77 | |
|
35676a9b7faa
Add the version to the application_name label and add the revision to build info
Gary Kramlich <grim@reaperworld.com>
parents:
38664
diff
changeset
|
78 | static void |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
79 | pidgin_about_dialog_load_main_page(PidginAboutDialog *about) { |
|
39217
4c5b6c2e7007
use gtk_text_buffer_get_start_iter instead of looking up the insertion mark and all that
Gary Kramlich <grim@reaperworld.com>
parents:
39216
diff
changeset
|
80 | GtkTextIter start; |
|
38664
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
81 | GInputStream *istream = NULL; |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
82 | GString *str = NULL; |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
83 | gchar buffer[8192]; |
|
39216
f6ab17b953df
Replace the WebkitWebView with Talkatu widgets. There's some bugs, but it mostly works
Gary Kramlich <grim@reaperworld.com>
parents:
38682
diff
changeset
|
84 | gssize read = 0, size = 0; |
|
38664
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
85 | |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
86 | /* now load the html */ |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
87 | istream = g_resource_open_stream(pidgin_get_resource(), |
|
41030
ec8b76f3bf0a
Fix the resource path so we can use the automatic stuff that GtkApplication supports
Gary Kramlich <grim@reaperworld.com>
parents:
41008
diff
changeset
|
88 | "/im/pidgin/Pidgin3/About/about.md", |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
89 | G_RESOURCE_LOOKUP_FLAGS_NONE, NULL); |
|
38664
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
90 | |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
91 | str = g_string_new(""); |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
92 | |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
93 | while((read = g_input_stream_read(istream, buffer, sizeof(buffer), NULL, NULL)) > 0) { |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
94 | g_string_append_len(str, (gchar *)buffer, read); |
|
39216
f6ab17b953df
Replace the WebkitWebView with Talkatu widgets. There's some bugs, but it mostly works
Gary Kramlich <grim@reaperworld.com>
parents:
38682
diff
changeset
|
95 | size += read; |
|
38664
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
96 | } |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
97 | |
|
39855
7c9c4d700ed2
Get rid of the private struct in PidginAbout box and a few other cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
39533
diff
changeset
|
98 | gtk_text_buffer_get_start_iter(about->main_buffer, &start); |
|
39216
f6ab17b953df
Replace the WebkitWebView with Talkatu widgets. There's some bugs, but it mostly works
Gary Kramlich <grim@reaperworld.com>
parents:
38682
diff
changeset
|
99 | |
|
42094
2707c81648a0
Update to talkatu 0.2.0
Gary Kramlich <grim@reaperworld.com>
parents:
42022
diff
changeset
|
100 | talkatu_markdown_insert(TALKATU_BUFFER(about->main_buffer), &start, |
|
2707c81648a0
Update to talkatu 0.2.0
Gary Kramlich <grim@reaperworld.com>
parents:
42022
diff
changeset
|
101 | str->str, size); |
|
38664
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
102 | |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
103 | g_string_free(str, TRUE); |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
104 | |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
105 | g_input_stream_close(istream, NULL, NULL); |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
106 | } |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
107 | |
|
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
108 | static void |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
109 | pidgin_about_dialog_group_add_row(AdwPreferencesGroup *group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
110 | const char *title, const char *value) |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
111 | { |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
112 | GtkWidget *row = adw_action_row_new(); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
113 | |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
114 | adw_preferences_row_set_title(ADW_PREFERENCES_ROW(row), title); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
115 | |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
116 | if(value != NULL) { |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
117 | GtkWidget *label = gtk_label_new(NULL); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
118 | gtk_label_set_markup(GTK_LABEL(label), value); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
119 | adw_action_row_add_suffix(ADW_ACTION_ROW(row), label); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
120 | } |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
121 | |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
122 | adw_preferences_group_add(group, row); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
123 | } |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
124 | |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
125 | static void |
|
42020
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
126 | pidgin_about_dialog_load_json(AdwPreferencesPage *page, |
|
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
127 | const char *json_section) |
|
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
128 | { |
| 38659 | 129 | GInputStream *istream = NULL; |
| 130 | GList *l = NULL, *sections = NULL; | |
| 131 | GError *error = NULL; | |
| 132 | JsonParser *parser = NULL; | |
| 133 | JsonNode *root_node = NULL; | |
| 134 | JsonObject *root_object = NULL; | |
|
38681
ee42a17715ac
Create a helper function for loading the developers and translators
Gary Kramlich <grim@reaperworld.com>
parents:
38680
diff
changeset
|
135 | JsonArray *sections_array = NULL; |
| 38659 | 136 | |
|
38681
ee42a17715ac
Create a helper function for loading the developers and translators
Gary Kramlich <grim@reaperworld.com>
parents:
38680
diff
changeset
|
137 | /* get a stream to the credits resource */ |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
138 | istream = g_resource_open_stream(pidgin_get_resource(), |
|
41030
ec8b76f3bf0a
Fix the resource path so we can use the automatic stuff that GtkApplication supports
Gary Kramlich <grim@reaperworld.com>
parents:
41008
diff
changeset
|
139 | "/im/pidgin/Pidgin3/About/credits.json", |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
140 | G_RESOURCE_LOOKUP_FLAGS_NONE, NULL); |
| 38659 | 141 | |
| 142 | /* create our parser */ | |
| 143 | parser = json_parser_new(); | |
| 144 | ||
| 145 | if(!json_parser_load_from_stream(parser, istream, NULL, &error)) { | |
|
38660
d6a4308481c7
Get the meson arguments working
Gary Kramlich <grim@reaperworld.com>
parents:
38659
diff
changeset
|
146 | g_critical("%s", error->message); |
|
42182
3fc2d2b7b7a8
Fix leaked errors
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42094
diff
changeset
|
147 | g_clear_error(&error); |
|
3fc2d2b7b7a8
Fix leaked errors
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42094
diff
changeset
|
148 | return; |
| 38659 | 149 | } |
| 150 | ||
| 151 | root_node = json_parser_get_root(parser); | |
| 152 | root_object = json_node_get_object(root_node); | |
| 153 | ||
|
38681
ee42a17715ac
Create a helper function for loading the developers and translators
Gary Kramlich <grim@reaperworld.com>
parents:
38680
diff
changeset
|
154 | sections_array = json_object_get_array_member(root_object, json_section); |
|
ee42a17715ac
Create a helper function for loading the developers and translators
Gary Kramlich <grim@reaperworld.com>
parents:
38680
diff
changeset
|
155 | sections = json_array_get_elements(sections_array); |
| 38659 | 156 | |
| 157 | for(l = sections; l; l = l->next) { | |
| 158 | JsonObject *section = json_node_get_object(l->data); | |
|
38672
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
159 | JsonArray *people = NULL; |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
160 | const gchar *title = NULL; |
|
42020
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
161 | AdwPreferencesGroup *group = NULL; |
|
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
162 | guint n_people = 0; |
| 38659 | 163 | |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
164 | title = json_object_get_string_member(section, "title"); |
|
42020
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
165 | group = ADW_PREFERENCES_GROUP(adw_preferences_group_new()); |
|
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
166 | adw_preferences_group_set_title(group, title); |
|
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
167 | adw_preferences_page_add(page, group); |
| 38659 | 168 | |
|
38672
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
169 | people = json_object_get_array_member(section, "people"); |
|
df4a6635745a
A bunch of updates from review comments
Gary Kramlich <grim@reaperworld.com>
parents:
38667
diff
changeset
|
170 | n_people = json_array_get_length(people); |
| 38659 | 171 | |
|
42020
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
172 | for(guint idx = 0; idx < n_people; idx++) { |
|
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
173 | const char *name = json_array_get_string_element(people, idx); |
|
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
174 | pidgin_about_dialog_group_add_row(group, name, NULL); |
| 38662 | 175 | } |
| 176 | } | |
| 177 | ||
| 178 | g_list_free(sections); | |
| 179 | ||
| 180 | /* clean up */ | |
| 181 | g_object_unref(G_OBJECT(parser)); | |
| 182 | ||
| 183 | g_input_stream_close(istream, NULL, NULL); | |
| 184 | } | |
| 185 | ||
| 186 | static void | |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
187 | pidgin_about_dialog_load_developers(PidginAboutDialog *about) { |
|
42020
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
188 | pidgin_about_dialog_load_json(about->developers_page, "developers"); |
|
38681
ee42a17715ac
Create a helper function for loading the developers and translators
Gary Kramlich <grim@reaperworld.com>
parents:
38680
diff
changeset
|
189 | } |
| 38662 | 190 | |
|
38681
ee42a17715ac
Create a helper function for loading the developers and translators
Gary Kramlich <grim@reaperworld.com>
parents:
38680
diff
changeset
|
191 | static void |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
192 | pidgin_about_dialog_load_translators(PidginAboutDialog *about) { |
|
42020
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
193 | pidgin_about_dialog_load_json(about->translators_page, "languages"); |
| 38659 | 194 | } |
| 195 | ||
|
38660
d6a4308481c7
Get the meson arguments working
Gary Kramlich <grim@reaperworld.com>
parents:
38659
diff
changeset
|
196 | static void |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
197 | pidgin_about_dialog_build_info_add_version(AdwPreferencesGroup *group, |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
198 | const gchar *title, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
199 | guint major, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
200 | guint minor, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
201 | guint micro) |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
202 | { |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
203 | gchar *version = g_strdup_printf("%u.%u.%u", major, minor, micro); |
|
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
204 | |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
205 | pidgin_about_dialog_group_add_row(group, title, version); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
206 | |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
207 | g_free(version); |
|
38660
d6a4308481c7
Get the meson arguments working
Gary Kramlich <grim@reaperworld.com>
parents:
38659
diff
changeset
|
208 | } |
|
d6a4308481c7
Get the meson arguments working
Gary Kramlich <grim@reaperworld.com>
parents:
38659
diff
changeset
|
209 | |
|
d6a4308481c7
Get the meson arguments working
Gary Kramlich <grim@reaperworld.com>
parents:
38659
diff
changeset
|
210 | static void |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
211 | pidgin_about_dialog_load_build_info(PidginAboutDialog *about) { |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
212 | |
|
38665
35676a9b7faa
Add the version to the application_name label and add the revision to build info
Gary Kramlich <grim@reaperworld.com>
parents:
38664
diff
changeset
|
213 | /* add the commit hash */ |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
214 | pidgin_about_dialog_group_add_row(about->build_info_group, "Commit Hash", |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
215 | REVISION); |
|
38665
35676a9b7faa
Add the version to the application_name label and add the revision to build info
Gary Kramlich <grim@reaperworld.com>
parents:
38664
diff
changeset
|
216 | |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
217 | /* add the purple version */ |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
218 | pidgin_about_dialog_build_info_add_version(about->build_info_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
219 | _("Purple Version"), |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
220 | PURPLE_MAJOR_VERSION, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
221 | PURPLE_MINOR_VERSION, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
222 | PURPLE_MICRO_VERSION); |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
223 | |
|
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
224 | /* add the glib version */ |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
225 | pidgin_about_dialog_build_info_add_version(about->build_info_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
226 | _("GLib Version"), |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
227 | GLIB_MAJOR_VERSION, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
228 | GLIB_MINOR_VERSION, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
229 | GLIB_MICRO_VERSION); |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
230 | |
|
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
231 | /* add the gtk version */ |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
232 | pidgin_about_dialog_build_info_add_version(about->build_info_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
233 | _("GTK Version"), |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
234 | GTK_MAJOR_VERSION, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
235 | GTK_MINOR_VERSION, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
236 | GTK_MICRO_VERSION); |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
237 | } |
|
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
238 | |
|
42022
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
239 | static char * |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
240 | pidgin_about_dialog_copy_build_info(void) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
241 | char *info = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
242 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
243 | info = g_strdup_printf( |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
244 | "Build Information\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
245 | "=================\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
246 | "Commit Hash: %s\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
247 | "Purple Version: %u.%u.%u\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
248 | "GLib Version: %u.%u.%u\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
249 | "GTK Version: %u.%u.%u\n", |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
250 | REVISION, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
251 | PURPLE_MAJOR_VERSION, PURPLE_MINOR_VERSION, PURPLE_MICRO_VERSION, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
252 | GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
253 | GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
254 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
255 | return info; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
256 | } |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
257 | |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
258 | static void |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
259 | pidgin_about_dialog_load_runtime_info(PidginAboutDialog *about) { |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
260 | /* add the purple version */ |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
261 | pidgin_about_dialog_build_info_add_version(about->runtime_info_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
262 | _("Purple Version"), |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
263 | purple_major_version, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
264 | purple_minor_version, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
265 | purple_micro_version); |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
266 | |
|
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
267 | /* add the glib version */ |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
268 | pidgin_about_dialog_build_info_add_version(about->runtime_info_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
269 | _("GLib Version"), |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
270 | glib_major_version, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
271 | glib_minor_version, |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
272 | glib_micro_version); |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
273 | |
|
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
274 | /* add the gtk version */ |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
275 | pidgin_about_dialog_build_info_add_version(about->runtime_info_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
276 | _("GTK Version"), |
|
41525
87e0e009f5c1
Convert some stuff in PidginAbout that was renamed in GTK4
Gary Kramlich <grim@reaperworld.com>
parents:
41372
diff
changeset
|
277 | gtk_get_major_version(), |
|
87e0e009f5c1
Convert some stuff in PidginAbout that was renamed in GTK4
Gary Kramlich <grim@reaperworld.com>
parents:
41372
diff
changeset
|
278 | gtk_get_minor_version(), |
|
87e0e009f5c1
Convert some stuff in PidginAbout that was renamed in GTK4
Gary Kramlich <grim@reaperworld.com>
parents:
41372
diff
changeset
|
279 | gtk_get_micro_version()); |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
280 | } |
|
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
281 | |
|
42022
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
282 | static char * |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
283 | pidgin_about_dialog_copy_runtime_info(void) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
284 | char *info = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
285 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
286 | info = g_strdup_printf( |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
287 | "Runtime Information\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
288 | "===================\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
289 | "Purple Version: %u.%u.%u\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
290 | "GLib Version: %u.%u.%u\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
291 | "GTK Version: %u.%u.%u\n", |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
292 | purple_major_version, purple_minor_version, purple_micro_version, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
293 | glib_major_version, glib_minor_version, glib_micro_version, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
294 | gtk_get_major_version(), gtk_get_minor_version(), gtk_get_micro_version()); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
295 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
296 | return info; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
297 | } |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
298 | |
|
38661
cf4073d0d648
A bunch more tweaks and added build and runtime library versions
Gary Kramlich <grim@reaperworld.com>
parents:
38660
diff
changeset
|
299 | static void |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
300 | pidgin_about_dialog_load_gtk_settings(PidginAboutDialog *about) { |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
301 | gchar *cursor_theme_name = NULL, *theme_name = NULL; |
|
41595
61d8f39f3d70
Port about dialog to GTK4
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41525
diff
changeset
|
302 | gchar *icon_theme_name = NULL; |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
303 | gchar *im_module = NULL; |
|
41595
61d8f39f3d70
Port about dialog to GTK4
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41525
diff
changeset
|
304 | gchar *sound_theme_name = NULL; |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
305 | gboolean enable_animations = FALSE; |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
306 | gboolean shell_shows_app_menu = FALSE, shell_shows_menubar = FALSE; |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
307 | |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
308 | /* get the settings we're interested in */ |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
309 | g_object_get( |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
310 | gtk_settings_get_default(), |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
311 | "gtk-cursor-theme-name", &cursor_theme_name, |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
312 | "gtk-enable-animations", &enable_animations, |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
313 | "gtk-icon-theme-name", &icon_theme_name, |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
314 | "gtk-im-module", &im_module, |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
315 | "gtk-shell-shows-app-menu", &shell_shows_app_menu, |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
316 | "gtk-shell-shows-menubar", &shell_shows_menubar, |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
317 | "gtk-sound-theme-name", &sound_theme_name, |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
318 | "gtk-theme-name", &theme_name, |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
319 | NULL); |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
320 | |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
321 | pidgin_about_dialog_group_add_row( |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
322 | about->gtk_settings_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
323 | "gtk-cursor-theme-name", |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
324 | (cursor_theme_name != NULL) ? cursor_theme_name : _("(not set)")); |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
325 | |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
326 | pidgin_about_dialog_group_add_row( |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
327 | about->gtk_settings_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
328 | "gtk-enable-animations", |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
329 | enable_animations ? _("yes") : _("no")); |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
330 | |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
331 | pidgin_about_dialog_group_add_row( |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
332 | about->gtk_settings_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
333 | "gtk-icon-theme-name", |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
334 | (icon_theme_name != NULL) ? icon_theme_name : _("(not set)")); |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
335 | |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
336 | pidgin_about_dialog_group_add_row( |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
337 | about->gtk_settings_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
338 | "gtk-im-module", |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
339 | (im_module != NULL) ? im_module : _("(not set)")); |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
340 | |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
341 | pidgin_about_dialog_group_add_row( |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
342 | about->gtk_settings_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
343 | "gtk-shell-shows-app-menu", |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
344 | shell_shows_app_menu ? _("yes") : _("no")); |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
345 | |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
346 | pidgin_about_dialog_group_add_row( |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
347 | about->gtk_settings_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
348 | "gtk-shell-shows-menubar", |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
349 | shell_shows_menubar ? _("yes") : _("no")); |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
350 | |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
351 | pidgin_about_dialog_group_add_row( |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
352 | about->gtk_settings_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
353 | "gtk-sound-theme-name", |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
354 | (sound_theme_name != NULL) ? sound_theme_name : _("(not set)")); |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
355 | |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
356 | pidgin_about_dialog_group_add_row( |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
357 | about->gtk_settings_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
358 | "gtk-theme-name", |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
359 | (theme_name != NULL) ? theme_name : _("(not set)")); |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
360 | |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
361 | g_free(cursor_theme_name); |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
362 | g_free(icon_theme_name); |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
363 | g_free(im_module); |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
364 | g_free(sound_theme_name); |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
365 | g_free(theme_name); |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
366 | } |
|
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
367 | |
|
42022
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
368 | static char * |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
369 | pidgin_about_dialog_copy_gtk_settings(void) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
370 | char *cursor_theme_name = NULL, *theme_name = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
371 | char *icon_theme_name = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
372 | char *im_module = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
373 | char *sound_theme_name = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
374 | gboolean enable_animations = FALSE; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
375 | gboolean shell_shows_app_menu = FALSE, shell_shows_menubar = FALSE; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
376 | GString *info = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
377 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
378 | /* get the settings we're interested in */ |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
379 | g_object_get( |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
380 | gtk_settings_get_default(), |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
381 | "gtk-cursor-theme-name", &cursor_theme_name, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
382 | "gtk-enable-animations", &enable_animations, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
383 | "gtk-icon-theme-name", &icon_theme_name, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
384 | "gtk-im-module", &im_module, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
385 | "gtk-shell-shows-app-menu", &shell_shows_app_menu, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
386 | "gtk-shell-shows-menubar", &shell_shows_menubar, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
387 | "gtk-sound-theme-name", &sound_theme_name, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
388 | "gtk-theme-name", &theme_name, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
389 | NULL); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
390 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
391 | info = g_string_new( |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
392 | "GTK Settings\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
393 | "============\n"); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
394 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
395 | g_string_append_printf( |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
396 | info, "gtk-cursor-theme-name: %s\n", |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
397 | (cursor_theme_name != NULL) ? cursor_theme_name : _("(not set)")); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
398 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
399 | g_string_append_printf(info, "gtk-enable-animations: %s\n", |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
400 | enable_animations ? _("yes") : _("no")); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
401 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
402 | g_string_append_printf( |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
403 | info, "gtk-icon-theme-name: %s\n", |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
404 | (icon_theme_name != NULL) ? icon_theme_name : _("(not set)")); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
405 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
406 | g_string_append_printf(info, "gtk-im-module: %s\n", |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
407 | (im_module != NULL) ? im_module : _("(not set)")); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
408 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
409 | g_string_append_printf(info, "gtk-shell-shows-app-menu: %s\n", |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
410 | shell_shows_app_menu ? _("yes") : _("no")); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
411 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
412 | g_string_append_printf(info, "gtk-shell-shows-menubar: %s\n", |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
413 | shell_shows_menubar ? _("yes") : _("no")); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
414 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
415 | g_string_append_printf( |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
416 | info, "gtk-sound-theme-name: %s\n", |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
417 | (sound_theme_name != NULL) ? sound_theme_name : _("(not set)")); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
418 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
419 | g_string_append_printf(info, "gtk-theme-name: %s\n", |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
420 | (theme_name != NULL) ? theme_name : _("(not set)")); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
421 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
422 | g_free(cursor_theme_name); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
423 | g_free(icon_theme_name); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
424 | g_free(im_module); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
425 | g_free(sound_theme_name); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
426 | g_free(theme_name); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
427 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
428 | return g_string_free(info, FALSE); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
429 | } |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
430 | |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
431 | static void |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
432 | pidgin_about_dialog_load_plugin_search_paths(PidginAboutDialog *about) { |
|
41008
dc06703548a1
Update everything for GPlugin 0.33.0
Gary Kramlich <grim@reaperworld.com>
parents:
40830
diff
changeset
|
433 | GList *paths = NULL; |
|
dc06703548a1
Update everything for GPlugin 0.33.0
Gary Kramlich <grim@reaperworld.com>
parents:
40830
diff
changeset
|
434 | GPluginManager *manager = gplugin_manager_get_default(); |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
435 | |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
436 | /* add the search paths */ |
|
41008
dc06703548a1
Update everything for GPlugin 0.33.0
Gary Kramlich <grim@reaperworld.com>
parents:
40830
diff
changeset
|
437 | paths = gplugin_manager_get_paths(manager); |
|
dc06703548a1
Update everything for GPlugin 0.33.0
Gary Kramlich <grim@reaperworld.com>
parents:
40830
diff
changeset
|
438 | while(paths != NULL) { |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
439 | pidgin_about_dialog_group_add_row(about->plugin_search_paths_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
440 | paths->data, NULL); |
|
41008
dc06703548a1
Update everything for GPlugin 0.33.0
Gary Kramlich <grim@reaperworld.com>
parents:
40830
diff
changeset
|
441 | |
|
dc06703548a1
Update everything for GPlugin 0.33.0
Gary Kramlich <grim@reaperworld.com>
parents:
40830
diff
changeset
|
442 | paths = paths->next; |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
443 | } |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
444 | } |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
445 | |
|
42022
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
446 | static char * |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
447 | pidgin_about_dialog_copy_plugin_search_paths(void) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
448 | GList *paths = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
449 | GPluginManager *manager = gplugin_manager_get_default(); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
450 | GString *info = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
451 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
452 | info = g_string_new( |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
453 | "Plugin Search Paths\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
454 | "===================\n"); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
455 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
456 | /* add the search paths */ |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
457 | paths = gplugin_manager_get_paths(manager); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
458 | while(paths != NULL) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
459 | g_string_append_printf(info, "- %s\n", (char *)paths->data); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
460 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
461 | paths = paths->next; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
462 | } |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
463 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
464 | return g_string_free(info, FALSE); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
465 | } |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
466 | |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
467 | static void |
|
40830
628ec6b8efd4
Add configuration directory path to help window
TANWEER ALI <tanweerali908@gmail.com>
parents:
40605
diff
changeset
|
468 | pidgin_about_dialog_load_conf_path_info(PidginAboutDialog *about) { |
|
628ec6b8efd4
Add configuration directory path to help window
TANWEER ALI <tanweerali908@gmail.com>
parents:
40605
diff
changeset
|
469 | /* add the cache directory path */ |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
470 | pidgin_about_dialog_group_add_row(about->conf_path_info_group, _("Cache"), |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
471 | purple_cache_dir()); |
|
40830
628ec6b8efd4
Add configuration directory path to help window
TANWEER ALI <tanweerali908@gmail.com>
parents:
40605
diff
changeset
|
472 | |
|
628ec6b8efd4
Add configuration directory path to help window
TANWEER ALI <tanweerali908@gmail.com>
parents:
40605
diff
changeset
|
473 | /* add the config directory path */ |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
474 | pidgin_about_dialog_group_add_row(about->conf_path_info_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
475 | _("Configuration"), purple_config_dir()); |
|
40830
628ec6b8efd4
Add configuration directory path to help window
TANWEER ALI <tanweerali908@gmail.com>
parents:
40605
diff
changeset
|
476 | |
|
628ec6b8efd4
Add configuration directory path to help window
TANWEER ALI <tanweerali908@gmail.com>
parents:
40605
diff
changeset
|
477 | /* add the data directory path */ |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
478 | pidgin_about_dialog_group_add_row(about->conf_path_info_group, _("Data"), |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
479 | purple_data_dir()); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
480 | } |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
481 | |
|
42022
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
482 | static char * |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
483 | pidgin_about_dialog_copy_conf_path_info(void) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
484 | char *info = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
485 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
486 | info = g_strdup_printf( |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
487 | "Runtime Directories\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
488 | "===================\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
489 | "Cache: %s\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
490 | "Configuration: %s\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
491 | "Data: %s\n", |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
492 | purple_cache_dir(), |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
493 | purple_config_dir(), |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
494 | purple_data_dir()); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
495 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
496 | return info; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
497 | } |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
498 | |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
499 | static void |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
500 | pidgin_about_dialog_add_build_args(PidginAboutDialog *about, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
501 | const char *build_args) |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
502 | { |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
503 | gchar **splits = NULL; |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
504 | |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
505 | /* Walk through the arguments and add them */ |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
506 | splits = g_strsplit(build_args, " ", -1); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
507 | for(gint idx = 0; splits[idx]; idx++) { |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
508 | gchar **value_split = g_strsplit(splits[idx], "=", 2); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
509 | |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
510 | if(value_split[0] == NULL || value_split[0][0] == '\0') { |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
511 | continue; |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
512 | } |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
513 | |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
514 | pidgin_about_dialog_group_add_row(about->build_args_group, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
515 | value_split[0], value_split[1]); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
516 | |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
517 | g_strfreev(value_split); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
518 | } |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
519 | |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
520 | g_strfreev(splits); |
|
40830
628ec6b8efd4
Add configuration directory path to help window
TANWEER ALI <tanweerali908@gmail.com>
parents:
40605
diff
changeset
|
521 | } |
|
628ec6b8efd4
Add configuration directory path to help window
TANWEER ALI <tanweerali908@gmail.com>
parents:
40605
diff
changeset
|
522 | |
|
42022
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
523 | static char * |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
524 | pidgin_about_dialog_copy_build_args(const char *build_args) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
525 | char **splits = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
526 | GString *info = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
527 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
528 | info = g_string_new( |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
529 | "Meson Arguments\n" |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
530 | "===============\n"); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
531 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
532 | /* Walk through the arguments and add them */ |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
533 | splits = g_strsplit(build_args, " ", -1); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
534 | for(gint idx = 0; splits[idx]; idx++) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
535 | char **value_split = g_strsplit(splits[idx], "=", 2); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
536 | char *value = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
537 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
538 | if(value_split[0] == NULL || value_split[0][0] == '\0') { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
539 | continue; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
540 | } |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
541 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
542 | if(value_split[1] != NULL) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
543 | value = purple_unescape_text(value_split[1]); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
544 | } else { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
545 | value = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
546 | } |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
547 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
548 | g_string_append_printf(info, "%s: %s\n", value_split[0], value); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
549 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
550 | g_free(value); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
551 | g_strfreev(value_split); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
552 | } |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
553 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
554 | g_strfreev(splits); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
555 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
556 | return g_string_free(info, FALSE); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
557 | } |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
558 | |
|
40830
628ec6b8efd4
Add configuration directory path to help window
TANWEER ALI <tanweerali908@gmail.com>
parents:
40605
diff
changeset
|
559 | static void |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
560 | pidgin_about_dialog_load_build_configuration(PidginAboutDialog *about) { |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
561 | pidgin_about_dialog_load_build_info(about); |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
562 | pidgin_about_dialog_load_runtime_info(about); |
|
40605
db61db6af817
Add a bunch of interesting properties from gtk-settings to the about box
Gary Kramlich <grim@reaperworld.com>
parents:
40539
diff
changeset
|
563 | pidgin_about_dialog_load_gtk_settings(about); |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
564 | pidgin_about_dialog_load_plugin_search_paths(about); |
|
40830
628ec6b8efd4
Add configuration directory path to help window
TANWEER ALI <tanweerali908@gmail.com>
parents:
40605
diff
changeset
|
565 | pidgin_about_dialog_load_conf_path_info(about); |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
566 | |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
567 | #ifdef MESON_ARGS |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
568 | pidgin_about_dialog_add_build_args(about, MESON_ARGS); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
569 | gtk_widget_set_visible(GTK_WIDGET(about->build_args_group), TRUE); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
570 | #endif /* MESON_ARGS */ |
|
38660
d6a4308481c7
Get the meson arguments working
Gary Kramlich <grim@reaperworld.com>
parents:
38659
diff
changeset
|
571 | } |
|
d6a4308481c7
Get the meson arguments working
Gary Kramlich <grim@reaperworld.com>
parents:
38659
diff
changeset
|
572 | |
| 38659 | 573 | /****************************************************************************** |
| 574 | * Callbacks | |
| 575 | *****************************************************************************/ | |
| 576 | static void | |
|
41372
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
577 | pidgin_about_dialog_response_cb(GtkDialog *dialog, gint response_id, |
|
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
578 | G_GNUC_UNUSED gpointer data) |
|
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
579 | { |
|
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
580 | switch(response_id) { |
|
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
581 | case GTK_RESPONSE_CLOSE: |
|
41595
61d8f39f3d70
Port about dialog to GTK4
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41525
diff
changeset
|
582 | case GTK_RESPONSE_DELETE_EVENT: |
|
41525
87e0e009f5c1
Convert some stuff in PidginAbout that was renamed in GTK4
Gary Kramlich <grim@reaperworld.com>
parents:
41372
diff
changeset
|
583 | gtk_window_destroy(GTK_WINDOW(dialog)); |
|
41372
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
584 | break; |
|
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
585 | } |
|
38666
c0bf67926a79
Wire up the close button
Gary Kramlich <grim@reaperworld.com>
parents:
38665
diff
changeset
|
586 | } |
|
c0bf67926a79
Wire up the close button
Gary Kramlich <grim@reaperworld.com>
parents:
38665
diff
changeset
|
587 | |
|
42016
aa93ea1296f3
Handle URL clicks in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42015
diff
changeset
|
588 | static void |
|
aa93ea1296f3
Handle URL clicks in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42015
diff
changeset
|
589 | pidgin_about_dialog_open_url_cb(G_GNUC_UNUSED TalkatuView *view, |
|
aa93ea1296f3
Handle URL clicks in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42015
diff
changeset
|
590 | const char *url, gpointer data) |
|
aa93ea1296f3
Handle URL clicks in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42015
diff
changeset
|
591 | { |
|
aa93ea1296f3
Handle URL clicks in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42015
diff
changeset
|
592 | gtk_show_uri(GTK_WINDOW(data), url, GDK_CURRENT_TIME); |
|
aa93ea1296f3
Handle URL clicks in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42015
diff
changeset
|
593 | } |
|
aa93ea1296f3
Handle URL clicks in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42015
diff
changeset
|
594 | |
|
42022
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
595 | static void |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
596 | pidgin_about_dialog_copy_button_cb(GtkButton *button, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
597 | gpointer data) |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
598 | { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
599 | PidginAboutDialog *about = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
600 | GdkClipboard *clipboard = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
601 | char *info = NULL; |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
602 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
603 | about = PIDGIN_ABOUT_DIALOG(gtk_widget_get_root(GTK_WIDGET(button))); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
604 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
605 | if(data == about->build_info_group) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
606 | info = pidgin_about_dialog_copy_build_info(); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
607 | } else if(data == about->runtime_info_group) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
608 | info = pidgin_about_dialog_copy_runtime_info(); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
609 | } else if(data == about->gtk_settings_group) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
610 | info = pidgin_about_dialog_copy_gtk_settings(); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
611 | } else if(data == about->plugin_search_paths_group) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
612 | info = pidgin_about_dialog_copy_plugin_search_paths(); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
613 | } else if(data == about->conf_path_info_group) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
614 | info = pidgin_about_dialog_copy_conf_path_info(); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
615 | #ifdef MESON_ARGS |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
616 | } else if(data == about->build_args_group) { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
617 | info = pidgin_about_dialog_copy_build_args(MESON_ARGS); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
618 | #endif |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
619 | } else { |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
620 | GString *everything = g_string_new(NULL); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
621 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
622 | info = pidgin_about_dialog_copy_build_info(); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
623 | g_string_append(everything, info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
624 | g_string_append_c(everything, '\n'); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
625 | g_free(info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
626 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
627 | info = pidgin_about_dialog_copy_runtime_info(); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
628 | g_string_append(everything, info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
629 | g_string_append_c(everything, '\n'); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
630 | g_free(info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
631 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
632 | info = pidgin_about_dialog_copy_conf_path_info(); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
633 | g_string_append(everything, info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
634 | g_string_append_c(everything, '\n'); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
635 | g_free(info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
636 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
637 | info = pidgin_about_dialog_copy_gtk_settings(); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
638 | g_string_append(everything, info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
639 | g_string_append_c(everything, '\n'); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
640 | g_free(info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
641 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
642 | info = pidgin_about_dialog_copy_plugin_search_paths(); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
643 | g_string_append(everything, info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
644 | g_free(info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
645 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
646 | #ifdef MESON_ARGS |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
647 | g_string_append_c(everything, '\n'); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
648 | info = pidgin_about_dialog_copy_build_args(MESON_ARGS); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
649 | g_string_append(everything, info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
650 | g_free(info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
651 | #endif |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
652 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
653 | info = g_string_free(everything, FALSE); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
654 | } |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
655 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
656 | clipboard = gtk_widget_get_clipboard(GTK_WIDGET(about)); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
657 | gdk_clipboard_set_text(clipboard, info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
658 | |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
659 | g_free(info); |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
660 | } |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
661 | |
| 38659 | 662 | /****************************************************************************** |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
663 | * GObject Implementation |
| 38659 | 664 | *****************************************************************************/ |
|
39855
7c9c4d700ed2
Get rid of the private struct in PidginAbout box and a few other cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
39533
diff
changeset
|
665 | G_DEFINE_TYPE(PidginAboutDialog, pidgin_about_dialog, GTK_TYPE_DIALOG); |
|
7c9c4d700ed2
Get rid of the private struct in PidginAbout box and a few other cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
39533
diff
changeset
|
666 | |
| 38659 | 667 | static void |
| 668 | pidgin_about_dialog_class_init(PidginAboutDialogClass *klass) { | |
| 669 | GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); | |
| 670 | ||
| 671 | gtk_widget_class_set_template_from_resource( | |
| 672 | widget_class, | |
|
41030
ec8b76f3bf0a
Fix the resource path so we can use the automatic stuff that GtkApplication supports
Gary Kramlich <grim@reaperworld.com>
parents:
41008
diff
changeset
|
673 | "/im/pidgin/Pidgin3/About/about.ui" |
| 38659 | 674 | ); |
| 675 | ||
|
41372
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
676 | gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
|
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
677 | application_name); |
| 38659 | 678 | |
|
41372
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
679 | gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
|
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
680 | main_buffer); |
|
38664
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
681 | |
|
41372
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
682 | gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
|
42020
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
683 | developers_page); |
| 38662 | 684 | |
|
41372
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
685 | gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
|
42020
c99700b694ed
Replace Developer/Translator GtkTreeView by Adwaita in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42019
diff
changeset
|
686 | translators_page); |
|
38660
d6a4308481c7
Get the meson arguments working
Gary Kramlich <grim@reaperworld.com>
parents:
38659
diff
changeset
|
687 | |
|
41372
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
688 | gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
689 | build_info_group); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
690 | gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
691 | runtime_info_group); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
692 | gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
693 | gtk_settings_group); |
|
41372
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
694 | gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
|
42019
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
695 | plugin_search_paths_group); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
696 | gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
697 | conf_path_info_group); |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
698 | gtk_widget_class_bind_template_child(widget_class, PidginAboutDialog, |
|
d9f258656fc6
Replace GtkTreeView in Build Information with Adwaita widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42016
diff
changeset
|
699 | build_args_group); |
|
41178
f47c2b18648e
Connect the close signal of the about dialog in the template instead of C code
Gary Kramlich <grim@reaperworld.com>
parents:
41030
diff
changeset
|
700 | |
|
41372
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
701 | gtk_widget_class_bind_template_callback(widget_class, |
|
e3d28548e01d
Some random about dialog cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
41307
diff
changeset
|
702 | pidgin_about_dialog_response_cb); |
|
42016
aa93ea1296f3
Handle URL clicks in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42015
diff
changeset
|
703 | gtk_widget_class_bind_template_callback(widget_class, |
|
aa93ea1296f3
Handle URL clicks in About dialog
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42015
diff
changeset
|
704 | pidgin_about_dialog_open_url_cb); |
|
42022
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
705 | gtk_widget_class_bind_template_callback(widget_class, |
|
b4747dfd7c34
Add copy button to Build Information sections
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42020
diff
changeset
|
706 | pidgin_about_dialog_copy_button_cb); |
| 38659 | 707 | } |
| 708 | ||
| 709 | static void | |
| 710 | pidgin_about_dialog_init(PidginAboutDialog *about) { | |
| 711 | gtk_widget_init_template(GTK_WIDGET(about)); | |
| 712 | ||
|
38665
35676a9b7faa
Add the version to the application_name label and add the revision to build info
Gary Kramlich <grim@reaperworld.com>
parents:
38664
diff
changeset
|
713 | /* setup the application name label */ |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
714 | pidgin_about_dialog_load_application_name(about); |
|
38665
35676a9b7faa
Add the version to the application_name label and add the revision to build info
Gary Kramlich <grim@reaperworld.com>
parents:
38664
diff
changeset
|
715 | |
|
38664
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
716 | /* setup the main page */ |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
717 | pidgin_about_dialog_load_main_page(about); |
|
38664
253a9bbc3317
Clean up the main page on the about dialog
Gary Kramlich <grim@reaperworld.com>
parents:
38663
diff
changeset
|
718 | |
| 38662 | 719 | /* setup the developers stuff */ |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
720 | pidgin_about_dialog_load_developers(about); |
| 38662 | 721 | |
| 722 | /* setup the translators stuff */ | |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
723 | pidgin_about_dialog_load_translators(about); |
| 38659 | 724 | |
|
38660
d6a4308481c7
Get the meson arguments working
Gary Kramlich <grim@reaperworld.com>
parents:
38659
diff
changeset
|
725 | /* setup the build info page */ |
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
726 | pidgin_about_dialog_load_build_configuration(about); |
| 38659 | 727 | } |
| 728 | ||
|
40530
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
729 | /****************************************************************************** |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
730 | * Public API |
|
ac5c0a85971e
Cleanup pidginabout.[ch] and add the plugin searchs paths to it
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
731 | *****************************************************************************/ |
| 38659 | 732 | GtkWidget * |
| 733 | pidgin_about_dialog_new(void) { | |
|
41307
685bab46fad2
Move the singleton handling of the about dialog to the action handler.
Gary Kramlich <grim@reaperworld.com>
parents:
41219
diff
changeset
|
734 | return g_object_new( |
| 38659 | 735 | PIDGIN_TYPE_ABOUT_DIALOG, |
| 736 | "title", "About Pidgin", | |
| 737 | NULL | |
|
41219
17dd0210fae7
Make the about dialog into a singleton
Gary Kramlich <grim@reaperworld.com>
parents:
41178
diff
changeset
|
738 | ); |
| 38659 | 739 | } |