Merge branch 'master' of git+ssh://ywwg@dev.laptop.org/git/sugar
This commit is contained in:
commit
556085dbf8
@ -1,15 +1,16 @@
|
|||||||
libsugarprivate_la_CPPFLAGS = \
|
libsugarprivate_la_CPPFLAGS = \
|
||||||
$(WARN_CFLAGS) \
|
$(WARN_CFLAGS) \
|
||||||
$(LIB_CFLAGS) \
|
$(LIB_CFLAGS) \
|
||||||
$(GECKO_CFLAGS) \
|
$(GECKO_CFLAGS) \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/dom \
|
-I$(MOZILLA_INCLUDE_DIR)/dom \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/exthandler \
|
-I$(MOZILLA_INCLUDE_DIR)/exthandler \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/gtkembedmoz \
|
-I$(MOZILLA_INCLUDE_DIR)/gtkembedmoz \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/mimetype \
|
-I$(MOZILLA_INCLUDE_DIR)/mimetype \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/necko \
|
-I$(MOZILLA_INCLUDE_DIR)/necko \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/pref \
|
-I$(MOZILLA_INCLUDE_DIR)/pref \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/uriloader \
|
-I$(MOZILLA_INCLUDE_DIR)/uriloader \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/webbrwsr \
|
-I$(MOZILLA_INCLUDE_DIR)/webbrwsr \
|
||||||
|
-DPLUGIN_DIR=\"$(libdir)/mozilla/plugins\" \
|
||||||
-DSHARE_DIR=\"$(pkgdatadir)\"
|
-DSHARE_DIR=\"$(pkgdatadir)\"
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libsugarprivate.la
|
noinst_LTLIBRARIES = libsugarprivate.la
|
||||||
|
@ -69,11 +69,28 @@ static const nsModuleComponentInfo sSugarComponents[] = {
|
|||||||
|
|
||||||
#endif
|
#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
|
gboolean
|
||||||
sugar_browser_startup(const char *profile_path, const char *profile_name)
|
sugar_browser_startup(const char *profile_path, const char *profile_name)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
|
setup_plugin_path();
|
||||||
|
|
||||||
gtk_moz_embed_set_profile_path(profile_path, profile_name);
|
gtk_moz_embed_set_profile_path(profile_path, profile_name);
|
||||||
|
|
||||||
gtk_moz_embed_push_startup();
|
gtk_moz_embed_push_startup();
|
||||||
|
@ -127,6 +127,10 @@ class KeyHandler(object):
|
|||||||
def handle_keyboard_brightness(self):
|
def handle_keyboard_brightness(self):
|
||||||
self._hw_manager.toggle_keyboard_brightness()
|
self._hw_manager.toggle_keyboard_brightness()
|
||||||
|
|
||||||
|
def handle_home(self):
|
||||||
|
# FIXME: finish alt+tab support
|
||||||
|
pass
|
||||||
|
|
||||||
def _key_pressed_cb(self, grabber, key):
|
def _key_pressed_cb(self, grabber, key):
|
||||||
action = _actions_table[key]
|
action = _actions_table[key]
|
||||||
method = getattr(self, 'handle_' + action)
|
method = getattr(self, 'handle_' + action)
|
||||||
|
@ -145,6 +145,8 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
|
|||||||
self._buffers = {}
|
self._buffers = {}
|
||||||
self._cur_buffer = None
|
self._cur_buffer = None
|
||||||
self._size = 24
|
self._size = 24
|
||||||
|
self.props.box_width = self._size
|
||||||
|
self.props.box_height = self._size
|
||||||
self._color = None
|
self._color = None
|
||||||
self._icon_name = None
|
self._icon_name = None
|
||||||
self._cache = False
|
self._cache = False
|
||||||
@ -175,6 +177,8 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
|
|||||||
if self._size != value and not self._cache:
|
if self._size != value and not self._cache:
|
||||||
self._clear_buffers()
|
self._clear_buffers()
|
||||||
self._size = value
|
self._size = value
|
||||||
|
self.props.box_width = value
|
||||||
|
self.props.box_height = value
|
||||||
self.emit_request_changed()
|
self.emit_request_changed()
|
||||||
elif pspec.name == 'cache':
|
elif pspec.name == 'cache':
|
||||||
self._cache = value
|
self._cache = value
|
||||||
@ -229,11 +233,5 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
|
|||||||
cr.set_source_surface(buf, x, y)
|
cr.set_source_surface(buf, x, y)
|
||||||
cr.paint()
|
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):
|
def _button_press_event_cb(self, item, event):
|
||||||
item.emit_activated()
|
item.emit_activated()
|
||||||
|
Loading…
Reference in New Issue
Block a user