Skip to content

Commit

Permalink
about dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
arcolinuxz committed May 14, 2023
1 parent b369a8a commit e7f71c6
Show file tree
Hide file tree
Showing 12 changed files with 184 additions and 55 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
43 changes: 43 additions & 0 deletions usr/share/arcolinux-app-glade/about.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env python3

# ArcoLinux App - https://www.arcolinuxiso.com/arcolinux-app/
# Copyright (C) 2023 EriK Dubois - Drunken Alcoholic
#
# ArcoLinux App is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# ArcoLinux App is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Gufw; if not, see http://www.gnu.org/licenses for more
# information.

import gi
import webbrowser
import functions as fn

gi.require_version("Gtk", "3.0")
from gi.repository import Gtk

# constant values
BASE_DIR = fn.path.dirname(fn.path.realpath(__file__))
GUI_UI_FILE = fn.os.path.join(BASE_DIR + "/about.ui")


class About(Gtk.Window):
def __init__(self):
self.builder = Gtk.Builder()
self.builder.add_from_file(GUI_UI_FILE)

self.win_about = self.builder.get_object("about")
# self.win_about.set_transient_for(self.main)
self.win_about.connect("response", lambda d, r: d.destroy())
self.win_about.show()

def on_website_link_activate(self, *args):
fn.run_as_user(webbrowser.open("https://www.arcolinuxiso.com/arcolinux-app/"))
32 changes: 32 additions & 0 deletions usr/share/arcolinux-app-glade/about.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkAboutDialog" id="about">
<property name="can-focus">False</property>
<property name="type-hint">dialog</property>
<property name="program-name">ArcoLinux App</property>
<property name="comments" translatable="yes">Educational Project</property>
<property name="authors">Erik Dubois</property>
<property name="logo">../../../../arcolinux-app-glade/usr/share/arcolinux-app-glade/images/medallion.png</property>
<signal name="activate-link" handler="on_website_link_activate" swapped="no"/>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
26 changes: 22 additions & 4 deletions usr/share/arcolinux-app-glade/arcolinux_application_glade.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
#!/usr/bin/env python3
# =================================================================
# = Author: Erik Dubois =
# =================================================================

import datetime
# ArcoLinux App - https://www.arcolinuxiso.com/arcolinux-app/
# Copyright (C) 2023 EriK Dubois
#
# ArcoLinux App is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# ArcoLinux App is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Gufw; if not, see http://www.gnu.org/licenses for more
# information.

import os
import logging
from datetime import datetime
Expand All @@ -14,6 +27,7 @@
# Importing gi
import gi
import splash
import about

# https://docs.gtk.org/gtk3/
gi.require_version("Gtk", "3.0")
Expand Down Expand Up @@ -577,6 +591,10 @@ def on_pacman_install_packages(self, widget):
else:
logging.info("First select a file")

def on_about_clicked(self, widget):
# About dialog
aboutwin = about.About()

def on_quit_button_clicked(self, widget):
# Ending the application
Gtk.main_quit()
Expand Down
Loading

0 comments on commit e7f71c6

Please sign in to comment.