Revision: 5064 http://geany.svn.sourceforge.net/geany/?rev=5064&view=rev Author: elextr Date: 2010-06-24 06:39:24 +0000 (Thu, 24 Jun 2010)
Log Message: ----------- Make default dialog entries use GTK_STATE_INSENSITIVE color not a fixed color (Suggestion by Ditmar Zhekov)
Modified Paths: -------------- trunk/ChangeLog trunk/src/build.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-06-23 16:57:28 UTC (rev 5063) +++ trunk/ChangeLog 2010-06-24 06:39:24 UTC (rev 5064) @@ -1,3 +1,10 @@ +2010-06-24 Lex Trotman <elextr(at)gmail(dot)com> + + * src/build.c + Make default dialog entries use GTK_STATE_INSENSITIVE color not + a fixed color (Suggestion by Ditmar Zhekov) + + 2010-06-23 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/search.c, doc/geany.txt, doc/geany.html:
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2010-06-23 16:57:28 UTC (rev 5063) +++ trunk/src/build.c 2010-06-24 06:39:24 UTC (rev 5064) @@ -1732,6 +1732,7 @@ gboolean used_dst; } RowWidgets;
+static GdkColor *insensitive_color;
static void set_row_color(RowWidgets *r, GdkColor *color ) { @@ -1756,7 +1757,6 @@ RowWidgets *r = (RowWidgets*)user_data; gint src; enum GeanyBuildCmdEntries i; - GdkColor color; GeanyBuildCommand *bc = get_next_build_cmd(NULL, r->grp, r->cmd, r->dst, &src);
if (bc != NULL) @@ -1778,8 +1778,7 @@ } } r->used_dst = FALSE; - gdk_color_parse("grey", &color); - set_row_color(r, &color); + set_row_color(r, insensitive_color); r->cleared = TRUE; }
@@ -1840,9 +1839,9 @@ gint src; enum GeanyBuildCmdEntries i; guint column = 0; - GdkColor color;
label = gtk_label_new(g_strdup_printf("%d:", cmd + 1)); + insensitive_color = &(gtk_widget_get_style(label)->text[GTK_STATE_INSENSITIVE]); gtk_table_attach(table, label, column, column + 1, row, row + 1, GTK_FILL, GTK_FILL | GTK_EXPAND, entry_x_padding, entry_y_padding); roww = g_new0(RowWidgets, 1); @@ -1894,9 +1893,8 @@ } set_build_command_entry_text(roww->entries[i], str); } - gdk_color_parse("grey", &color); if (bc != NULL && ((gint)dst > src)) - set_row_color(roww, &color); + set_row_color(roww, insensitive_color); if (bc != NULL && (src > (gint)dst || (grp == GEANY_GBG_FT && (doc == NULL || doc->file_type == NULL)))) { for (i = 0; i < GEANY_BC_CMDENTRIES_COUNT; i++)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.