[MPlayer-cvslog] r38522 - in trunk/gui: dialog/tools.c gtk-compat.h

ib subversion at mplayerhq.hu
Sun May 12 20:07:17 EEST 2024


Author: ib
Date: Sun May 12 20:07:17 2024
New Revision: 38522

Log:
If available, prefer GtkComboBoxText to GtkComboBoxEntry.

The GUI should preferably use a more recent GTK+ 2 style.

Modified:
   trunk/gui/dialog/tools.c
   trunk/gui/gtk-compat.h

Modified: trunk/gui/dialog/tools.c
==============================================================================
--- trunk/gui/dialog/tools.c	Sun May 12 20:04:17 2024	(r38521)
+++ trunk/gui/dialog/tools.c	Sun May 12 20:07:17 2024	(r38522)
@@ -21,6 +21,7 @@
 #include <string.h>
 
 #include "tools.h"
+#include "gui/gtk-compat.h"
 #include "gui/app/gui.h"
 
 #include "help_mp.h"

Modified: trunk/gui/gtk-compat.h
==============================================================================
--- trunk/gui/gtk-compat.h	Sun May 12 20:04:17 2024	(r38521)
+++ trunk/gui/gtk-compat.h	Sun May 12 20:07:17 2024	(r38522)
@@ -41,4 +41,9 @@
 #define GDK_KEY_Return GDK_Return
 #endif
 
+#if GTK_CHECK_VERSION(2,24,0)
+#define gtk_combo_box_entry_new_text gtk_combo_box_text_new_with_entry
+#define gtk_combo_box_append_text(combo_box, text) gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), text)
+#endif
+
 #endif


More information about the MPlayer-cvslog mailing list