[geany/geany] 1d0fc6: Add the choice to use Windows or Gtk color chooser dialog
Steven Valsesia
git-noreply at xxxxx
Sun Mar 30 18:40:12 UTC 2014
Branch: refs/heads/master
Author: Steven Valsesia <steven.valsesia at gmail.com>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sun, 30 Mar 2014 18:40:12 UTC
Commit: 1d0fc64ce8b07b6b03320b293724cd70eca05c22
https://github.com/geany/geany/commit/1d0fc64ce8b07b6b03320b293724cd70eca05c22
Log Message:
-----------
Add the choice to use Windows or Gtk color chooser dialog
Modification of the string "Use Windows File Open/Save dialogs" to
"Use Windows native dialogs".
Signed-off-by: bestel <steven.valsesia at gmail.com>
Signed-off-by: Colomban Wendling <ban at herbesfolles.org>
Modified Paths:
--------------
data/geany.glade
src/tools.c
Modified: data/geany.glade
4 files changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -1282,12 +1282,12 @@
</child>
<child>
<object class="GtkCheckButton" id="check_native_windows_dialogs">
- <property name="label" translatable="yes">Use Windows File Open/Save dialogs</property>
+ <property name="label" translatable="yes">Use Windows native dialogs</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">Defines whether to use the native Windows File Open/Save dialogs or whether to use the GTK default dialogs</property>
+ <property name="tooltip_text" translatable="yes">Defines whether to use the Windows native dialogs or whether to use the GTK default dialogs</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
Modified: src/tools.c
14 files changed, 8 insertions(+), 6 deletions(-)
===================================================================
@@ -946,7 +946,6 @@ void tools_word_count(void)
/*
* color dialog callbacks
*/
-#ifndef G_OS_WIN32
static void on_color_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)
{
switch (response)
@@ -976,18 +975,22 @@ static void on_color_dialog_response(GtkDialog *dialog, gint response, gpointer
gtk_widget_hide(ui_widgets.open_colorsel);
}
}
-#endif
/* This shows the color selection dialog to choose a color. */
void tools_color_chooser(const gchar *color)
{
-#ifdef G_OS_WIN32
- win32_show_color_dialog(color);
-#else
GdkColor gc;
GtkWidget *colorsel;
+#ifdef G_OS_WIN32
+ if (interface_prefs.use_native_windows_dialogs)
+ {
+ win32_show_color_dialog(color);
+ return;
+ }
+#endif
+
if (ui_widgets.open_colorsel == NULL)
{
ui_widgets.open_colorsel = gtk_color_selection_dialog_new(_("Color Chooser"));
@@ -1015,5 +1018,4 @@ void tools_color_chooser(const gchar *color)
/* We make sure the dialog is visible. */
gtk_window_present(GTK_WINDOW(ui_widgets.open_colorsel));
-#endif
}
--------------
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