Show gtk version in cli and in About window

This change adds the possibility to show the used gtk version either
via `xournalpp --version` or directly in the **About** window.
presentation
tobidot 6 years ago
parent cc9cdd0549
commit 88c10ca865
  1. 4
      .github/ISSUE_TEMPLATE/bug_report.md
  2. 1
      src/control/XournalMain.cpp
  3. 7
      src/gui/dialog/AboutDialog.cpp
  4. 27
      ui/about.glade

@ -12,8 +12,10 @@ assignees: ''
**Affects versions :**
- OS: [e.g. Linux (which distro), Mac, Windows]
- (Linux only) Desktop environment: [e.g. Wayland, Gnome-Wayland, XWayland, X11]
- Which version of libgtk do you use: [e.g. output of `pkg-config --modversion gtk+-3.0`]
- Which version of libgtk do you use
- can be obtained by running `xournalpp --version` or in the **About** window
- Version of Xournal++: [e.g. 1.0.16, specific commit, specific branch]
- can be obtained by running `xournalpp --version` or in the **About** window
- Installation method: [e.g. PPA, Flatpak, official release, etc.]
**Describe the bug**

@ -337,6 +337,7 @@ auto XournalMain::run(int argc, char* argv[]) -> int {
if (showVersion) {
g_printf("%s %s \n", PROJECT_NAME, PROJECT_VERSION);
g_printf("└──%s: %d.%d.%d \n", "libgtk", gtk_get_major_version(), gtk_get_minor_version(), gtk_get_micro_version());
return 0;
}

@ -1,5 +1,7 @@
#include "AboutDialog.h"
#include <gtk/gtk.h>
#include <config.h>
#include "StringUtils.h"
@ -9,6 +11,11 @@ AboutDialog::AboutDialog(GladeSearchpath* gladeSearchPath): GladeGui(gladeSearch
gtk_label_set_markup(GTK_LABEL(get("lbVersion")), PROJECT_VERSION);
gtk_label_set_markup(GTK_LABEL(get("lbRevId")), GIT_COMMIT_ID);
char gtkVersion[10];
sprintf(gtkVersion, "%d.%d.%d", gtk_get_major_version(), gtk_get_minor_version(), gtk_get_micro_version());
gtk_label_set_markup(GTK_LABEL(get("lbGtkVersion")), gtkVersion);
GtkWidget* w = get("vbox1");
GtkWidget* linkButton = gtk_link_button_new("http://github.com/xournalpp/xournalpp");
gtk_widget_show(linkButton);

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<!-- Generated with glade 3.36.0 -->
<interface>
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="aboutDialog">
@ -171,6 +171,31 @@
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">with libgtk</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbGtkVersion">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">X.X.X</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>

Loading…
Cancel
Save