#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <gtk/gtk.h>
#include "support.h"
Funkcije | |
GtkWidget * | lookup_widget (GtkWidget *widget, const gchar *widget_name) |
void | add_pixmap_directory (const gchar *directory) |
gchar * | find_pixmap_file (const gchar *filename) |
GtkWidget * | create_pixmap (GtkWidget *widget, const gchar *filename) |
GdkPixbuf * | create_pixbuf (const gchar *filename) |
void | glade_set_atk_action_description (AtkAction *action, const gchar *action_name, const gchar *description) |
Varijable | |
GList * | pixmaps_directories = NULL |
|
Definirano u liniji 70 datoteke support.c. Reference pixmaps_directories. Referencirano od main().
00071 { 00072 pixmaps_directories = g_list_prepend (pixmaps_directories, 00073 g_strdup (directory)); 00074 } |
|
Definirano u liniji 122 datoteke support.c. Reference _find_pixmap_file().
00123 { 00124 gchar *pathname = NULL; 00125 GdkPixbuf *pixbuf; 00126 GError *error = NULL; 00127 00128 if (!filename || !filename[0]) 00129 return NULL; 00130 00131 pathname = find_pixmap_file (filename); 00132 00133 if (!pathname) 00134 { 00135 g_warning (_("Couldn't find pixmap file: %s"), filename); 00136 return NULL; 00137 } 00138 00139 pixbuf = gdk_pixbuf_new_from_file (pathname, &error); 00140 if (!pixbuf) 00141 { 00142 fprintf (stderr, "Failed to load pixbuf file: %s: %s\n", 00143 pathname, error->message); 00144 g_error_free (error); 00145 } 00146 g_free (pathname); 00147 return pixbuf; 00148 } |
|
Definirano u liniji 98 datoteke support.c. Reference _find_pixmap_file().
00100 { 00101 gchar *pathname = NULL; 00102 GtkWidget *pixmap; 00103 00104 if (!filename || !filename[0]) 00105 return gtk_image_new (); 00106 00107 pathname = find_pixmap_file (filename); 00108 00109 if (!pathname) 00110 { 00111 g_warning (_("Couldn't find pixmap file: %s"), filename); 00112 return gtk_image_new (); 00113 } 00114 00115 pixmap = gtk_image_new_from_file (pathname); 00116 g_free (pathname); 00117 return pixmap; 00118 } |
|
Definirano u liniji 78 datoteke support.c. Reference pixmaps_directories. Referencirano od create_pixbuf()create_pixmap().
00079 { 00080 GList *elem; 00081 00082 /* We step through each of the pixmaps directory to find it. */ 00083 elem = pixmaps_directories; 00084 while (elem) 00085 { 00086 gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data, 00087 G_DIR_SEPARATOR_S, filename); 00088 if (g_file_test (pathname, G_FILE_TEST_EXISTS)) 00089 return pathname; 00090 g_free (pathname); 00091 elem = elem->next; 00092 } 00093 return NULL; 00094 } |
|
Definirano u liniji 152 datoteke support.c.
00155 { 00156 gint n_actions, i; 00157 00158 n_actions = atk_action_get_n_actions (action); 00159 for (i = 0; i < n_actions; i++) 00160 { 00161 if (!strcmp (atk_action_get_name (action, i), action_name)) 00162 atk_action_set_description (action, i, description); 00163 } 00164 } |
|
|
Definirano u liniji 66 datoteke support.c. Referencirano od add_pixmap_directory()find_pixmap_file(). |