diff --git a/Mailnag/configuration/configwindow.py b/Mailnag/configuration/configwindow.py index e27b4c1..b789b08 100644 --- a/Mailnag/configuration/configwindow.py +++ b/Mailnag/configuration/configwindow.py @@ -24,12 +24,11 @@ import gi gi.require_version('Gtk', '3.0') -gi.require_version('GLib', '2.0') import os import shutil import xdg.BaseDirectory as bd -from gi.repository import GLib, GdkPixbuf, Gdk, Gtk, GObject +from gi.repository import Gtk from Mailnag.common.dist_cfg import PACKAGE_NAME, APP_VERSION, BIN_DIR, DESKTOP_FILE_DIR from Mailnag.common.i18n import _ @@ -70,7 +69,6 @@ class ConfigWindow: self._window = builder.get_object("config_window") self._window.set_icon_name("mailnag") - self._load_stylesheet('config_window.css') self._cfg = read_cfg() self.daemon_enabled = False @@ -82,16 +80,6 @@ class ConfigWindow: self._box_navigation = builder.get_object("box_navigation") self._box_navigation.get_children()[0].set_active(True) - # - # general page - # - # The dimension of the png is expected to be 180x180 px - pb = GdkPixbuf.Pixbuf.new_from_file(get_data_file("mailnag.png")) - pb = pb.new_subpixbuf(0, 10, 180, 146) # crop whitespace at the bottom - self._image_logo = builder.get_object("image_logo") - self._image_logo.set_from_pixbuf(pb) - self._label_app_desc = builder.get_object("label_app_desc") - self._label_app_desc.set_markup("Mailnag\nVersion %s" % str(APP_VERSION)) self._switch_daemon_enabled = builder.get_object("switch_daemon_enabled") # @@ -148,14 +136,6 @@ class ConfigWindow: # load config self._load_config() self._window.show() - - - def _load_stylesheet(self, stylesheet): - provider = Gtk.CssProvider() - provider.load_from_path(get_data_file(stylesheet)) - Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), - provider, - Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION) def _load_config(self): diff --git a/README.md b/README.md index d8a43a7..a6caca8 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,7 @@ though make sure the requirements stated below are met. * python2 (python3 won't work!) * pygobject * gir-notify (>= 0.7.6) -* gir-gtk-3.0 -* gir-gdkpixbuf-2.0 +* gir-gtk-3.0 (>= 3.10.8) * gir-glib-2.0 * gir-gst-plugins-base-1.0 * python-dbus diff --git a/data/config_window.css b/data/config_window.css deleted file mode 100644 index a18f7c4..0000000 --- a/data/config_window.css +++ /dev/null @@ -1,6 +0,0 @@ -.bg-gradient { - background-image: linear-gradient(to bottom, - @theme_bg_color, - shade(@theme_bg_color, 0.94) - 12%); -} diff --git a/data/config_window.ui b/data/config_window.ui index a027c2d..0ff1026 100644 --- a/data/config_window.ui +++ b/data/config_window.ui @@ -1,7 +1,7 @@ - + @@ -26,36 +26,199 @@ False - Mailnag Configuration + 580 + 420 - + True - False - vertical + True + False + False - + + + + + + + True False - 18 - 18 - 12 - 12 - True + vertical - - General + True True - True - + in + + + True + True + liststore_accounts + False + True + False + 1 + + + + + + - False + True True 0 + + + True + False + icons + 1 + + + True + False + Add Account + list-add-symbolic + + + + False + True + + + + + True + False + Remove Account + list-remove-symbolic + + + + False + True + + + + + True + False + Edit Account + text-editor-symbolic + + + + False + True + + + + + + False + True + 1 + + + + + 1 + + + + + + + + True + False + vertical + + + True + True + in + + + True + True + liststore_plugins + False + True + False + 1 + + + + + + + + + + True + True + 0 + + + + + True + False + icons + 1 + + + True + False + Edit Plugin + text-editor-symbolic + + + + False + True + + + + + + False + True + 1 + + + + + 2 + + + + + + + + + + True + False + 12 + True + + + True + False + True Accounts @@ -88,274 +251,16 @@ - - False - True - 0 - - + True True - False - False - - - True - False - - - True - False - 12 - 12 - 12 - vertical - 12 - - - True - False - vertical - - - - False - False - 0 - - - - - True - False - APP_DESC - True - - - False - False - 1 - - - - - False - False - 0 - - - - - True - True - <a href="https://github.com/pulb/mailnag">Mailnag</a> - An extensible mail notification daemon. -Copyright (c) 2011 - 2016 Patrick Ulbrich -and contributors. - True - - - False - False - 1 - - - - - True - True - center - - - False - False - 2 - - - - - - - - - - - - - True - False - vertical - - - True - True - in - - - True - True - liststore_accounts - False - True - False - 1 - - - - - - - - - True - True - 0 - - - - - True - False - icons - 1 - - - True - False - Add Account - list-add-symbolic - - - - False - True - - - - - True - False - Remove Account - list-remove-symbolic - - - - False - True - - - - - True - False - Edit Account - text-editor-symbolic - - - - False - True - - - - - - False - True - 1 - - - - - 1 - - - - - - - - True - False - vertical - - - True - True - in - - - True - True - liststore_plugins - False - True - False - 1 - - - - - - - - - - True - True - 0 - - - - - True - False - icons - 1 - - - True - False - Edit Plugin - text-editor-symbolic - - - - False - True - - - - - - False - True - 1 - - - - - 2 - - - - - + center + center - True - True - 1 + end diff --git a/data/mailnag.png b/data/mailnag.png deleted file mode 100644 index 3d64908..0000000 Binary files a/data/mailnag.png and /dev/null differ diff --git a/setup.py b/setup.py index d0a7eb4..a90dc24 100755 --- a/setup.py +++ b/setup.py @@ -116,9 +116,7 @@ setup(name=PACKAGE_NAME, packages=['Mailnag', 'Mailnag.common', 'Mailnag.configuration', 'Mailnag.daemon', 'Mailnag.plugins'], scripts=['mailnag', 'mailnag-config'], data_files=[('share/mailnag', glob.glob('data/*.ui')), - ('share/mailnag', ['data/config_window.css']), ('share/mailnag', ['data/mailnag.ogg']), - ('share/mailnag', ['data/mailnag.png']), ('share/appdata', ['data/mailnag.appdata.xml']), ('share/applications', [os.path.join(BUILD_PATCH_DIR, 'mailnag.desktop'), os.path.join(BUILD_PATCH_DIR, 'mailnag-config.desktop')])], cmdclass={'build': BuildData,