示例#1
0
static void
save_done_notification (gpointer data)
{
  ScreenshotDialog *dialog = data;

  temporary_file = g_strdup (screenshot_save_get_filename ());
  screenshot_dialog_enable_dnd (dialog);

  if (save_immediately)
    {
      GtkWidget *toplevel;

      toplevel = screenshot_dialog_get_toplevel (dialog);
      gtk_dialog_response (GTK_DIALOG (toplevel), GTK_RESPONSE_OK);
    }
}
示例#2
0
static void
drag_data_get (GtkWidget          *widget,
	       GdkDragContext     *context,
	       GtkSelectionData   *selection_data,
	       guint               info,
	       guint               time,
	       ScreenshotDialog   *dialog)
{
  if (info == TYPE_TEXT_URI_LIST)
    {
      gchar **uris;

      uris = g_new (gchar *, 2);
      uris[0] = g_strconcat ("file://",
                             screenshot_save_get_filename (),
                             NULL);
      uris[1] = NULL;
      
      gtk_selection_data_set_uris (selection_data, uris);
    }