Exemple #1
0
static void
pragha_application_construct_window (PraghaApplication *pragha)
{
	gchar *icon_uri = NULL;

	/* Main window */

	pragha->mainwindow = gtk_application_window_new (GTK_APPLICATION (pragha));

	icon_uri = g_build_filename (PIXMAPDIR, "pragha.png", NULL);
	pragha->pixbuf_app = gdk_pixbuf_new_from_file (icon_uri, NULL);
	g_free (icon_uri);

	if (!pragha->pixbuf_app)
		g_warning("Unable to load pragha png");
	else
		gtk_window_set_icon (GTK_WINDOW(pragha->mainwindow),
		                     pragha->pixbuf_app);
	
	gtk_window_set_title(GTK_WINDOW(pragha->mainwindow), _("Pragha Music Player"));

	/* Get all widgets instances */

	pragha->menu_ui_manager = pragha_menubar_new ();
	pragha->toolbar = pragha_toolbar_new ();
	pragha->infobox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	pragha->pane1 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
	pragha->pane2 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
	pragha->sidebar1 = pragha_sidebar_new ();
	pragha->sidebar2 = pragha_sidebar_new ();
	pragha->library = pragha_library_pane_new ();
	pragha->playlist = pragha_playlist_new ();
	pragha->statusbar = pragha_statusbar_get ();
	pragha->scanner = pragha_scanner_new();

	pragha->status_icon = pragha_status_icon_new (pragha);

	pragha_menubar_connect_signals (pragha->menu_ui_manager, pragha);

	/* Contruct the window. */

	pragha_window_new (pragha);
}
Exemple #2
0
static void
pragha_application_construct_window (PraghaApplication *pragha)
{
	/* Main window */

	pragha->mainwindow = gtk_application_window_new (GTK_APPLICATION (pragha));

	gtk_window_set_icon_name (GTK_WINDOW(pragha->mainwindow), "pragha");


	/* Get all widgets instances */

	pragha->menu_ui_manager = pragha_menubar_new ();
	pragha->menu_ui = pragha_gmenu_toolbar_new (pragha);
	pragha->toolbar = pragha_toolbar_new ();
	pragha->infobox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	pragha->pane1 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
	pragha->main_stack = gtk_stack_new ();
	pragha->pane2 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
	pragha->sidebar1 = pragha_sidebar_new ();
	pragha->sidebar2 = pragha_sidebar_new ();
	pragha->library = pragha_library_pane_new ();
	pragha->playlist = pragha_playlist_new ();
	pragha->statusbar = pragha_statusbar_get ();
	pragha->scanner = pragha_scanner_new();

	pragha->status_icon = pragha_status_icon_new (pragha);

	pragha_menubar_connect_signals (pragha->menu_ui_manager, pragha);

	/* Contruct the window. */

	pragha_window_new (pragha);

	gtk_window_set_title (GTK_WINDOW(pragha->mainwindow),
	                      _("Pragha Music Player"));
}