Created
May 24, 2019 01:20
-
-
Save codebrainz/92f16cd23087888a982a9e3df1e752d4 to your computer and use it in GitHub Desktop.
Add GTK+ and GLib runtime versions into Geany's about dialog.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/about.c b/src/about.c | |
index 6c9a13896..7c31368a9 100644 | |
--- a/src/about.c | |
+++ b/src/about.c | |
@@ -43,6 +43,7 @@ | |
#define INFO "<span size=\"larger\" weight=\"bold\">%s</span>" | |
#define CODENAME "<span weight=\"bold\">\"" GEANY_CODENAME "\"</span>" | |
#define BUILDDATE "<span size=\"smaller\">%s</span>" | |
+#define RUNTIME BUILDDATE | |
#define COPYRIGHT _("Copyright (c) 2005\nThe Geany contributors") | |
static const gchar *translators[][2] = { | |
@@ -143,6 +144,7 @@ static GtkWidget *create_dialog(void) | |
GtkWidget *label_info; | |
GtkWidget *codename_label; | |
GtkWidget *builddate_label; | |
+ GtkWidget *runtime_label; | |
GtkWidget *url_button; | |
GtkWidget *cop_label; | |
GtkWidget *label; | |
@@ -241,6 +243,21 @@ static GtkWidget *create_dialog(void) | |
gtk_widget_show(builddate_label); | |
gtk_box_pack_start(GTK_BOX(info_box), builddate_label, FALSE, FALSE, 0); | |
+ /* GTK+/GLib runtime version label */ | |
+ runtime_label = gtk_label_new(NULL); | |
+ gtk_label_set_justify(GTK_LABEL(runtime_label), GTK_JUSTIFY_CENTER); | |
+ gtk_label_set_selectable(GTK_LABEL(runtime_label), TRUE); | |
+ gtk_label_set_use_markup(GTK_LABEL(runtime_label), TRUE); | |
+ g_snprintf(buffer2, sizeof(buffer2), | |
+ _("Using GTK+ v%u.%u.%u and GLib v%u.%u.%u runtime libraries"), | |
+ gtk_major_version, gtk_minor_version, gtk_micro_version, | |
+ glib_major_version, glib_minor_version, glib_micro_version); | |
+ g_snprintf(buffer, sizeof(buffer), RUNTIME, buffer2); | |
+ gtk_label_set_markup(GTK_LABEL(runtime_label), buffer); | |
+ gtk_misc_set_padding(GTK_MISC(runtime_label), 2, 2); | |
+ gtk_widget_show(runtime_label); | |
+ gtk_box_pack_start(GTK_BOX(info_box), runtime_label, FALSE, FALSE, 0); | |
+ | |
box = gtk_hbutton_box_new(); | |
url_button = gtk_button_new(); | |
gtk_button_set_relief(GTK_BUTTON(url_button), GTK_RELIEF_NONE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment