Ticket #122: notify-standard-theme-love.diff
-
src/themes/standard/theme.c
old new 1 1 #include "config.h" 2 2 3 #include <string.h> 3 4 #include <gtk/gtk.h> 5 #include <gconf/gconf-client.h> 4 6 #include <libsexy/sexy-url-label.h> 5 7 6 8 typedef void (*ActionInvokedCb)(GtkWindow *nw, const char *key); … … 21 23 GtkWidget *last_sep; 22 24 GtkWidget *stripe_spacer; 23 25 GtkWidget *pie_countdown; 26 GtkWidget *close_button; 24 27 25 28 gboolean has_arrow; 26 29 gboolean enable_transparency; 30 gboolean show_close_button; 31 gboolean draw_gradients; 27 32 28 33 int point_x; 29 34 int point_y; … … 35 40 int drawn_arrow_end_x; 36 41 int drawn_arrow_end_y; 37 42 43 int theme_width; 38 44 int width; 39 45 int height; 40 46 … … 49 55 50 56 UrlClickedCb url_clicked; 51 57 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; 52 66 } WindowData; 53 67 54 68 enum … … 58 72 URGENCY_CRITICAL 59 73 }; 60 74 61 //#define ENABLE_GRADIENT_LOOK62 63 #ifdef ENABLE_GRADIENT_LOOK64 # define STRIPE_WIDTH 4565 #else66 # define STRIPE_WIDTH 3067 #endif68 75 76 #define STRIPE_WIDTH 30 69 77 #define WIDTH 400 70 78 #define IMAGE_SIZE 32 71 79 #define IMAGE_PADDING 10 … … 77 85 #define DEFAULT_ARROW_OFFSET (SPACER_LEFT + 2) 78 86 #define DEFAULT_ARROW_HEIGHT 14 79 87 #define DEFAULT_ARROW_WIDTH 28 80 #define BACKGROUND_OPACITY 0.9281 88 #define BOTTOM_GRADIENT_HEIGHT 30 82 89 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 83 98 #if GTK_CHECK_VERSION(2, 8, 0) 84 99 # define USE_CAIRO 85 100 #endif … … 88 103 # define USE_COMPOSITE 89 104 #endif 90 105 106 static const gchar *gtk_state_strings [] = { 107 "normal", "active", "prelight", "selected", "insensitive", NULL 108 }; 109 110 static gboolean 111 parse_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 168 static gboolean 169 parse_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 181 static void 182 load_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 255 static void 256 set_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 273 static void 274 gconf_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 286 static void 287 setup_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 } 91 313 92 314 #ifdef USE_CAIRO 93 315 static void 94 316 fill_background(GtkWidget *widget, WindowData *windata, cairo_t *cr) 95 317 { 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; 99 319 cairo_pattern_t *gradient; 100 320 int gradient_y = widget->allocation.height - BOTTOM_GRADIENT_HEIGHT; 101 #endif102 321 103 322 if (windata->enable_transparency) 104 323 { … … 106 325 background_color->red / 65535.0, 107 326 background_color->green / 65535.0, 108 327 background_color->blue / 65535.0, 109 BACKGROUND_OPACITY);328 windata->background_opacity); 110 329 } 111 330 else 112 331 { … … 118 337 widget->allocation.height); 119 338 cairo_fill(cr); 120 339 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 } 133 352 } 134 353 #else /* !USE_CAIRO */ 135 354 static void 136 355 fill_background(GtkWidget *widget, WindowData *windata) 137 356 { 138 G tkStyle *style = gtk_widget_get_style(windata->win);357 GdkGC *gc; 139 358 359 gc = gdk_gc_new(GDK_DRAWABLE(widget->window)); 360 gdk_gc_set_rgb_fg_color(gc, &windata->background_color); 361 140 362 gdk_draw_rectangle(GDK_DRAWABLE(widget->window), 141 style->base_gc[GTK_STATE_NORMAL], TRUE,363 gc, TRUE, 142 364 0, 0, 143 365 widget->allocation.width, 144 366 widget->allocation.height); 367 368 g_object_unref(G_OBJECT(gc)); 145 369 } 146 370 #endif 147 371 … … 149 373 static void 150 374 draw_stripe(GtkWidget *widget, WindowData *windata, cairo_t *cr) 151 375 { 152 GtkStyle *style = gtk_widget_get_style(widget);153 376 GdkColor color; 154 377 int stripe_x = windata->main_hbox->allocation.x + 1; 155 378 int stripe_y = windata->main_hbox->allocation.y + 1; 156 379 int stripe_height = windata->main_hbox->allocation.height - 2; 157 #ifdef ENABLE_GRADIENT_LOOK158 380 cairo_pattern_t *gradient; 159 381 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); 176 403 } 177 178 cairo_rectangle(cr, stripe_x, stripe_y, STRIPE_WIDTH, stripe_height);179 180 #ifdef ENABLE_GRADIENT_LOOK181 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 #else192 gdk_cairo_set_source_color(cr, &color);193 cairo_fill(cr);194 #endif195 404 } 196 405 #else /* !USE_CAIRO */ 197 406 static void 198 407 draw_stripe(GtkWidget *widget, WindowData *windata) 199 408 { 200 GtkStyle *style = gtk_widget_get_style(widget);201 gboolean custom_gc = FALSE;202 409 GdkColor color; 203 410 GdkGC *gc; 204 411 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 225 416 gdk_draw_rectangle(widget->window, gc, TRUE, 226 417 windata->main_hbox->allocation.x + 1, 227 418 windata->main_hbox->allocation.y + 1, 228 419 STRIPE_WIDTH, 229 420 windata->main_hbox->allocation.height - 2); 230 421 231 if (custom_gc) 232 g_object_unref(G_OBJECT(gc)); 422 g_object_unref(G_OBJECT(gc)); 233 423 } 234 424 #endif 235 425 … … 467 657 static void 468 658 draw_border(GtkWidget *widget, WindowData *windata, cairo_t *cr) 469 659 { 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); 471 671 cairo_set_line_width(cr, 1.0); 472 672 473 673 if (windata->has_arrow) … … 477 677 create_border_with_arrow(windata->win, windata); 478 678 479 679 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); 482 682 483 683 for (i = 1; i < windata->num_border_points; i++) 484 684 { 485 685 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); 488 688 } 489 689 490 690 cairo_close_path(cr); … … 495 695 } 496 696 else 497 697 { 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); 500 700 } 501 701 502 702 cairo_stroke(cr); … … 511 711 GdkColor color; 512 712 513 713 windata->gc = gdk_gc_new(widget->window); 514 gdk_color_parse("black", &color);714 set_urgency_color(windata, &color); 515 715 gdk_gc_set_rgb_fg_color(windata->gc, &color); 516 716 } 517 717 … … 533 733 0, 0, windata->width - 1, windata->height - 1); 534 734 } 535 735 736 g_object_unref(G_OBJECT(windata->gc)); 737 windata->gc = NULL; 536 738 } 537 739 #endif 538 740 … … 587 789 if (windata->window_region != NULL) 588 790 gdk_region_destroy(windata->window_region); 589 791 792 gconf_client_notify_remove(gconf_client_get_default(), 793 windata->gconf_notify_id); 794 590 795 g_free(windata); 591 796 } 592 797 … … 676 881 windata->urgency = URGENCY_NORMAL; 677 882 windata->url_clicked = url_clicked; 678 883 884 windata->draw_gradients = TRUE; 885 windata->show_close_button = TRUE; 886 windata->theme_width = WIDTH; 887 888 setup_gconf(windata); 889 679 890 win = gtk_window_new(GTK_WINDOW_POPUP); 680 891 windata->win = win; 681 892 … … 691 902 } 692 903 #endif 693 904 905 load_theme_settings(windata); 906 694 907 gtk_window_set_title(GTK_WINDOW(win), "Notification"); 695 908 gtk_widget_add_events(win, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); 696 909 gtk_widget_realize(win); 697 gtk_widget_set_size_request(win, WIDTH, -1);910 gtk_widget_set_size_request(win, windata->theme_width, -1); 698 911 699 912 g_object_set_data_full(G_OBJECT(win), "windata", windata, 700 913 (GDestroyNotify)destroy_windata); … … 763 976 764 977 /* Add the close button */ 765 978 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 } 767 983 gtk_box_pack_start(GTK_BOX(hbox), close_button, FALSE, FALSE, 0); 768 984 gtk_button_set_relief(GTK_BUTTON(close_button), GTK_RELIEF_NONE); 769 985 gtk_container_set_border_width(GTK_CONTAINER(close_button), 0); 770 gtk_widget_set_size_request(close_button, 20, 20);771 986 g_signal_connect_swapped(G_OBJECT(close_button), "clicked", 772 987 G_CALLBACK(gtk_widget_destroy), win); 773 988 -
data/Makefile.am
old new 2 2 service_DATA = org.freedesktop.Notifications.service 3 3 4 4 schemasdir = $(GCONF_SCHEMA_FILE_DIR) 5 schemas_in_files = notification-daemon.schemas.in 5 schemas_in_files = notification-daemon.schemas.in notification-theme-standard.schemas.in 6 6 schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) 7 7 8 8 @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>
