diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | lib/widgets/ephy-label.c | 9 | ||||
-rw-r--r-- | lib/widgets/ephy-label.h | 15 |
3 files changed, 31 insertions, 1 deletions
@@ -1,5 +1,13 @@ 2004-08-09 Christian Persch <chpe@cvs.gnome.org> + * lib/widgets/ephy-label.c: + * lib/widgets/ephy-label.h: + + Only use this for gtk < 2.5.1, and just add a few + #defines otherwise. + +2004-08-09 Christian Persch <chpe@cvs.gnome.org> + * src/bookmarks/ephy-topics-selector.c: (ephy_topics_selector_get_type), (ephy_topics_selector_apply), (provide_toggle), (ephy_topics_selector_constructor), diff --git a/lib/widgets/ephy-label.c b/lib/widgets/ephy-label.c index 97c3e1878..70f6b03fb 100644 --- a/lib/widgets/ephy-label.c +++ b/lib/widgets/ephy-label.c @@ -23,13 +23,18 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#include <gtk/gtkversion.h> + +#if !GTK_CHECK_VERSION (2, 5, 1) + #ifdef HAVE_CONFIG_H #include <config.h> #endif +#include "ephy-label.h" + #include <math.h> #include <string.h> -#include "ephy-label.h" #include <gtk/gtkmain.h> #include <gtk/gtkwindow.h> #include <gdk/gdkkeysyms.h> @@ -3446,3 +3451,5 @@ ephy_label_do_popup (EphyLabel *label, popup_position_func, label, 0, gtk_get_current_event_time ()); } + +#endif /* !GTK_CHECK_VERSION (2, 5, 1) */ diff --git a/lib/widgets/ephy-label.h b/lib/widgets/ephy-label.h index d8ac386d4..0ac2504a0 100644 --- a/lib/widgets/ephy-label.h +++ b/lib/widgets/ephy-label.h @@ -26,6 +26,20 @@ #ifndef __EPHY_LABEL_H__ #define __EPHY_LABEL_H__ +#include <gtk/gtkversion.h> + +#if GTK_CHECK_VERSION (2, 5, 1) + +#include <gtk/gtklabel.h> + +#define ephy_label_new gtk_label_new +#define ephy_label_set_ellipsize gtk_label_set_ellipsize +#define ephy_label_set_text gtk_label_set_text +#define ephy_label_set_selectable gtk_label_set_selectable +#define ephy_label_set_use_markup gtk_label_set_use_markup +#define EPHY_LABEL GTK_LABEL + +#else #include <gdk/gdk.h> #include <gtk/gtkmisc.h> @@ -168,5 +182,6 @@ guint ephy_label_parse_uline (EphyLabel *label, } #endif /* __cplusplus */ +#endif /* GTK_CHECK_VERSION (2, 5, 1) */ #endif /* __EPHY_LABEL_H__ */ |