Skip to content

Commit

Permalink
Remove pygtkcompat dependence and change deprecated gtk3 code to actual
Browse files Browse the repository at this point in the history
  • Loading branch information
zavlab1 committed Dec 19, 2015
1 parent abb2093 commit 26eec80
Show file tree
Hide file tree
Showing 39 changed files with 283 additions and 369 deletions.
9 changes: 0 additions & 9 deletions foobnix.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@
import logging
import traceback

from gi import pygtkcompat, require_version
pygtkcompat.enable_gtk(version="3.0")

from gi.repository import Gtk
from gi.repository import GLib


from threading import Timer
from foobnix.fc.fc import FC
from foobnix.util import LOG, analytics
Expand All @@ -27,7 +23,6 @@ def except_hook(exc_t, exc_v, traceback):

#sys.excepthook = except_hook


def foobnix():

if "--debug" in sys.argv:
Expand Down Expand Up @@ -75,10 +70,6 @@ def foobnix():
GLib.threads_init() #@UndefinedVariable
core = FoobnixCore(True)
core.run()
settings = Gtk.settings_get_default()
settings.props.gtk_button_images = True
settings.props.gtk_menu_images = True
analytics.begin_session()
analytics.begin_session()
#core.dbus.parse_arguments(sys.argv)
analytics.begin_session()
Expand Down
14 changes: 7 additions & 7 deletions foobnix/dm/dm.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ class DMControls(MyToolbar):
def __init__(self, controls, dm_tree):
MyToolbar.__init__(self)

self.add_button(_("Preferences"), Gtk.STOCK_PREFERENCES, controls.preferences.show, CONFIG_OTHER)
self.add_button(_("Preferences"), "preferences-system", controls.preferences.show, CONFIG_OTHER)
self.add_separator()
self.add_button(_("Start Downloading"), Gtk.STOCK_MEDIA_PLAY, dm_tree.update_status_for_selected, DOWNLOAD_STATUS_ACTIVE)
self.add_button(_("Stop Downloading"), Gtk.STOCK_MEDIA_PAUSE, dm_tree.update_status_for_selected, DOWNLOAD_STATUS_STOP)
self.add_button(_("Start Downloading"), "media-playback-start", dm_tree.update_status_for_selected, DOWNLOAD_STATUS_ACTIVE)
self.add_button(_("Stop Downloading"), "media-playback-pause", dm_tree.update_status_for_selected, DOWNLOAD_STATUS_STOP)
self.add_separator()
#self.add_button("Start All", Gtk.STOCK_MEDIA_FORWARD, dm_tree.update_status_for_all, DOWNLOAD_STATUS_ACTIVE)
#self.add_button("Stop All", Gtk.STOCK_STOP, dm_tree.update_status_for_all, DOWNLOAD_STATUS_STOP)
#self.add_button("Start All", "go-next", dm_tree.update_status_for_all, DOWNLOAD_STATUS_ACTIVE)
#self.add_button("Stop All", "media-playback-stop", dm_tree.update_status_for_all, DOWNLOAD_STATUS_STOP)
#self.add_separator()
self.add_button(_("Delete"), Gtk.STOCK_DELETE, dm_tree.delete_all_selected, None)
#self.add_button("Delete All", Gtk.STOCK_CLEAR, dm_tree.delete_all, None)
self.add_button(_("Delete"), "edit-delete", dm_tree.delete_all_selected, None)
#self.add_button("Delete All", "edit-clear", dm_tree.delete_all, None)
#self.add_separator()

def on_load(self): pass
Expand Down
Loading

0 comments on commit 26eec80

Please sign in to comment.