Merge branch 'master' of git+ssh://ywwg@dev.laptop.org/git/sugar

This commit is contained in:
Owen Williams 2007-01-26 09:34:35 -05:00
commit 556085dbf8
4 changed files with 39 additions and 19 deletions

View File

@ -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 = \

View File

@ -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();

View File

@ -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)

View File

@ -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()