Skip to content

Commit

Permalink
markup
Browse files Browse the repository at this point in the history
  • Loading branch information
torikulhabib committed Aug 2, 2019
1 parent ffb8070 commit b439bd8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Widgets/Dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

namespace Mindi {
public class Dialog : Granite.MessageDialog {
public class Dialog : Mindi.MessageDialog {
public signal void dialog_cancel_convert ();

public Dialog (Gtk.Window? parent) {
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/DialogOverwrite.vala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

namespace Mindi {
public class DialogOverwrite : Granite.MessageDialog {
public class DialogOverwrite : Mindi.MessageDialog {
public signal void dialog_overwrite_convert ();

public DialogOverwrite (Gtk.Window? parent, string secondary) {
Expand Down
5 changes: 3 additions & 2 deletions src/Widgets/MessageDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ public class Mindi.MessageDialog : Gtk.Dialog {

primary_label = new Gtk.Label (null);
primary_label.get_style_context ().add_class (Granite.STYLE_CLASS_PRIMARY_LABEL);
primary_label.max_width_chars = 33;
primary_label.max_width_chars = 50;
primary_label.wrap = true;
primary_label.xalign = 0;

secondary_label = new Gtk.Label (null);
secondary_label.set_selectable (true);
secondary_label.max_width_chars = 50;
secondary_label.wrap = true;
secondary_label.xalign = 0;
Expand All @@ -107,7 +108,7 @@ public class Mindi.MessageDialog : Gtk.Dialog {
custom_bin.remove.connect (() => secondary_label.margin_bottom = 0);

var message_grid = new Gtk.Grid ();
message_grid.column_spacing = 0;
message_grid.column_spacing = 5;
message_grid.row_spacing = 0;
message_grid.margin_start = message_grid.margin_end = 6;
message_grid.attach (image, 0, 0, 1, 2);
Expand Down
8 changes: 6 additions & 2 deletions src/Window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ namespace Mindi {
if (selected_video != null) {
open_video.label = Mindi.StringPot.Change;
video_name.label = (selected_video.get_basename ());
video_name.use_markup = false;
video_name.tooltip_text = (selected_video.get_basename ());
status_location ();
input_find_location ();
Expand Down Expand Up @@ -354,8 +355,9 @@ namespace Mindi {
stream_logo = new Image.from_icon_name ("internet-web-browser", Gtk.IconSize.DIALOG);
stream_container.attach (stream_logo, 0, 1, 1, 1);

stream_name = new Gtk.Label (Mindi.StringPot.GetNow);
stream_name = new Gtk.Label ("<i>%s</i>".printf (Mindi.StringPot.GetNow));
stream_name.max_width_chars = 15;
stream_name.use_markup = true;
stream_name.ellipsize = Pango.EllipsizeMode.END;
stream_name.halign = Gtk.Align.CENTER;
stream_name.wrap = true;
Expand Down Expand Up @@ -473,7 +475,7 @@ namespace Mindi {
}

private void send_notify () {
stream_name.label = Mindi.StringPot.GetNow;
stream_name.label = ("<i>%s</i>".printf (Mindi.StringPot.GetNow));
notification_toast (checklink.status);
open_stream.sensitive = true;
video_logo.sensitive = true;
Expand Down Expand Up @@ -824,6 +826,7 @@ namespace Mindi {
reload_stack.visible_child_name = "addurl";
change_and_format.visible_child_name = "format";
stream_name.tooltip_text = (converter.name_file_stream);
stream_name.use_markup = false;
} else {
notification_toast (Mindi.StringPot.DownloadError);
stream_name.label = Mindi.StringPot.FailedRetrieve;
Expand All @@ -833,6 +836,7 @@ namespace Mindi {
reload_stack.visible_child_name = "reload";
change_and_format.visible_child_name = "change";
stream_name.tooltip_text = ("");
stream_name.use_markup = true;
}
} else {
if (success) {
Expand Down

0 comments on commit b439bd8

Please sign in to comment.