Ticket #122: notify-standard-theme-love.diff

  • src/themes/standard/theme.c

    old new  
    11#include "config.h" 
    22 
     3#include <string.h> 
    34#include <gtk/gtk.h> 
     5#include <gconf/gconf-client.h> 
    46#include <libsexy/sexy-url-label.h> 
    57 
    68typedef void (*ActionInvokedCb)(GtkWindow *nw, const char *key); 
     
    2123    GtkWidget *last_sep; 
    2224    GtkWidget *stripe_spacer; 
    2325    GtkWidget *pie_countdown; 
     26    GtkWidget *close_button; 
    2427 
    2528    gboolean has_arrow; 
    2629    gboolean enable_transparency; 
     30    gboolean show_close_button; 
     31    gboolean draw_gradients; 
    2732 
    2833    int point_x; 
    2934    int point_y; 
     
    3540    int drawn_arrow_end_x; 
    3641    int drawn_arrow_end_y; 
    3742 
     43    int theme_width; 
    3844    int width; 
    3945    int height; 
    4046 
     
    4955 
    5056    UrlClickedCb url_clicked; 
    5157 
     58    guint gconf_notify_id; 
     59 
     60    double background_opacity; 
     61 
     62    GdkColor background_color; 
     63    GdkColor urgency_low_color; 
     64    GdkColor urgency_normal_color; 
     65    GdkColor urgency_critical_color; 
    5266} WindowData; 
    5367 
    5468enum 
     
    5872    URGENCY_CRITICAL 
    5973}; 
    6074 
    61 //#define ENABLE_GRADIENT_LOOK 
    62  
    63 #ifdef ENABLE_GRADIENT_LOOK 
    64 # define STRIPE_WIDTH  45 
    65 #else 
    66 # define STRIPE_WIDTH  30 
    67 #endif 
    6875 
     76#define STRIPE_WIDTH  30 
    6977#define WIDTH         400 
    7078#define IMAGE_SIZE    32 
    7179#define IMAGE_PADDING 10 
     
    7785#define DEFAULT_ARROW_OFFSET  (SPACER_LEFT + 2) 
    7886#define DEFAULT_ARROW_HEIGHT  14 
    7987#define DEFAULT_ARROW_WIDTH   28 
    80 #define BACKGROUND_OPACITY    0.92 
    8188#define BOTTOM_GRADIENT_HEIGHT 30 
    8289 
     90#define DEFAULT_BACKGROUND_OPACITY     0.92 
     91#define DEFAULT_COLOR_BACKGROUND       "bg[normal]" 
     92#define DEFAULT_URGENCY_COLOR_CRITICAL "#a40000" 
     93#define DEFAULT_URGENCY_COLOR_NORMAL   "bg[selected]" 
     94#define DEFAULT_URGENCY_COLOR_LOW      "dark[normal]" 
     95 
     96#define BASE_GCONF_KEY "/apps/notification-daemon/themes/standard" 
     97 
    8398#if GTK_CHECK_VERSION(2, 8, 0) 
    8499# define USE_CAIRO 
    85100#endif 
     
    88103# define USE_COMPOSITE 
    89104#endif 
    90105 
     106static const gchar *gtk_state_strings [] = { 
     107    "normal", "active", "prelight", "selected", "insensitive", NULL 
     108}; 
     109 
     110static gboolean 
     111parse_theme_color(GtkStyle *style, GdkColor *color, const gchar *str) 
     112{ 
     113    GtkStateType state = -1; 
     114    gchar *head, *p; 
     115    gchar *style_str, *state_str; 
     116    gint i; 
     117 
     118    head = g_strdup(str); 
     119    p = strchr(head, '['); 
     120     
     121    if (p == NULL || p - head <= 0) { 
     122        g_free(head); 
     123        return FALSE; 
     124    } 
     125 
     126    head[p - head] = '\0'; 
     127    style_str = head; 
     128    state_str = p + 1; 
     129    state_str[strlen(state_str) - 1] = '\0'; 
     130 
     131    for (i = 0; gtk_state_strings[i] != NULL; i++) { 
     132        if (g_ascii_strcasecmp(gtk_state_strings[i], state_str) == 0) { 
     133            state = (GtkStateType)i; 
     134            break; 
     135        } 
     136    } 
     137 
     138    if (state == -1) { 
     139        g_free(head); 
     140        return FALSE; 
     141    } 
     142 
     143    if (g_ascii_strcasecmp(style_str, "fg") == 0) { 
     144        *color = style->fg[state]; 
     145    } else if (g_ascii_strcasecmp(style_str, "bg") == 0) { 
     146        *color = style->bg[state]; 
     147    } else if (g_ascii_strcasecmp(style_str, "light") == 0) { 
     148        *color = style->light[state]; 
     149    } else if (g_ascii_strcasecmp(style_str, "dark") == 0) { 
     150        *color = style->dark[state]; 
     151    } else if (g_ascii_strcasecmp(style_str, "mid") == 0) { 
     152        *color = style->mid[state]; 
     153    } else if (g_ascii_strcasecmp(style_str, "text") == 0) { 
     154        *color = style->text[state]; 
     155    } else if (g_ascii_strcasecmp(style_str, "base") == 0) { 
     156        *color = style->base[state]; 
     157    } else if (g_ascii_strcasecmp(style_str, "text_aa") == 0) { 
     158        *color = style->text_aa[state]; 
     159    } else { 
     160        g_free(head); 
     161        return FALSE; 
     162    } 
     163 
     164    g_free(head); 
     165    return TRUE; 
     166} 
     167 
     168static gboolean 
     169parse_color(GtkStyle *style, GdkColor *color, const gchar *attempt,  
     170    const gchar *fallback) 
     171{ 
     172    if (style != NULL && parse_theme_color(style, color, attempt)) { 
     173        return TRUE; 
     174    } else if (gdk_color_parse(attempt, color)) { 
     175        return TRUE; 
     176    } 
     177 
     178    return gdk_color_parse(fallback, color); 
     179} 
     180 
     181static void 
     182load_theme_settings(WindowData *windata) 
     183{ 
     184    GConfClient *client; 
     185    GConfValue *value; 
     186    GtkStyle *style = NULL; 
     187 
     188    const gchar *color_low = DEFAULT_URGENCY_COLOR_LOW; 
     189    const gchar *color_normal = DEFAULT_URGENCY_COLOR_NORMAL; 
     190    const gchar *color_critical = DEFAULT_URGENCY_COLOR_CRITICAL; 
     191    const gchar *color_background = DEFAULT_COLOR_BACKGROUND; 
     192 
     193    client = gconf_client_get_default(); 
     194 
     195    value = gconf_client_get(client, BASE_GCONF_KEY  
     196        "/background_opacity", NULL); 
     197     
     198    windata->background_opacity = value == NULL  
     199        ? DEFAULT_BACKGROUND_OPACITY 
     200        : gconf_value_get_float(value); 
     201 
     202    value = gconf_client_get(client, BASE_GCONF_KEY "/color_low", NULL); 
     203    if (value != NULL) { 
     204        color_low = gconf_value_get_string(value); 
     205    } 
     206 
     207    value = gconf_client_get(client, BASE_GCONF_KEY "/color_normal", NULL); 
     208    if (value != NULL) { 
     209        color_normal = gconf_value_get_string(value); 
     210    } 
     211     
     212    value = gconf_client_get(client, BASE_GCONF_KEY "/color_critical", NULL); 
     213    if (value != NULL) { 
     214        color_critical = gconf_value_get_string(value); 
     215    } 
     216 
     217    value = gconf_client_get(client, BASE_GCONF_KEY "/color_background", NULL); 
     218    if (value != NULL) { 
     219        color_background = gconf_value_get_string(value); 
     220    } 
     221 
     222    if (windata->win != NULL) { 
     223        gtk_widget_ensure_style(windata->win); 
     224        style = gtk_widget_get_style(windata->win); 
     225    } 
     226     
     227    parse_color(style, &windata->urgency_low_color, 
     228        color_low, DEFAULT_URGENCY_COLOR_LOW); 
     229 
     230    parse_color(style, &windata->urgency_normal_color,  
     231        color_normal, DEFAULT_URGENCY_COLOR_NORMAL); 
     232 
     233    parse_color(style, &windata->urgency_critical_color,  
     234        color_critical, DEFAULT_URGENCY_COLOR_CRITICAL); 
     235 
     236    parse_color(style, &windata->background_color,  
     237        color_background, DEFAULT_COLOR_BACKGROUND); 
     238 
     239    value = gconf_client_get(client, BASE_GCONF_KEY "/draw_gradients", NULL); 
     240    if (value != NULL) { 
     241        windata->draw_gradients = gconf_value_get_bool(value); 
     242    } 
     243 
     244    value = gconf_client_get(client, BASE_GCONF_KEY "/show_close_button", NULL); 
     245    if (value != NULL) { 
     246        windata->show_close_button = gconf_value_get_bool(value); 
     247    } 
     248 
     249    value = gconf_client_get(client, BASE_GCONF_KEY "/width", NULL); 
     250    if (value != NULL) { 
     251        windata->theme_width = gconf_value_get_int(value); 
     252    } 
     253} 
     254 
     255static void 
     256set_urgency_color(WindowData *windata, GdkColor *color) 
     257{ 
     258    switch (windata->urgency)  
     259    { 
     260        case URGENCY_LOW: 
     261            *color = windata->urgency_low_color; 
     262            break; 
     263        case URGENCY_CRITICAL: 
     264            *color = windata->urgency_critical_color; 
     265            break; 
     266        case URGENCY_NORMAL: 
     267        default: 
     268            *color = windata->urgency_normal_color; 
     269            break; 
     270    } 
     271} 
     272 
     273static void 
     274gconf_notify_cb(GConfClient *client, guint connection_id, GConfEntry *entry, 
     275    gpointer userdata) 
     276{ 
     277    WindowData *windata = (WindowData *)userdata; 
     278 
     279    load_theme_settings(windata); 
     280 
     281    if (windata->win != NULL) { 
     282        gtk_widget_queue_draw(windata->win); 
     283    } 
     284} 
     285 
     286static void  
     287setup_gconf(WindowData *windata) 
     288{ 
     289    GConfClient *client; 
     290    GError *error = NULL; 
     291 
     292    client = gconf_client_get_default(); 
     293 
     294    if (gconf_client_dir_exists(client, BASE_GCONF_KEY, &error)) { 
     295        gconf_client_add_dir(client, BASE_GCONF_KEY,  
     296            GCONF_CLIENT_PRELOAD_ONELEVEL, &error); 
     297    } 
     298     
     299    if (error != NULL) { 
     300        g_warning(error->message); 
     301        g_error_free(error); 
     302        return; 
     303    } 
     304 
     305    windata->gconf_notify_id = gconf_client_notify_add(client,  
     306        BASE_GCONF_KEY, gconf_notify_cb, windata, NULL, &error); 
     307     
     308    if (error != NULL) { 
     309        g_warning(error->message); 
     310        g_error_free(error); 
     311    } 
     312} 
    91313 
    92314#ifdef USE_CAIRO 
    93315static void 
    94316fill_background(GtkWidget *widget, WindowData *windata, cairo_t *cr) 
    95317{ 
    96     GtkStyle *style = gtk_widget_get_style(widget); 
    97     GdkColor *background_color = &style->base[GTK_STATE_NORMAL]; 
    98 #ifdef ENABLE_GRADIENT_LOOK 
     318    GdkColor *background_color = &windata->background_color; 
    99319    cairo_pattern_t *gradient; 
    100320    int gradient_y = widget->allocation.height - BOTTOM_GRADIENT_HEIGHT; 
    101 #endif 
    102321 
    103322    if (windata->enable_transparency) 
    104323    { 
     
    106325                              background_color->red   / 65535.0, 
    107326                              background_color->green / 65535.0, 
    108327                              background_color->blue  / 65535.0, 
    109                               BACKGROUND_OPACITY); 
     328                              windata->background_opacity); 
    110329    } 
    111330    else 
    112331    { 
     
    118337                    widget->allocation.height); 
    119338    cairo_fill(cr); 
    120339 
    121 #ifdef ENABLE_GRADIENT_LOOK 
    122     /* Add a very subtle gradient to the bottom of the notification */ 
    123     gradient = cairo_pattern_create_linear(0, gradient_y, 0, 
    124                                            widget->allocation.height); 
    125     cairo_pattern_add_color_stop_rgba(gradient, 0, 0, 0, 0, 0); 
    126     cairo_pattern_add_color_stop_rgba(gradient, 1, 0, 0, 0, 0.15); 
    127     cairo_rectangle(cr, 0, gradient_y, widget->allocation.width, 
    128                     BOTTOM_GRADIENT_HEIGHT); 
    129     cairo_set_source(cr, gradient); 
    130     cairo_fill(cr); 
    131     cairo_pattern_destroy(gradient); 
    132 #endif 
     340    if (windata->draw_gradients) { 
     341       /* Add a very subtle gradient to the bottom of the notification */ 
     342       gradient = cairo_pattern_create_linear(0, gradient_y, 0, 
     343                                              widget->allocation.height); 
     344       cairo_pattern_add_color_stop_rgba(gradient, 0, 0, 0, 0, 0); 
     345       cairo_pattern_add_color_stop_rgba(gradient, 1, 0, 0, 0, 0.15); 
     346       cairo_rectangle(cr, 0, gradient_y, widget->allocation.width, 
     347                       BOTTOM_GRADIENT_HEIGHT); 
     348       cairo_set_source(cr, gradient); 
     349       cairo_fill(cr); 
     350       cairo_pattern_destroy(gradient); 
     351    } 
    133352} 
    134353#else /* !USE_CAIRO */ 
    135354static void 
    136355fill_background(GtkWidget *widget, WindowData *windata) 
    137356{ 
    138     GtkStyle *style = gtk_widget_get_style(windata->win)
     357    GdkGC *gc
    139358 
     359    gc = gdk_gc_new(GDK_DRAWABLE(widget->window)); 
     360    gdk_gc_set_rgb_fg_color(gc, &windata->background_color); 
     361     
    140362    gdk_draw_rectangle(GDK_DRAWABLE(widget->window), 
    141                        style->base_gc[GTK_STATE_NORMAL], TRUE, 
     363                       gc, TRUE, 
    142364                       0, 0, 
    143365                       widget->allocation.width, 
    144366                       widget->allocation.height); 
     367 
     368    g_object_unref(G_OBJECT(gc)); 
    145369} 
    146370#endif 
    147371 
     
    149373static void 
    150374draw_stripe(GtkWidget *widget, WindowData *windata, cairo_t *cr) 
    151375{ 
    152     GtkStyle *style = gtk_widget_get_style(widget); 
    153376    GdkColor color; 
    154377    int stripe_x = windata->main_hbox->allocation.x + 1; 
    155378    int stripe_y = windata->main_hbox->allocation.y + 1; 
    156379    int stripe_height = windata->main_hbox->allocation.height - 2; 
    157 #ifdef ENABLE_GRADIENT_LOOK 
    158380    cairo_pattern_t *gradient; 
    159381    double r, g, b; 
    160 #endif 
    161  
    162     switch (windata->urgency) 
    163     { 
    164         case URGENCY_LOW: // LOW 
    165             color = style->bg[GTK_STATE_NORMAL]; 
    166             break; 
    167  
    168         case URGENCY_CRITICAL: // CRITICAL 
    169             gdk_color_parse("#CC0000", &color); 
    170             break; 
    171  
    172         case URGENCY_NORMAL: // NORMAL 
    173         default: 
    174             color = style->bg[GTK_STATE_SELECTED]; 
    175             break; 
     382     
     383    set_urgency_color(windata, &color); 
     384    cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE); 
     385 
     386    cairo_rectangle(cr, stripe_x, stripe_y, STRIPE_WIDTH,  
     387        stripe_height + (windata->has_arrow ? 1 : 0)); 
     388 
     389    if (windata->draw_gradients) { 
     390        r = color.red   / 65535.0; 
     391        g = color.green / 65535.0; 
     392        b = color.blue  / 65535.0; 
     393 
     394        gradient = cairo_pattern_create_linear(stripe_x, 0, STRIPE_WIDTH, 0); 
     395        cairo_pattern_add_color_stop_rgba(gradient, 0, r, g, b, 1); 
     396        cairo_pattern_add_color_stop_rgba(gradient, 1, r, g, b, 0.5); 
     397        cairo_set_source(cr, gradient); 
     398        cairo_fill(cr); 
     399        cairo_pattern_destroy(gradient); 
     400    } else { 
     401        gdk_cairo_set_source_color(cr, &color); 
     402        cairo_fill(cr); 
    176403    } 
    177  
    178     cairo_rectangle(cr, stripe_x, stripe_y, STRIPE_WIDTH, stripe_height); 
    179  
    180 #ifdef ENABLE_GRADIENT_LOOK 
    181     r = color.red   / 65535.0; 
    182     g = color.green / 65535.0; 
    183     b = color.blue  / 65535.0; 
    184  
    185     gradient = cairo_pattern_create_linear(stripe_x, 0, STRIPE_WIDTH, 0); 
    186     cairo_pattern_add_color_stop_rgba(gradient, 0, r, g, b, 1); 
    187     cairo_pattern_add_color_stop_rgba(gradient, 1, r, g, b, 0); 
    188     cairo_set_source(cr, gradient); 
    189     cairo_fill(cr); 
    190     cairo_pattern_destroy(gradient); 
    191 #else 
    192     gdk_cairo_set_source_color(cr, &color); 
    193     cairo_fill(cr); 
    194 #endif 
    195404} 
    196405#else /* !USE_CAIRO */ 
    197406static void 
    198407draw_stripe(GtkWidget *widget, WindowData *windata) 
    199408{ 
    200     GtkStyle *style = gtk_widget_get_style(widget); 
    201     gboolean custom_gc = FALSE; 
    202409    GdkColor color; 
    203410    GdkGC *gc; 
    204411 
    205     switch (windata->urgency) 
    206     { 
    207         case URGENCY_LOW: // LOW 
    208             gc = style->bg_gc[GTK_STATE_NORMAL]; 
    209             break; 
    210  
    211         case URGENCY_CRITICAL: // CRITICAL 
    212             custom_gc = TRUE; 
    213             gc = gdk_gc_new(GDK_DRAWABLE(widget->window)); 
    214             gdk_color_parse("#CC0000", &color); 
    215             gdk_gc_set_rgb_fg_color(gc, &color); 
    216             break; 
    217  
    218         case URGENCY_NORMAL: // NORMAL 
    219         default: 
    220             gc = style->bg_gc[GTK_STATE_SELECTED]; 
    221             break; 
    222     } 
    223  
    224  
     412    gc = gdk_gc_new(GDK_DRAWABLE(widget->window)); 
     413    set_urgency_color(windata, &color); 
     414    gdk_gc_set_rgb_fg_color(gc, &color); 
     415     
    225416    gdk_draw_rectangle(widget->window, gc, TRUE, 
    226417                       windata->main_hbox->allocation.x + 1, 
    227418                       windata->main_hbox->allocation.y + 1, 
    228419                       STRIPE_WIDTH, 
    229420                       windata->main_hbox->allocation.height - 2); 
    230421 
    231     if (custom_gc) 
    232         g_object_unref(G_OBJECT(gc)); 
     422    g_object_unref(G_OBJECT(gc)); 
    233423} 
    234424#endif 
    235425 
     
    467657static void 
    468658draw_border(GtkWidget *widget, WindowData *windata, cairo_t *cr) 
    469659{ 
    470     cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 1.0); 
     660    GdkColor border_color; 
     661 
     662    set_urgency_color(windata, &border_color); 
     663 
     664    cairo_set_source_rgba(cr,  
     665        border_color.red / 65535.0, 
     666        border_color.green / 65535.0,  
     667        border_color.blue / 65535.0,  
     668        0.75); 
     669     
     670    cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE); 
    471671    cairo_set_line_width(cr, 1.0); 
    472672 
    473673    if (windata->has_arrow) 
     
    477677        create_border_with_arrow(windata->win, windata); 
    478678 
    479679        cairo_move_to(cr, 
    480                       windata->border_points[0].x + 0.5
    481                       windata->border_points[0].y + 0.5); 
     680                      windata->border_points[0].x + 1.0
     681                      windata->border_points[0].y); 
    482682 
    483683        for (i = 1; i < windata->num_border_points; i++) 
    484684        { 
    485685            cairo_line_to(cr, 
    486                           windata->border_points[i].x + 0.5
    487                           windata->border_points[i].y + 0.5); 
     686                          windata->border_points[i].x + 1.0
     687                          windata->border_points[i].y); 
    488688        } 
    489689 
    490690        cairo_close_path(cr); 
     
    495695    } 
    496696    else 
    497697    { 
    498         cairo_rectangle(cr, 0.5, 0.5
    499                         windata->width - 0.5, windata->height - 0.5); 
     698        cairo_rectangle(cr, 1.0, 0.0
     699                        windata->width - 1.0, windata->height - 1.0); 
    500700    } 
    501701 
    502702    cairo_stroke(cr); 
     
    511711        GdkColor color; 
    512712 
    513713        windata->gc = gdk_gc_new(widget->window); 
    514         gdk_color_parse("black", &color); 
     714        set_urgency_color(windata, &color); 
    515715        gdk_gc_set_rgb_fg_color(windata->gc, &color); 
    516716    } 
    517717 
     
    533733                           0, 0, windata->width - 1, windata->height - 1); 
    534734    } 
    535735 
     736    g_object_unref(G_OBJECT(windata->gc)); 
     737    windata->gc = NULL; 
    536738} 
    537739#endif 
    538740 
     
    587789    if (windata->window_region != NULL) 
    588790        gdk_region_destroy(windata->window_region); 
    589791 
     792    gconf_client_notify_remove(gconf_client_get_default(),  
     793        windata->gconf_notify_id); 
     794 
    590795    g_free(windata); 
    591796} 
    592797 
     
    676881    windata->urgency = URGENCY_NORMAL; 
    677882    windata->url_clicked = url_clicked; 
    678883 
     884    windata->draw_gradients = TRUE; 
     885    windata->show_close_button = TRUE; 
     886    windata->theme_width = WIDTH; 
     887 
     888    setup_gconf(windata); 
     889 
    679890    win = gtk_window_new(GTK_WINDOW_POPUP); 
    680891    windata->win = win; 
    681892 
     
    691902    } 
    692903#endif 
    693904 
     905    load_theme_settings(windata); 
     906 
    694907    gtk_window_set_title(GTK_WINDOW(win), "Notification"); 
    695908    gtk_widget_add_events(win, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); 
    696909    gtk_widget_realize(win); 
    697     gtk_widget_set_size_request(win, WIDTH, -1); 
     910    gtk_widget_set_size_request(win, windata->theme_width, -1); 
    698911 
    699912    g_object_set_data_full(G_OBJECT(win), "windata", windata, 
    700913                           (GDestroyNotify)destroy_windata); 
     
    763976 
    764977    /* Add the close button */ 
    765978    close_button = gtk_button_new(); 
    766     gtk_widget_show(close_button); 
     979    windata->close_button = close_button; 
     980    if (windata->show_close_button) { 
     981        gtk_widget_show(close_button); 
     982    } 
    767983    gtk_box_pack_start(GTK_BOX(hbox), close_button, FALSE, FALSE, 0); 
    768984    gtk_button_set_relief(GTK_BUTTON(close_button), GTK_RELIEF_NONE); 
    769985    gtk_container_set_border_width(GTK_CONTAINER(close_button), 0); 
    770     gtk_widget_set_size_request(close_button, 20, 20); 
    771986    g_signal_connect_swapped(G_OBJECT(close_button), "clicked", 
    772987                             G_CALLBACK(gtk_widget_destroy), win); 
    773988 
  • data/Makefile.am

    old new  
    22service_DATA = org.freedesktop.Notifications.service 
    33 
    44schemasdir       = $(GCONF_SCHEMA_FILE_DIR) 
    5 schemas_in_files = notification-daemon.schemas.in 
     5schemas_in_files = notification-daemon.schemas.in notification-theme-standard.schemas.in 
    66schemas_DATA     = $(schemas_in_files:.schemas.in=.schemas) 
    77 
    88@INTLTOOL_SCHEMAS_RULE@ 
  • /dev/null

    old new  
     1<gconfschemafile> 
     2 <schemalist> 
     3 
     4  <schema> 
     5   <key>/schemas/apps/notification-daemon/themes/standard/background_opacity</key> 
     6   <applyto>/apps/notification-daemon/themes/standard/background_opacity</applyto> 
     7   <owner>notification-daemon</owner> 
     8   <type>float</type> 
     9   <default>0.92</default> 
     10   <locale name="C"> 
     11    <short>Opacity of the popup window</short> 
     12    <long>Background opacity of the popup window. Can be 0-100, where 0 is completely transparent and 100 is completely opaque. Works only if notification-daemon was built with Cairo  on GTK+ 2.10 or better and a compositing manager is running.</long> 
     13   </locale> 
     14  </schema> 
     15 
     16  <schema> 
     17   <key>/schemas/apps/notification-daemon/themes/standard/color_background</key> 
     18   <applyto>/apps/notification-daemon/themes/standard/color_background</applyto> 
     19   <owner>notification-daemon</owner> 
     20   <type>string</type> 
     21   <default>bg[normal]</default> 
     22   <locale name="C"> 
     23    <short>Background color of popup window</short> 
     24    <long>The color can be in short or long hexadecimal form (#ff9900 or #f90), a symbolic string (purple, blue, red), or a GTK+ style color, such as bg[normal], fg[selected], base[active], mid[prelight], etc.</long> 
     25   </locale> 
     26  </schema> 
     27 
     28  <schema> 
     29   <key>/schemas/apps/notification-daemon/themes/standard/color_critical</key> 
     30   <applyto>/apps/notification-daemon/themes/standard/color_critical</applyto> 
     31   <owner>notification-daemon</owner> 
     32   <type>string</type> 
     33   <default>#a40000</default> 
     34   <locale name="C"> 
     35    <short>Border and stripe color for critical urgency notification popup windows</short> 
     36    <long>The color can be in short or long hexadecimal form (#ff9900 or #f90), a symbolic string (purple, blue, red), or a GTK+ style color, such as bg[normal], fg[selected], base[active], mid[prelight], etc.</long> 
     37   </locale> 
     38  </schema> 
     39 
     40  <schema> 
     41   <key>/schemas/apps/notification-daemon/themes/standard/color_low</key> 
     42   <applyto>/apps/notification-daemon/themes/standard/color_low</applyto> 
     43   <owner>notification-daemon</owner> 
     44   <type>string</type> 
     45   <default>dark[normal]</default> 
     46   <locale name="C"> 
     47    <short>Border and stripe color for low urgency notification popup windows</short> 
     48    <long>The color can be in short or long hexadecimal form (#ff9900 or #f90), a symbolic string (purple, blue, red), or a GTK+ style color, such as bg[normal], fg[selected], base[active], mid[prelight], etc.</long> 
     49   </locale> 
     50  </schema> 
     51   
     52  <schema> 
     53   <key>/schemas/apps/notification-daemon/themes/standard/color_normal</key> 
     54   <applyto>/apps/notification-daemon/themes/standard/color_normal</applyto> 
     55   <owner>notification-daemon</owner> 
     56   <type>string</type> 
     57   <default>bg[selected]</default> 
     58   <locale name="C"> 
     59    <short>Border and stripe color for normal urgency notification popup windows</short> 
     60    <long>The color can be in short or long hexadecimal form (#ff9900 or #f90), a symbolic string (purple, blue, red), or a GTK+ style color, such as bg[normal], fg[selected], base[active], mid[prelight], etc.</long> 
     61   </locale> 
     62  </schema> 
     63   
     64  <schema> 
     65   <key>/schemas/apps/notification-daemon/themes/standard/draw_gradients</key> 
     66   <applyto>/apps/notification-daemon/themes/standard/draw_gradients</applyto> 
     67   <owner>notification-daemon</owner> 
     68   <type>bool</type> 
     69   <default>true</default> 
     70   <locale name="C"> 
     71    <short>Draw the stripe and background using subtle gradients</short> 
     72    <long>The left colored urgency stripe and the bottom of the notification popup window will be drawn in a very subtle gradient form. Works only if the notification-daemon was built with Cairo on GTK+ 2.8 or better.</long> 
     73   </locale> 
     74  </schema> 
     75   
     76  <schema> 
     77   <key>/schemas/apps/notification-daemon/themes/standard/show_close_button</key> 
     78   <applyto>/apps/notification-daemon/themes/standard/show_close_button</applyto> 
     79   <owner>notification-daemon</owner> 
     80   <type>bool</type> 
     81   <default>true</default> 
     82   <locale name="C"> 
     83    <short>Show a close button</short> 
     84    <long>Show a close button in the top right of the notification popup windows as a visual cue that the notifications can be dismissed before timing out. Clicking any area of the popup will however dismiss it.</long> 
     85   </locale> 
     86  </schema> 
     87 
     88  <schema> 
     89   <key>/schemas/apps/notification-daemon/themes/standard/width</key> 
     90   <applyto>/apps/notification-daemon/themes/standard/width</applyto> 
     91   <owner>notification-daemon</owner> 
     92   <type>int</type> 
     93   <default>400</default> 
     94   <locale name="C"> 
     95    <short>Fixed width of the notification popup windows</short> 
     96    <long>Width in pixels, which is recommended to be be no smaller than about 350.</long> 
     97   </locale> 
     98  </schema> 
     99 
     100 </schemalist> 
     101</gconfschemafile>