[ghex] about: Show GTK version built against if devel
- From: Logan Rathbone <larathbone src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex] about: Show GTK version built against if devel
- Date: Wed, 8 Dec 2021 20:01:44 +0000 (UTC)
commit f4f91e1185cc0c667b01158eb892503000f8334b
Author: Logan Rathbone <poprocks gmail com>
Date: Wed Dec 8 15:00:50 2021 -0500
about: Show GTK version built against if devel
src/common-ui.c | 15 +++++++++++++--
src/gtkhex.c | 8 +-------
2 files changed, 14 insertions(+), 9 deletions(-)
---
diff --git a/src/common-ui.c b/src/common-ui.c
index d3b5f41..11666cc 100644
--- a/src/common-ui.c
+++ b/src/common-ui.c
@@ -210,6 +210,7 @@ common_about_cb (GtkWindow *parent)
{
char *copyright;
char *license_translated;
+ char *version;
g_return_if_fail (GTK_IS_WINDOW(parent));
@@ -254,6 +255,15 @@ common_about_cb (GtkWindow *parent)
copyright = g_strdup_printf (_("Copyright © %d–%d The GHex authors"),
1998, 2021);
+ if (strstr (APP_ID, "Devel"))
+ version = g_strdup_printf ("%s (Running against GTK %d.%d.%d)",
+ PACKAGE_VERSION,
+ gtk_get_major_version (),
+ gtk_get_minor_version (),
+ gtk_get_micro_version ());
+ else
+ version = PACKAGE_VERSION;
+
gtk_show_about_dialog (parent,
"authors", authors,
"comments", _("A binary file editor"),
@@ -261,10 +271,11 @@ common_about_cb (GtkWindow *parent)
"documenters", documentation_credits,
"license", license_translated,
"logo-icon-name", APP_ID,
- "program-name", "GHex",
+ "program-name",
+ strstr (APP_ID, "Devel") ? "GHex (Development)" : "GHex",
"title", _("About GHex"),
"translator-credits", _("translator-credits"),
- "version", PACKAGE_VERSION,
+ "version", version,
"website", "https://wiki.gnome.org/Apps/Ghex",
"website-label", _("GHex Website"),
"wrap-license", TRUE,
diff --git a/src/gtkhex.c b/src/gtkhex.c
index 6265cf9..54f3d3c 100644
--- a/src/gtkhex.c
+++ b/src/gtkhex.c
@@ -322,7 +322,6 @@ toggle_hex_action (GtkWidget *widget,
gh->active_view = VIEW_HEX;
gtk_widget_queue_draw (widget);
-// show_cursor (gh, TRUE);
}
static void
@@ -334,7 +333,6 @@ toggle_ascii_action (GtkWidget *widget,
gh->active_view = VIEW_ASCII;
gtk_widget_queue_draw (widget);
-// show_cursor (gh, TRUE);
}
/*
@@ -3033,11 +3031,7 @@ gtk_hex_set_group_type (GtkHex *gh, guint gt)
void
gtk_hex_show_offsets(GtkHex *gh, gboolean show)
{
- g_return_if_fail(gh != NULL);
- g_return_if_fail(GTK_IS_HEX(gh));
-
- if (gh->show_offsets == show)
- return;
+ g_return_if_fail (GTK_IS_HEX (gh));
gh->show_offsets = show;
if (show)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]