tint2conf : cleanup
git-svn-id: http://tint2.googlecode.com/svn/trunk@413 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
9d1372cc27
commit
34f3b37ddf
1 changed files with 0 additions and 40 deletions
|
@ -124,43 +124,3 @@ gboolean update_snapshot()
|
|||
|
||||
|
||||
|
||||
void custom_list_append2(const gchar *name)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
gchar *snap, *cmd;
|
||||
gint pixWidth, pixHeight;
|
||||
gboolean changeSize = FALSE;
|
||||
GdkPixbuf *icon;
|
||||
|
||||
// build panel's snapshot
|
||||
snap = g_build_filename (g_get_user_config_dir(), "tint2", "snap.jpg", NULL);
|
||||
g_remove(snap);
|
||||
|
||||
cmd = g_strdup_printf("tint2 -c \'%s\' -s \'%s\'", name, snap);
|
||||
system(cmd);
|
||||
g_free(cmd);
|
||||
|
||||
// load
|
||||
icon = gdk_pixbuf_new_from_file(snap, NULL);
|
||||
g_free(snap);
|
||||
if (!icon)
|
||||
return;
|
||||
|
||||
pixWidth = gdk_pixbuf_get_width(icon);
|
||||
pixHeight = gdk_pixbuf_get_height(icon);
|
||||
if (g_width_list < pixWidth) {
|
||||
g_width_list = pixWidth;
|
||||
changeSize = TRUE;
|
||||
}
|
||||
if (g_height_list < (pixHeight+6)) {
|
||||
g_height_list = pixHeight+6;
|
||||
changeSize = TRUE;
|
||||
}
|
||||
if (changeSize)
|
||||
gtk_cell_renderer_set_fixed_size(g_renderer, g_width_list, g_height_list);
|
||||
|
||||
gtk_list_store_append(g_store, &iter);
|
||||
gtk_list_store_set(g_store, &iter, COL_THEME_FILE, name, COL_SNAPSHOT, icon, -1);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue