Wed, 25 Oct 2023 20:26:35 -0500
Fix possible clash of config headers
Both GLib and GStreamer have a config file called `config.h` and use the `HAVE_CONFIG_H` macro to conditionally include them.
Normally, this works out fine, but if they are subprojects, we may accidentally trigger including a different `config.h`. This is normally harmless, but it causes a bunch of warnings because we define `GETTEXT_PACKAGE` on the command-line, and it won't match the one in a different project.
However, we only include this file in source files, not headers, and it's always created, so there's no need to conditionally include it or define the macro. We can also rename it so it can't clash with other instances as well.
Testing Done:
Compiled with subprojects and stopped seeing many warnings about `GETTEXT_PACKAGE` and other generic variables being re-defined due to GStreamer's `config.h`.
Reviewed at https://reviews.imfreedom.org/r/2707/
|
39887
9c8f874c74a0
Clean up all of the license headers
Gary Kramlich <grim@reaperworld.com>
parents:
39621
diff
changeset
|
1 | /* |
|
9c8f874c74a0
Clean up all of the license headers
Gary Kramlich <grim@reaperworld.com>
parents:
39621
diff
changeset
|
2 | * finch |
|
14620
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
3 | * |
|
15931
716b5fac1895
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents:
15906
diff
changeset
|
4 | * Finch is the legal property of its developers, whose names are too numerous |
|
14620
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
6 | * source distribution. |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
7 | * |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
8 | * This program is free software; you can redistribute it and/or modify |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
9 | * it under the terms of the GNU General Public License as published by |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
10 | * the Free Software Foundation; either version 2 of the License, or |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
11 | * (at your option) any later version. |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
12 | * |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
13 | * This program is distributed in the hope that it will be useful, |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
16 | * GNU General Public License for more details. |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
17 | * |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
|
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
19 | * along with this program; if not, write to the Free Software |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18637
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
14620
90d599495d65
[gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14336
diff
changeset
|
21 | */ |
|
29106
51c7b2177e42
Fix all the remaining files for which internal.h doesn't end up being the first include.
Paul Aurich <darkrain42@pidgin.im>
parents:
27829
diff
changeset
|
22 | |
|
42410
563e7a17c220
Fix possible clash of config headers
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42079
diff
changeset
|
23 | #include <purpleconfig.h> |
|
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:
40359
diff
changeset
|
24 | |
|
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:
40359
diff
changeset
|
25 | #include <glib.h> |
|
40441
f23c7e772667
Make sure we're not including the gettext macros in header files and deal with the repercussions of that.
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
26 | #include <glib/gi18n-lib.h> |
|
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:
40359
diff
changeset
|
27 | #include <glib/gstdio.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:
40359
diff
changeset
|
28 | |
|
40359
ca141ea93b83
Make all of finch use purple.h
Gary Kramlich <grim@reaperworld.com>
parents:
39887
diff
changeset
|
29 | #include <purple.h> |
|
29106
51c7b2177e42
Fix all the remaining files for which internal.h doesn't end up being the first include.
Paul Aurich <darkrain42@pidgin.im>
parents:
27829
diff
changeset
|
30 | |
|
14045
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
31 | #include <gnt.h> |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
32 | |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
33 | #include "gntdebug.h" |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
34 | |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
35 | #include <stdio.h> |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
36 | #include <string.h> |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
37 | |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16255
diff
changeset
|
38 | #define PREF_ROOT "/finch/debug" |
|
14923
ccb42b285510
[gaim-migrate @ 17630]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14906
diff
changeset
|
39 | |
|
38644
8ba616e7c69c
Convert Finch debug into a GObject.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35972
diff
changeset
|
40 | struct _FinchDebugUi |
|
8ba616e7c69c
Convert Finch debug into a GObject.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35972
diff
changeset
|
41 | { |
|
8ba616e7c69c
Convert Finch debug into a GObject.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35972
diff
changeset
|
42 | GObject parent; |
|
8ba616e7c69c
Convert Finch debug into a GObject.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35972
diff
changeset
|
43 | |
|
8ba616e7c69c
Convert Finch debug into a GObject.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35972
diff
changeset
|
44 | /* Other members, including private data. */ |
|
8ba616e7c69c
Convert Finch debug into a GObject.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35972
diff
changeset
|
45 | }; |
|
8ba616e7c69c
Convert Finch debug into a GObject.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
35972
diff
changeset
|
46 | |
|
25321
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
47 | static gboolean |
|
42079
679258d92a92
Mark unused parameters as such for all finch
Gary Kramlich <grim@reaperworld.com>
parents:
41840
diff
changeset
|
48 | handle_fprintf_stderr_cb(GIOChannel *source, G_GNUC_UNUSED GIOCondition cond, |
|
679258d92a92
Mark unused parameters as such for all finch
Gary Kramlich <grim@reaperworld.com>
parents:
41840
diff
changeset
|
49 | G_GNUC_UNUSED gpointer data) |
|
25321
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
50 | { |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
51 | gssize size; |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
52 | char message[1024]; |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
53 | |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
54 | size = read(g_io_channel_unix_get_fd(source), message, sizeof(message) - 1); |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
55 | if (size <= 0) { |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
56 | /* Something bad probably happened elsewhere ... let's ignore */ |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
57 | } else { |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
58 | message[size] = '\0'; |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
59 | g_log("stderr", G_LOG_LEVEL_WARNING, "%s", message); |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
60 | } |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
61 | |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
62 | return TRUE; |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
63 | } |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
64 | |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
65 | static void |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
66 | handle_fprintf_stderr(gboolean stop) |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
67 | { |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
68 | GIOChannel *stderrch; |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
69 | static int readhandle = -1; |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
70 | int pipes[2]; |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
71 | |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
72 | if (stop) { |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
73 | if (readhandle >= 0) { |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
74 | g_source_remove(readhandle); |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
75 | readhandle = -1; |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
76 | } |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
77 | return; |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
78 | } |
|
35877
6c3ab2fd4412
cross-win32: fix finch build
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35454
diff
changeset
|
79 | if (purple_input_pipe(pipes)) { |
|
30475
c6a00c98bf46
Get rid of this warning:
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
29106
diff
changeset
|
80 | readhandle = -1; |
|
c6a00c98bf46
Get rid of this warning:
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
29106
diff
changeset
|
81 | return; |
|
c6a00c98bf46
Get rid of this warning:
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
29106
diff
changeset
|
82 | }; |
|
25321
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
83 | dup2(pipes[1], STDERR_FILENO); |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
84 | |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
85 | stderrch = g_io_channel_unix_new(pipes[0]); |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
86 | g_io_channel_set_close_on_unref(stderrch, TRUE); |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
87 | readhandle = g_io_add_watch_full(stderrch, G_PRIORITY_HIGH, |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
88 | G_IO_IN | G_IO_ERR | G_IO_PRI, |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
89 | handle_fprintf_stderr_cb, NULL, NULL); |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
90 | g_io_channel_unref(stderrch); |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
91 | } |
|
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
92 | |
|
14045
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
93 | static struct |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
94 | { |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
95 | GntWidget *window; |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
96 | GntWidget *tview; |
|
17056
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
97 | GntWidget *search; |
| 14755 | 98 | gboolean paused; |
|
14045
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
99 | } debug; |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
100 | |
|
14047
764a70ebfdc5
[gaim-migrate @ 16555]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14045
diff
changeset
|
101 | static void |
|
42079
679258d92a92
Mark unused parameters as such for all finch
Gary Kramlich <grim@reaperworld.com>
parents:
41840
diff
changeset
|
102 | reset_debug_win(G_GNUC_UNUSED GntWidget *w, G_GNUC_UNUSED gpointer data) |
|
14047
764a70ebfdc5
[gaim-migrate @ 16555]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14045
diff
changeset
|
103 | { |
|
17056
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
104 | debug.window = debug.tview = debug.search = NULL; |
|
14047
764a70ebfdc5
[gaim-migrate @ 16555]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14045
diff
changeset
|
105 | } |
|
764a70ebfdc5
[gaim-migrate @ 16555]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14045
diff
changeset
|
106 | |
|
14187
881ec8710386
[gaim-migrate @ 16763]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14121
diff
changeset
|
107 | static void |
|
42079
679258d92a92
Mark unused parameters as such for all finch
Gary Kramlich <grim@reaperworld.com>
parents:
41840
diff
changeset
|
108 | clear_debug_win(G_GNUC_UNUSED GntWidget *w, GntTextView *tv) |
| 14755 | 109 | { |
| 110 | gnt_text_view_clear(tv); | |
| 111 | } | |
| 112 | ||
| 113 | static void | |
|
14187
881ec8710386
[gaim-migrate @ 16763]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14121
diff
changeset
|
114 | print_stderr(const char *string) |
|
881ec8710386
[gaim-migrate @ 16763]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14121
diff
changeset
|
115 | { |
|
881ec8710386
[gaim-migrate @ 16763]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14121
diff
changeset
|
116 | g_printerr("%s", string); |
|
881ec8710386
[gaim-migrate @ 16763]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14121
diff
changeset
|
117 | } |
|
881ec8710386
[gaim-migrate @ 16763]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14121
diff
changeset
|
118 | |
| 14755 | 119 | static void |
|
42079
679258d92a92
Mark unused parameters as such for all finch
Gary Kramlich <grim@reaperworld.com>
parents:
41840
diff
changeset
|
120 | toggle_pause(G_GNUC_UNUSED GntWidget *w, G_GNUC_UNUSED gpointer n) |
| 14755 | 121 | { |
| 122 | debug.paused = !debug.paused; | |
| 123 | } | |
| 124 | ||
|
41113
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
125 | static GLogWriterOutput |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
126 | finch_debug_g_log_handler(GLogLevelFlags log_level, const GLogField *fields, |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
127 | gsize n_fields, G_GNUC_UNUSED gpointer user_data) |
|
14771
c9740405d914
[gaim-migrate @ 17463]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14755
diff
changeset
|
128 | { |
|
41113
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
129 | const gchar *domain = NULL; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
130 | const gchar *msg = NULL; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
131 | const gchar *search_str = NULL; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
132 | gint pos = 0; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
133 | GntTextFormatFlags flag = 0; |
|
41250
e82d07ed6862
Remove purple_utf8_strftime
Gary Kramlich <grim@reaperworld.com>
parents:
41127
diff
changeset
|
134 | GDateTime *local_date_time = NULL; |
|
e82d07ed6862
Remove purple_utf8_strftime
Gary Kramlich <grim@reaperworld.com>
parents:
41127
diff
changeset
|
135 | gchar *local_time = NULL; |
|
41113
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
136 | gsize i; |
|
14771
c9740405d914
[gaim-migrate @ 17463]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14755
diff
changeset
|
137 | |
|
41113
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
138 | if (debug.window == NULL || debug.paused) { |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
139 | return G_LOG_WRITER_UNHANDLED; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
140 | } |
|
14771
c9740405d914
[gaim-migrate @ 17463]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14755
diff
changeset
|
141 | |
|
41113
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
142 | for (i = 0; i < n_fields; i++) { |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
143 | if (purple_strequal(fields[i].key, "GLIB_DOMAIN")) { |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
144 | domain = fields[i].value; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
145 | } else if (purple_strequal(fields[i].key, "MESSAGE")) { |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
146 | msg = fields[i].value; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
147 | } |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
148 | } |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
149 | |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
150 | if (msg == NULL) { |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
151 | return G_LOG_WRITER_UNHANDLED; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
152 | } |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
153 | if (domain == NULL) { |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
154 | domain = "g_log"; |
|
14771
c9740405d914
[gaim-migrate @ 17463]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14755
diff
changeset
|
155 | } |
|
c9740405d914
[gaim-migrate @ 17463]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14755
diff
changeset
|
156 | |
|
41113
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
157 | /* Filter out log line if we have a search term, and it doesn't match |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
158 | * the domain or message. */ |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
159 | search_str = gnt_entry_get_text(GNT_ENTRY(debug.search)); |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
160 | if (search_str != NULL && *search_str != '\0') { |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
161 | if (g_strrstr(domain, search_str) == NULL && |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
162 | g_strrstr(msg, search_str) == NULL) |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
163 | { |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
164 | return G_LOG_WRITER_UNHANDLED; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
165 | } |
|
14771
c9740405d914
[gaim-migrate @ 17463]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14755
diff
changeset
|
166 | } |
|
c9740405d914
[gaim-migrate @ 17463]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14755
diff
changeset
|
167 | |
|
41113
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
168 | pos = gnt_text_view_get_lines_below(GNT_TEXT_VIEW(debug.tview)); |
|
41250
e82d07ed6862
Remove purple_utf8_strftime
Gary Kramlich <grim@reaperworld.com>
parents:
41127
diff
changeset
|
169 | |
|
e82d07ed6862
Remove purple_utf8_strftime
Gary Kramlich <grim@reaperworld.com>
parents:
41127
diff
changeset
|
170 | local_date_time = g_date_time_new_now_local(); |
|
e82d07ed6862
Remove purple_utf8_strftime
Gary Kramlich <grim@reaperworld.com>
parents:
41127
diff
changeset
|
171 | local_time = g_date_time_format(local_date_time, "%H:%M:%S "); |
|
e82d07ed6862
Remove purple_utf8_strftime
Gary Kramlich <grim@reaperworld.com>
parents:
41127
diff
changeset
|
172 | g_date_time_unref(local_date_time); |
|
e82d07ed6862
Remove purple_utf8_strftime
Gary Kramlich <grim@reaperworld.com>
parents:
41127
diff
changeset
|
173 | |
|
e82d07ed6862
Remove purple_utf8_strftime
Gary Kramlich <grim@reaperworld.com>
parents:
41127
diff
changeset
|
174 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(debug.tview), local_time, |
|
41113
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
175 | GNT_TEXT_FLAG_NORMAL); |
|
41250
e82d07ed6862
Remove purple_utf8_strftime
Gary Kramlich <grim@reaperworld.com>
parents:
41127
diff
changeset
|
176 | g_free(local_time); |
|
41113
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
177 | |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
178 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(debug.tview), domain, |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
179 | GNT_TEXT_FLAG_BOLD); |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
180 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(debug.tview), ": ", |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
181 | GNT_TEXT_FLAG_BOLD); |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
182 | |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
183 | flag = GNT_TEXT_FLAG_NORMAL; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
184 | switch (log_level & G_LOG_LEVEL_MASK) { |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
185 | case G_LOG_LEVEL_WARNING: |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
186 | flag |= GNT_TEXT_FLAG_UNDERLINE; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
187 | /* fallthrough */ |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
188 | case G_LOG_LEVEL_ERROR: |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
189 | flag |= GNT_TEXT_FLAG_BOLD; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
190 | break; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
191 | default: |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
192 | break; |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
193 | } |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
194 | |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
195 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(debug.tview), msg, |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
196 | flag); |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
197 | gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(debug.tview), "\n", |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
198 | GNT_TEXT_FLAG_NORMAL); |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
199 | if (pos <= 1) { |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
200 | gnt_text_view_scroll(GNT_TEXT_VIEW(debug.tview), 0); |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
201 | } |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
202 | |
|
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
203 | return G_LOG_WRITER_HANDLED; |
|
14771
c9740405d914
[gaim-migrate @ 17463]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14755
diff
changeset
|
204 | } |
|
c9740405d914
[gaim-migrate @ 17463]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14755
diff
changeset
|
205 | |
|
14923
ccb42b285510
[gaim-migrate @ 17630]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14906
diff
changeset
|
206 | static void |
|
42079
679258d92a92
Mark unused parameters as such for all finch
Gary Kramlich <grim@reaperworld.com>
parents:
41840
diff
changeset
|
207 | size_changed_cb(GntWidget *widget, G_GNUC_UNUSED int oldw, |
|
679258d92a92
Mark unused parameters as such for all finch
Gary Kramlich <grim@reaperworld.com>
parents:
41840
diff
changeset
|
208 | G_GNUC_UNUSED int oldh) |
|
14923
ccb42b285510
[gaim-migrate @ 17630]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14906
diff
changeset
|
209 | { |
|
ccb42b285510
[gaim-migrate @ 17630]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14906
diff
changeset
|
210 | int w, h; |
|
ccb42b285510
[gaim-migrate @ 17630]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14906
diff
changeset
|
211 | gnt_widget_get_size(widget, &w, &h); |
| 15884 | 212 | purple_prefs_set_int(PREF_ROOT "/size/width", w); |
| 213 | purple_prefs_set_int(PREF_ROOT "/size/height", h); | |
|
14923
ccb42b285510
[gaim-migrate @ 17630]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14906
diff
changeset
|
214 | } |
|
ccb42b285510
[gaim-migrate @ 17630]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14906
diff
changeset
|
215 | |
|
17056
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
216 | static gboolean |
|
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
217 | for_real(gpointer entry) |
|
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
218 | { |
|
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
219 | purple_prefs_set_string(PREF_ROOT "/filter", gnt_entry_get_text(entry)); |
|
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
220 | return FALSE; |
|
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
221 | } |
|
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
222 | |
|
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
223 | static void |
|
42079
679258d92a92
Mark unused parameters as such for all finch
Gary Kramlich <grim@reaperworld.com>
parents:
41840
diff
changeset
|
224 | update_filter_string(GntEntry *entry, G_GNUC_UNUSED gpointer data) |
|
17056
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
225 | { |
|
40412
c0905847d779
Use g_timeout_add_seconds some more.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40359
diff
changeset
|
226 | int id = g_timeout_add_seconds(1, for_real, entry); |
|
17056
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
227 | g_object_set_data_full(G_OBJECT(entry), "update-filter", GINT_TO_POINTER(id), |
|
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
228 | (GDestroyNotify)g_source_remove); |
|
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
229 | } |
|
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
230 | |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
231 | static void |
|
42079
679258d92a92
Mark unused parameters as such for all finch
Gary Kramlich <grim@reaperworld.com>
parents:
41840
diff
changeset
|
232 | file_save(GntFileSel *fs, const char *path, G_GNUC_UNUSED const char *file, |
|
679258d92a92
Mark unused parameters as such for all finch
Gary Kramlich <grim@reaperworld.com>
parents:
41840
diff
changeset
|
233 | GntTextView *tv) |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
234 | { |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
235 | FILE *fp; |
|
41763
4a51008d3f64
Remove purple_date_format_full
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41250
diff
changeset
|
236 | GDateTime *date = NULL; |
|
4a51008d3f64
Remove purple_date_format_full
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41250
diff
changeset
|
237 | gchar *date_str = NULL; |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
238 | |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
239 | if ((fp = g_fopen(path, "w+")) == NULL) { |
|
34449
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34309
diff
changeset
|
240 | purple_notify_error(NULL, NULL, _("Unable to open file."), NULL, NULL); |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
241 | return; |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
242 | } |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
243 | |
|
41763
4a51008d3f64
Remove purple_date_format_full
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41250
diff
changeset
|
244 | date = g_date_time_new_now_local(); |
|
4a51008d3f64
Remove purple_date_format_full
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41250
diff
changeset
|
245 | date_str = g_date_time_format(date, "%c"); |
|
4a51008d3f64
Remove purple_date_format_full
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41250
diff
changeset
|
246 | |
|
4a51008d3f64
Remove purple_date_format_full
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41250
diff
changeset
|
247 | fprintf(fp, "Finch Debug Log : %s\n", date_str); |
|
39620
72bc1964b230
Use gnt_*_get_text accessors.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39617
diff
changeset
|
248 | fprintf(fp, "%s", gnt_text_view_get_text(tv)); |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
249 | fclose(fp); |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
250 | gnt_widget_destroy(GNT_WIDGET(fs)); |
|
41763
4a51008d3f64
Remove purple_date_format_full
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41250
diff
changeset
|
251 | |
|
4a51008d3f64
Remove purple_date_format_full
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41250
diff
changeset
|
252 | g_free(date_str); |
|
4a51008d3f64
Remove purple_date_format_full
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41250
diff
changeset
|
253 | g_date_time_unref(date); |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
254 | } |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
255 | |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
256 | static void |
|
42079
679258d92a92
Mark unused parameters as such for all finch
Gary Kramlich <grim@reaperworld.com>
parents:
41840
diff
changeset
|
257 | save_debug_win(G_GNUC_UNUSED GntWidget *w, GntTextView *tv) |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
258 | { |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
259 | GntWidget *window = gnt_file_sel_new(); |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
260 | GntFileSel *sel = GNT_FILE_SEL(window); |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
261 | gnt_file_sel_set_current_location(sel, purple_home_dir()); |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
262 | gnt_file_sel_set_suggested_filename(sel, "debug.txt"); |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
263 | g_signal_connect(G_OBJECT(sel), "file_selected", G_CALLBACK(file_save), tv); |
|
39621
ac33d7dd1ead
Use new GntFileSel signals.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39620
diff
changeset
|
264 | g_signal_connect(G_OBJECT(sel), "cancelled", G_CALLBACK(gnt_widget_destroy), NULL); |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
265 | gnt_widget_show(window); |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
266 | } |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
267 | |
|
41840
fe350460fb1c
Remove C99-obsoleted constructs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41763
diff
changeset
|
268 | void |
|
fe350460fb1c
Remove C99-obsoleted constructs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41763
diff
changeset
|
269 | finch_debug_window_show(void) |
|
14045
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
270 | { |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
271 | GntWidget *wid, *box, *label; |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
272 | |
|
14906
fdf387cc4b12
[gaim-migrate @ 17613]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14775
diff
changeset
|
273 | debug.paused = FALSE; |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
274 | if (debug.window) { |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
275 | gnt_window_present(debug.window); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
276 | return; |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
277 | } |
|
14045
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
278 | |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
279 | debug.window = gnt_vbox_new(FALSE); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
280 | gnt_box_set_toplevel(GNT_BOX(debug.window), TRUE); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
281 | gnt_box_set_title(GNT_BOX(debug.window), _("Debug Window")); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
282 | gnt_box_set_pad(GNT_BOX(debug.window), 0); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
283 | gnt_box_set_alignment(GNT_BOX(debug.window), GNT_ALIGN_MID); |
|
14047
764a70ebfdc5
[gaim-migrate @ 16555]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14045
diff
changeset
|
284 | |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
285 | debug.tview = gnt_text_view_new(); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
286 | gnt_box_add_widget(GNT_BOX(debug.window), debug.tview); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
287 | gnt_widget_set_size(debug.tview, |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
288 | purple_prefs_get_int(PREF_ROOT "/size/width"), |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
289 | purple_prefs_get_int(PREF_ROOT "/size/height")); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
290 | g_signal_connect(G_OBJECT(debug.tview), "size_changed", G_CALLBACK(size_changed_cb), NULL); |
| 14755 | 291 | |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
292 | gnt_box_add_widget(GNT_BOX(debug.window), gnt_line_new(FALSE)); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
293 | |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
294 | box = gnt_hbox_new(FALSE); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
295 | gnt_box_set_alignment(GNT_BOX(box), GNT_ALIGN_MID); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
296 | gnt_box_set_fill(GNT_BOX(box), FALSE); |
| 14755 | 297 | |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
298 | /* XXX: Setting the GROW_Y for the following widgets don't make sense. But right now |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
299 | * it's necessary to make the width of the debug window resizable ... like I said, |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
300 | * it doesn't make sense. The bug is likely in the packing in gntbox.c. |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
301 | */ |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
302 | wid = gnt_button_new(_("Clear")); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
303 | g_signal_connect(G_OBJECT(wid), "activate", G_CALLBACK(clear_debug_win), debug.tview); |
|
39617
1d0453799f73
Use GntWidget flag accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38644
diff
changeset
|
304 | gnt_widget_set_grow_y(wid, TRUE); |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
305 | gnt_box_add_widget(GNT_BOX(box), wid); |
|
17056
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
306 | |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
307 | wid = gnt_button_new(_("Save")); |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
308 | g_signal_connect(G_OBJECT(wid), "activate", G_CALLBACK(save_debug_win), debug.tview); |
|
39617
1d0453799f73
Use GntWidget flag accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38644
diff
changeset
|
309 | gnt_widget_set_grow_y(wid, TRUE); |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
310 | gnt_box_add_widget(GNT_BOX(box), wid); |
|
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
311 | |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
312 | debug.search = gnt_entry_new(purple_prefs_get_string(PREF_ROOT "/filter")); |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
313 | label = gnt_label_new(_("Filter:")); |
|
39617
1d0453799f73
Use GntWidget flag accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38644
diff
changeset
|
314 | gnt_widget_set_grow_x(label, FALSE); |
|
20734
cb906a9e343e
Add save button to the debug window and alter some GROW_X for visual appeal
Richard Nelson <wabz@pidgin.im>
parents:
20147
diff
changeset
|
315 | gnt_box_add_widget(GNT_BOX(box), label); |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
316 | gnt_box_add_widget(GNT_BOX(box), debug.search); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
317 | g_signal_connect(G_OBJECT(debug.search), "text_changed", G_CALLBACK(update_filter_string), NULL); |
| 14755 | 318 | |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
319 | wid = gnt_check_box_new(_("Pause")); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
320 | g_signal_connect(G_OBJECT(wid), "toggled", G_CALLBACK(toggle_pause), NULL); |
|
39617
1d0453799f73
Use GntWidget flag accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38644
diff
changeset
|
321 | gnt_widget_set_grow_y(wid, TRUE); |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
322 | gnt_box_add_widget(GNT_BOX(box), wid); |
| 14755 | 323 | |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
324 | gnt_box_add_widget(GNT_BOX(debug.window), box); |
|
39617
1d0453799f73
Use GntWidget flag accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38644
diff
changeset
|
325 | gnt_widget_set_grow_y(box, TRUE); |
|
14121
3d8804b82150
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14072
diff
changeset
|
326 | |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
327 | gnt_widget_set_name(debug.window, "debug-window"); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
328 | |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
329 | g_signal_connect(G_OBJECT(debug.window), "destroy", G_CALLBACK(reset_debug_win), NULL); |
|
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17064
diff
changeset
|
330 | gnt_text_view_attach_scroll_widget(GNT_TEXT_VIEW(debug.tview), debug.window); |
|
18605
76230f659c3f
Use the utility function for the conversation and debug windows.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18400
diff
changeset
|
331 | gnt_text_view_attach_pager_widget(GNT_TEXT_VIEW(debug.tview), debug.window); |
|
14045
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
332 | |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
333 | gnt_widget_show(debug.window); |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
334 | } |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
335 | |
|
41118
bd2767810a18
Initialize Finch debug handlers earlier
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41113
diff
changeset
|
336 | void |
|
bd2767810a18
Initialize Finch debug handlers earlier
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41113
diff
changeset
|
337 | finch_debug_init_handler(void) |
|
bd2767810a18
Initialize Finch debug handlers earlier
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41113
diff
changeset
|
338 | { |
|
41113
1896a80ff8e3
Route GLib debug logging directly to the Finch debug window
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40765
diff
changeset
|
339 | g_log_set_writer_func(finch_debug_g_log_handler, NULL, NULL); |
|
41118
bd2767810a18
Initialize Finch debug handlers earlier
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41113
diff
changeset
|
340 | } |
|
14771
c9740405d914
[gaim-migrate @ 17463]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14755
diff
changeset
|
341 | |
|
41118
bd2767810a18
Initialize Finch debug handlers earlier
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41113
diff
changeset
|
342 | void |
|
bd2767810a18
Initialize Finch debug handlers earlier
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41113
diff
changeset
|
343 | finch_debug_init(void) |
|
bd2767810a18
Initialize Finch debug handlers earlier
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41113
diff
changeset
|
344 | { |
|
14187
881ec8710386
[gaim-migrate @ 16763]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14121
diff
changeset
|
345 | g_set_print_handler(print_stderr); /* Redirect the debug messages to stderr */ |
|
41127
cd297cfc56f3
Move debug command-line option to the UIs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41120
diff
changeset
|
346 | handle_fprintf_stderr(FALSE); |
|
14923
ccb42b285510
[gaim-migrate @ 17630]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14906
diff
changeset
|
347 | |
| 15884 | 348 | purple_prefs_add_none(PREF_ROOT); |
|
17056
10ca7f26479f
Now that timestamps are gone, let's allow filter strings in the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17043
diff
changeset
|
349 | purple_prefs_add_string(PREF_ROOT "/filter", ""); |
| 15884 | 350 | purple_prefs_add_none(PREF_ROOT "/size"); |
| 351 | purple_prefs_add_int(PREF_ROOT "/size/width", 60); | |
| 352 | purple_prefs_add_int(PREF_ROOT "/size/height", 15); | |
|
14045
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
353 | } |
|
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
354 | |
|
41118
bd2767810a18
Initialize Finch debug handlers earlier
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41113
diff
changeset
|
355 | void |
|
bd2767810a18
Initialize Finch debug handlers earlier
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41113
diff
changeset
|
356 | finch_debug_uninit(void) |
|
14045
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
357 | { |
|
25321
69d02c27a5ff
Redirect stderr to the debug window.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24822
diff
changeset
|
358 | handle_fprintf_stderr(TRUE); |
|
14045
12b8c2bfd3fb
[gaim-migrate @ 16552]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
359 | } |