Compare commits

...

No commits in common. 'master' and 'pristine-tar' have entirely different histories.

56 changed files with 1 additions and 13367 deletions
Split View
  1. +0
    -2
      .gitignore
  2. +0
    -0
      AUTHORS
  3. +0
    -339
      COPYING
  4. +0
    -1
      ChangeLog
  5. +0
    -38
      Makefile.am
  6. +0
    -0
      README
  7. +0
    -68
      README.md
  8. +0
    -164
      acinclude.m4
  9. +0
    -11
      autogen.sh
  10. +0
    -123
      configure.ac
  11. +0
    -6
      debian/changelog
  12. +0
    -1
      debian/compat
  13. +0
    -75
      debian/control
  14. +0
    -76
      debian/copyright
  15. +0
    -1
      debian/gir1.2-xapp-1.0.install.in
  16. +0
    -4
      debian/libxapp-dev.install
  17. +0
    -2
      debian/libxapp1.install
  18. +0
    -24
      debian/libxapp1.symbols
  19. +0
    -1166
      debian/patches/fix-licensing.patch
  20. +0
    -112
      debian/patches/gnome-common-migration.patch
  21. +0
    -2
      debian/patches/series
  22. +0
    -16
      debian/rules
  23. +0
    -1
      debian/source/format
  24. +0
    -3
      debian/watch
  25. +0
    -4
      debian/xapps-common.install
  26. +0
    -5
      files/Makefile.am
  27. +0
    -28
      files/usr/bin/pastebin
  28. +0
    -11
      files/usr/bin/upload-system-info
  29. +0
    -32
      files/usr/bin/xfce4-set-wallpaper
  30. +0
    -99
      files/usr/share/icons/hicolor/scalable/actions/xapp-search-entire-word-symbolic.svg
  31. +0
    -73
      files/usr/share/icons/hicolor/scalable/actions/xapp-search-wrap-symbolic.svg
  32. +0
    -86
      files/usr/share/icons/hicolor/scalable/actions/xapp-text-case-symbolic.svg
  33. +0
    -72
      libxapp/Makefile.am
  34. +0
    -676
      libxapp/xapp-kbd-layout-controller.c
  35. +0
    -70
      libxapp/xapp-kbd-layout-controller.h
  36. +0
    -155
      libxapp/xapp-monitor-blanker.c
  37. +0
    -43
      libxapp/xapp-monitor-blanker.h
  38. +0
    -11
      libxapp/xapp-uninstalled.pc.in
  39. +0
    -12
      libxapp/xapp.pc.in
  40. +0
    -67
      m4/gtk-doc.m4
  41. +0
    -237
      m4/intltool.m4
  42. +0
    -8388
      m4/libtool.m4
  43. +0
    -437
      m4/ltoptions.m4
  44. +0
    -124
      m4/ltsugar.m4
  45. +0
    -23
      m4/ltversion.m4
  46. +0
    -99
      m4/lt~obsolete.m4
  47. +0
    -3
      po/LINGUAS
  48. +0
    -222
      po/Makefile.in.in
  49. +0
    -5
      po/POTFILES.in
  50. +0
    -3
      po/POTFILES.skip
  51. +0
    -0
      po/fr.po
  52. +0
    -26
      schemas/Makefile.am
  53. +0
    -6
      schemas/org.x.apps.gschema.xml.in.in
  54. +0
    -115
      test-scripts/xapp-kbd-layout-controller
  55. BIN
      xapp_1.0.2.orig.tar.gz.delta
  56. +1
    -0
      xapp_1.0.2.orig.tar.gz.id

+ 0
- 2
.gitignore View File

@@ -1,2 +0,0 @@
# Quilt patches
.pc/

+ 0
- 0
AUTHORS View File


+ 0
- 339
COPYING View File

@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.

When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.

We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and
modification follow.

GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.

b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.

c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,

b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.

<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

+ 0
- 1
ChangeLog View File

@@ -1 +0,0 @@


+ 0
- 38
Makefile.am View File

@@ -1,38 +0,0 @@
SUBDIRS = libxapp po schemas files

ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

DISTCHECK_CONFIGURE_FLAGS = --enable-introspection

@INTLTOOL_XML_RULE@

MAINTAINERCLEANFILES = \
$(srcdir)/aclocal.m4 \
$(srcdir)/config.guess \
$(srcdir)/config.h.in \
$(srcdir)/config.sub \
$(srcdir)/depcomp \
$(srcdir)/install-sh \
$(srcdir)/ltmain.sh \
$(srcdir)/missing \
$(srcdir)/mkinstalldirs \
`find "$(srcdir)" -type f -name Makefile.in -print` \
$(srcdir)/configure \
$(srcdir)/m4/gnome-doc-utils.m4 \
$(srcdir)/m4/gtk-doc.m4 \
$(srcdir)/m4/intltool.m4

dist-hook:
$(AM_V_GEN)if test -d "$(srcdir)/.git"; then \
( echo '# Generated by Makefile. Do not edit.'; echo; \
GIT_DIR="$(top_srcdir)/.git" ./missing --run \
git log $(CHANGELOG_GIT_RANGE) --no-color -M -C --name-status ) \
> ChangeLog.tmp \
&& mv -f ChangeLog.tmp $(distdir)/ChangeLog \
|| ( rm -f ChangeLog.tmp ; echo Failed to generate ChangeLog >&2 ); \
else \
echo A git checkout is required to generate ChangeLog >&2; \
fi

GITIGNOREFILES = $(PACKAGE)-\*.tar.{gz,bz2,xz}
-include $(top_srcdir)/git.mk

+ 0
- 0
README View File


+ 0
- 68
README.md View File

@@ -1,68 +0,0 @@
This project gathers the components which are common to multiple desktop environments and required to implement cross-DE solutions.

# xapp-common

A set of resources and tools.

# libxapp

A library available in C, Python and other languages (via Gobject Introspection).

# Scope

In the long term Xapps are there to provide applications to users in multiple DEs, but also to provide building blocks, resources and libraries to Linux developers who want to develop applications which work well in multiple DEs.

This project is still relatively new though and we can't yet commit to a stable ABI.

You are welcome to use libxapp or xapps-common in your application, but if you do, please make sure to tell us, so that we can communicate with you going forward about any potential changes.

## XAppMonitorBlanker

XAppMonitorBlanker is used to blank other monitors. It takes a window as an argument and blanks all the monitors but the one where the window is located.

This is particularly useful in multi-monitor situations, for presentations, full screen media playback etc..

`XAppMonitorBlanker *xapp_monitor_blanker_new (void);`

`void xapp_monitor_blanker_blank_other_monitors (XAppMonitorBlanker *self, GtkWindow *window);`

