Various changes to avoid using deprecated Gtk+ code. Gtk+ 3.0 is slated to remove most of the currently deprecated calls...

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4139 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-12-24 23:58:56 +00:00
parent e51768f8c7
commit 0297a6d364
23 changed files with 83 additions and 24 deletions

View File

@ -128,6 +128,10 @@
<Add option="-pipe -msse -msse2" />
<Add option="-m32" />
<Add option="-fvisibility=hidden" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="../../include/Utilities" />
<Add directory="../../include" />
<Add directory="../../../3rdparty" />
@ -171,9 +175,9 @@
<Unit filename="../../include/Utilities/TlsVariable.inl" />
<Unit filename="../../include/Utilities/TraceLog.h" />
<Unit filename="../../include/Utilities/lnx_memzero.h" />
<Unit filename="../../include/Utilities/pxForwardDefs.h" />
<Unit filename="../../include/Utilities/pxCheckBox.h" />
<Unit filename="../../include/Utilities/pxEvents.h" />
<Unit filename="../../include/Utilities/pxForwardDefs.h" />
<Unit filename="../../include/Utilities/pxRadioPanel.h" />
<Unit filename="../../include/Utilities/pxStaticText.h" />
<Unit filename="../../include/Utilities/pxStreams.h" />

View File

@ -131,6 +131,10 @@
<Add option="-pipe -msse -msse2" />
<Add option="-m32" />
<Add option="-fvisibility=hidden" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="../../include/x86emitter" />
<Add directory="../../include" />
</Compiler>

View File

@ -212,9 +212,9 @@ static void __forceinline PluginNullConfigure(std::string desc, int &log)
g_signal_connect_swapped(GTK_OBJECT (check_box), "toggled", G_CALLBACK(set_logging), check_box);
/* Add all our widgets, and show everything we've added to the dialog. */
gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->action_area), okay_button);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), check_box);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_action_area(GTK_DIALOG(dialog))), okay_button);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG(dialog))), label);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG(dialog))), check_box);
gtk_widget_show_all (dialog);
log = gtk_dialog_run (GTK_DIALOG (dialog));

View File

@ -16,9 +16,12 @@
#include "../PrecompiledHeader.h"
#include "ConsoleLogger.h"
//#include <wx/gtk/win_gtk.h>
#include <gdk/gdkkeysyms.h>
#include <gdk/gdkx.h>
#if (GTK_MAJOR_VERSION > 2)
// All those GDK_<key> defines are now GDK_KEY_<key>, as of around Gtk+ 2.22. This include gets brought in automatically until Gtk 3.0,
// But we want to bring it in after that, too, until we're ready to break compatability prior to Gtk+ 2.22.
#include <gdk/gdkkeysyms-compat.h>
#endif
void NTFS_CompressFile( const wxString& file, bool compressStatus ) {}

View File

@ -212,6 +212,10 @@
<Add option="-m32" />
<Add option="-fvisibility=hidden" />
<Add option="-DWX_PRECOMP" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="$(SvnRootDir)/common/include/" />
<Add directory="$(SvnRootDir)/3rdparty/" />
<Add directory="$(ProjectRootDir)" />

View File

@ -39,6 +39,10 @@
<Add option="-fPIC" />
<Add option="-m32" />
<Add option="-fvisibility=hidden" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="../Linux" />
<Add directory="../../CDVDnull" />
<Add directory="../../../common/include" />

View File

@ -35,6 +35,10 @@
<Add option="-fPIC" />
<Add option="-m32" />
<Add option="-fvisibility=hidden" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="../../../common/include" />
<Add directory="../Linux" />
<Add directory="../../FWnull" />

View File

@ -39,6 +39,10 @@
<Add option="-fPIC" />
<Add option="-m32" />
<Add option="-msse2" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="../Linux" />
<Add directory="../../GSnull" />
<Add directory="../null" />

View File

@ -39,6 +39,10 @@
<Add option="-fPIC" />
<Add option="-m32" />
<Add option="-fvisibility=hidden" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="../Linux" />
<Add directory="../../PadNull" />
<Add directory="../../../common/include" />

View File

@ -45,6 +45,10 @@
<Add option="-fPIC" />
<Add option="-m32" />
<Add option="-fvisibility=hidden" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
</Compiler>
<Linker>
<Add option="`pkg-config gtk+-2.0 --libs`" />

View File

@ -39,6 +39,10 @@
<Add option="-fPIC" />
<Add option="-m32" />
<Add option="-fvisibility=hidden" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="../Linux" />
<Add directory="../../USBnull" />
<Add directory="../../../common/include" />

View File

@ -39,6 +39,10 @@
<Add option="-fPIC" />
<Add option="-m32" />
<Add option="-fvisibility=hidden" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="../Linux" />
<Add directory="../../dev9null" />
<Add directory="../../../common/include" />

View File

@ -40,6 +40,10 @@
<Add option="-fPIC" />
<Add option="-m32" />
<Add option="-fvisibility=hidden" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="../Linux" />
<Add directory="../../onepad" />
<Add directory="../../../common/include" />

