summaryrefslogtreecommitdiff
path: root/mate-panel/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'mate-panel/main.c')
-rw-r--r--mate-panel/main.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/mate-panel/main.c b/mate-panel/main.c
index 4289c158..dc136cda 100644
--- a/mate-panel/main.c
+++ b/mate-panel/main.c
@@ -60,7 +60,8 @@ main (int argc, char **argv)
{
char *desktopfile;
GOptionContext *context;
- GError *error;
+ GError *error, *error2;
+ GtkCssProvider *provider;
bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
@@ -166,6 +167,23 @@ main (int argc, char **argv)
* connecting to the session manager */
panel_session_init ();
+ /*Load a css file from a path so the drag handle image can be loaded*/
+ error2 = NULL;
+ provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_path (provider,
+ DATADIR "/mate-panel/" "mate-panel.css", &error2);
+
+ if (error2 != NULL) {
+ g_warning ("Can't parse mate-panel CSS custom description: %s\n", error2->message);
+ g_error_free (error2);
+ }
+ else {
+ gtk_style_context_add_provider_for_screen (gdk_screen_get_default(),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_FALLBACK);
+ }
+ g_object_unref (provider);
+
gtk_main ();
panel_lockdown_finalize ();