`void xapp_monitor_blanker_unblank_monitors (XAppMonitorBlanker *self);`

`gboolean xapp_monitor_blanker_are_monitors_blanked (XAppMonitorBlanker *self);`

This is used by:

- xplayer

## XAppKbdLayoutController

XAppKbdLayoutController is used to get a keyboard layout code or flag for a given locale.

`XAppKbdLayoutController *xapp_kbd_layout_controller_new (void);`

`gboolean xapp_kbd_layout_controller_get_enabled (XAppKbdLayoutController *controller);`

`guint xapp_kbd_layout_controller_get_current_group (XAppKbdLayoutController *controller);`

`void xapp_kbd_layout_controller_set_current_group (XAppKbdLayoutController *controller, guint group);`

`void xapp_kbd_layout_controller_next_group (XAppKbdLayoutController *controller);`

`void xapp_kbd_layout_controller_previous_group (XAppKbdLayoutController *controller);`

`gchar *xapp_kbd_layout_controller_get_current_name (XAppKbdLayoutController *controller);`

`gchar **xapp_kbd_layout_controller_get_all_names (XAppKbdLayoutController *controller);`

`gchar *xapp_kbd_layout_controller_get_current_icon_name (XAppKbdLayoutController *controller);`

`gchar *xapp_kbd_layout_controller_get_icon_name_for_group (XAppKbdLayoutController *controller, guint group);`

`gchar *xapp_kbd_layout_controller_get_short_name (XAppKbdLayoutController *controller);`

`gchar *xapp_kbd_layout_controller_get_short_name_for_group (XAppKbdLayoutController *controller, guint group);`

This is used by:

- cinnamon-screensaver
- cinnamon keyboard applet

+ 0
- 164
acinclude.m4 View File

@@ -1,164 +0,0 @@
# Configure paths for ESD
# Manish Singh 98-9-30
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor

dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
dnl
AC_DEFUN([AM_PATH_ESD],
[dnl
dnl Get the cflags and libraries from the esd-config script
dnl
AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
esd_prefix="$withval", esd_prefix="")
AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
esd_exec_prefix="$withval", esd_exec_prefix="")
AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
, enable_esdtest=yes)

if test x$esd_exec_prefix != x ; then
esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
if test x${ESD_CONFIG+set} != xset ; then
ESD_CONFIG=$esd_exec_prefix/bin/esd-config
fi
fi
if test x$esd_prefix != x ; then
esd_args="$esd_args --prefix=$esd_prefix"
if test x${ESD_CONFIG+set} != xset ; then
ESD_CONFIG=$esd_prefix/bin/esd-config
fi
fi

