[easytag/wip/application-window: 6/45] Avoid use of deprecated background-gdk property



commit 16ed7412860957a5bfbcda7a6a1593465dbeb7a8
Author: David King <amigadave amigadave com>
Date:   Fri Jul 4 21:39:43 2014 +0100

    Avoid use of deprecated background-gdk property
    
    Use new background-rgba property instead.

 src/browser.c |   17 +++++++++--------
 src/et_core.c |    1 -
 src/et_core.h |    1 -
 3 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/src/browser.c b/src/browser.c
index 33c1b11..760c1b9 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -1413,7 +1413,8 @@ Browser_List_Set_Row_Appearance (GtkTreeIter *iter)
 {
     ET_File *rowETFile = NULL;
     gboolean otherdir = FALSE;
-    GdkColor *backgroundcolor;
+    const GdkRGBA LIGHT_BLUE = { 0.866, 0.933, 1.0, 1.0 };
+    const GdkRGBA *background;
     //gchar *temp = NULL;
 
     if (iter == NULL)
@@ -1428,9 +1429,9 @@ Browser_List_Set_Row_Appearance (GtkTreeIter *iter)
 
     // Must change background color?
     if (otherdir)
-        backgroundcolor = &LIGHT_BLUE;
+        background = &LIGHT_BLUE;
     else
-        backgroundcolor = NULL;
+        background = NULL;
 
     // Set text to bold/red if 'filename' or 'tag' changed
     if ( ET_Check_If_File_Is_Saved(rowETFile) == FALSE )
@@ -1439,20 +1440,20 @@ Browser_List_Set_Row_Appearance (GtkTreeIter *iter)
         {
             gtk_list_store_set(fileListModel, iter,
                                LIST_FONT_WEIGHT,    PANGO_WEIGHT_BOLD,
-                               LIST_ROW_BACKGROUND, backgroundcolor,
+                               LIST_ROW_BACKGROUND, background,
                                LIST_ROW_FOREGROUND, NULL, -1);
         } else
         {
             gtk_list_store_set(fileListModel, iter,
                                LIST_FONT_WEIGHT,    PANGO_WEIGHT_NORMAL,
-                               LIST_ROW_BACKGROUND, backgroundcolor,
+                               LIST_ROW_BACKGROUND, background,
                                LIST_ROW_FOREGROUND, &RED, -1);
         }
     } else
     {
         gtk_list_store_set(fileListModel, iter,
                            LIST_FONT_WEIGHT,    PANGO_WEIGHT_NORMAL,
-                           LIST_ROW_BACKGROUND, backgroundcolor,
+                           LIST_ROW_BACKGROUND, background,
                            LIST_ROW_FOREGROUND, NULL ,-1);
     }
 
@@ -3508,7 +3509,7 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
                                         G_TYPE_INT, /* File key. */
                                         G_TYPE_BOOLEAN, /* File OtherDir. */
                                         G_TYPE_INT, /* Font weight. */
-                                        GDK_TYPE_COLOR, /* Row background. */
+                                        GDK_TYPE_RGBA, /* Row background. */
                                         GDK_TYPE_COLOR); /* Row foreground. */
 
     BrowserList = gtk_tree_view_new_with_model(GTK_TREE_MODEL(fileListModel));
@@ -3529,7 +3530,7 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
         gtk_tree_view_column_set_title (column, _(BrowserList_Titles[i]));
         gtk_tree_view_column_set_attributes(column, renderer, "text", i,
                                             "weight", LIST_FONT_WEIGHT,
-                                            "background-gdk",
+                                            "background-rgba",
                                             LIST_ROW_BACKGROUND,
                                             "foreground-gdk",
                                             LIST_ROW_FOREGROUND, NULL);
diff --git a/src/et_core.c b/src/et_core.c
index ddaa6b8..e3b1f7e 100644
--- a/src/et_core.c
+++ b/src/et_core.c
@@ -122,7 +122,6 @@ const gsize ET_FILE_DESCRIPTION_SIZE = G_N_ELEMENTS (ETFileDescription) - 1;
 /*
  * Colors Used
  */
-GdkColor LIGHT_BLUE = {0, 0xddd1, 0xeeec, 0xffff};
 GdkColor RED        = {0, 0xffff, 0x0000, 0x0000};
 GdkColor LIGHT_RED  = {0, 0xffff, 0x8888, 0x8888};
 GdkColor GREY       = {0, 0xaa00, 0xaa00, 0xaa00};
diff --git a/src/et_core.h b/src/et_core.h
index 469a284..16e4985 100644
--- a/src/et_core.h
+++ b/src/et_core.h
@@ -32,7 +32,6 @@ G_BEGIN_DECLS
 /*
  * Colors Used (see declaration into et_core.c)
  */
-extern GdkColor LIGHT_BLUE;
 extern GdkColor RED;
 extern GdkColor LIGHT_RED;
 extern GdkColor GREY;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]