Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
Notify the user if the upload fails
Browse files Browse the repository at this point in the history
  • Loading branch information
cybre committed Jul 14, 2016
1 parent f1e5343 commit bc3060a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion screenshot-applet/HistoryViewItem.vala
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ namespace ScreenshotApplet
upload_button.tooltip_text = "Upload screenshot";

Gtk.Spinner upload_spinner = new Gtk.Spinner();

action_stack = new Gtk.Stack();
action_stack.transition_type = Gtk.StackTransitionType.SLIDE_LEFT;
action_stack.add_named(upload_button, "upload_button");
Expand Down Expand Up @@ -147,8 +148,11 @@ namespace ScreenshotApplet
url_label.set_text(link.split("://")[1]);
apply_changes(settings, old_url);
} else {
Gtk.Image error_image = new Gtk.Image.from_icon_name(
"action-unavailable-symbolic", Gtk.IconSize.SMALL_TOOLBAR);
upload_button.image = error_image;
upload_button.tooltip_text = "Upload failed! Click to try again.";
action_stack.visible_child_name = "upload_button";
upload_button.get_style_context().add_class("alert");
}
});
}
Expand Down

0 comments on commit bc3060a

Please sign in to comment.