AC_PATH_PROG(ESD_CONFIG, esd-config, no)
min_esd_version=ifelse([$1], ,0.2.5,$1)
AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
no_esd=""
if test "$ESD_CONFIG" = "no" ; then
no_esd=yes
else
ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`

esd_major_version=`$ESD_CONFIG $esd_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
esd_minor_version=`$ESD_CONFIG $esd_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_esdtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $ESD_CFLAGS"
LIBS="$LIBS $ESD_LIBS"
dnl
dnl Now check if the installed ESD is sufficiently new. (Also sanity
dnl checks the results of esd-config to some extent
dnl
rm -f conf.esdtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <esd.h>

char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}

int main ()
{
int major, minor, micro;
char *tmp_version;

system ("touch conf.esdtest");

/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_esd_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_esd_version");
exit(1);
}

if (($esd_major_version > major) ||
(($esd_major_version == major) && ($esd_minor_version > minor)) ||
(($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
printf("*** to point to the correct copy of esd-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}

],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_esd" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$ESD_CONFIG" = "no" ; then
echo "*** The esd-config script installed by ESD could not be found"
echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the ESD_CONFIG environment variable to the"
echo "*** full path to esd-config."
else
if test -f conf.esdtest ; then
:
else
echo "*** Could not run ESD test program, checking why..."
CFLAGS="$CFLAGS $ESD_CFLAGS"
LIBS="$LIBS $ESD_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <esd.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding ESD or finding the wrong"
echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means ESD was incorrectly installed"
echo "*** or that you have moved ESD since it was installed. In the latter case, you"
echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
ESD_CFLAGS=""
ESD_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(ESD_CFLAGS)
AC_SUBST(ESD_LIBS)
rm -f conf.esdtest
])

+ 0
- 11
autogen.sh View File

@@ -1,11 +0,0 @@
#!/bin/sh

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

which gnome-autogen.sh || {
echo "You need to install gnome-common from GNOME Git (or from"
echo "your OS vendor's package manager)."
exit 1
}
. gnome-autogen.sh

+ 0
- 123
configure.ac View File

@@ -1,123 +0,0 @@

AC_INIT(xapp, 1.0.2)
AC_CONFIG_SRCDIR(libxapp)

AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz tar-ustar])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

AC_CONFIG_HEADERS([config.h])

AC_CONFIG_MACRO_DIR([m4])

# Before making a release, the LT_VERSION string should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
# been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
# change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A

LT_VERSION=1:0:0
AC_SUBST(LT_VERSION)

LT_PREREQ([2.2.6])
LT_INIT([dlopen win32-dll disable-static])

IT_PROG_INTLTOOL([0.40.6])

AC_PROG_CC
PKG_PROG_PKG_CONFIG

GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES

AC_ARG_ENABLE(deprecation_flags,
[AC_HELP_STRING([--enable-deprecation-flags],
[use *_DISABLE_DEPRECATED flags @<:@default=no@:>@])],,
[enable_deprecation_flags=no])

if test "x$enable_deprecation_flags" = "xyes"; then
DISABLE_DEPRECATED_CFLAGS=$DISABLE_DEPRECATED
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi

dnl If you add a version number here, you *must* add an AC_SUBST line for
dnl it too, or it will never make it into the spec file!

GDK_PIXBUF_REQUIRED=2.22.0
GTK_REQUIRED=3.3.16
GLIB_REQUIRED=2.37.3

AC_SUBST(GTK_REQUIRED)
AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GDK_PIXBUF_REQUIRED)

PKG_CHECK_MODULES(XLIB, x11,
X11_PACKAGE=x11,
[X11_PACKAGE=
AC_PATH_XTRA
if test "x$no_x" = xyes; then
AC_MSG_ERROR("no (requires X development libraries)")
else
XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
XLIB_CFLAGS=$X_CFLAGS
fi])
AC_SUBST(X11_PACKAGE)
AC_SUBST(XLIB_CFLAGS)
AC_SUBST(XLIB_LIBS)

dnl pkg-config dependency checks

PKG_CHECK_MODULES(XAPP, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED
gtk+-3.0 >= $GTK_REQUIRED
glib-2.0 >= $GLIB_REQUIRED
gio-2.0 >= $GLIB_REQUIRED
cairo
libgnomekbdui)

dnl Language Support

GETTEXT_PACKAGE=xapp
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The gettext translation domain])
AC_SUBST(GETTEXT_PACKAGE)

AM_GLIB_GNU_GETTEXT

GLIB_GSETTINGS

GOBJECT_INTROSPECTION_CHECK([0.9.7])

AC_CONFIG_FILES([
Makefile
libxapp/Makefile
libxapp/xapp.pc
libxapp/xapp-uninstalled.pc
schemas/Makefile
po/Makefile.in
files/Makefile
])

AC_OUTPUT

dnl ---------------------------------------------------------------------------
dnl - Show summary
dnl ---------------------------------------------------------------------------

echo "
prefix: ${prefix}
exec_prefix: ${exec_prefix}
libdir: ${libdir}
bindir: ${bindir}
sbindir: ${sbindir}
sysconfdir: ${sysconfdir}
localstatedir: ${localstatedir}
datadir: ${datadir}
source code location: ${srcdir}
compiler: ${CC}
cflags: ${CFLAGS}
Maintainer mode: ${USE_MAINTAINER_MODE}
Use *_DISABLE_DEPRECATED: ${enable_deprecation_flags}

"

+ 0
- 6
debian/changelog View File

@@ -1,6 +0,0 @@
xapp (1.0.2-1) unstable; urgency=medium

* Initial version
* Added gnome-common-migration.patch

-- Margarita Manterola <marga@debian.org> Tue, 06 Dec 2016 19:23:57 -0300

+ 0
- 1
debian/compat View File

@@ -1 +0,0 @@
9

+ 0
- 75
debian/control View File

@@ -1,75 +0,0 @@
Source: xapp
Section: x11
Priority: optional
Maintainer: Debian Cinnamon Team <pkg-cinnamon-team@lists.alioth.debian.org>
Uploaders:
Maximiliano Curia <maxy@debian.org>,
Margarita Manterola <marga@debian.org>,
Build-Depends:
autoconf-archive,
debhelper (>= 9),
dh-autoreconf,
dpkg-dev (>= 1.15.1),
gnome-doc-utils (>= 0.3.2),
gnome-pkg-tools (>= 0.10),
gobject-introspection (>= 0.10.2-1~),
gtk-doc-tools (>= 1.4),
intltool (>= 0.40.6),
libgdk-pixbuf2.0-dev (>= 2.22.0),
libgirepository1.0-dev (>= 0.10.2-1~),
libglib2.0-dev (>= 2.37.3),
libgnomekbd-dev,
libgtk-3-dev (>= 3.3.16),
libx11-dev,
python3,
yelp-tools,
Standards-Version: 3.9.8
Homepage: http://cinnamon.linuxmint.com/
Vcs-Browser: https://anonscm.debian.org/git/pkg-cinnamon/xapp.git
Vcs-Git: https://anonscm.debian.org/git/pkg-cinnamon/xapp.git

Package: xapps-common
Architecture: all
Multi-Arch: foreign
Depends:
gist,
inxi,
python3,
python3-gi,
xdg-utils,
${misc:Depends},
Description: Common files for XApp desktop apps
This package includes files that are shared between several XApp
apps (i18n files and configuration schemas).

Package: libxapp1
Section: libs
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends:
libgnomekbd8,
xapps-common (>= ${source:Version}),
${misc:Depends},
${shlibs:Depends},
Description: XApp library for loading .desktop files
This library is used by XApp to load the .desktop files.

Package: libxapp-dev
Section: libdevel
Architecture: any
Depends:
gir1.2-xapp-1.0 (= ${binary:Version}),
libgtk-3-dev (>= 3.3.16),
libxapp1 (= ${binary:Version}),
${misc:Depends},
Description: XApp library - development files
This package provides the include files and static library for the XApp
library functions.

Package: gir1.2-xapp-1.0
Section: introspection
Architecture: any
Depends: ${gir:Depends}, ${misc:Depends}, ${shlibs:Depends}
Description: Introspection data for XApp
This package contains the introspection data for XApp.

+ 0
- 76
debian/copyright View File

@@ -1,76 +0,0 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: xapps
Source: https://github.com/linuxmint/xapps

Files: *
Copyright: 2016, Linux Mint
License: LGPL-3

Files: m4/*
Copyright: 2004-2015, Free Software Foundation, Inc
License: FSF_unlimited

Files: m4/intltool.m4
Copyright: 2001, Eazel, Inc
License: GPL-2+_AutoConfException

Files: po/Makefile.in.in
Copyright: 2004-2008, Rodney Dawes <dobey.pwns@gmail.com>
1995-1997, Ulrich Drepper <drepper@gnu.ai.mit.edu>
License: Permissive

Files: files/usr/bin/xfce4-set-wallpaper
Copyright: Weitian Leung <weitianleung@gmail.com>
License: GPL-3

License: LGPL-3
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License V3.
.
The complete text of the GNU Lesser General Public License version 3 can be
found in `/usr/share/common-licenses/LGPL-3'.

License: FSF_unlimited
This file is free software; the Free Software Foundation gives
unlimited permission to copy and/or distribute it, with or without
modifications, as long as this notice is preserved.

License: GPL-2+_AutoConfException
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
.
The complete text of the GNU General Public License version 2 can be found in
`/usr/share/common-licenses/GPL-2'.
.
As a special exception to the GNU General Public License, if you
distribute this file as part of a program that contains a
configuration script generated by Autoconf, you may include it under
the same distribution terms that you use for the rest of that program.

License: Permissive
This file may be copied and used freely without restrictions. It may
be used in projects which are not available under a GNU Public License,
but which still want to provide support for the GNU gettext functionality.

License: GPL-3
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3 of the License.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
The complete text of the GNU General Public License version 3 can be found in
`/usr/share/common-licenses/GPL-3'.

+ 0
- 1
debian/gir1.2-xapp-1.0.install.in View File

@@ -1 +0,0 @@
DEB_PKG_CONFIG_LIBDIR/girepository-1.0/XApp-1.0.typelib

+ 0
- 4
debian/libxapp-dev.install View File

@@ -1,4 +0,0 @@
usr/include/xapp/libxapp
usr/lib/*/libxapp.so
usr/lib/*/pkgconfig/xapp.pc
usr/share/gir-1.0/XApp-1.0.gir

+ 0
- 2
debian/libxapp1.install View File

@@ -1,2 +0,0 @@
usr/lib/*/libxapp.so.1
usr/lib/*/libxapp.so.1.*

