[geany/geany] dbf906: Feature request #686 : Add apply button on Gtk color chooser

Steven Valsesia git-noreply at xxxxx
Fri Mar 7 14:27:18 UTC 2014


Branch:      refs/heads/master
Author:      Steven Valsesia <steven.valsesia at gmail.com>
Committer:   Steven Valsesia <steven.valsesia at gmail.com>
Date:        Fri, 07 Mar 2014 14:27:18 UTC
Commit:      dbf9061a52b9ea32b3928be14b30dc1637019fc0
             https://github.com/geany/geany/commit/dbf9061a52b9ea32b3928be14b30dc1637019fc0

Log Message:
-----------
Feature request #686 : Add apply button on Gtk color chooser

feature request : http://sourceforge.net/p/geany/feature-requests/686/

Signed-off-by: Steven Valsesia <steven.valsesia at gmail.com>


Modified Paths:
--------------
    src/tools.c

Modified: src/tools.c
5 files changed, 4 insertions(+), 1 deletions(-)
===================================================================
@@ -952,13 +952,15 @@ static void on_color_dialog_response(GtkDialog *dialog, gint response, gpointer
 	switch (response)
 	{
 		case GTK_RESPONSE_OK:
+			gtk_widget_hide(ui_widgets.open_colorsel);
+			/* fall through */
+		case GTK_RESPONSE_APPLY:
 		{
 			GdkColor color;
 			GeanyDocument *doc = document_get_current();
 			gchar *hex;
 			GtkWidget *colorsel;
 
-			gtk_widget_hide(ui_widgets.open_colorsel);
 			g_return_if_fail(doc != NULL);
 
 			colorsel = gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(ui_widgets.open_colorsel));
@@ -989,6 +991,7 @@ void tools_color_chooser(const gchar *color)
 	if (ui_widgets.open_colorsel == NULL)
 	{
 		ui_widgets.open_colorsel = gtk_color_selection_dialog_new(_("Color Chooser"));
+		gtk_dialog_add_button(GTK_DIALOG(ui_widgets.open_colorsel), GTK_STOCK_APPLY, GTK_RESPONSE_APPLY);
 		gtk_widget_set_name(ui_widgets.open_colorsel, "GeanyDialog");
 		gtk_window_set_transient_for(GTK_WINDOW(ui_widgets.open_colorsel), GTK_WINDOW(main_widgets.window));
 		colorsel = gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(ui_widgets.open_colorsel));



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list