Exemple #1
0
static char *
get_icon_path (char *icon_name)
{
	char *ret;
	
	if (g_path_is_absolute (icon_name)) {
		ret = g_strdup (icon_name);
	} else {
		ret = anjuta_res_get_pixmap_file (icon_name);
	}
	
	return ret;
}
Exemple #2
0
GtkWidget *
anjuta_res_get_image (const gchar * pixfile)
{
	GtkWidget *pixmap;
	gchar *pathname;
	
	if (!pixfile || !pixfile[0])
		return gtk_image_new ();

	pathname = anjuta_res_get_pixmap_file (pixfile);
	if (!pathname)
	{
		g_warning (_("Could not find application pixmap file: %s"),
			   pixfile);
		return gtk_image_new ();
	}
	pixmap = gtk_image_new_from_file (pathname);
	g_free (pathname);
	return pixmap;
}
Exemple #3
0
GtkWidget *
anjuta_res_get_image_sized (const gchar * pixfile, gint width, gint height)
{
	GtkWidget *pixmap;
	GdkPixbuf *pixbuf;
	gchar *pathname;
	
	if (!pixfile || !pixfile[0])
		return gtk_image_new ();

	pathname = anjuta_res_get_pixmap_file (pixfile);
	if (!pathname)
	{
		g_warning (_("Could not find application pixmap file: %s"),
			   pixfile);
		return gtk_image_new ();
	}
	pixbuf = gdk_pixbuf_new_from_file_at_size (pathname, width, height, NULL);
	pixmap = gtk_image_new_from_pixbuf (pixbuf);
	g_object_unref (pixbuf);
	g_free (pathname);
	return pixmap;
}
Exemple #4
0
	AnjutaStatus *status;
	AnjutaProfile *profile;
	GFile *session_profile;
	gchar *remembered_plugins;
	GFile *project = NULL;
	GFile *template = NULL;
	gchar *profile_name = NULL;
	gchar *im_file = NULL;
	GError *error = NULL;

	/* Initialize application */
	app = ANJUTA_APP (anjuta_app_new ());
	status = anjuta_shell_get_status (ANJUTA_SHELL (app), NULL);
	anjuta_status_progress_add_ticks (status, 1);

	im_file = anjuta_res_get_pixmap_file (ANJUTA_PIXMAP_SPLASH_SCREEN);

	gtk_window_set_role (GTK_WINDOW (app), "anjuta-app");
	gtk_window_set_auto_startup_notification(TRUE);
	gtk_window_set_default_icon_name ("anjuta");
	gtk_window_set_auto_startup_notification(FALSE);

	if (im_file)
	{
		anjuta_status_set_splash (status, im_file, 100);
		g_free (im_file);
	}
	if (no_splash)
		anjuta_status_disable_splash (status, no_splash);

	if (proper_shutdown)