+ 0
- 24
debian/libxapp1.symbols View File

@@ -1,24 +0,0 @@
libxapp.so.1 libxapp1 #MINVER#
xapp_kbd_layout_controller_get_all_names@Base 1.0.2
xapp_kbd_layout_controller_get_current_flag_id@Base 1.0.2
xapp_kbd_layout_controller_get_current_group@Base 1.0.2
xapp_kbd_layout_controller_get_current_icon_name@Base 1.0.2
xapp_kbd_layout_controller_get_current_name@Base 1.0.2
xapp_kbd_layout_controller_get_current_short_group_label@Base 1.0.2
xapp_kbd_layout_controller_get_current_variant_label@Base 1.0.2
xapp_kbd_layout_controller_get_enabled@Base 1.0.2
xapp_kbd_layout_controller_get_flag_id_for_group@Base 1.0.2
xapp_kbd_layout_controller_get_icon_name_for_group@Base 1.0.2
xapp_kbd_layout_controller_get_short_group_label_for_group@Base 1.0.2
xapp_kbd_layout_controller_get_type@Base 1.0.2
xapp_kbd_layout_controller_get_variant_label_for_group@Base 1.0.2
xapp_kbd_layout_controller_new@Base 1.0.2
xapp_kbd_layout_controller_next_group@Base 1.0.2
xapp_kbd_layout_controller_previous_group@Base 1.0.2
xapp_kbd_layout_controller_render_cairo_subscript@Base 1.0.2
xapp_kbd_layout_controller_set_current_group@Base 1.0.2
xapp_monitor_blanker_are_monitors_blanked@Base 1.0.2
xapp_monitor_blanker_blank_other_monitors@Base 1.0.2
xapp_monitor_blanker_get_type@Base 1.0.2
xapp_monitor_blanker_new@Base 1.0.2
xapp_monitor_blanker_unblank_monitors@Base 1.0.2

+ 0
- 1166
debian/patches/fix-licensing.patch
File diff suppressed because it is too large
View File


+ 0
- 112
debian/patches/gnome-common-migration.patch View File

