126 GdkGLConfig *glconfig;
128 GtkComboBox *graphComboBox;
131 gtk_init(&argc, &argv);
136 GtkWidget *gladewidget = glade_xml_get_widget(
xml,
"frmMain");
137 gtk_widget_show(gladewidget);
138 g_signal_connect(gladewidget,
"destroy", G_CALLBACK(
mQuitSlot),
NULL);
139 glade_xml_signal_autoconnect(
xml);
143 gladewidget = glade_xml_get_widget(
xml,
"hbox11");
145 gtk_widget_hide(glade_xml_get_widget(
xml,
"vbox13"));
146 gtk_window_set_deletable(
147 (GtkWindow *)glade_xml_get_widget(
xml,
"dlgSettings"), 0);
148 gtk_window_set_deletable((GtkWindow *)glade_xml_get_widget(
xml,
"frmTVNodes"),
154 glutInit(&argc, argv);
157 gladewidget = glade_xml_get_widget(
xml,
"hbox13");
158 graphComboBox = (GtkComboBox *)gtk_combo_box_new_text();
159 gtk_box_pack_end((GtkBox *)gladewidget, (GtkWidget *)graphComboBox, 1, 1, 10);
160 gtk_widget_show((GtkWidget *)graphComboBox);
171 const char PATH_SEPARATOR =
'\\';
173 const char PATH_SEPARATOR =
'/';
178 if (smyrna_exe ==
NULL) {
179 fputs(
"failed to find path to self\n", stderr);
186 char *slash = strrchr(smyrna_exe, PATH_SEPARATOR);
188 fprintf(stderr,
"no path separator in path to self, %s\n", smyrna_exe);
194 slash = strrchr(smyrna_exe, PATH_SEPARATOR);
196 fprintf(stderr,
"no path separator in directory containing self, %s\n",
203 size_t share_len = strlen(smyrna_exe) + strlen(
"/share/graphviz/smyrna") + 1;
205 snprintf(share, share_len,
"%s%cshare%cgraphviz%csmyrna", smyrna_exe,
206 PATH_SEPARATOR, PATH_SEPARATOR, PATH_SEPARATOR);
212int main(
int argc,
char *argv[]) {
218 char *package_locale_dir;
221 char *package_prefix =
222 g_win32_get_package_installation_directory(
NULL,
NULL);
224 g_build_filename(package_prefix,
"share",
"locale",
NULL);
225 g_free(package_prefix);
228 package_locale_dir = g_build_filename(
smyrnaDir,
"locale",
NULL);
232 bind_textdomain_codeset(GETTEXT_PACKAGE,
"UTF-8");
245 g_free(package_locale_dir);
static char * smyrnaGlade
char * smyrnaPath(char *suffix)
static char * smyrnaDir
path to directory containing smyrna data files
static char * parseArgs(int argc, char *argv[], ViewInfo *viewinfo)
static void windowedMode(int argc, char *argv[])
static char * find_share(void)
find an absolute path to where Smyrna auxiliary files are stored