[chronojump] Removed menu icons type from gui/preferences
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Removed menu icons type from gui/preferences
- Date: Wed, 21 Jul 2021 14:44:12 +0000 (UTC)
commit 96554012b0bee6372148b99268b7a1e5f06b35c8
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Jul 21 16:43:31 2021 +0200
Removed menu icons type from gui/preferences
glade/preferences_win.glade | 235 ++------------------------------------------
src/gui/app1/menu.cs | 19 +---
src/gui/preferences.cs | 69 +------------
src/preferences.cs | 6 +-
4 files changed, 13 insertions(+), 316 deletions(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index ea430487d..065eb066e 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -536,6 +536,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">16</property>
+ <property name="spacing">8</property>
<child>
<widget class="GtkLabel" id="label66">
<property name="visible">True</property>
@@ -569,13 +570,10 @@
<widget class="GtkTable" id="table6">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">5</property>
+ <property name="n_rows">3</property>
<property name="n_columns">2</property>
<property name="column_spacing">20</property>
<property name="row_spacing">16</property>
- <child>
- <placeholder/>
- </child>
<child>
<widget class="GtkCheckButton" id="check_appearance_person_photo">
<property name="label" translatable="yes">Show persons
photo</property>
@@ -585,8 +583,8 @@
<property name="draw_indicator">True</property>
</widget>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
</packing>
</child>
<child>
@@ -629,20 +627,6 @@
<property name="x_options"/>
</packing>
</child>
- <child>
- <widget class="GtkLabel" id="label134">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Only icons</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options"/>
- </packing>
- </child>
<child>
<widget class="GtkLabel" id="label135">
<property name="visible">True</property>
@@ -652,8 +636,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options"/>
</packing>
</child>
@@ -736,213 +720,6 @@
<property name="x_options"/>
</packing>
</child>
- <child>
- <widget class="GtkHBox" id="hbox53">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">16</property>
- <child>
- <widget class="GtkLabel" id="label128">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">At menu
show:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox63">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkRadioButton" id="radio_menu_show_all">
- <property name="label"
translatable="yes">Everything</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_radio_menu_show_toggled"
swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="radio_menu_show_text">
- <property name="label" translatable="yes">Only
text</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radio_menu_show_all</property>
- <signal name="toggled" handler="on_radio_menu_show_toggled"
swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="radio_menu_show_icons">
- <property name="label" translatable="yes">Only
icons</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radio_menu_show_all</property>
- <signal name="toggled" handler="on_radio_menu_show_toggled"
swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox57">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkCheckButton" id="check_example_menu_all">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip" translatable="yes">Session</property>
- <property name="active">True</property>
- <property name="draw_indicator">False</property>
- <child>
- <widget class="GtkHBox" id="hbox369">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkImage" id="image_menu_folders">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label_menu_folders">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"
translatable="yes">Session</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="check_example_menu_text">
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip" translatable="yes">Session</property>
- <property name="active">True</property>
- <property name="draw_indicator">False</property>
- <child>
- <widget class="GtkHBox" id="hbox62">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkLabel" id="label_menu_folders1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"
translatable="yes">Session</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="check_example_menu_icons">
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip" translatable="yes">Session</property>
- <property name="active">True</property>
- <property name="draw_indicator">False</property>
- <child>
- <widget class="GtkHBox" id="hbox64">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkImage" id="image_menu_folders2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_EXPAND</property>
- </packing>
- </child>
</widget>
</child>
</widget>
diff --git a/src/gui/app1/menu.cs b/src/gui/app1/menu.cs
index 005a9c39a..54dc44ec4 100644
--- a/src/gui/app1/menu.cs
+++ b/src/gui/app1/menu.cs
@@ -101,7 +101,7 @@ public partial class ChronoJumpWindow
private void initialize_menu_or_menu_tiny()
{
- if(preferences.menuType == Preferences.MenuTypes.ICONS)
+ if(preferences.personWinHide)
menuTinyInitialize();
else
menuInitialize();
@@ -134,7 +134,6 @@ public partial class ChronoJumpWindow
private void menuInitialize ()
{
- menuSetTextAndIcons();
menuSetColors();
//LogB.Information("hpaned MinPosition: " + hpaned_contacts_main.MinPosition.ToString());
@@ -223,22 +222,6 @@ public partial class ChronoJumpWindow
}
*/
- private void menuSetTextAndIcons ()
- {
- //icons
- image_menu_folders.Visible = preferences.menuType != Preferences.MenuTypes.TEXT;
- image_session_new3.Visible = preferences.menuType != Preferences.MenuTypes.TEXT;
- image_session_load2.Visible = preferences.menuType != Preferences.MenuTypes.TEXT;
- image_session_edit2.Visible = preferences.menuType != Preferences.MenuTypes.TEXT;
- image_menu_preferences.Visible = preferences.menuType != Preferences.MenuTypes.TEXT;
- image_menu_help.Visible = preferences.menuType != Preferences.MenuTypes.TEXT;
- image_menu_help_documents.Visible = preferences.menuType != Preferences.MenuTypes.TEXT;
- image_menu_help_shortcuts.Visible = preferences.menuType != Preferences.MenuTypes.TEXT;
- image_menu_help_about.Visible = preferences.menuType != Preferences.MenuTypes.TEXT;
- image_menu_news.Visible = preferences.menuType != Preferences.MenuTypes.TEXT;
- image_menu_quit.Visible = preferences.menuType != Preferences.MenuTypes.TEXT;
- }
-
private void menuSetColors ()
{
//Gdk.Color color = UtilGtk.YELLOW;
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index 93e850fe8..e47d5969a 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -63,14 +63,6 @@ public class PreferencesWindow
[Widget] Gtk.CheckButton check_appearance_maximized;
[Widget] Gtk.CheckButton check_appearance_maximized_undecorated;
[Widget] Gtk.CheckButton check_appearance_person_win_hide;
- [Widget] Gtk.RadioButton radio_menu_show_all;
- [Widget] Gtk.RadioButton radio_menu_show_text;
- [Widget] Gtk.RadioButton radio_menu_show_icons;
- [Widget] Gtk.CheckButton check_example_menu_all;
- [Widget] Gtk.CheckButton check_example_menu_text;
- [Widget] Gtk.CheckButton check_example_menu_icons;
- [Widget] Gtk.Image image_menu_folders;
- [Widget] Gtk.Image image_menu_folders2;
[Widget] Gtk.CheckButton check_appearance_person_photo;
[Widget] Gtk.Alignment alignment_undecorated;
[Widget] Gtk.Label label_recommended_undecorated;
@@ -382,36 +374,18 @@ public class PreferencesWindow
(preferences.maximized == Preferences.MaximizedTypes.YESUNDECORATED);
}
- if(preferences.personWinHide) {
+ if(preferences.personWinHide)
PreferencesWindowBox.check_appearance_person_win_hide.Active = true;
- PreferencesWindowBox.radio_menu_show_all.Sensitive = false;
- PreferencesWindowBox.radio_menu_show_text.Sensitive = false;
- PreferencesWindowBox.radio_menu_show_icons.Sensitive = true;
- } else {
+ else
PreferencesWindowBox.check_appearance_person_win_hide.Active = false;
- PreferencesWindowBox.radio_menu_show_all.Sensitive = true;
- PreferencesWindowBox.radio_menu_show_text.Sensitive = true;
- PreferencesWindowBox.radio_menu_show_icons.Sensitive = false;
- }
PreferencesWindowBox.check_appearance_person_photo.Sensitive = ! preferences.personWinHide;
- pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_folders.png");
- PreferencesWindowBox.image_menu_folders.Pixbuf = pixbuf;
- PreferencesWindowBox.image_menu_folders2.Pixbuf = pixbuf;
-
if(preferences.personPhoto)
PreferencesWindowBox.check_appearance_person_photo.Active = true;
else
PreferencesWindowBox.check_appearance_person_photo.Active = false;
- if(preferences.menuType == Preferences.MenuTypes.ALL)
- PreferencesWindowBox.radio_menu_show_all.Active = true;
- else if(preferences.menuType == Preferences.MenuTypes.TEXT)
- PreferencesWindowBox.radio_menu_show_text.Active = true;
- else //if(preferences.menuType == Preferences.MenuTypes.ICONS)
- PreferencesWindowBox.radio_menu_show_icons.Active = true;
-
if(preferences.logoAnimatedShow)
PreferencesWindowBox.check_logo_animated.Active = true;
else
@@ -848,13 +822,6 @@ public class PreferencesWindow
// <---- endo of view more tabs
- private void on_radio_menu_show_toggled (object o, EventArgs args)
- {
- check_example_menu_all.Visible = (o == (object) radio_menu_show_all &&
radio_menu_show_all.Active);
- check_example_menu_text.Visible = (o == (object) radio_menu_show_text &&
radio_menu_show_text.Active);
- check_example_menu_icons.Visible = (o == (object) radio_menu_show_icons &&
radio_menu_show_icons.Active);
- }
-
private void paintColorDrawingAreaAndBg (Gdk.Color color)
{
UtilGtk.PaintColorDrawingArea(drawingarea_background_color, color);
@@ -1234,22 +1201,6 @@ public class PreferencesWindow
private void on_check_appearance_person_win_hide_toggled (object obj, EventArgs args)
{
- if(check_appearance_person_win_hide.Active)
- {
- radio_menu_show_all.Sensitive = false;
- radio_menu_show_text.Sensitive = false;
- radio_menu_show_icons.Sensitive = true;
-
- radio_menu_show_icons.Active = true;
- } else {
- radio_menu_show_all.Sensitive = true;
- radio_menu_show_text.Sensitive = true;
- radio_menu_show_icons.Sensitive = false;
-
- if(radio_menu_show_icons.Active)
- radio_menu_show_all.Active = true;
- }
-
check_appearance_person_photo.Sensitive = ! check_appearance_person_win_hide.Active;
}
@@ -1788,22 +1739,6 @@ public class PreferencesWindow
preferences.personPhoto = PreferencesWindowBox.check_appearance_person_photo.Active;
}
- if(PreferencesWindowBox.radio_menu_show_all.Active && preferences.menuType !=
Preferences.MenuTypes.ALL)
- {
- SqlitePreferences.Update(SqlitePreferences.MenuType,
Preferences.MenuTypes.ALL.ToString(), true);
- preferences.menuType = Preferences.MenuTypes.ALL;
- }
- else if(PreferencesWindowBox.radio_menu_show_text.Active && preferences.menuType !=
Preferences.MenuTypes.TEXT)
- {
- SqlitePreferences.Update(SqlitePreferences.MenuType,
Preferences.MenuTypes.TEXT.ToString(), true);
- preferences.menuType = Preferences.MenuTypes.TEXT;
- }
- else if(PreferencesWindowBox.radio_menu_show_icons.Active && preferences.menuType !=
Preferences.MenuTypes.ICONS)
- {
- SqlitePreferences.Update(SqlitePreferences.MenuType,
Preferences.MenuTypes.ICONS.ToString(), true);
- preferences.menuType = Preferences.MenuTypes.ICONS;
- }
-
if(radio_color_chronojump_blue.Active)
{
preferences.colorBackgroundString = Preferences.PreferencesChange(
diff --git a/src/preferences.cs b/src/preferences.cs
index bce999a8b..990e58a95 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -34,8 +34,10 @@ public class Preferences
public bool personWinHide;
public bool personPhoto;
//public string colorBackgroundString = "#0e1e46";
- public enum MenuTypes { ALL, TEXT, ICONS};
- public MenuTypes menuType;
+
+ public enum MenuTypes { ALL, TEXT, ICONS}; //unused on 2.1.3
+ public MenuTypes menuType; //unused on 2.1.3
+
public string colorBackgroundString; //"" means system color (do not do nothing)
public bool colorBackgroundIsDark; //this is assigned when colorBackgroundString changes. And this is
used by the rest of the program. Not stored on SQL.
public bool colorBackgroundOsColor;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]