summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/Makefile.am14
-rw-r--r--src/fe-gtk/fe-gtk.vcxproj8
-rw-r--r--src/fe-gtk/fe-gtk.vcxproj.filters7
-rw-r--r--src/fe-gtk/sexy-marshal.c146
-rw-r--r--src/fe-gtk/sexy-marshal.h45
-rw-r--r--src/fe-gtk/sexy-spell-entry.c4
-rw-r--r--src/fe-gtk/xtext.c6
-rw-r--r--src/fe-gtk/xtext_marshalers.list2
8 files changed, 12 insertions, 220 deletions
diff --git a/src/fe-gtk/Makefile.am b/src/fe-gtk/Makefile.am
index 07f2ffc0..4ce02dbc 100644
--- a/src/fe-gtk/Makefile.am
+++ b/src/fe-gtk/Makefile.am
@@ -11,10 +11,10 @@ EXTRA_DIST = \
 	chanview-tree.c custom-list.h editlist.h fe-gtk.h fkeys.h gtkutil.h joind.h \
 	maingui.h menu.h notifygui.h palette.h pixmaps.h \
 	plugin-tray.h plugingui.c plugingui.h rawlog.h sexy-iso-codes.h \
-	sexy-spell-entry.h sexy-marshal.h textgui.h urlgrab.h userlistgui.h xtext.h \
+	sexy-spell-entry.h textgui.h urlgrab.h userlistgui.h xtext.h \
 	../../data/hexchat.gresource.xml
 
-BUILT_SOURCES = resources.c xtext_marshalers.h xtext_marshalers.c
+BUILT_SOURCES = resources.c
 
 CLEANFILES = $(BUILT_SOURCES)
 
@@ -29,14 +29,8 @@ endif
 hexchat_SOURCES = ascii.c banlist.c chanlist.c chanview.c custom-list.c \
 	dccgui.c editlist.c fe-gtk.c fkeys.c gtkutil.c ignoregui.c joind.c menu.c \
 	maingui.c notifygui.c palette.c pixmaps.c plugin-tray.c $(plugingui_c) \
-	rawlog.c resources.c servlistgui.c setup.c $(iso_codes_c) sexy-marshal.c \
-	sexy-spell-entry.c textgui.c urlgrab.c userlistgui.c xtext.c xtext_marshalers.c
+	rawlog.c resources.c servlistgui.c setup.c $(iso_codes_c) \
+	sexy-spell-entry.c textgui.c urlgrab.c userlistgui.c xtext.c
 
 resources.c: ../../data/hexchat.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=../../data --generate-dependencies ../../data/hexchat.gresource.xml)
 	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=../../data --generate-source $<
-
-xtext_marshalers.h: xtext_marshalers.list
-	$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_xtext_marshal --header $(srcdir)/xtext_marshalers.list > $@
-
-xtext_marshalers.c: xtext_marshalers.list
-	$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_xtext_marshal --body $(srcdir)/xtext_marshalers.list > $@
diff --git a/src/fe-gtk/fe-gtk.vcxproj b/src/fe-gtk/fe-gtk.vcxproj
index 6b6301b2..f5e2dace 100644
--- a/src/fe-gtk/fe-gtk.vcxproj
+++ b/src/fe-gtk/fe-gtk.vcxproj
@@ -97,15 +97,13 @@
   </ItemDefinitionGroup>

   <ItemDefinitionGroup>

     <PreBuildEvent>

-      <Command>

-      <![CDATA[

+      <Command><![CDATA[

 SET SOLUTIONDIR=$(SolutionDir)..\

 powershell "$(SolutionDir)..\version-template.ps1" "$(SolutionDir)..\src\fe-gtk\hexchat.rc.tt" "$(SolutionDir)..\src\fe-gtk\hexchat.rc.utf8"

 REM hexchat.rc needs to be in UCS-2 or Resource Compiler will complain

 powershell "Get-Content -Encoding UTF8 '$(SolutionDir)..\src\fe-gtk\hexchat.rc.utf8' | Out-File '$(SolutionDir)..\src\fe-gtk\hexchat.rc'; Remove-Item '$(SolutionDir)..\src\fe-gtk\hexchat.rc.utf8'"

 "$(DepsRoot)\bin\glib-compile-resources.exe" --generate-source --sourcedir $(DataDir) --target "$(ProjectDir)resources.c" "$(DataDir)hexchat.gresource.xml"

-      ]]>

-      </Command>

+      ]]></Command>

       <Message>Build hexchat.rc and gresource file</Message>

     </PreBuildEvent>

   </ItemDefinitionGroup>

@@ -131,7 +129,6 @@ powershell "Get-Content -Encoding UTF8 '$(SolutionDir)..\src\fe-gtk\hexchat.rc.u
     <ClInclude Include="servlistgui.h" />

     <ClInclude Include="setup.h" />

     <ClInclude Include="sexy-iso-codes.h" />

-    <ClInclude Include="sexy-marshal.h" />

     <ClInclude Include="sexy-spell-entry.h" />

     <ClInclude Include="textgui.h" />

     <ClInclude Include="urlgrab.h" />

@@ -163,7 +160,6 @@ powershell "Get-Content -Encoding UTF8 '$(SolutionDir)..\src\fe-gtk\hexchat.rc.u
     <ClCompile Include="servlistgui.c" />

     <ClCompile Include="setup.c" />

     <ClCompile Include="sexy-iso-codes.c" />

-    <ClCompile Include="sexy-marshal.c" />

     <ClCompile Include="sexy-spell-entry.c" />

     <ClCompile Include="textgui.c" />

     <ClCompile Include="urlgrab.c" />

diff --git a/src/fe-gtk/fe-gtk.vcxproj.filters b/src/fe-gtk/fe-gtk.vcxproj.filters
index eb6e2281..4598b1f2 100644
--- a/src/fe-gtk/fe-gtk.vcxproj.filters
+++ b/src/fe-gtk/fe-gtk.vcxproj.filters
@@ -72,9 +72,6 @@
     <ClInclude Include="sexy-iso-codes.h">

       <Filter>Header Files</Filter>

     </ClInclude>

-    <ClInclude Include="sexy-marshal.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

     <ClInclude Include="sexy-spell-entry.h">

       <Filter>Header Files</Filter>

     </ClInclude>

@@ -167,9 +164,6 @@
     <ClCompile Include="sexy-iso-codes.c">

       <Filter>Source Files</Filter>

     </ClCompile>

-    <ClCompile Include="sexy-marshal.c">

-      <Filter>Source Files</Filter>

-    </ClCompile>

     <ClCompile Include="sexy-spell-entry.c">

       <Filter>Source Files</Filter>

     </ClCompile>

@@ -203,6 +197,7 @@
     <None Include="..\..\data\icons\hexchat.ico">

       <Filter>Resource Files</Filter>

     </None>

+    <None Include="hexchat.rc.tt" />

   </ItemGroup>

   <ItemGroup>

     <Xml Include="..\..\data\hexchat.gresource.xml" />

diff --git a/src/fe-gtk/sexy-marshal.c b/src/fe-gtk/sexy-marshal.c
deleted file mode 100644
index 363842ca..00000000
--- a/src/fe-gtk/sexy-marshal.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/* libsexy
- * Copyright (C) 2005-2006 Christian Hammond.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include <glib-object.h>
-
-
-#ifdef G_ENABLE_DEBUG
-#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
-#define g_marshal_value_peek_char(v)     g_value_get_char (v)
-#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
-#define g_marshal_value_peek_int(v)      g_value_get_int (v)
-#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
-#define g_marshal_value_peek_long(v)     g_value_get_long (v)
-#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
-#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
-#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
-#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
-#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
-#define g_marshal_value_peek_float(v)    g_value_get_float (v)
-#define g_marshal_value_peek_double(v)   g_value_get_double (v)
-#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
-#define g_marshal_value_peek_param(v)    g_value_get_param (v)
-#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
-#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
-#define g_marshal_value_peek_object(v)   g_value_get_object (v)
-#else /* !G_ENABLE_DEBUG */
-/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
- *          Do not access GValues directly in your code. Instead, use the
- *          g_value_get_*() functions
- */
-#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
-#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
-#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
-#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
-#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
-#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
-#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
-#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
-#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
-#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
-#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
-#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
-#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
-#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
-#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
-#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
-#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
-#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
-#endif /* !G_ENABLE_DEBUG */
-
-
-/* BOOLEAN:STRING (./marshal.list:1) */
-void
-sexy_marshal_BOOLEAN__STRING (GClosure     *closure,
-                              GValue       *return_value,
-                              guint         n_param_values,
-                              const GValue *param_values,
-                              gpointer      invocation_hint,
-                              gpointer      marshal_data)
-{
-  typedef gboolean (*GMarshalFunc_BOOLEAN__STRING) (gpointer     data1,
-                                                    gpointer     arg_1,
-                                                    gpointer     data2);
-  register GMarshalFunc_BOOLEAN__STRING callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gboolean v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 2);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_BOOLEAN__STRING) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_string (param_values + 1),
-                       data2);
-
-  g_value_set_boolean (return_value, v_return);
-}
-
-/* OBJECT:OBJECT,OBJECT (./marshal.list:2) */
-void
-sexy_marshal_OBJECT__OBJECT_OBJECT (GClosure     *closure,
-                                    GValue       *return_value,
-                                    guint         n_param_values,
-                                    const GValue *param_values,
-                                    gpointer      invocation_hint,
-                                    gpointer      marshal_data)
-{
-  typedef GObject* (*GMarshalFunc_OBJECT__OBJECT_OBJECT) (gpointer     data1,
-                                                          gpointer     arg_1,
-                                                          gpointer     arg_2,
-                                                          gpointer     data2);
-  register GMarshalFunc_OBJECT__OBJECT_OBJECT callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  GObject* v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 3);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_OBJECT__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_object (param_values + 1),
-                       g_marshal_value_peek_object (param_values + 2),
-                       data2);
-
-  g_value_take_object (return_value, v_return);
-}
-
diff --git a/src/fe-gtk/sexy-marshal.h b/src/fe-gtk/sexy-marshal.h
deleted file mode 100644
index aa560767..00000000
--- a/src/fe-gtk/sexy-marshal.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* libsexy
- * Copyright (C) 2005-2006 Christian Hammond.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#ifndef __sexy_marshal_MARSHAL_H__
-#define __sexy_marshal_MARSHAL_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-/* BOOLEAN:STRING (./marshal.list:1) */
-extern void sexy_marshal_BOOLEAN__STRING (GClosure     *closure,
-                                          GValue       *return_value,
-                                          guint         n_param_values,
-                                          const GValue *param_values,
-                                          gpointer      invocation_hint,
-                                          gpointer      marshal_data);
-
-/* OBJECT:OBJECT,OBJECT (./marshal.list:2) */
-extern void sexy_marshal_OBJECT__OBJECT_OBJECT (GClosure     *closure,
-                                                GValue       *return_value,
-                                                guint         n_param_values,
-                                                const GValue *param_values,
-                                                gpointer      invocation_hint,
-                                                gpointer      marshal_data);
-
-G_END_DECLS
-
-#endif /* __sexy_marshal_MARSHAL_H__ */
-
diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c
index e7d54777..db52eecb 100644
--- a/src/fe-gtk/sexy-spell-entry.c
+++ b/src/fe-gtk/sexy-spell-entry.c
@@ -31,7 +31,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include "sexy-iso-codes.h"
-#include "sexy-marshal.h"
+#include "../common/marshal.h"
 
 #ifdef WIN32
 #include "../common/typedef.h"
