mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-08-30 02:42:32 +00:00
Remove commented out code (#353)
This commit is contained in:
commit
40b74723e9
7 changed files with 0 additions and 71 deletions
|
@ -27,8 +27,6 @@ class GradienceAppTypeDialog(Adw.MessageDialog):
|
|||
|
||||
gtk4_app_type = Gtk.Template.Child("gtk4-app-type")
|
||||
gtk3_app_type = Gtk.Template.Child("gtk3-app-type")
|
||||
# dark = Gtk.Template.Child("dark")
|
||||
# light = Gtk.Template.Child("light")
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
@ -54,9 +52,3 @@ class GradienceAppTypeDialog(Adw.MessageDialog):
|
|||
"gtk4": self.gtk4_app_type.get_active(),
|
||||
"gtk3": self.gtk3_app_type.get_active(),
|
||||
}
|
||||
|
||||
# def get_color_mode(self):
|
||||
# return {
|
||||
# "dark": self.dark.get_active(),
|
||||
# "light": self.light.get_active(),
|
||||
# }
|
||||
|
|
30
src/main.py
30
src/main.py
|
@ -551,36 +551,6 @@ class GradienceApplication(Adw.Application):
|
|||
|
||||
def apply_color_scheme(self, widget, response):
|
||||
if response == "apply":
|
||||
# if widget.get_color_mode()["dark"]:
|
||||
# if widget.get_app_types()["gtk4"]:
|
||||
# gtk4_dir = os.path.join(
|
||||
# os.environ.get(
|
||||
# "XDG_CONFIG_HOME", os.environ["HOME"] + "/.config"
|
||||
# ),
|
||||
# "gtk-4.0",
|
||||
# )
|
||||
# if not os.path.exists(gtk4_dir):
|
||||
# os.makedirs(gtk4_dir)
|
||||
# gtk4_css = self.generate_gtk_css("gtk4")
|
||||
# with open(
|
||||
# os.path.join(gtk4_dir, "gtk-dark.css"), "w", encoding="utf-8"
|
||||
# ) as file:
|
||||
# file.write(gtk4_css)
|
||||
# if widget.get_app_types()["gtk3"]:
|
||||
# gtk3_dir = os.path.join(
|
||||
# os.environ.get(
|
||||
# "XDG_CONFIG_HOME", os.environ["HOME"] + "/.config"
|
||||
# ),
|
||||
# "gtk-3.0",
|
||||
# )
|
||||
# if not os.path.exists(gtk3_dir):
|
||||
# os.makedirs(gtk3_dir)
|
||||
# gtk3_css = self.generate_gtk_css("gtk3")
|
||||
# with open(
|
||||
# os.path.join(gtk3_dir, "gtk-dark.css"), "w", encoding="utf-8"
|
||||
# ) as file:
|
||||
# file.write(gtk3_css)
|
||||
# if widget.get_color_mode()["light"]:
|
||||
if widget.get_app_types()["gtk4"]:
|
||||
gtk4_dir = os.path.join(
|
||||
os.environ.get("XDG_CONFIG_HOME",
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# from .setting import GradienceSetting
|
||||
|
||||
|
||||
class GradiencePluginCore:
|
||||
def __init__(self):
|
||||
|
|
|
@ -45,24 +45,6 @@ class GradiencePluginRow(Adw.ActionRow):
|
|||
|
||||
@Gtk.Template.Callback()
|
||||
def on_remove_plugin_clicked(self, *_args):
|
||||
# try:
|
||||
# os.remove(os.path.join(
|
||||
# os.environ.get("XDG_CONFIG_HOME",
|
||||
# os.environ["HOME"] + "/.config"),
|
||||
# "gradience_plugins",
|
||||
# self.plugin_object.plugin_id + "."
|
||||
# ))
|
||||
# except Exception as exception:
|
||||
# print(exception.with_traceback())
|
||||
# self.toast_overlay.add_toast(
|
||||
# Adw.Toast(title=_("Unable to delete preset"))
|
||||
# )
|
||||
# else:
|
||||
# self.toast_overlay.add_toast(
|
||||
# Adw.Toast(title=_("Preset removed"))
|
||||
# )
|
||||
# finally:
|
||||
# self.win.reload_pref_group()
|
||||
print("delete")
|
||||
|
||||
@Gtk.Template.Callback()
|
||||
|
|
|
@ -51,7 +51,6 @@ class GradiencePreferencesWindow(Adw.PreferencesWindow):
|
|||
self.setup()
|
||||
|
||||
def setup(self):
|
||||
# self.set_search_enabled(False)
|
||||
|
||||
self.setup_flatpak_group()
|
||||
|
||||
|
@ -59,14 +58,10 @@ class GradiencePreferencesWindow(Adw.PreferencesWindow):
|
|||
user_flatpak_theming_gtk4 = self.settings.get_boolean(
|
||||
"user-flatpak-theming-gtk4"
|
||||
)
|
||||
# global_flatpak_theming_gtk4 = self.settings.get_boolean(
|
||||
# "global-flatpak-theming-gtk4")
|
||||
|
||||
user_flatpak_theming_gtk3 = self.settings.get_boolean(
|
||||
"user-flatpak-theming-gtk3"
|
||||
)
|
||||
# global_flatpak_theming_gtk3 = self.settings.get_boolean(
|
||||
# "global-flatpak-theming-gtk3")
|
||||
|
||||
self.allow_gtk4_flatpak_theming_user.set_state(
|
||||
user_flatpak_theming_gtk4)
|
||||
|
@ -79,14 +74,10 @@ class GradiencePreferencesWindow(Adw.PreferencesWindow):
|
|||
self.allow_gtk4_flatpak_theming_user.connect(
|
||||
"state-set", self.on_allow_gtk4_flatpak_theming_user_toggled
|
||||
)
|
||||
# self.allow_gtk4_flatpak_theming_global.connect(
|
||||
# "state-set", self.on_allow_gtk4_flatpak_theming_global_toggled)
|
||||
|
||||
self.allow_gtk3_flatpak_theming_user.connect(
|
||||
"state-set", self.on_allow_gtk3_flatpak_theming_user_toggled
|
||||
)
|
||||
# self.allow_gtk3_flatpak_theming_global.connect(
|
||||
# "state-set", self.on_allow_gtk3_flatpak_theming_global_toggled)
|
||||
|
||||
def on_allow_gtk4_flatpak_theming_user_toggled(self, *args):
|
||||
state = self.allow_gtk4_flatpak_theming_user.props.state
|
||||
|
|
|
@ -87,7 +87,6 @@ class GradiencePresetRow(Adw.ActionRow):
|
|||
def on_remove_button_clicked(self, *_args):
|
||||
self.delete_preset = True
|
||||
self.delete_toast = Adw.Toast(title=_("Preset removed"))
|
||||
# self.delete_toast.set_action_name("on_undo_button_clicked")
|
||||
self.delete_toast.set_button_label(_("Undo"))
|
||||
self.delete_toast.connect("dismissed", self.on_delete_toast_dismissed)
|
||||
self.delete_toast.connect(
|
||||
|
|
|
@ -165,9 +165,6 @@ class GradienceMainWindow(Adw.ApplicationWindow):
|
|||
|
||||
self.monet_file_chooser_button.set_child(child_button)
|
||||
|
||||
# self.monet_file_chooser_button.set_margin_top(5)
|
||||
# self.monet_file_chooser_button.set_margin_bottom(5)
|
||||
|
||||
self.monet_file_chooser_button.connect(
|
||||
"clicked", self.on_file_picker_button_clicked
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue