- plenty of fixes for ACME integration
This commit is contained in:
parent
830d7a5fe5
commit
a634112d99
6 changed files with 71 additions and 46 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-01-14 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* schemas/apps_gnome_settings_daemon_keybindings.schemas.in:
|
||||
Change the labels for a couple of keys, make them more of the style
|
||||
of the current ones
|
||||
|
||||
2004-01-08 Carlos Perelló Marín <carlos@gnome.org>
|
||||
|
||||
* configure.in: The localization capplet is disabled until we remove
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
2004-01-14 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* Makefile.am: fix compilation with FB Level enabled
|
||||
* actions/acme.h: fix a stupid typo that made the WWW key not work
|
||||
* gnome-settings-multimedia-keys.c: (acme_get_screen_from_event),
|
||||
(acme_filter_events), (gnome_settings_multimedia_keys_init):
|
||||
only get the current screen if we actually need to, fix locating the
|
||||
glade file when compiling with a prefix not ending in '/'
|
||||
|
||||
2004-01-13 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* gnome-settings-multimedia-keys.c: (acme_filter_events): let's
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
SUBDIRS = xrdb actions
|
||||
|
||||
if HAVE_FB
|
||||
FB_CFLAGS = -DHAVE_FB
|
||||
endif
|
||||
|
||||
INCLUDES=$(LIBXKLAVIER_CFLAGS) $(GNOME_SETTINGS_DAEMON_CFLAGS) -I$(top_srcdir)/libbackground -I$(top_srcdir) \
|
||||
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
|
||||
-DESD_SERVER="\"$(ESD_SERVER)\"" \
|
||||
-DDATADIR="\"$(datadir)\"" \
|
||||
-DPIXMAPSDIR="\"$(GNOMECC_PIXMAPS_DIR)\""
|
||||
-DPIXMAPSDIR="\"$(GNOMECC_PIXMAPS_DIR)\"" \
|
||||
$(FB_CFLAGS)
|
||||
|
||||
libexec_PROGRAMS=gnome-settings-daemon
|
||||
|
||||
gnome_settings_daemon_SOURCES = \
|
||||
|
|
|
@ -72,7 +72,7 @@ static struct {
|
|||
{ SLEEP_KEY, GCONF_BINDING_DIR "/sleep", NULL },
|
||||
{ SCREENSAVER_KEY, GCONF_BINDING_DIR "/screensaver", NULL },
|
||||
{ HELP_KEY, GCONF_BINDING_DIR "/help", NULL },
|
||||
{ WWW_KEY, GCONF_BINDING_DIR "/www_key_str", NULL },
|
||||
{ WWW_KEY, GCONF_BINDING_DIR "/www", NULL },
|
||||
#ifdef USE_FBLEVEL
|
||||
{ BRIGHT_DOWN_KEY, GCONF_BINDING_DIR "/brightness_down", NULL },
|
||||
{ BRIGHT_UP_KEY, GCONF_BINDING_DIR "/brightness_up", NULL },
|
||||
|
|
|
@ -814,34 +814,37 @@ do_action (int type, Acme *acme)
|
|||
}
|
||||
}
|
||||
|
||||
static GdkScreen *
|
||||
acme_get_screen_from_event (Acme *acme, XAnyEvent *xanyev)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkScreen *screen;
|
||||
GSList *l;
|
||||
|
||||
/* Look for which screen we're receiving events */
|
||||
for (l = acme->screens; l != NULL; l = l->next)
|
||||
{
|
||||
screen = (GdkScreen *) l->data;
|
||||
window = gdk_screen_get_root_window (screen);
|
||||
|
||||
if (GDK_WINDOW_XID (window) == xanyev->window)
|
||||
{
|
||||
return screen;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GdkFilterReturn
|
||||
acme_filter_events (GdkXEvent *xevent, GdkEvent *event, gpointer data)
|
||||
{
|
||||
Acme *acme = (Acme *) data;
|
||||
XEvent *xev = (XEvent *) xevent;
|
||||
XAnyEvent *xanyev = (XAnyEvent *) xevent;
|
||||
GdkScreen *event_screen = NULL;
|
||||
guint keycode, state;
|
||||
GSList *l;
|
||||
int i;
|
||||
|
||||
/* Look for which screen we're receiving events */
|
||||
for (l = acme->screens; (l != NULL) && (event_screen == NULL);
|
||||
l = l->next)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkScreen *screen;
|
||||
|
||||
screen = (GdkScreen *) l->data;
|
||||
window = gdk_screen_get_root_window (screen);
|
||||
|
||||
if (GDK_WINDOW_XID (window) == xanyev->window)
|
||||
{
|
||||
event_screen = screen;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
keycode = xev->xkey.keycode;
|
||||
state = xev->xkey.state;
|
||||
|
||||
|
@ -869,7 +872,8 @@ acme_filter_events (GdkXEvent *xevent, GdkEvent *event, gpointer data)
|
|||
return GDK_FILTER_CONTINUE;
|
||||
}
|
||||
|
||||
acme->current_screen = event_screen;
|
||||
acme->current_screen = acme_get_screen_from_event
|
||||
(acme, xanyev);
|
||||
|
||||
do_action (keys[i].key_type, acme);
|
||||
return GDK_FILTER_REMOVE;
|
||||
|
@ -890,7 +894,7 @@ gnome_settings_multimedia_keys_init (GConfClient *client)
|
|||
acme->conf_client = client;
|
||||
|
||||
glade_gnome_init ();
|
||||
acme->xml = glade_xml_new (DATADIR "control-center-2.0/interfaces/acme.glade", NULL, NULL);
|
||||
acme->xml = glade_xml_new (DATADIR "/control-center-2.0/interfaces/acme.glade", NULL, NULL);
|
||||
|
||||
if (acme->xml == NULL) {
|
||||
acme_error (_("Couldn't load the Glade file.\n"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Volume mute</short>
|
||||
<long>Volume mute key's shortcut</long>
|
||||
<long>Volume mute's shortcut</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Volume down</short>
|
||||
<long>Volume down key's shortcut.</long>
|
||||
<long>Volume down's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -55,8 +55,8 @@
|
|||
<type>string</type>
|
||||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Power</short>
|
||||
<long>Power key's shortcut.</long>
|
||||
<short>Log Out</short>
|
||||
<long>Log Out's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
|||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Eject</short>
|
||||
<long>Eject key's shortcut.</long>
|
||||
<long>Eject's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -80,7 +80,7 @@
|
|||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Home Folder</short>
|
||||
<long>My Home Folder shortcut.</long>
|
||||
<long>My Home Folder's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -92,7 +92,7 @@
|
|||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Search</short>
|
||||
<long>Search key's shortcut.</long>
|
||||
<long>Search's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -104,7 +104,7 @@
|
|||
<default></default>
|
||||
<locale name="C">
|
||||
<short>E-mail</short>
|
||||
<long>E-mail key's shortcut.</long>
|
||||
<long>E-mail's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -116,7 +116,7 @@
|
|||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Sleep</short>
|
||||
<long>Sleep key's shortcut.</long>
|
||||
<long>Sleep's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -127,8 +127,8 @@
|
|||
<type>string</type>
|
||||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Activate Screensaver</short>
|
||||
<long>Screensaver key's shortcut.</long>
|
||||
<short>Lock Screen</short>
|
||||
<long>Lock Screen's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -140,7 +140,7 @@
|
|||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Launch Help Browser</short>
|
||||
<long>Help key's shortcut.</long>
|
||||
<long>Launch Help Browser's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -152,7 +152,7 @@
|
|||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Launch Web Browser</short>
|
||||
<long>World Wide Web key's shortcut.</long>
|
||||
<long>Launch Web Browser's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -164,7 +164,7 @@
|
|||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Brightness down</short>
|
||||
<long>Brightness down key's shortcut.</long>
|
||||
<long>Brightness down's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -176,7 +176,7 @@
|
|||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Brightness up</short>
|
||||
<long>Brightness up key's shortcut.</long>
|
||||
<long>Brightness up's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -187,7 +187,7 @@
|
|||
<type>string</type>
|
||||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Play CD-Rom</short>
|
||||
<short>Play (or Play/Pause)</short>
|
||||
<long>Play (or Play/Pause) key's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
@ -199,7 +199,7 @@
|
|||
<type>string</type>
|
||||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Pause CD-Rom</short>
|
||||
<short>Pause</short>
|
||||
<long>Pause key's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
@ -211,8 +211,8 @@
|
|||
<type>string</type>
|
||||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Stop CD-Rom</short>
|
||||
<long>Stop key's shortcut.</long>
|
||||
<short>Stop playback key</short>
|
||||
<long>Stop playback key's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -223,8 +223,8 @@
|
|||
<type>string</type>
|
||||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Previous CD-Rom Track</short>
|
||||
<long>Previous (audio) key's shortcut.</long>
|
||||
<short>Skip to Previous track</short>
|
||||
<long>Previous track key's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
@ -235,8 +235,8 @@
|
|||
<type>string</type>
|
||||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Next CD-Rom Track</short>
|
||||
<long>Next (audio) key's shortcut.</long>
|
||||
<short>Skip to Next track</short>
|
||||
<long>Next track key's shortcut.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue