1 #include <gtk/gtk.h> 2 #include <sys/types.h> 3 #include <sys/stat.h> 4 #include <sys/wait.h> 5 #include <sys/types.h> 6 #include <unistd.h> 7 #include <dirent.h> 8 #include <stdio.h> 9 #include <stdlib.h> 10 #include <string.h> 11 #include <fcntl.h> 12 #include <signal.h> 13 14 static GList *get_dirs(void); 15 static void preview_clicked(GtkWidget *button, gpointer data); 16 static void update_newfont (void); 17 static void apply_clicked(GtkWidget *button, gpointer data); 18 static void usage(void); 19 static void ok_clicked(gchar *rc); 20 static void preview_ok_clicked(gchar *rc); 21 static GtkTreeModel *create_model(void); 22 static void dock(void); 23 /*static int rightclick (GtkWidget *w, GdkEventButton *event, gpointer data);*/ 24 static void preview(gchar *rc_file); 25 static void preview_window(gchar *rc_file); 26 static void send_refresh_signal(void); 27 static short is_themedir (gchar *path, gchar **rc_file); 28 static short is_installed_theme (gchar *path, gchar **rc_file); 29 static short install_tarball (gchar *path, gchar **rc_file); 30 static int switcheroo (gchar *actual); 31 static void install_clicked (GtkWidget *w, gpointer data); 32 static void install_ok_clicked (GtkWidget *w, gpointer data); 33 static void search_for_theme_or_die_trying (gchar *actual, gchar **rc_file); 34 static void set_font (GtkWidget *w, GtkWidget *dialog); 35 static void font_browse_clicked (GtkWidget *w, gpointer data); 36 static short fgrep_gtkrc_for (gchar *needle); 37 static GList *compare_glists (GList *t1, GList *t2, GCompareFunc cmpfunc); 38 void quit_preview(); 39 void quit(); 40 void hide_stuff(); 41 void show_stuff(); 42 void on_eventbox_click(); 43 void clist_insert(GtkTreeView *clist); 44