summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--po/POTFILES.in2
-rw-r--r--po/POTFILES.skip1
-rw-r--r--tools/Makefile.am20
-rw-r--r--tools/mate-color-select.c57
-rw-r--r--tools/mate-color-select.desktop.in.in11
6 files changed, 89 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index e25d96f..8703761 100644
--- a/configure.ac
+++ b/configure.ac
@@ -298,6 +298,7 @@ mate-version.xml.in
po/Makefile.in
schemas/Makefile
man/Makefile
+tools/mate-color-select.desktop.in
tools/mate-conf-import.desktop.in
tools/Makefile
])
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3c5c6c1..90c434a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -32,4 +32,6 @@ schemas/org.mate.sound.gschema.xml.in.in
schemas/org.mate.thumbnail-cache.gschema.xml.in.in
schemas/org.mate.thumbnailers.gschema.xml.in.in
schemas/org.mate.typing-break.gschema.xml.in.in
+tools/mate-color-select.c
+tools/mate-color-select.desktop.in.in
tools/mate-conf-import.desktop.in.in
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index fd7e174..509df24 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -3,5 +3,6 @@
# Please keep this file sorted alphabetically.
mate-about/mate-about.desktop.in
mate-version.xml.in
+tools/mate-color-select.desktop.in
tools/mate-conf-import.desktop.in
user-guide/mate-user-guide.desktop.in
diff --git a/tools/Makefile.am b/tools/Makefile.am
index ccce500..906694b 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,11 +1,24 @@
+bin_PROGRAMS = mate-color-select
bin_SCRIPTS = mate-gsettings-toggle
-if MATE_CONF_IMPORT_ENABLED
+mate_color_select_SOURCES = \
+ mate-color-select.c
+
+mate_color_select_CFLAGS = \
+ -DLOCALE_DIR=\"$(datadir)/locale\" \
+ $(MATE_DESKTOP_CFLAGS)
+
+mate_color_select_LDADD = \
+ $(top_builddir)/libmate-desktop/libmate-desktop-2.la \
+ $(MATE_DESKTOP_LIBS)
+
@INTLTOOL_DESKTOP_RULE@
desktopdir = $(datadir)/applications
-desktop_in_files = mate-conf-import.desktop.in
+desktop_in_files = mate-color-select.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+if MATE_CONF_IMPORT_ENABLED
+desktop_in_files += mate-conf-import.desktop.in
bin_SCRIPTS += mate-conf-import
endif
@@ -14,8 +27,9 @@ bin_SCRIPTS += mpaste
endif
EXTRA_DIST = \
+ mate-conf-import.desktop.in.in \
mate-conf-import \
mate-gsettings-toggle \
mpaste
-CLEANFILES = mate-conf-import.desktop mate-conf-import.desktop.in
+CLEANFILES = *.desktop *.desktop.in
diff --git a/tools/mate-color-select.c b/tools/mate-color-select.c
new file mode 100644
index 0000000..b2da648
--- /dev/null
+++ b/tools/mate-color-select.c
@@ -0,0 +1,57 @@
+/*
+ * mate-color.c: MATE color selection tool
+ *
+ * Copyright (C) 2014 Stefano Karapetsas
+ *
+ * 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 St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ * Authors:
+ * Stefano Karapetsas <[email protected]>
+ */
+
+#include <config.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+#include <libmate-desktop/mate-colorseldialog.h>
+
+#define mate_gettext(package, locale, codeset) \
+ bindtextdomain(package, locale); \
+ bind_textdomain_codeset(package, codeset); \
+ textdomain(package);
+
+int
+main (int argc, char **argv)
+{
+ GtkWidget *color_dialog = NULL;
+
+ mate_gettext (GETTEXT_PACKAGE, LOCALE_DIR, "UTF-8");
+
+ /* initialize GTK+ */
+ gtk_init (&argc, &argv);
+
+ color_dialog = mate_color_selection_dialog_new (_("MATE Color Selection"));
+
+ /* quit signal */
+ g_signal_connect (color_dialog, "destroy", gtk_main_quit, NULL);
+
+ gtk_widget_show_all (color_dialog);
+ gtk_widget_hide (MATE_COLOR_SELECTION_DIALOG (color_dialog)->ok_button);
+ gtk_widget_hide (MATE_COLOR_SELECTION_DIALOG (color_dialog)->cancel_button);
+ gtk_widget_hide (MATE_COLOR_SELECTION_DIALOG (color_dialog)->help_button);
+
+ /* start application */
+ gtk_main ();
+}
diff --git a/tools/mate-color-select.desktop.in.in b/tools/mate-color-select.desktop.in.in
new file mode 100644
index 0000000..3aede0e
--- /dev/null
+++ b/tools/mate-color-select.desktop.in.in
@@ -0,0 +1,11 @@
+[Desktop Entry]
+_Name=MATE Color Selection
+_GenericName=Color selection dialog
+_Comment=Choose colors from the palette or the screen
+Exec=mate-color-select
+Icon=gcolor2
+Terminal=false
+Type=Application
+Categories=GTK;Graphics;
+OnlyShowIn=MATE;
+StartupNotify=false