@@ -1,112 +0,0 @@
Description: Migrate away from gnome-common
Author: marga@debian.org
Forwarded: not yet
Last-Update: 2016-11-19
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: xapp/autogen.sh
===================================================================
--- xapp.orig/autogen.sh 2016-11-19 18:32:42.305346265 +0100
+++ xapp/autogen.sh 2016-11-19 18:32:42.293345934 +0100
@@ -1,11 +1,39 @@
#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+test -n "$srcdir" || srcdir=$(dirname "$0")
+test -n "$srcdir" || srcdir=.
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+olddir=$(pwd)
-which gnome-autogen.sh || {
- echo "You need to install gnome-common from GNOME Git (or from"
- echo "your OS vendor's package manager)."
+cd $srcdir
+
+(test -f configure.ac) || {
+ echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
exit 1
}
-. gnome-autogen.sh
+
+# shellcheck disable=SC2016
+PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
+
+if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
+ echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
+ echo "*** If you wish to pass any to it, please specify them on the" >&2
+ echo "*** '$0' command line." >&2
+ echo "" >&2
+fi
+
+aclocal --install || exit 1
+glib-gettextize --force --copy || exit 1
+intltoolize --force --copy --automake || exit 1
+autoreconf --verbose --force --install || exit 1
+
+cd "$olddir"
+if [ "$NOCONFIGURE" = "" ]; then
+ $srcdir/configure "$@" || exit 1
+
+ if [ "$1" = "--help" ]; then exit 0 else
+ echo "Now type 'make' to compile $PKG_NAME" || exit 1
+ fi
+else
+ echo "Skipping configure process."
+fi
Index: xapp/configure.ac
===================================================================
--- xapp.orig/configure.ac 2016-11-19 18:32:42.305346265 +0100
+++ xapp/configure.ac 2016-11-19 18:34:22.468111327 +0100
@@ -9,6 +9,8 @@
AC_CONFIG_MACRO_DIR([m4])
+m4_ifdef([AX_IS_RELEASE], [AX_IS_RELEASE([always])])
+
# Before making a release, the LT_VERSION string should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
@@ -28,8 +30,7 @@
AC_PROG_CC
PKG_PROG_PKG_CONFIG
-GNOME_COMPILE_WARNINGS([maximum])
-GNOME_MAINTAINER_MODE_DEFINES
+m4_ifdef([AX_COMPILER_FLAGS], [AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])])
AC_ARG_ENABLE(deprecation_flags,
[AC_HELP_STRING([--enable-deprecation-flags],
Index: xapp/libxapp/Makefile.am
===================================================================
--- xapp.orig/libxapp/Makefile.am 2016-11-19 18:32:42.305346265 +0100
+++ xapp/libxapp/Makefile.am 2016-11-19 18:32:42.297346044 +0100
@@ -4,6 +4,7 @@
lib_LTLIBRARIES = libxapp.la
AM_CPPFLAGS = \
+ $(WARN_CFLAGS) \
-I$(top_srcdir) \
$(XAPP_CFLAGS) \
$(XLIB_CFLAGS) \
@@ -26,6 +27,7 @@
-lrt
libxapp_la_LDFLAGS = \
+ $(WARN_LDFLAGS) \
-version-info $(LT_VERSION) \
-export-symbols-regex "^xapp_.*" \
-no-undefined
@@ -49,10 +51,10 @@
XApp_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0
XApp_1_0_gir_PACKAGES = gdk-pixbuf-2.0 glib-2.0 gobject-2.0 gio-2.0 gtk+-3.0
XApp_1_0_gir_EXPORT_PACKAGES = xapp
-XApp_1_0_gir_CFLAGS = -I$(top_srcdir) -DWITH_INTROSPECTION
+XApp_1_0_gir_CFLAGS = $(WARN_CFLAGS) -I$(top_srcdir) -DWITH_INTROSPECTION
XApp_1_0_gir_LIBS = libxapp.la
XApp_1_0_gir_FILES = $(introspection_sources) $(libxapp_HEADERS)
-XApp_1_0_gir_SCANNERFLAGS = --identifier-prefix=XApp --symbol-prefix=xapp_
+XApp_1_0_gir_SCANNERFLAGS = $(WARN_SCANNERFLAGS) --identifier-prefix=XApp --symbol-prefix=xapp_
INTROSPECTION_GIRS += XApp-1.0.gir
girdir = $(datadir)/gir-1.0

+ 0
- 2
debian/patches/series View File

@@ -1,2 +0,0 @@
fix-licensing.patch
gnome-common-migration.patch

+ 0
- 16
debian/rules View File

@@ -1,16 +0,0 @@
#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

DEB_PKG_CONFIG_LIBDIR=$(shell pkg-config gobject-introspection-1.0 --variable libdir | sed -e 's/.//')

%:
dh $@ --parallel --with=autoreconf,gir,gnome

override_dh_gnome_clean:
dh_gnome_clean --no-control

override_dh_install:
sed 's@DEB_PKG_CONFIG_LIBDIR@${DEB_PKG_CONFIG_LIBDIR}@' debian/gir1.2-xapp-1.0.install.in > debian/gir1.2-xapp-1.0.install
dh_install --list-missing

+ 0
- 1
debian/source/format View File

@@ -1 +0,0 @@
3.0 (quilt)

+ 0
- 3
debian/watch View File

@@ -1,3 +0,0 @@
version=3
opts="dversionmangle=s/\+repack//;s/\+dfsg//;s/\+up[0-9]//,filenamemangle=s/.*\/(.*)/xapp-$1/" \
https://github.com/linuxmint/xapps/tags .*/v?(\d.*)\.(?:tgz|tar\.(?:gz|bz2|xz))

+ 0
- 4
debian/xapps-common.install View File

@@ -1,4 +0,0 @@
usr/share/glib-2.0/schemas
usr/share/locale
usr/bin/ usr/share/xapps-common/
usr/share/icons

+ 0
- 5
files/Makefile.am View File

@@ -1,5 +0,0 @@
install-data-hook:
find -mindepth 1 -maxdepth 1 -type d -exec cp -R {} $(DESTDIR)/ \;

uninstall-hook:
find -mindepth 1 -type f -exec rm $(DESTDIR)/{} \;

+ 0
- 28
files/usr/bin/pastebin View File

@@ -1,28 +0,0 @@
#!/usr/bin/python3

import sys
import os
import stat
import subprocess

content = ""

mode = os.fstat(0).st_mode
if stat.S_ISFIFO(mode):
content = sys.stdin.read()
elif stat.S_ISREG(mode):
content = sys.stdin.read()
else:
args = sys.argv[1:]
if len(args) == 1 and os.path.exists(args[0]):
with open(args[0], 'r') as infile:
content = infile.read()
else:
str_args = ' '.join(args)
content = str_args

if content != "":
for paster in ['/usr/bin/gist-paste', '/usr/bin/fpaste']:
if os.path.exists(paster):
p = subprocess.Popen([paster], stdin=subprocess.PIPE)
p.communicate(content.encode("UTF-8"))

+ 0
- 11
files/usr/bin/upload-system-info View File

@@ -1,11 +0,0 @@
#!/usr/bin/python3

import subprocess, os

inxi = subprocess.Popen(['inxi', '-Fxxrzc0'], stdout=subprocess.PIPE)
pastebin = subprocess.Popen(['/usr/bin/pastebin'], stdin=inxi.stdout, stdout=subprocess.PIPE)
inxi.stdout.close()
output = pastebin.communicate()[0]
output = output.split()[0] # if we have more than one URL, only use the first one
pastebin.wait()
subprocess.call(['xdg-open', output])

+ 0
- 32
files/usr/bin/xfce4-set-wallpaper View File

@@ -1,32 +0,0 @@
#!/bin/bash

# Author: Weitian Leung <weitianleung@gmail.com>
# Version: 2.0
# License: GPL-3.0
# Description: set a picture as xfce4 wallpaper

wallpaper=$1

# check image
mime_type=`file --mime-type -b "$wallpaper"`
if [[ ! "$mime_type" == image/* ]]; then
echo "Invalid image"
exit 1
fi

# set to every monitor that contains image-path/last-image
properties=$(xfconf-query -c xfce4-desktop -p /backdrop -l | grep -e "screen.*/monitor.*image-path$" -e "screen.*/monitor.*/last-image$")

for property in $properties; do
xfconf-query -c xfce4-desktop -p $property -s "$wallpaper"
done











+ 0
- 99
files/usr/share/icons/hicolor/scalable/actions/xapp-search-entire-word-symbolic.svg View File

@@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg7384"
height="16"
width="16"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="xapp-search-entire-word-symbolic.svg">
<defs
id="defs7667" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1479"
inkscape:window-height="852"
id="namedview7665"
showgrid="true"
inkscape:zoom="22.627417"
inkscape:cx="11.198507"
inkscape:cy="11.756873"
inkscape:window-x="2265"
inkscape:window-y="90"
inkscape:window-maximized="0"
inkscape:current-layer="g4147"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:bbox-nodes="true"
inkscape:snap-intersection-paths="true"
inkscape:object-nodes="true">
<inkscape:grid
type="xygrid"
id="grid4148" />
</sodipodi:namedview>
<metadata
id="metadata90">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<g
id="g4147"
style="fill:#bebebe;fill-opacity:1;stroke:none"
transform="matrix(1.3889016,0,0,1.3889016,-3.0103731,-3.5159478)">
<g
transform="scale(1.1627898,0.86000064)"
style="font-style:normal;font-weight:normal;font-size:23.34823418px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="text4138-6">
<path
d="m 9.9135395,5.4551583 1.8575845,-2e-7 0,2.8410321 c 0,2.0390788 -0.631802,3.0193748 -1.8575845,3.0193748 l 3e-7,-0.837201 c 0.3385492,-0.03113 0.5778682,-0.2446 0.7179572,-0.5403447 0.14009,-0.2957443 0.210134,-0.8405365 0.210134,-1.6343764 l -0.0051,-0.3370195 -0.9229612,0 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#bebebe;fill-opacity:1;stroke:none"
id="path4157"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccsccssccc" />
<path
sodipodi:nodetypes="ccsccssccc"
inkscape:connector-curvature="0"
id="path4159"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#bebebe;fill-opacity:1;stroke:none"
d="m 7.4367607,5.4551581 1.8575849,-2e-7 0,2.8410321 c 0,2.039079 -0.631802,3.019375 -1.8575849,3.019375 l 3e-7,-0.837201 c 0.3385493,-0.03113 0.5778685,-0.2446 0.7179576,-0.5403449 0.14009,-0.2957443 0.210134,-0.8405365 0.210134,-1.6343764 l -0.0051,-0.3370195 -0.9229616,0 z" />
<path
d="m 6.1983412,11.315703 -1.8575849,0 0,-2.8410321 c 0,-2.039079 0.631802,-3.019375 1.8575849,-3.019375 l -3e-7,0.837201 c -0.3385493,0.03113 -0.5778685,0.2446 -0.7179576,0.5403449 -0.14009,0.2957443 -0.210134,0.8405365 -0.210134,1.6343764 l 0.0051,0.3370195 0.9229616,0 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#bebebe;fill-opacity:1;stroke:none"
id="path4161"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccsccssccc" />
<path
sodipodi:nodetypes="ccsccssccc"
inkscape:connector-curvature="0"
id="path4163"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#bebebe;fill-opacity:1;stroke:none"
d="m 3.7215923,11.315565 -1.8575849,0 0,-2.8410319 c 0,-2.039079 0.631802,-3.019375 1.8575849,-3.019375 l -3e-7,0.837201 c -0.3385493,0.03113 -0.5778685,0.2446 -0.7179576,0.5403449 -0.14009,0.2957443 -0.210134,0.8405365 -0.210134,1.6343764 l 0.0051,0.3370195 0.9229616,0 z" />
</g>
</g>
</svg>

+ 0
- 73
files/usr/share/icons/hicolor/scalable/actions/xapp-search-wrap-symbolic.svg View File

@@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg7384"
height="16"
width="16"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="xapp-search-wrap-symbolic.svg">
<defs
id="defs9" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1236"
inkscape:window-height="795"
id="namedview7"
showgrid="true"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="true"
inkscape:object-nodes="true"
inkscape:snap-smooth-nodes="true"
inkscape:zoom="41.7193"
inkscape:cx="10.555301"
inkscape:cy="7.666891"
inkscape:window-x="583"
inkscape:window-y="99"
inkscape:window-maximized="0"
inkscape:current-layer="svg7384">
<inkscape:grid
type="xygrid"
id="grid4137" />
</sodipodi:namedview>
<metadata
id="metadata90">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 2,1 C 1.446,1 1,1.446 1,2 l 0,12 c 0,0.554 0.446,1 1,1 l 11,0 c 0.554,0 0.82481,-0.474429 1,-1 l 0,-3 -2,0 0,1 c 0,0.554 -0.446,1 -1,1 L 4,13 C 3.446,13 3,12.554 3,12 L 3,4 C 3,3.446 3.446,3 4,3 l 7,0 c 0.554,0 1,0.4726696 1,1 l 0,1 -2,0 0,1 3,3 3,-3 0,-1 -2,0 0,-3 C 14,1.446 13.554,1 13,1 Z"
id="rect4144"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ssssscccsssssssscccccccsss" />
</svg>

+ 0
- 86
files/usr/share/icons/hicolor/scalable/actions/xapp-text-case-symbolic.svg View File

@@ -1,86 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg7384"
height="16"
width="16"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="xapp-text-case-symbolic.svg">
<defs
id="defs7667" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1560"
inkscape:window-height="849"
id="namedview7665"
showgrid="true"
inkscape:zoom="32"
inkscape:cx="1.8642481"
inkscape:cy="7.8505367"
inkscape:window-x="2231"
inkscape:window-y="204"
inkscape:window-maximized="0"
inkscape:current-layer="g4147"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-midpoints="true">
<inkscape:grid
type="xygrid"
id="grid4138" />
</sodipodi:namedview>
<metadata
id="metadata90">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<g
id="g4147"
style="fill:#bebebe;fill-opacity:1;stroke:none"
transform="matrix(1.3889016,0,0,1.3889016,-3.0103731,-3.5159478)">
<g
transform="matrix(0.83484587,0,0,1.0714235,1.697848,-0.28559499)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:11.25px;line-height:125%;font-family:'Noto Sans UI';-inkscape-font-specification:'Noto Sans UI, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="flowRoot4140">
<path
d="m 6.489624,12.037222 -0.5822754,-1.911621 -2.9278564,0 -0.5822754,1.911621 -1.8347168,0 2.8344727,-8.0639647 2.0819091,0 2.845459,8.0639647 -1.8347168,0 z M 5.5008545,8.6973784 Q 4.6933594,6.0991118 4.5889893,5.7585356 4.4901123,5.4179594 4.446167,5.2202055 4.2648926,5.9233305 3.407959,8.6973784 l 2.0928955,0 z"
id="path4160"
inkscape:connector-curvature="0" />
</g>
<g
transform="matrix(1.0955533,0,0,1.2543973,-0.50361273,-1.4227521)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:8.09992599px;line-height:125%;font-family:'Noto Sans UI';-inkscape-font-specification:'Noto Sans UI, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="flowRoot4148">
<path
d="m 12.110808,11.108837 -0.233347,-0.601167 -0.03164,0 q -0.304539,0.383639 -0.628852,0.533931 -0.320358,0.146337 -0.838469,0.146337 -0.6367617,0 -1.0045807,-0.363864 -0.3638638,-0.363864 -0.3638638,-1.0362213 0,-0.7039975 0.4904252,-1.036221 0.4943802,-0.3361786 1.4870953,-0.371774 l 0.767279,-0.02373 0,-0.1937971 q 0,-0.6723571 -0.688178,-0.6723571 -0.529975,0 -1.2458379,0.3203584 L 9.4213799,6.995593 q 0.7633231,-0.3994592 1.6927581,-0.3994592 0.889884,0 1.364489,0.3875941 0.474605,0.3875941 0.474605,1.1786025 l 0,2.9465066 -0.842424,0 z m -0.355953,-2.0487121 -0.466695,0.01582 q -0.526021,0.01582 -0.783099,0.189842 -0.257077,0.1740219 -0.257077,0.5299757 0,0.5102004 0.585346,0.5102004 0.419234,0 0.668402,-0.241257 0.253123,-0.2412581 0.253123,-0.6407174 l 0,-0.3638639 z"
id="path4157"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

+ 0
- 72
libxapp/Makefile.am View File

@@ -1,72 +0,0 @@
CLEANFILES =

noinst_LTLIBRARIES =
lib_LTLIBRARIES = libxapp.la

AM_CPPFLAGS = \
-I$(top_srcdir) \
$(XAPP_CFLAGS) \
$(XLIB_CFLAGS) \
-DG_LOG_DOMAIN=\"XApp\" \
-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale\"" \
$(DISABLE_DEPRECATED_CFLAGS)

AM_CFLAGS = $(WARN_CFLAGS)

introspection_sources = \
xapp-monitor-blanker.c \
xapp-kbd-layout-controller.c

libxapp_la_SOURCES = \
$(introspection_sources)

libxapp_la_LIBADD = \
$(XLIB_LIBS) \
$(XAPP_LIBS) \
-lrt

libxapp_la_LDFLAGS = \
-version-info $(LT_VERSION) \
-export-symbols-regex "^xapp_.*" \
-no-undefined

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xapp.pc

libxappdir = $(includedir)/xapp/libxapp
libxapp_HEADERS = \
xapp-monitor-blanker.h \
xapp-kbd-layout-controller.h

-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)

if HAVE_INTROSPECTION

XApp-1.0.gir: libxapp.la
XApp_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0
XApp_1_0_gir_PACKAGES = gdk-pixbuf-2.0 glib-2.0 gobject-2.0 gio-2.0 gtk+-3.0
XApp_1_0_gir_EXPORT_PACKAGES = xapp
XApp_1_0_gir_CFLAGS = -I$(top_srcdir) -DWITH_INTROSPECTION
XApp_1_0_gir_LIBS = libxapp.la
XApp_1_0_gir_FILES = $(introspection_sources) $(libxapp_HEADERS)
XApp_1_0_gir_SCANNERFLAGS = --identifier-prefix=XApp --symbol-prefix=xapp_
INTROSPECTION_GIRS += XApp-1.0.gir

girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)

typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)

CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif

EXTRA_DIST = \
xapp.pc.in \
xapp-uninstalled.pc.in \
$(pnpdata_DATA_dist)

-include $(top_srcdir)/git.mk

+ 0
- 676
libxapp/xapp-kbd-layout-controller.c View File

@@ -1,676 +0,0 @@

#include <config.h>

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#include <glib/gstdio.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>

#include <libgnomekbd/gkbd-configuration.h>

#include "xapp-kbd-layout-controller.h"

enum
{
PROP_0,

PROP_ENABLED
};

enum
{
KBD_LAYOUT_CHANGED,
KBD_CONFIG_CHANGED,

LAST_SIGNAL
};

static guint signals[LAST_SIGNAL] = { 0, };

typedef struct
{
gchar *group_name;
gchar *variant_name;

gchar *group_label;
gint group_dupe_id;

gchar *variant_label;
gint variant_dupe_id;
} GroupData;

#define GROUP_DATA(ptr, idx) ((GroupData *) g_ptr_array_index (ptr, idx))

static void
group_data_free (GroupData *data)
{
g_clear_pointer (&data->group_name, g_free);
g_clear_pointer (&data->group_label, g_free);
g_clear_pointer (&data->variant_label, g_free);
data->group_dupe_id = 0;
data->variant_dupe_id = 0;

g_slice_free (GroupData, data);
}

struct _XAppKbdLayoutControllerPrivate
{
GkbdConfiguration *config;

gint num_groups;

GPtrArray *group_data;

gulong changed_id;
gulong group_changed_id;
guint idle_changed_id;

gboolean enabled;
};

G_DEFINE_TYPE (XAppKbdLayoutController, xapp_kbd_layout_controller, G_TYPE_OBJECT);

static void
clear_stores (XAppKbdLayoutController *controller)
{
XAppKbdLayoutControllerPrivate *priv = controller->priv;

g_clear_pointer (&priv->group_data, g_ptr_array_unref);
}

static gchar *
create_label (XAppKbdLayoutController *controller,
const gchar *name,
gint dupe_id)
{
if (g_utf8_validate (name, -1, NULL))
{
gchar utf8[20];
gchar *utf8_cased = NULL;

g_utf8_strncpy (utf8, name, 2);

utf8_cased = g_utf8_strdown (utf8, -1);

GString *string = g_string_new (utf8_cased);

g_free (utf8_cased);

if (dupe_id > 0)
{
string = g_string_append_unichar (string, 0x2080 + dupe_id);
}

return g_string_free (string, FALSE);
}

return NULL;
}

static void
load_stores (XAppKbdLayoutController *controller)
{
XAppKbdLayoutControllerPrivate *priv = controller->priv;

gchar **group_names = gkbd_configuration_get_group_names (priv->config);
priv->num_groups = g_strv_length (group_names);

/* We do nothing if there's only one keyboard layout enabled */
if (priv->num_groups == 1)
{
priv->enabled = FALSE;
return;
}

priv->enabled = TRUE;

/* Populate the GroupData pointer array */

gint i, j, group_dupe_id, variant_dupe_id;
GPtrArray *list = g_ptr_array_new_with_free_func ((GDestroyNotify) group_data_free);

for (i = 0; i < priv->num_groups; i++)
{
GroupData *data = g_slice_new0 (GroupData);

/* Iterate through group names, figure out subscript values for duplicates */

gchar *group_name = gkbd_configuration_get_group_name (priv->config, i);
group_dupe_id = 0;

for (j = 0; j < list->len; j++)
{
GroupData *iter = g_ptr_array_index (list, j);

if (g_strcmp0 (group_name, iter->group_name) == 0)
{
group_dupe_id++;
iter->group_dupe_id = group_dupe_id;
}
}

if (group_dupe_id > 0)
{
group_dupe_id++;
}

data->group_name = group_name;
data->group_dupe_id = group_dupe_id;

/* Iterate through layout/variant names, figure out subscript values for duplicates */

gchar *variant_name = gkbd_configuration_extract_layout_name (priv->config, i);
variant_dupe_id = 0;

for (j = 0; j < list->len; j++)
{
GroupData *iter = g_ptr_array_index (list, j);

if (g_strcmp0 (variant_name, iter->variant_name) == 0)
{
variant_dupe_id++;
iter->variant_dupe_id = variant_dupe_id;
}
}

if (variant_dupe_id > 0)
{
variant_dupe_id++;
}

data->variant_name = variant_name;
data->variant_dupe_id = variant_dupe_id;

/* Finally, add the GroupData slice to the array */
g_ptr_array_add (list, data);
}

for (i = 0; i < priv->num_groups; i++)
{
GroupData *data = g_ptr_array_index (list, i);

/* Now generate labels for group names and for variant names. This is done
* in its own loop after the initial run, because previous dupe ids could have
* changed later in the loop.
*/

data->group_label = create_label (controller, data->group_name, data->group_dupe_id);
data->variant_label = create_label (controller, data->variant_name, data->variant_dupe_id);
}

priv->group_data = list;
}

static gboolean
idle_config_changed (XAppKbdLayoutController *controller)
{
XAppKbdLayoutControllerPrivate *priv = controller->priv;

clear_stores (controller);
load_stores (controller);

if (gkbd_configuration_get_current_group (priv->config) >= priv->num_groups)
{
xapp_kbd_layout_controller_set_current_group (controller, 0);
}

g_signal_emit (controller, signals[KBD_CONFIG_CHANGED], 0);

priv->idle_changed_id = 0;
return FALSE;
}

static void
on_configuration_changed (GkbdConfiguration *config,
XAppKbdLayoutController *controller)
{
XAppKbdLayoutControllerPrivate *priv = controller->priv;

if (priv->idle_changed_id != 0)
{
g_source_remove (priv->idle_changed_id);
priv->idle_changed_id = 0;
}

priv->idle_changed_id = g_idle_add ((GSourceFunc) idle_config_changed, controller);
}


static void
on_configuration_group_changed (GkbdConfiguration *config,
gint group,
XAppKbdLayoutController *controller)
{
g_signal_emit (controller, signals[KBD_LAYOUT_CHANGED], 0, (guint) group);
}

static void
xapp_kbd_layout_controller_init (XAppKbdLayoutController *controller)
{
controller->priv = G_TYPE_INSTANCE_GET_PRIVATE (controller, XAPP_TYPE_KBD_LAYOUT_CONTROLLER, XAppKbdLayoutControllerPrivate);

XAppKbdLayoutControllerPrivate *priv = controller->priv;

priv->config = gkbd_configuration_get ();
priv->enabled = FALSE;
priv->idle_changed_id = 0;

priv->group_data = NULL;
}

static void
xapp_kbd_layout_controller_constructed (GObject *object)
{
G_OBJECT_CLASS (xapp_kbd_layout_controller_parent_class)->constructed (object);

XAppKbdLayoutController *controller = XAPP_KBD_LAYOUT_CONTROLLER (object);
XAppKbdLayoutControllerPrivate *priv = controller->priv;

gkbd_configuration_start_listen (priv->config);

priv->changed_id = g_signal_connect_object (priv->config,
"changed",
G_CALLBACK (on_configuration_changed),
controller, 0);

priv->group_changed_id = g_signal_connect_object (priv->config,
"group-changed",
G_CALLBACK (on_configuration_group_changed),
controller, 0);
clear_stores (controller);
load_stores (controller);
}

static void
xapp_kbd_layout_controller_get_property (GObject *gobject,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
XAppKbdLayoutController *controller = XAPP_KBD_LAYOUT_CONTROLLER (gobject);
XAppKbdLayoutControllerPrivate *priv = controller->priv;

switch (prop_id)
{
case PROP_ENABLED:
g_value_set_boolean (value, priv->enabled);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
break;
}
}

static void
xapp_kbd_layout_controller_dispose (GObject *object)
{
XAppKbdLayoutController *controller = XAPP_KBD_LAYOUT_CONTROLLER (object);
XAppKbdLayoutControllerPrivate *priv = controller->priv;

gkbd_configuration_stop_listen (priv->config);

clear_stores (controller);

if (priv->changed_id > 0)
{
g_signal_handler_disconnect (priv->config, priv->changed_id);
priv->changed_id = 0;
}

if (priv->group_changed_id > 0)
{
g_signal_handler_disconnect (priv->config, priv->group_changed_id);
priv->group_changed_id = 0;
}

if (priv->idle_changed_id != 0)
{
g_source_remove (priv->idle_changed_id);
priv->idle_changed_id = 0;
}

G_OBJECT_CLASS (xapp_kbd_layout_controller_parent_class)->dispose (object);
}

static void
xapp_kbd_layout_controller_finalize (GObject *object)
{
XAppKbdLayoutController *controller = XAPP_KBD_LAYOUT_CONTROLLER (object);
XAppKbdLayoutControllerPrivate *priv = controller->priv;

g_clear_object (&priv->config);

G_OBJECT_CLASS (xapp_kbd_layout_controller_parent_class)->finalize (object);
}

static void
xapp_kbd_layout_controller_class_init (XAppKbdLayoutControllerClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);

gobject_class->dispose = xapp_kbd_layout_controller_dispose;
gobject_class->finalize = xapp_kbd_layout_controller_finalize;
gobject_class->get_property = xapp_kbd_layout_controller_get_property;
gobject_class->constructed = xapp_kbd_layout_controller_constructed;

g_type_class_add_private (gobject_class, sizeof (XAppKbdLayoutControllerPrivate));

g_object_class_install_property (gobject_class, PROP_ENABLED,
g_param_spec_boolean ("enabled",
"Enabled",
"Whether we're enabled (more than one keyboard layout is installed)",
FALSE,
G_PARAM_READABLE)
);

signals[KBD_LAYOUT_CHANGED] = g_signal_new ("layout-changed",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__UINT,
G_TYPE_NONE,
1, G_TYPE_UINT);

signals[KBD_CONFIG_CHANGED] = g_signal_new ("config-changed",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0, G_TYPE_NONE);
}

XAppKbdLayoutController *
xapp_kbd_layout_controller_new (void)
{
return g_object_new (XAPP_TYPE_KBD_LAYOUT_CONTROLLER, NULL);
}

gboolean
xapp_kbd_layout_controller_get_enabled (XAppKbdLayoutController *controller)
{
return controller->priv->enabled;
}

guint
xapp_kbd_layout_controller_get_current_group (XAppKbdLayoutController *controller)
{
g_return_val_if_fail (controller->priv->enabled, 0);

return gkbd_configuration_get_current_group (controller->priv->config);
}

void
xapp_kbd_layout_controller_set_current_group (XAppKbdLayoutController *controller,
guint group)
{
g_return_if_fail (controller->priv->enabled);
g_return_if_fail (group <= controller->priv->num_groups);

guint current = gkbd_configuration_get_current_group (controller->priv->config);

if (current != group)
{
gkbd_configuration_lock_group (controller->priv->config, group);
}
}

void
xapp_kbd_layout_controller_next_group (XAppKbdLayoutController *controller)
{
g_return_if_fail (controller->priv->enabled);

gkbd_configuration_lock_next_group (controller->priv->config);
}

void
xapp_kbd_layout_controller_previous_group (XAppKbdLayoutController *controller)
{
g_return_if_fail (controller->priv->enabled);

XAppKbdLayoutControllerPrivate *priv = controller->priv;

gint current = gkbd_configuration_get_current_group (priv->config);

if (current > 0)
{
current--;
}
else
{
current = priv->num_groups - 1;
}

gkbd_configuration_lock_group (controller->priv->config, current);
}

/**
* xapp_kbd_layout_controller_get_current_name:
*
* Returns the full name of the current keyboard layout.
*
* Returns: (transfer full): the newly created string or NULL
* if something went wrong.
*/
gchar *
xapp_kbd_layout_controller_get_current_name (XAppKbdLayoutController *controller)
{
g_return_val_if_fail (controller->priv->enabled, NULL);

return gkbd_configuration_get_current_tooltip (controller->priv->config);
}

/**
* xapp_kbd_layout_controller_get_all_names:
*
* Returns an array of all full layout names
*
* Returns: (transfer none) (array zero-terminated=1): array of names
*/
gchar **
xapp_kbd_layout_controller_get_all_names (XAppKbdLayoutController *controller)
{
g_return_val_if_fail (controller->priv->enabled, NULL);

return gkbd_configuration_get_group_names (controller->priv->config);
}