View File

@ -644,7 +644,7 @@ void DisplayDialog()
gtk_container_add(GTK_CONTAINER(main_box), joy_choose_frame);
gtk_container_add(GTK_CONTAINER(main_box), keys_frame);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), main_frame);
gtk_container_add (GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), main_frame);
fir->update();

View File

@ -76,7 +76,7 @@ s32 _PADopen(void *pDsp)
// comes along instead. Later, we can fiddle with this, but I'm not sure the
// best way to get a Display* out of a GtkScrolledWindow. A GtkWindow I might
// be able to manage... --arcum42
GSdsp = GDK_DISPLAY();
GSdsp = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
}
else
{

View File

@ -226,7 +226,7 @@ void DisplayDialog()
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(effects_check), EffectsDisabled);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(debug_check), DebugEnabled);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), main_frame);
gtk_container_add (GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), main_frame);
gtk_widget_show_all (dialog);
g_signal_connect_swapped(GTK_OBJECT (advanced_button), "clicked", G_CALLBACK(advanced_dialog), advanced_button);

View File

@ -259,7 +259,7 @@ void DisplayDialog()
gtk_container_add (GTK_CONTAINER(main_box), dump_frame);
// Add all our widgets, and show everything we've added to the dialog.
gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), main_frame);
gtk_container_add (GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), main_frame);
gtk_widget_show_all (dialog);
return_value = gtk_dialog_run (GTK_DIALOG (dialog));

View File

@ -113,10 +113,10 @@ void DisplayDialog()
gtk_container_add(GTK_CONTAINER (main_box), seek_slide);
gtk_container_add(GTK_CONTAINER (main_box), over_label);
gtk_container_add(GTK_CONTAINER (main_box), over_slide);
gtk_container_add (GTK_CONTAINER(main_frame), main_box);
gtk_container_add(GTK_CONTAINER(main_frame), main_box);
gtk_container_add(GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), main_label);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), main_frame);
gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), main_label);
gtk_container_add (GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), main_frame);
gtk_widget_show_all (dialog);
g_signal_connect_swapped(GTK_OBJECT (default_button), "clicked", G_CALLBACK(restore_defaults), default_button);

View File

@ -49,6 +49,10 @@
<Add option="-liconv" />
<Add option="-msse2" />
<Add option="-fvisibility=hidden" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="../Linux" />
<Add directory="../../src" />
<Add directory="../../../../common/include" />

View File

@ -155,7 +155,7 @@ void DisplayDialog()
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mute_check), (conf.options & OPTION_MUTE));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(logging_check), (conf.Log));
gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), main_box);
gtk_container_add (GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), main_box);
gtk_widget_show_all (dialog);
return_value = gtk_dialog_run (GTK_DIALOG (dialog));

View File

@ -110,6 +110,10 @@
<Add option="-fPIC" />
<Add option="-m32" />
<Add option="-msse2" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="../Linux" />
<Add directory="../../zerospu2" />
<Add directory="../../../common/include" />

View File

@ -252,7 +252,7 @@ void DisplayAdvancedDialog()
gtk_box_pack_start(GTK_BOX(advanced_box), advanced_scroll, true, true, 2);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), advanced_frame);
gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), advanced_frame);
gtk_widget_show_all(dialog);
@ -401,7 +401,7 @@ void DisplayDialog()
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widescreen_check), (conf.widescreen()));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dis_hacks_check), (conf.disableHacks));
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), main_frame);
gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), main_frame);
g_signal_connect_swapped(GTK_OBJECT (advanced_button), "clicked", G_CALLBACK(DisplayAdvancedDialog), advanced_button);
tempHacks = conf.hacks;
gtk_widget_show_all(dialog);

View File

@ -74,6 +74,10 @@
<Add option="-fno-regmove" />
<Add option="-fno-strict-aliasing" />
<Add option="-DZEROGS_SSE2" />
<Add option="-DGDK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_DEPRECATED" />
<Add option="-DGTK_DISABLE_SINGLE_INCLUDES" />
<Add option="-DGSEAL_ENABLE" />
<Add directory="../../Linux" />
<Add directory="../../../opengl" />
<Add directory="../../../../../common/include" />
@ -147,13 +151,13 @@
<Unit filename="../../ZZHacks.cpp" />
<Unit filename="../../ZZHacks.h" />
<Unit filename="../../ZZKeyboard.cpp" />
<Unit filename="../../ZZoglDrawing.cpp" />
<Unit filename="../../ZZoglDrawing.h" />
<Unit filename="../../ZZLog.cpp" />
<Unit filename="../../ZZLog.h" />
<Unit filename="../../ZZoglCRTC.cpp" />
<Unit filename="../../ZZoglCRTC.h" />
<Unit filename="../../ZZoglCreate.cpp" />
<Unit filename="../../ZZoglDrawing.cpp" />
<Unit filename="../../ZZoglDrawing.h" />
<Unit filename="../../ZZoglFlush.cpp" />
<Unit filename="../../ZZoglFlushHack.cpp" />
<Unit filename="../../ZZoglFlushHack.h" />