From 89e10838d3199e6f52508c72ee0aa904cbf235d4 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 24 Jan 2007 14:56:44 -0500 Subject: [PATCH 1/3] Stub Alt+Tab key handler --- shell/view/keyhandler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/view/keyhandler.py b/shell/view/keyhandler.py index 87ddce67..c5f9eff9 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) From 8a0728b169535e83ba1c1540cd6ddc42d24f16e3 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 26 Jan 2007 11:44:08 +0100 Subject: [PATCH 2/3] Setup plugins path --- lib/src/Makefile.am | 27 ++++++++++++++------------- lib/src/sugar-browser.cpp | 17 +++++++++++++++++ 2 files changed, 31 insertions(+), 13 deletions(-) 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(); From 0eaa29ee9d3aac7514bdbe3e6ae087a3b51f336c Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 26 Jan 2007 09:21:56 -0500 Subject: [PATCH 3/3] Set width/height the right way --- sugar/graphics/canvasicon.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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()