mirror of
https://github.com/hexchat/hexchat.git
synced 2024-11-05 10:42:33 +01:00
GtkComboBoxText requires GTK+ 2.24, dump code for older versions
This commit is contained in:
parent
5c663adf35
commit
712eb5428e
@ -199,7 +199,7 @@ dnl *********************************************************************
|
||||
|
||||
# we might get undefined macro without this test
|
||||
if test "$gtkfe" = yes ; then
|
||||
AM_PATH_GTK_2_0(2.14.0, havegtk=yes, havegtk=no)
|
||||
AM_PATH_GTK_2_0(2.24.0, havegtk=yes, havegtk=no)
|
||||
|
||||
if test "$havegtk" = no; then
|
||||
gtkfe=no
|
||||
|
@ -21,7 +21,7 @@ in general. HexChat runs on most BSD and POSIX compliant operating systems.
|
||||
|
||||
## Requirements:
|
||||
|
||||
* GTK+ 2.14
|
||||
* GTK+ 2.24
|
||||
* GLib 2.14
|
||||
|
||||
HexChat is known to work on, at least:
|
||||
|
@ -685,14 +685,14 @@ dcc_detail_label (char *text, GtkWidget *box, int num)
|
||||
static void
|
||||
dcc_exp_cb (GtkWidget *exp, GtkWidget *box)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(2,20,0)
|
||||
if (gtk_widget_get_visible (box))
|
||||
#else
|
||||
if (GTK_WIDGET_VISIBLE (box))
|
||||
#endif
|
||||
{
|
||||
gtk_widget_hide (box);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_show (box);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -897,15 +897,15 @@ fe_gui_info (session *sess, int info_type)
|
||||
switch (info_type)
|
||||
{
|
||||
case 0: /* window status */
|
||||
#if GTK_CHECK_VERSION(2,20,0)
|
||||
if (!gtk_widget_get_visible (GTK_WIDGET (sess->gui->window)))
|
||||
#else
|
||||
if (!GTK_WIDGET_VISIBLE (GTK_WIDGET (sess->gui->window)))
|
||||
#endif
|
||||
{
|
||||
return 2; /* hidden (iconified or systray) */
|
||||
}
|
||||
|
||||
if (gtk_window_is_active (GTK_WINDOW (sess->gui->window)))
|
||||
{
|
||||
return 1; /* active/focused */
|
||||
}
|
||||
|
||||
return 0; /* normal (no keyboard focus or behind a window) */
|
||||
}
|
||||
@ -920,11 +920,7 @@ fe_gui_info_ptr (session *sess, int info_type)
|
||||
{
|
||||
case 0: /* native window pointer (for plugins) */
|
||||
#ifdef WIN32
|
||||
#if GTK_CHECK_VERSION(2,24,8)
|
||||
return gdk_win32_window_get_impl_hwnd (sess->gui->window->window);
|
||||
#else
|
||||
return GDK_WINDOW_HWND (sess->gui->window->window);
|
||||
#endif
|
||||
#else
|
||||
return sess->gui->window;
|
||||
#endif
|
||||
|
@ -1729,11 +1729,7 @@ static gboolean
|
||||
menu_canacaccel (GtkWidget *widget, guint signal_id, gpointer user_data)
|
||||
{
|
||||
/* GTK2.2 behaviour */
|
||||
#if GTK_CHECK_VERSION(2,20,0)
|
||||
return gtk_widget_is_sensitive (widget);
|
||||
#else
|
||||
return GTK_WIDGET_IS_SENSITIVE (widget);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* === STUFF FOR /MENU === */
|
||||
|
@ -414,11 +414,7 @@ tray_toggle_visibility (gboolean force_hide)
|
||||
if (!win)
|
||||
return FALSE;
|
||||
|
||||
#if GTK_CHECK_VERSION(2,20,0)
|
||||
if (force_hide || gtk_widget_get_visible (GTK_WIDGET (win)))
|
||||
#else
|
||||
if (force_hide || GTK_WIDGET_VISIBLE (win))
|
||||
#endif
|
||||
{
|
||||
if (prefs.hex_gui_tray_away)
|
||||
hexchat_command (ph, "ALLSERV AWAY");
|
||||
|
@ -1034,11 +1034,7 @@ gtk_xtext_realize (GtkWidget * widget)
|
||||
|
||||
gdk_window_set_user_data (widget->window, widget);
|
||||
|
||||
#if GTK_CHECK_VERSION(2,24,0)
|
||||
xtext->depth = gdk_window_get_visual (widget->window)->depth;
|
||||
#else
|
||||
xtext->depth = gdk_drawable_get_visual (widget->window)->depth;
|
||||
#endif
|
||||
|
||||
val.subwindow_mode = GDK_INCLUDE_INFERIORS;
|
||||
val.graphics_exposures = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user