diff --git a/lib/src/Makefile.am b/lib/src/Makefile.am index f7d0e171..407b4690 100644 --- a/lib/src/Makefile.am +++ b/lib/src/Makefile.am @@ -1,17 +1,18 @@ -libsugarprivate_la_CPPFLAGS = \ - $(WARN_CFLAGS) \ - $(LIB_CFLAGS) \ - $(GECKO_CFLAGS) \ - -I$(MOZILLA_INCLUDE_DIR)/dom \ - -I$(MOZILLA_INCLUDE_DIR)/exthandler \ - -I$(MOZILLA_INCLUDE_DIR)/gtkembedmoz \ - -I$(MOZILLA_INCLUDE_DIR)/mimetype \ - -I$(MOZILLA_INCLUDE_DIR)/necko \ - -I$(MOZILLA_INCLUDE_DIR)/pref \ - -I$(MOZILLA_INCLUDE_DIR)/uriloader \ - -I$(MOZILLA_INCLUDE_DIR)/webbrwsr \ +libsugarprivate_la_CPPFLAGS = \ + $(WARN_CFLAGS) \ + $(LIB_CFLAGS) \ + $(GECKO_CFLAGS) \ + -I$(MOZILLA_INCLUDE_DIR)/dom \ + -I$(MOZILLA_INCLUDE_DIR)/exthandler \ + -I$(MOZILLA_INCLUDE_DIR)/gtkembedmoz \ + -I$(MOZILLA_INCLUDE_DIR)/mimetype \ + -I$(MOZILLA_INCLUDE_DIR)/necko \ + -I$(MOZILLA_INCLUDE_DIR)/pref \ + -I$(MOZILLA_INCLUDE_DIR)/uriloader \ + -I$(MOZILLA_INCLUDE_DIR)/webbrwsr \ + -DPLUGIN_DIR=\"$(libdir)/mozilla/plugins\" \ -DSHARE_DIR=\"$(pkgdatadir)\" - + noinst_LTLIBRARIES = libsugarprivate.la libsugarprivate_la_LIBADD = \ diff --git a/lib/src/sugar-browser.cpp b/lib/src/sugar-browser.cpp index fe94378a..4bbbb62f 100644 --- a/lib/src/sugar-browser.cpp +++ b/lib/src/sugar-browser.cpp @@ -69,11 +69,28 @@ static const nsModuleComponentInfo sSugarComponents[] = { #endif +static void +setup_plugin_path () +{ + const char *user_path; + char *new_path; + + user_path = g_getenv ("MOZ_PLUGIN_PATH"); + new_path = g_strconcat (user_path ? user_path : "", + user_path ? ":" : "", + PLUGIN_DIR, + (char *) NULL); + g_setenv ("MOZ_PLUGIN_PATH", new_path, TRUE); + g_free (new_path); +} + gboolean sugar_browser_startup(const char *profile_path, const char *profile_name) { nsresult rv; + setup_plugin_path(); + gtk_moz_embed_set_profile_path(profile_path, profile_name); gtk_moz_embed_push_startup(); diff --git a/shell/view/keyhandler.py b/shell/view/keyhandler.py index 3564974d..870adb9c 100644 --- a/shell/view/keyhandler.py +++ b/shell/view/keyhandler.py @@ -127,6 +127,10 @@ class KeyHandler(object): def handle_keyboard_brightness(self): self._hw_manager.toggle_keyboard_brightness() + def handle_home(self): + # FIXME: finish alt+tab support + pass + def _key_pressed_cb(self, grabber, key): action = _actions_table[key] method = getattr(self, 'handle_' + action) diff --git a/sugar/graphics/canvasicon.py b/sugar/graphics/canvasicon.py index 7da71f7a..714ba307 100644 --- a/sugar/graphics/canvasicon.py +++ b/sugar/graphics/canvasicon.py @@ -145,6 +145,8 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem): self._buffers = {} self._cur_buffer = None self._size = 24 + self.props.box_width = self._size + self.props.box_height = self._size self._color = None self._icon_name = None self._cache = False @@ -175,6 +177,8 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem): if self._size != value and not self._cache: self._clear_buffers() self._size = value + self.props.box_width = value + self.props.box_height = value self.emit_request_changed() elif pspec.name == 'cache': self._cache = value @@ -229,11 +233,5 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem): cr.set_source_surface(buf, x, y) cr.paint() - def do_get_width_request(self): - return self._size - - def do_get_height_request(self, for_width): - return self._size - def _button_press_event_cb(self, item, event): item.emit_activated()