@@ -237,7 +237,7 @@ sexy_spell_entry_class_init(SexySpellEntryClass *klass)
 					   G_SIGNAL_RUN_LAST,
 					   G_STRUCT_OFFSET(SexySpellEntryClass, word_check),
 					   (GSignalAccumulator) spell_accumulator, NULL,
-					   sexy_marshal_BOOLEAN__STRING,
+					   _hexchat_marshal_BOOLEAN__STRING,
 					   G_TYPE_BOOLEAN,
 					   1, G_TYPE_STRING);
 }
diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c
index 53658b09..6a6b1215 100644
--- a/src/fe-gtk/xtext.c
+++ b/src/fe-gtk/xtext.c
@@ -42,10 +42,10 @@
 #include "../common/util.h"
 #include "../common/hexchatc.h"
 #include "../common/url.h"
+#include "../common/marshal.h"
 #include "fe-gtk.h"
 #include "xtext.h"
 #include "fkeys.h"
-#include "xtext_marshalers.h"
 
 #define charlen(str) g_utf8_skip[*(guchar *)(str)]
 
@@ -2260,7 +2260,7 @@ gtk_xtext_class_init (GtkXTextClass * class)
 							G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
 							G_STRUCT_OFFSET (GtkXTextClass, word_click),
 							NULL, NULL,
-							_xtext_marshal_VOID__POINTER_POINTER,
+							_hexchat_marshal_VOID__POINTER_POINTER,
 							G_TYPE_NONE,
 							2, G_TYPE_POINTER, G_TYPE_POINTER);
 	xtext_signals[SET_SCROLL_ADJUSTMENTS] =
@@ -2269,7 +2269,7 @@ gtk_xtext_class_init (GtkXTextClass * class)
 							G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
 							G_STRUCT_OFFSET (GtkXTextClass, set_scroll_adjustments),
 							NULL, NULL,
-							_xtext_marshal_VOID__OBJECT_OBJECT,
+							_hexchat_marshal_VOID__OBJECT_OBJECT,
 							G_TYPE_NONE,
 							2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
 
diff --git a/src/fe-gtk/xtext_marshalers.list b/src/fe-gtk/xtext_marshalers.list
deleted file mode 100644
index 2f708bb3..00000000
--- a/src/fe-gtk/xtext_marshalers.list
+++ /dev/null
@@ -1,2 +0,0 @@
-VOID:OBJECT,OBJECT
-VOID:POINTER,POINTER