| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a216ed1 commit f4f27e4
25 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,6 +32,7 @@ src/fe-gtk/joind.c | |||
| 32 | 32 | src/fe-gtk/maingui.c | |
| 33 | 33 | src/fe-gtk/menu.c | |
| 34 | 34 | src/fe-gtk/notifygui.c | |
| 35 | + src/fe-gtk/plugin-notifications.c | ||
| 35 | 36 | src/fe-gtk/plugin-tray.c | |
| 36 | 37 | src/fe-gtk/plugingui.c | |
| 37 | 38 | src/fe-gtk/rawlog.c | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -178,7 +178,6 @@ typedef enum | |||
| 178 | 178 | } feicon; | |
| 179 | 179 | void fe_tray_set_icon (feicon icon); | |
| 180 | 180 | void fe_tray_set_tooltip (const char *text); | |
| 181 | - void fe_tray_set_balloon (const char *title, const char *text); | ||
| 182 | 181 | void fe_open_chan_list (server *serv, char *filter, int do_refresh); | |
| 183 | 182 | const char *fe_get_default_font (); | |
| 184 | 183 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3470,12 +3470,6 @@ cmd_topic (struct session *sess, char *tbuf, char *word[], char *word_eol[]) | |||
| 3470 | 3470 | static int | |
| 3471 | 3471 | cmd_tray (struct session *sess, char *tbuf, char *word[], char *word_eol[]) | |
| 3472 | 3472 | { | |
| 3473 | - if (strcmp (word[2], "-b") == 0) | ||
| 3474 | - { | ||
| 3475 | - fe_tray_set_balloon (word[3], word[4][0] ? word[4] : NULL); | ||
| 3476 | - return TRUE; | ||
| 3477 | - } | ||
| 3478 | - | ||
| 3479 | 3473 | if (strcmp (word[2], "-t") == 0) | |
| 3480 | 3474 | { | |
| 3481 | 3475 | fe_tray_set_tooltip (word[3][0] ? word[3] : NULL); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -355,15 +355,11 @@ plugin_kill_all (void) | |||
| 355 | 355 | ||
| 356 | 356 | #ifdef USE_PLUGIN | |
| 357 | 357 | ||
| 358 | - /* load a plugin from a filename. Returns: NULL-success or an error string */ | ||
| 359 | - | ||
| 360 | - char * | ||
| 361 | - plugin_load (session *sess, char *filename, char *arg) | ||
| 358 | + GModule * | ||
| 359 | + module_load (char *filename) | ||
| 362 | 360 | { | |
| 363 | 361 | void *handle; | |
| 364 | 362 | char *filepart; | |
| 365 | - hexchat_init_func *init_func; | ||
| 366 | - hexchat_deinit_func *deinit_func; | ||
| 367 | 363 | char *pluginpath; | |
| 368 | 364 | ||
| 369 | 365 | /* get the filename without path */ | |
@@ -383,6 +379,18 @@ plugin_load (session *sess, char *filename, char *arg) | |||
| 383 | 379 | handle = g_module_open (filename, 0); | |
| 384 | 380 | } | |
| 385 | 381 | ||
| 382 | + return handle; | ||
| 383 | + } | ||
| 384 | + | ||
| 385 | + /* load a plugin from a filename. Returns: NULL-success or an error string */ | ||
| 386 | + | ||
| 387 | + char * | ||
| 388 | + plugin_load (session *sess, char *filename, char *arg) | ||
| 389 | + { | ||
| 390 | + GModule *handle = module_load (filename); | ||
| 391 | + hexchat_init_func *init_func; | ||
| 392 | + hexchat_deinit_func *deinit_func; | ||
| 393 | + | ||
| 386 | 394 | if (handle == NULL) | |
| 387 | 395 | return (char *)g_module_error (); | |
| 388 | 396 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -163,6 +163,7 @@ struct _hexchat_plugin | |||
| 163 | 163 | }; | |
| 164 | 164 | #endif | |
| 165 | 165 | ||
| 166 | + GModule *module_load (char *filename); | ||
| 166 | 167 | char *plugin_load (session *sess, char *filename, char *arg); | |
| 167 | 168 | int plugin_reload (session *sess, char *name, int by_filename); | |
| 168 | 169 | void plugin_add (session *sess, char *filename, void *handle, void *init_func, void *deinit_func, char *arg, int fake); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ hexchat_LDADD = ../common/libhexchatcommon.a $(GUI_LIBS) | |||
| 12 | 12 | EXTRA_DIST = \ | |
| 13 | 13 | ascii.h banlist.h chanlist.h chanview.h chanview-tabs.c \ | |
| 14 | 14 | chanview-tree.c custom-list.h editlist.h fe-gtk.h fkeys.h gtkutil.h joind.h \ | |
| 15 | - maingui.h menu.h notifygui.h palette.h pixmaps.h \ | ||
| 15 | + maingui.h menu.h notifygui.h notifications palette.h pixmaps.h plugin-notification.h \ | ||
| 16 | 16 | plugin-tray.h plugingui.c plugingui.h rawlog.h sexy-iso-codes.h \ | |
| 17 | 17 | sexy-spell-entry.h textgui.h urlgrab.h userlistgui.h xtext.h \ | |
| 18 | 18 | ../../data/hexchat.gresource.xml | |
@@ -29,10 +29,16 @@ if HAVE_ISO_CODES | |||
| 29 | 29 | iso_codes_c = sexy-iso-codes.c | |
| 30 | 30 | endif | |
| 31 | 31 | ||
| 32 | + if USE_LIBNOTIFY | ||
| 33 | + notify_c = notifications/notification-libnotify.c | ||
| 34 | + else | ||
| 35 | + notify_c = notifications/notification-dummy.c | ||
| 36 | + endif | ||
| 37 | + | ||
| 32 | 38 | hexchat_SOURCES = ascii.c banlist.c chanlist.c chanview.c custom-list.c \ | |
| 33 | 39 | dccgui.c editlist.c fe-gtk.c fkeys.c gtkutil.c ignoregui.c joind.c menu.c \ | |
| 34 | - maingui.c notifygui.c palette.c pixmaps.c plugin-tray.c $(plugingui_c) \ | ||
| 35 | - rawlog.c resources.c servlistgui.c setup.c $(iso_codes_c) \ | ||
| 40 | + maingui.c notifygui.c $(notify_c) palette.c pixmaps.c plugin-tray.c $(plugingui_c) \ | ||
| 41 | + plugin-notification.c rawlog.c resources.c servlistgui.c setup.c $(iso_codes_c) \ | ||
| 36 | 42 | sexy-spell-entry.c textgui.c urlgrab.c userlistgui.c xtext.c | |
| 37 | 43 | hexchat_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/common | |
| 38 | 44 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -52,6 +52,7 @@ | |||
| 52 | 52 | #include "plugin-tray.h" | |
| 53 | 53 | #include "urlgrab.h" | |
| 54 | 54 | #include "setup.h" | |
| 55 | + #include "plugin-notification.h" | ||
| 55 | 56 | ||
| 56 | 57 | #ifdef USE_LIBCANBERRA | |
| 57 | 58 | #include <canberra.h> | |
@@ -381,6 +382,8 @@ fe_idle (gpointer data) | |||
| 381 | 382 | { | |
| 382 | 383 | session *sess = sess_list->data; | |
| 383 | 384 | ||
| 385 | + plugin_add (sess, NULL, NULL, notification_plugin_init, notification_plugin_deinit, NULL, FALSE); | ||
| 386 | + | ||
| 384 | 387 | plugin_add (sess, NULL, NULL, tray_plugin_init, tray_plugin_deinit, NULL, FALSE); | |
| 385 | 388 | ||
| 386 | 389 | if (arg_minimize == 1) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -60,7 +60,7 @@ | |||
| 60 | 60 | <FunctionLevelLinking>true</FunctionLevelLinking> | |
| 61 | 61 | <IntrinsicFunctions>true</IntrinsicFunctions> | |
| 62 | 62 | <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
| 63 | - <AdditionalIncludeDirectories>$(SolutionDir)..;$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
| 63 | + <AdditionalIncludeDirectories>$(SolutionDir)..;..\common;$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
| 64 | 64 | <MultiProcessorCompilation>true</MultiProcessorCompilation> | |
| 65 | 65 | <DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings> | |
| 66 | 66 | </ClCompile> | |
@@ -81,7 +81,7 @@ | |||
| 81 | 81 | <FunctionLevelLinking>true</FunctionLevelLinking> | |
| 82 | 82 | <IntrinsicFunctions>true</IntrinsicFunctions> | |
| 83 | 83 | <PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
| 84 | - <AdditionalIncludeDirectories>$(SolutionDir)..;$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
| 84 | + <AdditionalIncludeDirectories>$(SolutionDir)..;..\common;$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
| 85 | 85 | <MultiProcessorCompilation>true</MultiProcessorCompilation> | |
| 86 | 86 | <DisableSpecificWarnings>4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings> | |
| 87 | 87 | </ClCompile> | |
@@ -120,6 +120,7 @@ powershell "Get-Content -Encoding UTF8 '$(SolutionDir)..\src\fe-gtk\hexchat.rc.u | |||
| 120 | 120 | <ClInclude Include="joind.h" /> | |
| 121 | 121 | <ClInclude Include="maingui.h" /> | |
| 122 | 122 | <ClInclude Include="menu.h" /> | |
| 123 | + <ClInclude Include="notifications\notification-backend.h" /> | ||
| 123 | 124 | <ClInclude Include="notifygui.h" /> | |
| 124 | 125 | <ClInclude Include="palette.h" /> | |
| 125 | 126 | <ClInclude Include="pixmaps.h" /> | |
@@ -150,9 +151,11 @@ powershell "Get-Content -Encoding UTF8 '$(SolutionDir)..\src\fe-gtk\hexchat.rc.u | |||
| 150 | 151 | <ClCompile Include="joind.c" /> | |
| 151 | 152 | <ClCompile Include="maingui.c" /> | |
| 152 | 153 | <ClCompile Include="menu.c" /> | |
| 154 | + <ClCompile Include="notifications\notification-windows.c" /> | ||
| 153 | 155 | <ClCompile Include="notifygui.c" /> | |
| 154 | 156 | <ClCompile Include="palette.c" /> | |
| 155 | 157 | <ClCompile Include="pixmaps.c" /> | |
| 158 | + <ClCompile Include="plugin-notification.c" /> | ||
| 156 | 159 | <ClCompile Include="plugin-tray.c" /> | |
| 157 | 160 | <ClCompile Include="plugingui.c" /> | |
| 158 | 161 | <ClCompile Include="rawlog.c" /> | |
@@ -167,7 +170,7 @@ powershell "Get-Content -Encoding UTF8 '$(SolutionDir)..\src\fe-gtk\hexchat.rc.u | |||
| 167 | 170 | <ClCompile Include="xtext.c" /> | |
| 168 | 171 | </ItemGroup> | |
| 169 | 172 | <ItemGroup> | |
| 170 | - <Manifest Include="hexchat.exe.manifest" /> | ||
| 173 | + <Manifest Include="..\..\win32\hexchat.exe.manifest" /> | ||
| 171 | 174 | </ItemGroup> | |
| 172 | 175 | <ItemGroup> | |
| 173 | 176 | <None Include="hexchat.rc.tt" /> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -93,6 +93,9 @@ | |||
| 93 | 93 | <ClInclude Include="setup.h"> | |
| 94 | 94 | <Filter>Header Files</Filter> | |
| 95 | 95 | </ClInclude> | |
| 96 | + <ClInclude Include="notifications\notification-backend.h"> | ||
| 97 | + <Filter>Header Files</Filter> | ||
| 98 | + </ClInclude> | ||
| 96 | 99 | </ItemGroup> | |
| 97 | 100 | <ItemGroup> | |
| 98 | 101 | <ClCompile Include="ascii.c"> | |
@@ -182,9 +185,15 @@ | |||
| 182 | 185 | <ClCompile Include="resources.c"> | |
| 183 | 186 | <Filter>Source Files</Filter> | |
| 184 | 187 | </ClCompile> | |
| 188 | + <ClCompile Include="plugin-notification.c"> | ||
| 189 | + <Filter>Source Files</Filter> | ||
| 190 | + </ClCompile> | ||
| 191 | + <ClCompile Include="notifications\notification-windows.c"> | ||
| 192 | + <Filter>Source Files</Filter> | ||
| 193 | + </ClCompile> | ||
| 185 | 194 | </ItemGroup> | |
| 186 | 195 | <ItemGroup> | |
| 187 | - <Manifest Include="hexchat.exe.manifest"> | ||
| 196 | + <Manifest Include="..\..\win32\hexchat.exe.manifest"> | ||
| 188 | 197 | <Filter>Resource Files</Filter> | |
| 189 | 198 | </Manifest> | |
| 190 | 199 | </ItemGroup> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,27 @@ | |||
| 1 | + /* HexChat | ||
| 2 | + * Copyright (C) 2015 Patrick Griffis. | ||
| 3 | + * | ||
| 4 | + * This program is free software; you can redistribute it and/or modify | ||
| 5 | + * it under the terms of the GNU General Public License as published by | ||
| 6 | + * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | + * (at your option) any later version. | ||
| 8 | + * | ||
| 9 | + * This program is distributed in the hope that it will be useful, | ||
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | + * GNU General Public License for more details. | ||
| 13 | + * | ||
| 14 | + * You should have received a copy of the GNU General Public License | ||
| 15 | + * along with this program; if not, write to the Free Software | ||
| 16 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA | ||
| 17 | + */ | ||
| 18 | + | ||
| 19 | + #ifndef HEXCHAT_PLUGIN_NOTIFICATION_BACKEND_H | ||
| 20 | + #define HEXCHAT_PLUGIN_NOTIFICATION_BACKEND_H | ||
| 21 | + | ||
| 22 | + int notification_backend_supported (void); | ||
| 23 | + void notification_backend_show (const char *title, const char *text, int timeout); | ||
| 24 | + int notification_backend_init (void); | ||
| 25 | + void notification_backend_deinit (void); | ||
| 26 | + | ||
| 27 | + #endif | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments