Port to Clutter-0.9
tools/build/gnome-shell.modules: Point at master branch of Clutter (0.9) and make gobject-introspection a dep of Clutter. configure.ac src/Makefile.am: Use Clutter-0.9 js/ui/button.js js/ui/genericDisplay.js js/ui/overlay.js js/ui/panel.js js/ui/runDialog.js js/ui/workspaces.js src/shell-status-menu.c: Use ClutterText instead of ClutterLabel and ClutterEntry js/ui/workspaces.js js/ui/genericDisplay.js: Use ClutterClone instead of ClutterCloneTexture src/shell-global.[ch]: Add Shell.get_event_key_symbol() to workaround unaccessibility of clutter_key_event_symbol() to use. js/runDialog.js js/overlay.js: Use Shell.get_event_key_symbol() as appropriate.
This commit is contained in:
parent
6719c00f8a
commit
0f7abf96a7
@ -19,8 +19,8 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
|||||||
[The prefix for our gettext translation domains.])
|
[The prefix for our gettext translation domains.])
|
||||||
|
|
||||||
PKG_CHECK_MODULES(MUTTER_PLUGIN, gtk+-2.0 dbus-glib-1 metacity-plugins gjs-gi-1.0)
|
PKG_CHECK_MODULES(MUTTER_PLUGIN, gtk+-2.0 dbus-glib-1 metacity-plugins gjs-gi-1.0)
|
||||||
PKG_CHECK_MODULES(TIDY, clutter-0.8)
|
PKG_CHECK_MODULES(TIDY, clutter-0.9)
|
||||||
PKG_CHECK_MODULES(BIG, clutter-cairo-0.8 gtk+-2.0 librsvg-2.0)
|
PKG_CHECK_MODULES(BIG, clutter-0.9 gtk+-2.0 librsvg-2.0)
|
||||||
PKG_CHECK_MODULES(GDMUSER, dbus-glib-1 gtk+-2.0)
|
PKG_CHECK_MODULES(GDMUSER, dbus-glib-1 gtk+-2.0)
|
||||||
PKG_CHECK_MODULES(TRAY, gtk+-2.0)
|
PKG_CHECK_MODULES(TRAY, gtk+-2.0)
|
||||||
PKG_CHECK_MODULES(TASKPANEL, libwnck-1.0 dbus-glib-1)
|
PKG_CHECK_MODULES(TASKPANEL, libwnck-1.0 dbus-glib-1)
|
||||||
|
@ -46,8 +46,8 @@ Button.prototype = {
|
|||||||
y_align: Big.BoxAlignment.CENTER
|
y_align: Big.BoxAlignment.CENTER
|
||||||
});
|
});
|
||||||
if (typeof widgetOrText == 'string') {
|
if (typeof widgetOrText == 'string') {
|
||||||
this._widget = new Clutter.Label({ font_name: "Sans Bold 16px",
|
this._widget = new Clutter.Text({ font_name: "Sans Bold 16px",
|
||||||
text: widgetOrText });
|
text: widgetOrText });
|
||||||
} else {
|
} else {
|
||||||
this._widget = widgetOrText;
|
this._widget = widgetOrText;
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ GenericDisplayItem.prototype = {
|
|||||||
//// Draggable interface ////
|
//// Draggable interface ////
|
||||||
getDragActor: function(stageX, stageY) {
|
getDragActor: function(stageX, stageY) {
|
||||||
// FIXME: assumes this._icon is a Clutter.Texture
|
// FIXME: assumes this._icon is a Clutter.Texture
|
||||||
let icon = new Clutter.CloneTexture({ parent_texture: this._icon });
|
let icon = new Clutter.Clone({ source: this._icon });
|
||||||
[icon.width, icon.height] = this._icon.get_transformed_size();
|
[icon.width, icon.height] = this._icon.get_transformed_size();
|
||||||
|
|
||||||
// If the user dragged from the icon itself, then position
|
// If the user dragged from the icon itself, then position
|
||||||
@ -137,21 +137,21 @@ GenericDisplayItem.prototype = {
|
|||||||
this.actor.add_actor(this._icon);
|
this.actor.add_actor(this._icon);
|
||||||
|
|
||||||
let text_width = this._availableWidth - (ITEM_DISPLAY_ICON_SIZE + 4);
|
let text_width = this._availableWidth - (ITEM_DISPLAY_ICON_SIZE + 4);
|
||||||
this._name = new Clutter.Label({ color: ITEM_DISPLAY_NAME_COLOR,
|
this._name = new Clutter.Text({ color: ITEM_DISPLAY_NAME_COLOR,
|
||||||
font_name: "Sans 14px",
|
font_name: "Sans 14px",
|
||||||
width: text_width,
|
width: text_width,
|
||||||
ellipsize: Pango.EllipsizeMode.END,
|
ellipsize: Pango.EllipsizeMode.END,
|
||||||
text: nameText,
|
text: nameText,
|
||||||
x: ITEM_DISPLAY_ICON_SIZE + 4,
|
x: ITEM_DISPLAY_ICON_SIZE + 4,
|
||||||
y: ITEM_DISPLAY_PADDING });
|
y: ITEM_DISPLAY_PADDING });
|
||||||
this.actor.add_actor(this._name);
|
this.actor.add_actor(this._name);
|
||||||
this._description = new Clutter.Label({ color: ITEM_DISPLAY_DESCRIPTION_COLOR,
|
this._description = new Clutter.Text({ color: ITEM_DISPLAY_DESCRIPTION_COLOR,
|
||||||
font_name: "Sans 12px",
|
font_name: "Sans 12px",
|
||||||
width: text_width,
|
width: text_width,
|
||||||
ellipsize: Pango.EllipsizeMode.END,
|
ellipsize: Pango.EllipsizeMode.END,
|
||||||
text: descriptionText,
|
text: descriptionText,
|
||||||
x: this._name.x,
|
x: this._name.x,
|
||||||
y: this._name.height + 4 });
|
y: this._name.height + 4 });
|
||||||
this.actor.add_actor(this._description);
|
this.actor.add_actor(this._description);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -110,14 +110,16 @@ Sideshow.prototype = {
|
|||||||
|
|
||||||
// We need to initialize the text for the entry to have the cursor displayed
|
// We need to initialize the text for the entry to have the cursor displayed
|
||||||
// in it. See http://bugzilla.openedhand.com/show_bug.cgi?id=1365
|
// in it. See http://bugzilla.openedhand.com/show_bug.cgi?id=1365
|
||||||
this._searchEntry = new Clutter.Entry({
|
this._searchEntry = new Clutter.Text({ font_name: "Sans 14px",
|
||||||
font_name: "Sans 14px",
|
x: searchIconTexture.x
|
||||||
x: searchIconTexture.x
|
+ searchIconTexture.width + 4,
|
||||||
+ searchIconTexture.width + 4,
|
y: searchIconTexture.y,
|
||||||
y: searchIconTexture.y,
|
width: this._searchBox.width - (searchIconTexture.x),
|
||||||
width: this._searchBox.width - (searchIconTexture.x),
|
height: searchIconTexture.height,
|
||||||
height: searchIconTexture.height,
|
editable: true,
|
||||||
text: ""});
|
activatable: true,
|
||||||
|
singleLineMode: true,
|
||||||
|
text: ""});
|
||||||
this.actor.add_actor(this._searchEntry);
|
this.actor.add_actor(this._searchEntry);
|
||||||
this._searchQueued = false;
|
this._searchQueued = false;
|
||||||
this._searchEntry.connect('notify::text', function (se, prop) {
|
this._searchEntry.connect('notify::text', function (se, prop) {
|
||||||
@ -141,15 +143,15 @@ Sideshow.prototype = {
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
this._searchEntry.connect('key-press-event', function (se, e) {
|
this._searchEntry.connect('key-press-event', function (se, e) {
|
||||||
let code = e.get_code();
|
let symbol = Shell.get_event_key_symbol(e);
|
||||||
if (code == 9) {
|
if (symbol == Clutter.Escape) {
|
||||||
// A single escape clears the entry, two of them hides the overlay
|
// A single escape clears the entry, two of them hides the overlay
|
||||||
if (me._searchEntry.text == '')
|
if (me._searchEntry.text == '')
|
||||||
me.emit('activated');
|
me.emit('activated');
|
||||||
else
|
else
|
||||||
me._searchEntry.text = '';
|
me._searchEntry.text = '';
|
||||||
return true;
|
return true;
|
||||||
} else if (code == 111) {
|
} else if (symbol == Clutter.Up) {
|
||||||
// selectUp and selectDown wrap around in their respective displays
|
// selectUp and selectDown wrap around in their respective displays
|
||||||
// too, but there doesn't seem to be any flickering if we first select
|
// too, but there doesn't seem to be any flickering if we first select
|
||||||
// something in one display, but then unset the selection, and move
|
// something in one display, but then unset the selection, and move
|
||||||
@ -162,7 +164,7 @@ Sideshow.prototype = {
|
|||||||
me._appDisplay.selectLastItem();
|
me._appDisplay.selectLastItem();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else if (code == 116) {
|
} else if (symbol == Clutter.Down) {
|
||||||
if (me._appDisplay.hasSelected() && !me._appDisplay.selectDown() && me._docDisplay.hasItems()) {
|
if (me._appDisplay.hasSelected() && !me._appDisplay.selectDown() && me._docDisplay.hasItems()) {
|
||||||
me._appDisplay.unsetSelected();
|
me._appDisplay.unsetSelected();
|
||||||
me._docDisplay.selectFirstItem();
|
me._docDisplay.selectFirstItem();
|
||||||
@ -180,10 +182,10 @@ Sideshow.prototype = {
|
|||||||
padding_top: SIDESHOW_SECTION_PADDING_TOP,
|
padding_top: SIDESHOW_SECTION_PADDING_TOP,
|
||||||
spacing: SIDESHOW_SECTION_SPACING});
|
spacing: SIDESHOW_SECTION_SPACING});
|
||||||
|
|
||||||
this._appsText = new Clutter.Label({ color: SIDESHOW_TEXT_COLOR,
|
this._appsText = new Clutter.Text({ color: SIDESHOW_TEXT_COLOR,
|
||||||
font_name: "Sans Bold 14px",
|
font_name: "Sans Bold 14px",
|
||||||
text: "Applications",
|
text: "Applications",
|
||||||
height: LABEL_HEIGHT});
|
height: LABEL_HEIGHT});
|
||||||
this._appsSection.append(this._appsText, Big.BoxPackFlags.EXPAND);
|
this._appsSection.append(this._appsText, Big.BoxPackFlags.EXPAND);
|
||||||
|
|
||||||
|
|
||||||
@ -195,11 +197,11 @@ Sideshow.prototype = {
|
|||||||
this._appsSection.append(this._appDisplay.actor, Big.BoxPackFlags.EXPAND);
|
this._appsSection.append(this._appDisplay.actor, Big.BoxPackFlags.EXPAND);
|
||||||
|
|
||||||
let moreAppsBox = new Big.Box({x_align: Big.BoxAlignment.END});
|
let moreAppsBox = new Big.Box({x_align: Big.BoxAlignment.END});
|
||||||
this._moreAppsText = new Clutter.Label({ color: SIDESHOW_TEXT_COLOR,
|
this._moreAppsText = new Clutter.Text({ color: SIDESHOW_TEXT_COLOR,
|
||||||
font_name: "Sans Bold 14px",
|
font_name: "Sans Bold 14px",
|
||||||
text: "More...",
|
text: "More...",
|
||||||
height: LABEL_HEIGHT,
|
height: LABEL_HEIGHT,
|
||||||
reactive: true});
|
reactive: true});
|
||||||
moreAppsBox.append(this._moreAppsText, Big.BoxPackFlags.EXPAND);
|
moreAppsBox.append(this._moreAppsText, Big.BoxPackFlags.EXPAND);
|
||||||
this._appsSection.append(moreAppsBox, Big.BoxPackFlags.EXPAND);
|
this._appsSection.append(moreAppsBox, Big.BoxPackFlags.EXPAND);
|
||||||
|
|
||||||
@ -212,21 +214,21 @@ Sideshow.prototype = {
|
|||||||
padding_top: SIDESHOW_SECTION_PADDING_TOP,
|
padding_top: SIDESHOW_SECTION_PADDING_TOP,
|
||||||
spacing: SIDESHOW_SECTION_SPACING});
|
spacing: SIDESHOW_SECTION_SPACING});
|
||||||
|
|
||||||
this._docsText = new Clutter.Label({ color: SIDESHOW_TEXT_COLOR,
|
this._docsText = new Clutter.Text({ color: SIDESHOW_TEXT_COLOR,
|
||||||
font_name: "Sans Bold 14px",
|
font_name: "Sans Bold 14px",
|
||||||
text: "Recent Documents",
|
text: "Recent Documents",
|
||||||
height: LABEL_HEIGHT});
|
height: LABEL_HEIGHT});
|
||||||
this._docsSection.append(this._docsText, Big.BoxPackFlags.EXPAND);
|
this._docsSection.append(this._docsText, Big.BoxPackFlags.EXPAND);
|
||||||
|
|
||||||
this._docDisplay = new DocDisplay.DocDisplay(this._width, this._itemDisplayHeight - this._appDisplay.actor.height, SIDESHOW_COLUMNS, SIDESHOW_PAD);
|
this._docDisplay = new DocDisplay.DocDisplay(this._width, this._itemDisplayHeight - this._appDisplay.actor.height, SIDESHOW_COLUMNS, SIDESHOW_PAD);
|
||||||
this._docsSection.append(this._docDisplay.actor, Big.BoxPackFlags.EXPAND);
|
this._docsSection.append(this._docDisplay.actor, Big.BoxPackFlags.EXPAND);
|
||||||
|
|
||||||
let moreDocsBox = new Big.Box({x_align: Big.BoxAlignment.END});
|
let moreDocsBox = new Big.Box({x_align: Big.BoxAlignment.END});
|
||||||
this._moreDocsText = new Clutter.Label({ color: SIDESHOW_TEXT_COLOR,
|
this._moreDocsText = new Clutter.Text({ color: SIDESHOW_TEXT_COLOR,
|
||||||
font_name: "Sans Bold 14px",
|
font_name: "Sans Bold 14px",
|
||||||
text: "More...",
|
text: "More...",
|
||||||
height: LABEL_HEIGHT,
|
height: LABEL_HEIGHT,
|
||||||
reactive: true});
|
reactive: true});
|
||||||
moreDocsBox.append(this._moreDocsText, Big.BoxPackFlags.EXPAND);
|
moreDocsBox.append(this._moreDocsText, Big.BoxPackFlags.EXPAND);
|
||||||
this._docsSection.append(moreDocsBox, Big.BoxPackFlags.EXPAND);
|
this._docsSection.append(moreDocsBox, Big.BoxPackFlags.EXPAND);
|
||||||
|
|
||||||
|
@ -58,8 +58,8 @@ Panel.prototype = {
|
|||||||
statusbutton.release();
|
statusbutton.release();
|
||||||
});
|
});
|
||||||
|
|
||||||
this._clock = new Clutter.Label({ font_name: "Sans Bold 16px",
|
this._clock = new Clutter.Text({ font_name: "Sans Bold 16px",
|
||||||
text: "" });
|
text: "" });
|
||||||
let pad = (PANEL_HEIGHT - this._clock.height) / 2;
|
let pad = (PANEL_HEIGHT - this._clock.height) / 2;
|
||||||
let clockbox = new Big.Box({ padding_top: pad,
|
let clockbox = new Big.Box({ padding_top: pad,
|
||||||
padding_bottom: pad,
|
padding_bottom: pad,
|
||||||
|
@ -50,19 +50,20 @@ RunDialog.prototype = {
|
|||||||
border_width: 0 });
|
border_width: 0 });
|
||||||
boxGroup.add_actor(box);
|
boxGroup.add_actor(box);
|
||||||
|
|
||||||
let label = new Clutter.Label({ color: BOX_TEXT_COLOR,
|
let label = new Clutter.Text({ color: BOX_TEXT_COLOR,
|
||||||
font_name: '18px Sans',
|
font_name: '18px Sans',
|
||||||
text: 'Please enter a command:' });
|
text: 'Please enter a command:' });
|
||||||
label.set_position(6, 6);
|
label.set_position(6, 6);
|
||||||
boxGroup.add_actor(label);
|
boxGroup.add_actor(label);
|
||||||
|
|
||||||
this._entry = new Clutter.Entry({ color: BOX_TEXT_COLOR,
|
this._entry = new Clutter.Text({ color: BOX_TEXT_COLOR,
|
||||||
font_name: '20px Sans Bold',
|
font_name: '20px Sans Bold',
|
||||||
reactive: true,
|
editable: true,
|
||||||
text: '',
|
activatable: true,
|
||||||
entry_padding: 0,
|
singleLineMode: true,
|
||||||
width: BOX_WIDTH - 12,
|
text: '',
|
||||||
height: BOX_HEIGHT - 12 });
|
width: BOX_WIDTH - 12,
|
||||||
|
height: BOX_HEIGHT - 12 });
|
||||||
// TODO: Implement relative positioning using Tidy.
|
// TODO: Implement relative positioning using Tidy.
|
||||||
this._entry.set_position(6, 30);
|
this._entry.set_position(6, 30);
|
||||||
boxGroup.add_actor(this._entry);
|
boxGroup.add_actor(this._entry);
|
||||||
@ -106,7 +107,7 @@ RunDialog.prototype = {
|
|||||||
this._group.show_all();
|
this._group.show_all();
|
||||||
|
|
||||||
this._entry.connect('key-press-event', function(o, e) {
|
this._entry.connect('key-press-event', function(o, e) {
|
||||||
if (e.get_code() == 9) {
|
if (Shell.get_event_key_symbol(e) == Clutter.Escape) {
|
||||||
me.hide();
|
me.hide();
|
||||||
me.emit('cancel');
|
me.emit('cancel');
|
||||||
return true;
|
return true;
|
||||||
|
@ -57,10 +57,10 @@ function WindowClone(realWindow) {
|
|||||||
|
|
||||||
WindowClone.prototype = {
|
WindowClone.prototype = {
|
||||||
_init : function(realWindow) {
|
_init : function(realWindow) {
|
||||||
this.actor = new Clutter.CloneTexture({ parent_texture: realWindow.get_texture(),
|
this.actor = new Clutter.Clone({ source: realWindow.get_texture(),
|
||||||
reactive: true,
|
reactive: true,
|
||||||
x: realWindow.x,
|
x: realWindow.x,
|
||||||
y: realWindow.y });
|
y: realWindow.y });
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
this.realWindow = realWindow;
|
this.realWindow = realWindow;
|
||||||
this.metaWindow = realWindow.meta_window;
|
this.metaWindow = realWindow.meta_window;
|
||||||
@ -166,11 +166,11 @@ WindowClone.prototype = {
|
|||||||
Shell.clutter_texture_set_from_pixbuf(iconTexture, icon);
|
Shell.clutter_texture_set_from_pixbuf(iconTexture, icon);
|
||||||
box.append(iconTexture, Big.BoxPackFlags.NONE);
|
box.append(iconTexture, Big.BoxPackFlags.NONE);
|
||||||
|
|
||||||
let title = new Clutter.Label({ color: WINDOWCLONE_TITLE_COLOR,
|
let title = new Clutter.Text({ color: WINDOWCLONE_TITLE_COLOR,
|
||||||
font_name: "Sans 12",
|
font_name: "Sans 12",
|
||||||
text: this.metaWindow.title,
|
text: this.metaWindow.title,
|
||||||
ellipsize: Pango.EllipsizeMode.END
|
ellipsize: Pango.EllipsizeMode.END
|
||||||
});
|
});
|
||||||
box.append(title, Big.BoxPackFlags.EXPAND);
|
box.append(title, Big.BoxPackFlags.EXPAND);
|
||||||
// Get and cache the expected width (just the icon), with spacing, plus title
|
// Get and cache the expected width (just the icon), with spacing, plus title
|
||||||
box.fullWidth = box.width;
|
box.fullWidth = box.width;
|
||||||
@ -237,8 +237,8 @@ function DesktopClone(window) {
|
|||||||
DesktopClone.prototype = {
|
DesktopClone.prototype = {
|
||||||
_init : function(window) {
|
_init : function(window) {
|
||||||
if (window) {
|
if (window) {
|
||||||
this.actor = new Clutter.CloneTexture({ parent_texture: window.get_texture(),
|
this.actor = new Clutter.Clone({ source: window.get_texture(),
|
||||||
reactive: true });
|
reactive: true });
|
||||||
} else {
|
} else {
|
||||||
let global = Shell.Global.get();
|
let global = Shell.Global.get();
|
||||||
this.actor = new Clutter.Rectangle({ color: global.stage.color,
|
this.actor = new Clutter.Rectangle({ color: global.stage.color,
|
||||||
|
@ -92,8 +92,8 @@ Shell-0.1.gir: $(metacity) $(G_IR_SCANNER) Big-1.0.gir libgnome-shell.la Makefil
|
|||||||
$(G_IR_SCANNER) \
|
$(G_IR_SCANNER) \
|
||||||
--namespace=Shell \
|
--namespace=Shell \
|
||||||
--nsversion=0.1 \
|
--nsversion=0.1 \
|
||||||
--add-include-path=$(libdir)/metacity/ \
|
--add-include-path=$(libdir)/metacity/ \
|
||||||
--include=Clutter-0.8 \
|
--include=Clutter-0.9 \
|
||||||
--include=Meta-2.25 \
|
--include=Meta-2.25 \
|
||||||
--add-include-path=$(builddir) \
|
--add-include-path=$(builddir) \
|
||||||
--include=Big-1.0 \
|
--include=Big-1.0 \
|
||||||
@ -106,7 +106,7 @@ CLEANFILES += Shell-1.0.gir
|
|||||||
|
|
||||||
# The dependency on libgnome-shell.la here is because g-ir-compiler opens it
|
# The dependency on libgnome-shell.la here is because g-ir-compiler opens it
|
||||||
# (not the fake library, since we've already done the rewriting)
|
# (not the fake library, since we've already done the rewriting)
|
||||||
Shell-0.1.typelib: libgnome-shell.la Shell-0.1.gir
|
Shell-0.1.typelib: libgnome-shell.la Shell-0.1.gir Big-1.0.gir
|
||||||
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. g-ir-compiler --includedir=$(builddir) --includedir=$(libdir)/metacity/ Shell-0.1.gir -o $@
|
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. g-ir-compiler --includedir=$(builddir) --includedir=$(libdir)/metacity/ Shell-0.1.gir -o $@
|
||||||
CLEANFILES += Shell-1.0.typelib
|
CLEANFILES += Shell-1.0.typelib
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ Tidy-1.0.gir: $(metacity) $(G_IR_SCANNER) libgnome-shell.la libtidy-1.0.la Makef
|
|||||||
$(G_IR_SCANNER) \
|
$(G_IR_SCANNER) \
|
||||||
--namespace=Tidy \
|
--namespace=Tidy \
|
||||||
--nsversion=1.0 \
|
--nsversion=1.0 \
|
||||||
--include=Clutter-0.8 \
|
--include=Clutter-0.9 \
|
||||||
--program=metacity \
|
--program=metacity \
|
||||||
--program-arg=--mutter-plugins=$$(pwd)/libgnome-shell.la \
|
--program-arg=--mutter-plugins=$$(pwd)/libgnome-shell.la \
|
||||||
$(tidy_source_h) \
|
$(tidy_source_h) \
|
||||||
@ -132,7 +132,8 @@ Big-1.0.gir: $(metacity) $(G_IR_SCANNER) libgnome-shell.la libbig-1.0.la Makefil
|
|||||||
$(G_IR_SCANNER) \
|
$(G_IR_SCANNER) \
|
||||||
--namespace=Big \
|
--namespace=Big \
|
||||||
--nsversion=1.0 \
|
--nsversion=1.0 \
|
||||||
--include=ClutterCairo-0.8 \
|
--include=Clutter-0.9 \
|
||||||
|
--include=GdkPixbuf-2.0 \
|
||||||
--program=metacity \
|
--program=metacity \
|
||||||
--program-arg=--mutter-plugins=$$(pwd)/libgnome-shell.la \
|
--program-arg=--mutter-plugins=$$(pwd)/libgnome-shell.la \
|
||||||
$(big_source_h) \
|
$(big_source_h) \
|
||||||
|
@ -421,6 +421,15 @@ shell_get_categories_for_desktop_file(const char *desktop_file_name)
|
|||||||
return categories_list;
|
return categories_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guint16
|
||||||
|
shell_get_event_key_symbol(ClutterEvent *event)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail(event->type == CLUTTER_KEY_PRESS ||
|
||||||
|
event->type == CLUTTER_KEY_RELEASE, 0);
|
||||||
|
|
||||||
|
return event->key.keyval;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* shell_global_get:
|
* shell_global_get:
|
||||||
*
|
*
|
||||||
|
@ -38,6 +38,8 @@ GdkPixbuf *shell_get_thumbnail_for_recent_info(GtkRecentInfo *recent_info);
|
|||||||
|
|
||||||
GSList *shell_get_categories_for_desktop_file(const char *desktop_file_name);
|
GSList *shell_get_categories_for_desktop_file(const char *desktop_file_name);
|
||||||
|
|
||||||
|
guint16 shell_get_event_key_symbol(ClutterEvent *event);
|
||||||
|
|
||||||
ShellGlobal *shell_global_get (void);
|
ShellGlobal *shell_global_get (void);
|
||||||
|
|
||||||
void shell_global_grab_dbus_service (ShellGlobal *global);
|
void shell_global_grab_dbus_service (ShellGlobal *global);
|
||||||
|
@ -50,7 +50,7 @@ struct _ShellStatusMenuPrivate {
|
|||||||
|
|
||||||
ClutterTexture *user_icon;
|
ClutterTexture *user_icon;
|
||||||
BigBox *name_box;
|
BigBox *name_box;
|
||||||
ClutterLabel *name;
|
ClutterText *name;
|
||||||
|
|
||||||
GtkWidget *menu;
|
GtkWidget *menu;
|
||||||
GtkWidget *account_item;
|
GtkWidget *account_item;
|
||||||
@ -110,15 +110,14 @@ reset_icon (ShellStatusMenu *status)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_label (ShellStatusMenu *status)
|
update_name_text (ShellStatusMenu *status)
|
||||||
{
|
{
|
||||||
ShellStatusMenuPrivate *priv = status->priv;
|
ShellStatusMenuPrivate *priv = status->priv;
|
||||||
char *markup;
|
char *markup;
|
||||||
|
|
||||||
markup = g_strdup_printf ("<b>%s</b>",
|
markup = g_markup_printf_escaped("<b>%s</b>",
|
||||||
gdm_user_get_real_name (GDM_USER (priv->user)));
|
gdm_user_get_real_name (GDM_USER (priv->user)));
|
||||||
clutter_label_set_use_markup (priv->name, TRUE);
|
clutter_text_set_markup (priv->name, markup);
|
||||||
clutter_label_set_text (priv->name, markup);
|
|
||||||
g_free (markup);
|
g_free (markup);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +134,7 @@ user_notify_display_name_cb (GObject *object,
|
|||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
ShellStatusMenu *status)
|
ShellStatusMenu *status)
|
||||||
{
|
{
|
||||||
update_label (status);
|
update_name_text (status);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -155,7 +154,7 @@ setup_current_user (ShellStatusMenu *status)
|
|||||||
name = _("Unknown");
|
name = _("Unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
update_label (status);
|
update_name_text (status);
|
||||||
|
|
||||||
if (priv->user != NULL)
|
if (priv->user != NULL)
|
||||||
{
|
{
|
||||||
@ -541,7 +540,7 @@ shell_status_menu_init (ShellStatusMenu *status)
|
|||||||
priv->name_box = BIG_BOX (big_box_new (BIG_BOX_ORIENTATION_VERTICAL));
|
priv->name_box = BIG_BOX (big_box_new (BIG_BOX_ORIENTATION_VERTICAL));
|
||||||
g_object_set (G_OBJECT (priv->name_box), "y-align", BIG_BOX_ALIGNMENT_CENTER, NULL);
|
g_object_set (G_OBJECT (priv->name_box), "y-align", BIG_BOX_ALIGNMENT_CENTER, NULL);
|
||||||
big_box_append (BIG_BOX (status), CLUTTER_ACTOR (priv->name_box), BIG_BOX_PACK_EXPAND);
|
big_box_append (BIG_BOX (status), CLUTTER_ACTOR (priv->name_box), BIG_BOX_PACK_EXPAND);
|
||||||
priv->name = CLUTTER_LABEL (clutter_label_new ());
|
priv->name = CLUTTER_TEXT (clutter_text_new ());
|
||||||
big_box_append (BIG_BOX (priv->name_box), CLUTTER_ACTOR (priv->name), BIG_BOX_PACK_EXPAND);
|
big_box_append (BIG_BOX (priv->name_box), CLUTTER_ACTOR (priv->name), BIG_BOX_PACK_EXPAND);
|
||||||
|
|
||||||
priv->manager = gdm_user_manager_ref_default ();
|
priv->manager = gdm_user_manager_ref_default ();
|
||||||
@ -622,4 +621,4 @@ shell_status_menu_toggle (ShellStatusMenu *status, ClutterEvent *event)
|
|||||||
gtk_menu_popup (GTK_MENU (priv->menu), NULL, NULL, position_menu,
|
gtk_menu_popup (GTK_MENU (priv->menu), NULL, NULL, position_menu,
|
||||||
status, 1, event->button.time);
|
status, 1, event->button.time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,6 @@
|
|||||||
<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
|
||||||
<!-- vim:set ts=2 expandtab: -->
|
<!-- vim:set ts=2 expandtab: -->
|
||||||
<moduleset>
|
<moduleset>
|
||||||
<repository type="svn" name="svn.gnome.org" default="yes"
|
|
||||||
href="http://svn.gnome.org/svn/">
|
|
||||||
<mirror type="bzr" href="http://bzr-mirror.gnome.org/bzr/" trunk-path="trunk" />
|
|
||||||
<mirror type="git" href="git://git-mirror.gnome.org/git/" />
|
|
||||||
</repository>
|
|
||||||
<repository type="git" name="fishsoup.net"
|
<repository type="git" name="fishsoup.net"
|
||||||
href="git://git.fishsoup.net/"/>
|
href="git://git.fishsoup.net/"/>
|
||||||
<repository type="git" name="git.clutter-project.org"
|
<repository type="git" name="git.clutter-project.org"
|
||||||
@ -23,8 +18,6 @@
|
|||||||
<branch repo="git.gnome.org" module="gir-repository"/>
|
<branch repo="git.gnome.org" module="gir-repository"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dep package="gobject-introspection"/>
|
<dep package="gobject-introspection"/>
|
||||||
<dep package="clutter"/>
|
|
||||||
<dep package="clutter-cairo"/>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</autotools>
|
</autotools>
|
||||||
|
|
||||||
@ -39,11 +32,10 @@
|
|||||||
</autotools>
|
</autotools>
|
||||||
|
|
||||||
<autotools id="clutter">
|
<autotools id="clutter">
|
||||||
<branch repo="git.clutter-project.org" module="clutter" revision="clutter-0-8"/>
|
<branch repo="git.clutter-project.org" module="clutter"/>
|
||||||
</autotools>
|
<dependencies>
|
||||||
|
<dep package="gobject-introspection"/>
|
||||||
<autotools id="clutter-cairo">
|
</dependencies>
|
||||||
<branch repo="git.clutter-project.org" module="clutter-cairo" revision="clutter-cairo-0-8"/>
|
|
||||||
</autotools>
|
</autotools>
|
||||||
|
|
||||||
<autotools id="metacity-clutter" autogenargs="--with-clutter">
|
<autotools id="metacity-clutter" autogenargs="--with-clutter">
|
||||||
|
Loading…
Reference in New Issue
Block a user