[gnome-applets/wip/dont-use-deprecated] invest-applet: - properly call Gtk.Window constructor with a WindowType, fixes bug 646486 - removed
- From: Enrico Minack <eminack src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/wip/dont-use-deprecated] invest-applet: - properly call Gtk.Window constructor with a WindowType, fixes bug 646486 - removed
- Date: Sat, 2 Apr 2011 11:50:40 +0000 (UTC)
commit 8bf99f86ac259ce40762bf92ac60a7420a393e02
Author: Enrico Minack <enrico-minack gmx de>
Date: Sat Apr 2 06:16:16 2011 -0400
invest-applet:
- properly call Gtk.Window constructor with a WindowType, fixes bug 646486
- removed "import pygtk" and "pygtk.require('2.0')" as suggested in bug 646486
invest-applet/invest/__init__.py | 6 ------
invest-applet/invest/about.py | 3 ---
invest-applet/invest/applet.py | 6 +-----
invest-applet/invest/chart.py | 4 +---
invest-applet/invest/help.py | 2 --
invest-applet/invest/invest-applet.py | 4 ----
invest-applet/invest/preferences.py | 4 ----
invest-applet/invest/quotes.py | 4 ----
invest-applet/invest/widgets.py | 4 ----
9 files changed, 2 insertions(+), 35 deletions(-)
---
diff --git a/invest-applet/invest/__init__.py b/invest-applet/invest/__init__.py
index 9977a3b..71bd2ca 100644
--- a/invest-applet/invest/__init__.py
+++ b/invest-applet/invest/__init__.py
@@ -2,15 +2,9 @@ import os, sys, traceback
from os.path import join, exists, isdir, isfile, dirname, abspath, expanduser
from types import ListType
import datetime
-
-import pygtk
-pygtk.require('2.0')
from gi.repository import GObject, Gtk, Gdk, GConf
-
import cPickle
-
import networkmanager
-
import random
diff --git a/invest-applet/invest/about.py b/invest-applet/invest/about.py
index 0fa8533..7b3bd42 100644
--- a/invest-applet/invest/about.py
+++ b/invest-applet/invest/about.py
@@ -3,9 +3,6 @@ from os.path import join
from gettext import gettext as _
from invest.defs import VERSION
import invest
-
-import pygtk
-pygtk.require('2.0')
from gi.repository import Gtk, Gdk, GdkPixbuf
invest_logo = None
diff --git a/invest-applet/invest/applet.py b/invest-applet/invest/applet.py
index a1a7823..b8af64b 100644
--- a/invest-applet/invest/applet.py
+++ b/invest-applet/invest/applet.py
@@ -1,8 +1,6 @@
import os, time
from os.path import *
-import pygtk
-pygtk.require('2.0')
from gi.repository import GObject, Gtk, Gdk, GdkPixbuf, GConf, PanelApplet
GObject.threads_init()
@@ -109,9 +107,7 @@ class InvestApplet(PanelApplet.Applet):
class InvestmentsListWindow(Gtk.Window):
def __init__(self, applet, list):
-# throws an exception, but shouldn't
-# Gtk.Window.__init__(self, Gtk.WindowType.TOPLEVEL)
- Gtk.Window.__init__(self)
+ Gtk.Window.__init__(self, type=Gtk.WindowType.TOPLEVEL)
self.set_type_hint(Gdk.WindowTypeHint.DOCK)
self.stick()
self.set_resizable(False)
diff --git a/invest-applet/invest/chart.py b/invest-applet/invest/chart.py
index 68169e1..8a01970 100644
--- a/invest-applet/invest/chart.py
+++ b/invest-applet/invest/chart.py
@@ -1,8 +1,6 @@
#!/usr/bin/env python
-import pygtk
-pygtk.require('2.0')
-from gi.repository import GObject, Gtk, Gdk, GdkPixbuf
+from gi.repository import GObject, Gtk, Gdk, GdkPixbuf, Gio
import os
import invest
diff --git a/invest-applet/invest/help.py b/invest-applet/invest/help.py
index c2a4a66..2851e54 100644
--- a/invest-applet/invest/help.py
+++ b/invest-applet/invest/help.py
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
-import pygtk
-pygtk.require('2.0')
from gi.repository import Gtk, Gdk
def show_help():
diff --git a/invest-applet/invest/invest-applet.py b/invest-applet/invest/invest-applet.py
index 57f4f30..68f2652 100755
--- a/invest-applet/invest/invest-applet.py
+++ b/invest-applet/invest/invest-applet.py
@@ -1,10 +1,6 @@
#!/usr/bin/env python
-#
-import pygtk
-pygtk.require('2.0')
from gi.repository import GObject, Gtk, PanelApplet
-
import getopt, sys
from os.path import *
diff --git a/invest-applet/invest/preferences.py b/invest-applet/invest/preferences.py
index 8e1097e..fc4e8c4 100644
--- a/invest-applet/invest/preferences.py
+++ b/invest-applet/invest/preferences.py
@@ -1,11 +1,7 @@
from gettext import gettext as _
import locale
from os.path import join
-
-import pygtk
-pygtk.require('2.0')
from gi.repository import GObject, Gtk, GConf
-
import invest
import currencies
import cPickle
diff --git a/invest-applet/invest/quotes.py b/invest-applet/invest/quotes.py
index 9672f57..066ff91 100644
--- a/invest-applet/invest/quotes.py
+++ b/invest-applet/invest/quotes.py
@@ -1,9 +1,5 @@
from os.path import join
-
-import pygtk
-pygtk.require('2.0')
from gi.repository import GObject, Gtk, Gdk, GdkPixbuf, GConf, PanelApplet
-
from gettext import gettext as _
import csv
import locale
diff --git a/invest-applet/invest/widgets.py b/invest-applet/invest/widgets.py
index 9d3fe12..0442e0f 100644
--- a/invest-applet/invest/widgets.py
+++ b/invest-applet/invest/widgets.py
@@ -1,10 +1,6 @@
import os, time
from os.path import *
-
-import pygtk
-pygtk.require('2.0')
from gi.repository import GObject, Gtk, Gdk, GdkPixbuf, GConf, PanelApplet, Pango
-
from gettext import gettext as _
import locale
import csv
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]