Example #1
0
static void add_all(MacMenu* mmb)
{
  GList* windows = wnck_screen_get_windows(mmb->screen);
  GList* node = windows;
  while (node != NULL) {
    WnckWindow* wnckwin = (WnckWindow*) node->data;
    if (is_menubar(wnckwin))
      add_menubar(mmb, wnckwin);
    node = node->next;
  }
}
/*
 * Adds everything from <HTML> to <BODY>. title will be added
 * between <title> and </title>
 */
status_t add_page_start(http_response page, int pageid)
{
    const char *html =
        "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Strict//EN\">\n"
        "<html>\n"
        "<head>\n"
        "<meta http-equiv='Content-Type' content='text/html'>\n"
        "<link href='/webcache_styles.css' rel=stylesheet type='text/css'>"
        "<title>The Highlander web cache\n</title>\n"
        "</head>\n"
        "<body>"
        "<a href='http://www.metasystems.no'>"
        "<img border=0 src='/webcache_logo.gif'>"
        "</a><br>"
        ;

    if (!response_add(page, html))
        return failure;

    if (!add_menubar(page, pageid))
        return failure;

    return success;
}
Example #3
0
static void desktop_window_opened(WnckScreen* screen, WnckWindow* window, MacMenu* mmb)
{
  if (is_menubar(window))
    add_menubar(mmb, window);
}