[MPlayer-cvslog] r38487 - in trunk: gui/dialog/fileselect.c gui/gtk-compat.h gui/win32/dialogs.c help/help_mp-de.h help/help_mp-en.h help/help_mp-ru.h help/help_mp-zh_CN.h
ib
subversion at mplayerhq.hu
Tue Apr 30 11:42:40 EEST 2024
Author: ib
Date: Tue Apr 30 11:42:40 2024
New Revision: 38487
Log:
Re-enable compilation with GTK+ version 2.4 (the minimum requirement).
gtk_button_set_image() is only available since GTK+ 2.6.
Use gtk_button_set_label() as a fallback.
Modified:
trunk/gui/dialog/fileselect.c
trunk/gui/gtk-compat.h
trunk/gui/win32/dialogs.c
Changes in other areas also in this revision:
Modified:
trunk/help/help_mp-de.h
trunk/help/help_mp-en.h
trunk/help/help_mp-ru.h
trunk/help/help_mp-zh_CN.h
Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c Tue Apr 30 11:32:56 2024 (r38486)
+++ trunk/gui/dialog/fileselect.c Tue Apr 30 11:42:40 2024 (r38487)
@@ -36,6 +36,7 @@
#include "pixmaps/file_playlist.xpm"
#include "pixmaps/file_subtitle.xpm"
#include "pixmaps/file_video.xpm"
+#include "gui/gtk-compat.h"
#include "gui/interface.h"
#include "gui/app/app.h"
#include "gui/app/cfg.h"
@@ -753,7 +754,7 @@ static GtkWidget *CreateFileSelect(void)
GtkWidget *fsFNameListWindow;
GtkWidget *hbuttonbox3;
- GtkWidget *upimage;
+ GtkWidget *Up;
GdkPixbuf *uppixbuf;
accel_group = gtk_accel_group_new();
@@ -788,12 +789,12 @@ static GtkWidget *CreateFileSelect(void)
gtk_box_pack_start(GTK_BOX(hbox4), vseparator1, FALSE, TRUE, 0);
uppixbuf = gdk_pixbuf_new_from_inline(-1, dir_up_png, FALSE, NULL);
- upimage = gtk_image_new_from_pixbuf(uppixbuf);
+ Up = gtk_image_new_from_pixbuf(uppixbuf);
g_object_unref(uppixbuf);
- gtk_widget_show(upimage);
+ gtk_widget_show(Up);
fsUp = gtk_button_new();
- gtk_button_set_image(GTK_BUTTON(fsUp), upimage);
+ gtk_button_set_image(GTK_BUTTON(fsUp), Up);
gtk_widget_show(fsUp);
gtk_box_pack_start(GTK_BOX(hbox4), fsUp, FALSE, FALSE, 0);
gtk_widget_set_size_request(fsUp, 60, -1);
Modified: trunk/gui/gtk-compat.h
==============================================================================
--- trunk/gui/gtk-compat.h Tue Apr 30 11:32:56 2024 (r38486)
+++ trunk/gui/gtk-compat.h Tue Apr 30 11:42:40 2024 (r38487)
@@ -26,4 +26,8 @@
#include <gtk/gtk.h>
+#if !GTK_CHECK_VERSION(2,6,0)
+#define gtk_button_set_image(button, image) gtk_button_set_label(button, MSGTR_GUI_ ## image)
+#endif
+
#endif
Modified: trunk/gui/win32/dialogs.c
==============================================================================
--- trunk/gui/win32/dialogs.c Tue Apr 30 11:32:56 2024 (r38486)
+++ trunk/gui/win32/dialogs.c Tue Apr 30 11:42:40 2024 (r38487)
@@ -437,7 +437,7 @@ static LRESULT CALLBACK PlayListWndProc(
NULL);
SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
- wdg = CreateWindow ("button", acp(MSGTR_GUI_WIN32_Up),
+ wdg = CreateWindow ("button", acp(MSGTR_GUI_Up),
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
4, 37, 80, 25, hwnd,
(HMENU) ID_UP,
More information about the MPlayer-cvslog
mailing list