Пример #1
0
void compose_show_about(Compose * compose, gboolean show)
{
	GtkWidget * dialog;

	if(compose->ab_window != NULL)
	{
		if(show)
			gtk_widget_show(compose->ab_window);
		else
			gtk_widget_hide(compose->ab_window);
		return;
	}
	dialog = desktop_about_dialog_new();
	compose->ab_window = dialog;
	g_signal_connect_swapped(G_OBJECT(compose->ab_window), "delete-event",
			G_CALLBACK(_about_on_closex), compose);
	gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(
				compose->window));
	desktop_about_dialog_set_name(dialog, PACKAGE);
	desktop_about_dialog_set_version(dialog, VERSION);
	desktop_about_dialog_set_authors(dialog, _authors);
	desktop_about_dialog_set_comments(dialog, _(_comments));
	desktop_about_dialog_set_copyright(dialog, _copyright);
	desktop_about_dialog_set_logo_icon_name(dialog, "mailer");
	desktop_about_dialog_set_license(dialog, _license);
	gtk_widget_show(dialog);
}
Пример #2
0
void notes_about(Notes * notes)
{
	if(notes->about != NULL)
	{
		gtk_widget_show(notes->about);
		return;
	}
	notes->about = desktop_about_dialog_new();
	gtk_window_set_transient_for(GTK_WINDOW(notes->about),
			GTK_WINDOW(notes->window));
	desktop_about_dialog_set_authors(notes->about, _authors);
	desktop_about_dialog_set_comments(notes->about,
			_("Notes for the DeforaOS desktop"));
	desktop_about_dialog_set_copyright(notes->about, _copyright);
	desktop_about_dialog_set_logo_icon_name(notes->about, "notes");
	desktop_about_dialog_set_license(notes->about, _license);
	desktop_about_dialog_set_program_name(notes->about, PACKAGE);
	desktop_about_dialog_set_translator_credits(notes->about,
			_("translator-credits"));
	desktop_about_dialog_set_version(notes->about, VERSION);
	desktop_about_dialog_set_website(notes->about, "http://www.defora.org/");
	g_signal_connect_swapped(notes->about, "delete-event", G_CALLBACK(
				_about_on_closex), notes);
	gtk_widget_show(notes->about);
}
Пример #3
0
static void _panel_helper_about_dialog(Panel * panel)
{
	if(panel->ab_window != NULL)
	{
		gtk_window_present(GTK_WINDOW(panel->ab_window));
		return;
	}
	panel->ab_window = desktop_about_dialog_new();
	desktop_about_dialog_set_authors(panel->ab_window, _authors);
	desktop_about_dialog_set_comments(panel->ab_window,
			_("Panel for the DeforaOS desktop"));
	desktop_about_dialog_set_copyright(panel->ab_window, _copyright);
	desktop_about_dialog_set_logo_icon_name(panel->ab_window,
			"panel-settings"); /* XXX */
	desktop_about_dialog_set_license(panel->ab_window, _license);
	desktop_about_dialog_set_program_name(panel->ab_window, PACKAGE);
	desktop_about_dialog_set_translator_credits(panel->ab_window,
			_("translator-credits"));
	desktop_about_dialog_set_version(panel->ab_window, VERSION);
	desktop_about_dialog_set_website(panel->ab_window,
			"http://www.defora.org/");
	gtk_window_set_position(GTK_WINDOW(panel->ab_window),
			GTK_WIN_POS_CENTER_ALWAYS);
	g_signal_connect_swapped(panel->ab_window, "delete-event", G_CALLBACK(
				_about_on_closex), panel);
	gtk_widget_show(panel->ab_window);
}
Пример #4
0
void mixerwindow_about(MixerWindow * mixer)
{
	if(mixer->about != NULL)
	{
		gtk_widget_show(mixer->about);
		return;
	}
	mixer->about = desktop_about_dialog_new();
	gtk_window_set_transient_for(GTK_WINDOW(mixer->about), GTK_WINDOW(
				mixer->window));
	g_signal_connect(mixer->about, "delete-event", G_CALLBACK(
				_about_on_closex), NULL);
	desktop_about_dialog_set_authors(mixer->about, _authors);
	desktop_about_dialog_set_comments(mixer->about,
			_("Volume control for the DeforaOS desktop"));
	desktop_about_dialog_set_copyright(mixer->about, _copyright);
	desktop_about_dialog_set_license(mixer->about, _license);
	desktop_about_dialog_set_logo_icon_name(mixer->about, "stock_volume");
	desktop_about_dialog_set_name(mixer->about, PACKAGE);
	desktop_about_dialog_set_translator_credits(mixer->about,
			_("translator-credits"));
	desktop_about_dialog_set_version(mixer->about, VERSION);
	desktop_about_dialog_set_website(mixer->about,
			"http://www.defora.org/");
	gtk_widget_show(mixer->about);
}
Пример #5
0
static void _panel_helper_about_dialog(Panel * panel)
{
	char const * p;
	char const ** q;
	char const * authors[] = { NULL, NULL };

	if(panel->ab_window != NULL)
	{
		gtk_window_present(GTK_WINDOW(panel->ab_window));
		return;
	}
	panel->ab_window = desktop_about_dialog_new();
	if((authors[0] = panel_get_config(panel, "about", "authors")) != NULL)
		q = authors;
	else
		q = _authors;
	desktop_about_dialog_set_authors(panel->ab_window, q);
	if((p = panel_get_config(panel, "about", "comment")) == NULL)
		p = _("Panel for the DeforaOS desktop");
	desktop_about_dialog_set_comments(panel->ab_window, p);
	if((p = panel_get_config(panel, "about", "copyright")) == NULL)
		p = _copyright;
	desktop_about_dialog_set_copyright(panel->ab_window, p);
	if((p = panel_get_config(panel, "about", "icon")) == NULL)
		p = "panel-settings"; /* XXX */
	desktop_about_dialog_set_logo_icon_name(panel->ab_window, p);
	if((p = panel_get_config(panel, "about", "license")) == NULL)
		p = _license;
	desktop_about_dialog_set_license(panel->ab_window, p);
	if((p = panel_get_config(panel, "about", "name")) == NULL)
		p = PACKAGE;
	desktop_about_dialog_set_program_name(panel->ab_window, p);
	if((p = panel_get_config(panel, "about", "translator")) == NULL)
		p = _("translator-credits");
	desktop_about_dialog_set_translator_credits(panel->ab_window, p);
	if((p = panel_get_config(panel, "about", "version")) == NULL)
		p = VERSION;
	desktop_about_dialog_set_version(panel->ab_window, p);
	if((p = panel_get_config(panel, "about", "website")) == NULL)
		p = "https://www.defora.org/";
	desktop_about_dialog_set_website(panel->ab_window, p);
	gtk_window_set_position(GTK_WINDOW(panel->ab_window),
			GTK_WIN_POS_CENTER);
	g_signal_connect_swapped(panel->ab_window, "delete-event", G_CALLBACK(
				_about_on_closex), panel);
	gtk_widget_show(panel->ab_window);
}
Пример #6
0
/* callbacks */
static void _console_on_about(gpointer data)
{
	Console * console = data;
	GtkWidget * dialog;

	dialog = desktop_about_dialog_new();
	gtk_window_set_transient_for(GTK_WINDOW(dialog),
			GTK_WINDOW(console->window));
	desktop_about_dialog_set_authors(dialog, _authors);
	desktop_about_dialog_set_comments(dialog,
			"PHP console for the DeforaOS desktop");
	desktop_about_dialog_set_copyright(dialog, _copyright);
	desktop_about_dialog_set_license(dialog, _license);
	desktop_about_dialog_set_name(dialog, "Console");
	desktop_about_dialog_set_version(dialog, VERSION);
	desktop_about_dialog_set_website(dialog, "https://www.defora.org/");
	gtk_dialog_run(GTK_DIALOG(dialog));
	gtk_widget_destroy(dialog);
}