static char * retrive_screenshot_format(){ gchar *img_format = NULL; GtkComboBox *combo_box; ScreenshotDialog *dialog; dialog = g_new0 (ScreenshotDialog, 1); dialog->xml = glade_xml_new (GLADEDIR "/gnome-screenshot.glade", NULL, NULL); combo_box = glade_xml_get_widget (dialog->xml, "combo_box"); img_format = gtk_combo_box_get_active_text(combo_box); g_printf("before ' %s' ", img_format); if (img_format == NULL) img_format = "png"; g_printf("after '%s'", img_format); return img_format; }