diff --git a/demos/gtk-demo/Makefile.am b/demos/gtk-demo/Makefile.am index 0c4da0f2fe..7e90f2d217 100644 --- a/demos/gtk-demo/Makefile.am +++ b/demos/gtk-demo/Makefile.am @@ -43,7 +43,7 @@ demos = \ stock_browser.c \ textview.c \ textscroll.c \ - theming.c \ + theming_style_classes.c \ toolpalette.c \ transparent.c \ tree_store.c \ diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c index df2a6c6351..ce362a288b 100644 --- a/demos/gtk-demo/main.c +++ b/demos/gtk-demo/main.c @@ -623,12 +623,18 @@ load_file (const gchar *filename) while (*p == '/' || *p == '*' || g_ascii_isspace (*p)) p++; r = p; - while (*r != '/' && *r != ':' && *r != '\0') - r++; - if (*r == '/') - p = r + 1; - if (r[0] == ':' && r[1] == ':') - *r = '\0'; + while (*r != '\0') + { + while (*r != '/' && *r != ':' && *r != '\0') + r++; + if (*r == '/') + { + r++; + p = r; + } + if (r[0] == ':' && r[1] == ':') + *r = '\0'; + } q = p + strlen (p); while (q > p && g_ascii_isspace (*(q - 1))) q--; diff --git a/demos/gtk-demo/theming.c b/demos/gtk-demo/theming_style_classes.c similarity index 94% rename from demos/gtk-demo/theming.c rename to demos/gtk-demo/theming_style_classes.c index a74ec6cb59..b00e4dcdb9 100644 --- a/demos/gtk-demo/theming.c +++ b/demos/gtk-demo/theming_style_classes.c @@ -1,4 +1,4 @@ -/* Theming :: theming.ui +/* Theming/Style Classes :: theming.ui * * GTK+ uses CSS for theming. Style classes can be associated * with widgets to inform the theme about intended rendering. @@ -14,7 +14,7 @@ static GtkWidget *window = NULL; GtkWidget * -do_theming (GtkWidget *do_widget) +do_theming_style_classes (GtkWidget *do_widget) { GtkWidget *grid; GtkBuilder *builder;