summaryrefslogtreecommitdiff
path: root/tools/mate-color-select.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-05-11 12:14:15 +0200
committerStefano Karapetsas <[email protected]>2014-05-11 12:14:15 +0200
commitd80a75c3b9b4d453067386c6a8f3cc7506c0a401 (patch)
tree5a77db621958dae281fc27466f5440d4e8acb98e /tools/mate-color-select.c
parent820fb82ac033b7cbecf2b16cd3b7185d3b8957af (diff)
downloadmate-desktop-d80a75c3b9b4d453067386c6a8f3cc7506c0a401.tar.bz2
mate-desktop-d80a75c3b9b4d453067386c6a8f3cc7506c0a401.tar.xz
Add MATE Color Selection tool
Diffstat (limited to 'tools/mate-color-select.c')
-rw-r--r--tools/mate-color-select.c57
1 files changed, 57 insertions, 0 deletions
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 ();
+}