-static void
-theme_boxes_setup_clean (EmpathyTheme *theme)
-{
- g_object_set (theme,
- "header-foreground", "black",
- "header-background", "#efefdf",
- "header_line_background", "#e3e3d3",
- "action_foreground", "brown4",
- "time_foreground", "darkgrey",
- "event_foreground", "darkgrey",
- "invite_foreground", "sienna",
- "link_foreground","#49789e",
- NULL);
-}
-
-static void
-theme_boxes_gdk_color_to_hex (GdkColor *gdk_color, gchar *str_color)
-{
- g_snprintf (str_color, 10,
- "#%02x%02x%02x",
- gdk_color->red >> 8,
- gdk_color->green >> 8,
- gdk_color->blue >> 8);
-}
-
-static void
-theme_boxes_setup_themed (EmpathyTheme *theme)
-{
- EmpathyThemeBoxesPriv *priv;
- GtkWidget *widget;
- GtkStyle *style;
- gchar color[10];
-
- priv = GET_PRIV (theme);
-
- widget = gtk_entry_new ();
- style = gtk_widget_get_style (widget);
- gtk_widget_destroy (widget);
-
- theme_boxes_gdk_color_to_hex (&style->base[GTK_STATE_SELECTED], color);
-
- g_object_set (theme,
- "action-foreground", color,
- "link-foreground", color,
- NULL);
-
- theme_boxes_gdk_color_to_hex (&style->bg[GTK_STATE_SELECTED], color);
-
- g_object_set (theme,
- "header-background", color,
- NULL);
-
- theme_boxes_gdk_color_to_hex (&style->dark[GTK_STATE_SELECTED], color);
-
- g_object_set (theme,
- "header_line-background", color,
- NULL);
-
- theme_boxes_gdk_color_to_hex (&style->fg[GTK_STATE_SELECTED], color);
-
- g_object_set (theme,
- "header-foreground", color,
- NULL);
-}
-
-static void
-theme_boxes_theme_changed_cb (GtkWidget *widget,
- GtkStyle *previous_style,
- gpointer user_data)
-{
- theme_boxes_setup_themed (EMPATHY_THEME (user_data));
-
- g_signal_emit_by_name (G_OBJECT (user_data), "updated");
-}
-
-static void
-theme_boxes_setup_blue (EmpathyTheme *theme)
-{
- g_object_set (theme,
- "header_foreground", "black",
- "header_background", "#88a2b4",
- "header_line_background", "#7f96a4",
- "text_foreground", "black",
- "text_background", "#adbdc8",
- "highlight_foreground", "black",
- "action_foreground", "brown4",
- "time_foreground", "darkgrey",
- "event_foreground", "#7f96a4",
- "invite_foreground", "sienna",
- "link_foreground", "#49789e",
- NULL);
-}
-
-EmpathyTheme *
-empathy_theme_boxes_new (const gchar *name)
-{
- EmpathyTheme *theme;
- EmpathyThemeBoxesPriv *priv;
-
- theme = g_object_new (EMPATHY_TYPE_THEME_BOXES, NULL);
- priv = GET_PRIV (theme);
-
- if (strcmp (name, "clean") == 0) {
- theme_boxes_setup_clean (theme);
- }
- else if (strcmp (name, "simple") == 0) {
- /* FIXME: Make an actual accessor function */
- g_signal_connect (empathy_main_window_show (),
- "style-set",
- G_CALLBACK (theme_boxes_theme_changed_cb),
- theme);
-
- theme_boxes_setup_themed (theme);
- }
- else if (strcmp (name, "blue") == 0) {
- theme_boxes_setup_blue (theme);
- }
-
- return theme;
-}
-
-