Compile notebook_motion_notify_event_cb() only with GTK 2.6 (again).

Made "built on" string translatable.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@583 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2006-07-18 22:01:24 +00:00
parent b9f6cf6987
commit 0e4e014759
3 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2006-07-18 Enrico Troeger <enrico.troeger@uvena.de>
* src/notebook.c:
Compile notebook_motion_notify_event_cb() only with GTK 2.6 (again).
* src/about.c: Made "built on" string translatable.
2006-07-18 Nick Treleaven <nick.treleaven@btinternet.com> 2006-07-18 Nick Treleaven <nick.treleaven@btinternet.com>
* src/sciwrappers.c, src/sciwrappers.h, src/document.c: * src/sciwrappers.c, src/sciwrappers.h, src/document.c:

View File

@ -32,7 +32,7 @@ static GtkWidget *gb_window = NULL;
#define HEADER "<span size=\"larger\" weight=\"bold\">Geany " VERSION "%s</span>" #define HEADER "<span size=\"larger\" weight=\"bold\">Geany " VERSION "%s</span>"
#define INFO "<span size=\"larger\" weight=\"bold\">%s</span>" #define INFO "<span size=\"larger\" weight=\"bold\">%s</span>"
#define CODENAME "<span weight=\"bold\">\"" GEANY_CODENAME "\"</span>" #define CODENAME "<span weight=\"bold\">\"" GEANY_CODENAME "\"</span>"
#define BUILDDATE "<span size=\"smaller\">(built on " __DATE__ ")</span>" #define BUILDDATE "<span size=\"smaller\">%s</span>"
#define COPYRIGHT "Copyright (c) 2005-2006 \n Enrico Tröger \nAll rights reserved." #define COPYRIGHT "Copyright (c) 2005-2006 \n Enrico Tröger \nAll rights reserved."
#define CREDITS \ #define CREDITS \
"<span size=\"larger\" weight=\"bold\">%s</span>\n\t\ "<span size=\"larger\" weight=\"bold\">%s</span>\n\t\
@ -89,6 +89,7 @@ static GtkWidget *create_dialog(void)
GtkTextBuffer* tb; GtkTextBuffer* tb;
gchar *license_text = NULL; gchar *license_text = NULL;
gchar buffer[512]; gchar buffer[512];
gchar buffer2[128];
gchar *credits; gchar *credits;
dialog = gtk_dialog_new(); dialog = gtk_dialog_new();
@ -165,7 +166,9 @@ static GtkWidget *create_dialog(void)
gtk_label_set_justify(GTK_LABEL(builddate_label), GTK_JUSTIFY_CENTER); gtk_label_set_justify(GTK_LABEL(builddate_label), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(builddate_label), TRUE); gtk_label_set_selectable(GTK_LABEL(builddate_label), TRUE);
gtk_label_set_use_markup(GTK_LABEL(builddate_label), TRUE); gtk_label_set_use_markup(GTK_LABEL(builddate_label), TRUE);
gtk_label_set_markup(GTK_LABEL(builddate_label), BUILDDATE); g_snprintf(buffer2, sizeof(buffer2), _("(built on %s)"), __DATE__);
g_snprintf(buffer, sizeof(buffer), BUILDDATE, buffer2);
gtk_label_set_markup(GTK_LABEL(builddate_label), buffer);
gtk_misc_set_padding(GTK_MISC(builddate_label), 2, 2); gtk_misc_set_padding(GTK_MISC(builddate_label), 2, 2);
gtk_widget_show(builddate_label); gtk_widget_show(builddate_label);
gtk_box_pack_start(GTK_BOX(info_box), builddate_label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(info_box), builddate_label, FALSE, FALSE, 0);

View File

@ -37,9 +37,11 @@ static gboolean
notebook_drag_motion_cb(GtkWidget *widget, GdkDragContext *dc, notebook_drag_motion_cb(GtkWidget *widget, GdkDragContext *dc,
gint x, gint y, guint time, gpointer user_data); gint x, gint y, guint time, gpointer user_data);
#if ! GTK_CHECK_VERSION(2, 8, 0)
static gboolean static gboolean
notebook_motion_notify_event_cb(GtkWidget *widget, GdkEventMotion *event, notebook_motion_notify_event_cb(GtkWidget *widget, GdkEventMotion *event,
gpointer user_data); gpointer user_data);
#endif
static gint static gint
notebook_find_tab_num_at_pos(GtkNotebook *notebook, gint x, gint y); notebook_find_tab_num_at_pos(GtkNotebook *notebook, gint x, gint y);