Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
Diffstat (limited to 'activity.py')
-rw-r--r--activity.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/activity.py b/activity.py
index 55ce1b4..91cf06c 100644
--- a/activity.py
+++ b/activity.py
@@ -36,6 +36,9 @@ from sugar3.graphics.combobox import ComboBox
from sugar3.graphics.menuitem import MenuItem
+USE_LOCAL_CSS = True
+
+
class TestTheme3Activity(activity.Activity):
"""HelloWorldActivity class as specified in activity.info"""
@@ -45,11 +48,12 @@ class TestTheme3Activity(activity.Activity):
screen = Gdk.Screen.get_default()
- css_provider = Gtk.CssProvider()
- css_provider.load_from_path('sugar-theme.css')
+ if USE_LOCAL_CSS:
+ css_provider = Gtk.CssProvider()
+ css_provider.load_from_path('sugar-theme.css')
- context = Gtk.StyleContext()
- context.add_provider_for_screen(screen, css_provider,
+ context = Gtk.StyleContext()
+ context.add_provider_for_screen(screen, css_provider,
Gtk.STYLE_PROVIDER_PRIORITY_USER)
# toolbar with the new toolbar redesign
@@ -128,9 +132,9 @@ class TestTheme3Activity(activity.Activity):
vbox1.pack_start(spin, False, False, 5)
hb_group = Gtk.HBox()
- item1 = Gtk.RadioButton(None, _('RadioBt 1'))
- item2 = Gtk.RadioButton(item1, _('RadioBt 2'))
- item3 = Gtk.RadioButton(item1, _('RadioBt 3'))
+ item1 = Gtk.RadioButton.new_with_label_from_widget(None, _('RadioBt 1'))
+ item2 = Gtk.RadioButton.new_with_label_from_widget(item1, _('RadioBt 2'))
+ item3 = Gtk.RadioButton.new_with_label_from_widget(item1, _('RadioBt 3'))
hb_group.pack_start(item1, False, False, 5)
hb_group.pack_start(item2, False, False, 5)