[chronojump] Preferences show title on help tab
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Preferences show title on help tab
- Date: Wed, 4 Aug 2021 09:32:25 +0000 (UTC)
commit 9587e9d2e42d27b6bdc44ef21b82477f5bcc4515
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Aug 4 11:32:10 2021 +0200
Preferences show title on help tab
glade/preferences_win.glade | 1 -
src/gui/preferences.cs | 11 +++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index 49fa0620e..3e6a69afa 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -5,7 +5,6 @@
<widget class="GtkWindow" id="preferences_win">
<property name="can_focus">False</property>
<property name="border_width">10</property>
- <property name="title" translatable="yes">Preferences</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<signal name="delete_event" handler="on_preferences_delete_event" swapped="no"/>
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index d91ee51b4..d7a3b3d90 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -310,6 +310,7 @@ public class PreferencesWindow
//put an icon to window
UtilGtk.IconWindow(preferences_win);
+ preferences_win.Title = Catalog.GetString("Preferences");
//database and log files stuff
databaseURL = Util.GetDatabaseDir() + System.IO.Path.DirectorySeparatorChar +
"chronojump.db";
@@ -844,19 +845,21 @@ public class PreferencesWindow
// help ---->
private enum helpTypes { NORMAL, STIFFNESS }
- private void showHelp (string str, helpTypes helpType)
+ private void showHelp (string title, helpTypes helpType, string message)
{
+ preferences_win.Title = Catalog.GetString("Preferences") + " / " + Catalog.GetString("Help:")
+ " " + title;
PreferencesWindowBox.notebook_top.CurrentPage = Convert.ToInt32(notebook_top_pages.HELP);
hbox_buttons_bottom.Sensitive = false;
hbox_stiffness_formula.Visible = (helpType == helpTypes.STIFFNESS);
- label_help_message.Text = str;
+ label_help_message.Text = message;
label_help_message.UseMarkup = true;
}
private void on_button_help_close_clicked (object o, EventArgs args)
{
+ preferences_win.Title = Catalog.GetString("Preferences");
PreferencesWindowBox.notebook_top.CurrentPage =
Convert.ToInt32(notebook_top_pages.PREFERENCES);
hbox_buttons_bottom.Sensitive = true;
}
@@ -958,10 +961,10 @@ public class PreferencesWindow
//both valid for jumps and jumps_rj
private void on_button_jumps_power_help_clicked (object o, EventArgs args) {
- showHelp(Constants.HelpPowerStr(), helpTypes.NORMAL);
+ showHelp(Catalog.GetString("Power"), helpTypes.NORMAL, Constants.HelpPowerStr());
}
private void on_button_jumps_stiffness_help_clicked (object o, EventArgs args) {
- showHelp(Constants.HelpStiffnessStr(), helpTypes.STIFFNESS);
+ showHelp(Catalog.GetString("Stiffness"), helpTypes.STIFFNESS, Constants.HelpStiffnessStr());
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]