talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 8caee652b14c7d487636930a0a0daca58e65cead
parent 9d22797677900688a40bc792e75c425810b86e46
Author: paul <paul@claws-mail.org>
Date:   Sun, 22 Aug 2021 20:10:50 +0100

remove now unneeded colorsel.[ch]

Diffstat:
Msrc/gtk/Makefile.am | 2--
Dsrc/gtk/colorsel.c | 99-------------------------------------------------------------------------------
Dsrc/gtk/colorsel.h | 25-------------------------
Msrc/prefs_folder_item.c | 1-
Msrc/prefs_spelling.c | 1-
5 files changed, 0 insertions(+), 128 deletions(-)

diff --git a/src/gtk/Makefile.am b/src/gtk/Makefile.am @@ -20,7 +20,6 @@ endif libclawsgtk_la_SOURCES = \ about.c \ colorlabel.c \ - colorsel.c \ combobox.c \ description_window.c \ $(arch_sources) \ @@ -51,7 +50,6 @@ clawsgtkinclude_HEADERS = \ about.h \ authors.h \ colorlabel.h \ - colorsel.h \ combobox.h \ description_window.h \ filesel.h \ diff --git a/src/gtk/colorsel.c b/src/gtk/colorsel.c @@ -1,99 +0,0 @@ -/* - * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 2003-2012 Hiroyuki Yamamoto & The Claws Mail Team - * - * 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 3 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, see <http://www.gnu.org/licenses/>. - * - */ - -#include <gtk/gtk.h> -#include <gdk/gdkkeysyms.h> - -#include "gtkutils.h" -#include "colorsel.h" -#include "manage_window.h" - -static void quote_colors_set_dialog_ok(GtkWidget *widget, gpointer data) -{ - *((gint *) data) = 0; - gtk_main_quit(); -} - -static void quote_colors_set_dialog_cancel(GtkWidget *widget, gpointer data) -{ - *((gint *) data) = 1; - gtk_main_quit(); -} - -static gboolean quote_colors_set_dialog_key_pressed(GtkWidget *widget, - GdkEventKey *event, - gpointer data) -{ - if (event && event->keyval == GDK_KEY_Escape) { - *((gint *) data) = 1; - gtk_main_quit(); - return TRUE; - } else if (event && event->keyval == GDK_KEY_Return) { - *((gint *) data) = 0; - gtk_main_quit(); - return FALSE; - } - return FALSE; -} - -GdkRGBA colorsel_select_color_rgb(gchar *title, GdkRGBA rgba) -{ - GdkColor color; - GtkColorSelectionDialog *color_dialog; - GtkWidget *ok_button, *cancel_button; - gint result; - - color_dialog = GTK_COLOR_SELECTION_DIALOG(gtk_color_selection_dialog_new(title)); - gtk_window_set_modal(GTK_WINDOW(color_dialog), TRUE); - gtk_window_set_resizable(GTK_WINDOW(color_dialog), FALSE); - manage_window_set_transient(GTK_WINDOW(color_dialog)); - - g_object_get(color_dialog, - "ok-button", &ok_button, - "cancel-button", &cancel_button, - NULL); - - g_signal_connect(G_OBJECT(ok_button), - "clicked", - G_CALLBACK(quote_colors_set_dialog_ok), &result); - g_signal_connect(G_OBJECT(cancel_button), - "clicked", - G_CALLBACK(quote_colors_set_dialog_cancel), &result); - g_signal_connect(G_OBJECT(color_dialog), "key_press_event", - G_CALLBACK(quote_colors_set_dialog_key_pressed), &result); - - /* preselect the previous color in the color selection dialog */ - GTKUT_GDKRGBA_TO_GDKCOLOR(rgba, color); - gtk_color_selection_set_current_color(GTK_COLOR_SELECTION( - gtk_color_selection_dialog_get_color_selection(color_dialog)), &color); - - gtk_widget_show(GTK_WIDGET(color_dialog)); - gtk_main(); - - if (result == 0) { - gtk_color_selection_get_current_color(GTK_COLOR_SELECTION( - gtk_color_selection_dialog_get_color_selection(color_dialog)), &color); - GTKUT_GDKCOLOR_TO_GDKRGBA(color, rgba); - } - - gtk_widget_destroy(GTK_WIDGET(color_dialog)); - - return rgba; -} - diff --git a/src/gtk/colorsel.h b/src/gtk/colorsel.h @@ -1,25 +0,0 @@ -/* - * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 2003-2012 Hiroyuki Yamamoto & The Claws Mail Team - * - * 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 3 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, see <http://www.gnu.org/licenses/>. - * - */ - -#ifndef COLORSEL_H -#define COLORSEL_H - -GdkRGBA colorsel_select_color_rgb(gchar *title, GdkRGBA rgba); - -#endif /* COLORSEL_H */ diff --git a/src/prefs_folder_item.c b/src/prefs_folder_item.c @@ -45,7 +45,6 @@ #include "gtkutils.h" #include "filtering.h" #include "folder_item_prefs.h" -#include "gtk/colorsel.h" #include "string_match.h" #include "quote_fmt.h" #include "combobox.h" diff --git a/src/prefs_spelling.c b/src/prefs_spelling.c @@ -39,7 +39,6 @@ #include "gtk/gtkutils.h" #include "gtk/prefswindow.h" #include "gtk/filesel.h" -#include "gtk/colorsel.h" #include "gtk/combobox.h" typedef struct _SpellingPage