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

Commit

Permalink
fix compile error and segfault after cancel of dnd tag creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jangernert committed Jul 30, 2016
1 parent 834cb55 commit fa50375
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
23 changes: 22 additions & 1 deletion src/Widgets/FeedList.vala
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class FeedReader.feedList : Gtk.Stack {
private ServiceInfo m_branding;
private uint m_expand_collapse_time = 150;
private bool m_update = false;
private bool m_busy = false;
private bool m_TagsDisplayed = false;
public signal void newFeedSelected(string feedID);
public signal void newTagSelected(string tagID);
Expand Down Expand Up @@ -191,6 +192,14 @@ public class FeedReader.feedList : Gtk.Stack {
public void newFeedlist(bool defaultSettings, bool masterCat = false)
{
logger.print(LogMessage.DEBUG, "FeedList: new FeedList");

if(m_busy)
{
logger.print(LogMessage.DEBUG, "FeedList: busy");
return;
}

m_busy = true;
m_branding.refresh();
var FeedChildList = m_list.get_children();

Expand All @@ -215,6 +224,7 @@ public class FeedReader.feedList : Gtk.Stack {
createFeedlist(defaultSettings, masterCat);
settings_state.set_boolean("no-animations", false);
m_update = false;
m_busy = false;
}


Expand Down Expand Up @@ -964,7 +974,18 @@ public class FeedReader.feedList : Gtk.Stack {
public void removeEmptyTagRow()
{
logger.print(LogMessage.DEBUG, "removeEmptyTagRow");
removeRow(m_emptyTagRow, 250);

if(m_busy)
{
logger.print(LogMessage.DEBUG, "FeedList: busy");
return;
}

if(m_emptyTagRow != null)
{
removeRow(m_emptyTagRow, 250);
m_emptyTagRow = null;
}
}

public void deselectRow()
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ public class FeedReader.readerUI : Gtk.ApplicationWindow
m_ErrorMessage.set_label(_("No valid CA certificate available!"));
m_ignore_tls_errors.set_visible(true);
break;
case LoginResponse.CA_ERROR:
case LoginResponse.PLUGIN_NEEDED:
m_ErrorMessage.set_label(_("Please install the \"api_feedreader\"-plugin on your tt-rss instance!"));
m_ignore_tls_errors.set_visible(true);
break;
Expand Down
3 changes: 1 addition & 2 deletions src/Widgets/TagRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,11 @@ public class FeedReader.TagRow : Gtk.ListBoxRow {
this.unset_state_flags(Gtk.StateFlags.PRELIGHT);
if(m_tagID == TagID.NEW && context != null)
{
removeRow();
if(Utils.haveTags())
{
var window = ((FeedApp)GLib.Application.get_default()).getWindow();
var feedlist = window.getContent().getFeedList();
feedlist.newFeedlist(false, false);
//feedlist.newFeedlist(false, false);
}
Gtk.drag_finish(context, true, false, time);
}
Expand Down

0 comments on commit fa50375

Please # to comment.