summaryrefslogtreecommitdiff
path: root/src/gtk
AgeCommit message (Collapse)AuthorFilesLines
2009-04-19Overhaul the resolver tab.Daniel Burrows3-334/+919
Eliminated the previous/next holdover from the curses interface: it made sense there because of the limited real estate and input mechanisms, but in the GTK+ frontend it's much better to have a list of the already-generated solutions and a button to make a new solution. There are still a bunch of loose ends. The display of the current solution doesn't adapt well to being narrow -- I think the "action" column should be nuked and merged with "name", but I'm not sure what else to do there. Display of actions is somewhat inconsistent. It would be nice to unify them, but we should do that with an eye to the fact that differing renders are also useful. At the very least, use of text styles should be straightened out: I'm not sure that showing version numbers in a larger font works, but we should either do it everywhere or nowhere. It's scattershoot now partly because I wanted to throw lots of stuff at the wall and see what stuck. I also would not bet much money on the behavior being absolutely correct.
2009-04-19Instead of manually freeing the resolver tab when it's deleted, rely on the ↵Daniel Burrows1-1/+3
fact that if all the dependencies are fixed, the resolver tab will go away on its own. This fixes a double-free bug that was crashing the program.
2009-04-19Initialize the background build thread's self-poitner to NULL, so if it ↵Daniel Burrows1-1/+2
exits without getting a self pointer, it doesn't try to remove a bad pointer from the set of active threads.
2009-04-19Expose accept/reject states in the resolver view and add UI elements to ↵Daniel Burrows3-166/+896
modify them. Arguably we should have better UI here, but at least the capability is visible now.
2009-04-19Make constants for the light-red and light-green background color the ↵Daniel Burrows3-2/+8
package list uses, so other lists can consistently use the same colors.
2009-04-19Make ResolverTab::dep_text() and ResolverTab::dep_targets() const methods.Daniel Burrows2-78/+216
Actually, I bet they could be static (doesn't really matter, though).
2009-04-05Build a tree of resolver steps as the resolver runs.Daniel Burrows2-6/+6
This is in preparation for backpropagating conflict/promotion information, and in fact much of the code for that is already implemented in this commit (just not activated yet). I decided to use integer references into a deque to keep things a little more compact instead of having a huge number of structures on the heap: the resolver is already memory-hungry enough, no need to make things even worse.
2009-04-05Show tiers instead of scores in the resolver tab.Daniel Burrows1-1/+2
2009-04-05Disallow new upgrades in the GTK+ upgrade calculator, to match what ↵Daniel Burrows1-1/+1
"safe-upgrade" does. Since all upgrades are selected anyway, this won't have much effect, except that there might be some upgrades that shouldn't be selected at all, and those are no longer allowed. The main motivation here is to make the program's behavior more consistent.
2009-03-29Use tiering in the aptitude resolver to order returned solutions.Daniel Burrows1-2/+2
Right now the default tiers are: 10,000 -> "safe" solutions containing only new installs, upgrades and "keeps". 20,000 -> solutions that cancel all the user's actions. 30,000 -> solutions that remove packages. 40,000 -> solutions that break holds. 50,000 -> solutions that install non-default versions of packages. (the subordinate tier is the version priority) 60,000 -> solutions that remove Essential packages. Still to do: add tier hints, add a way to set tier names, show tiers and/or names in the UI (in place of the meaningless and confusing score value).
2009-03-23Restructure the resolver so that it stores and returns sets of choices using ↵Daniel Burrows2-114/+166
choice_sets, rather than manually storing the different types of choices in the solution object. This has two beneficial effects. First, it should make it a bit easier to add a new choice type, although many parts of the program will still have to be touched. Perhaps more importantly, this provides a cleaner conceptual model of what the resolver does: it finds "choice points" (that is to say, dependencies that need to be solved) and makes choices at them. This commit sneaks in a few optimizations that I came across in the process of rewiring all the resolver logic. The big one is that testing whether a solution violates a user constraint now requires steps proportional to the size of the solution, not to the number of user constraints. (each step is logarithmic in the number of constraints, but that's still a big improvement)
2009-02-22Cosmetic change on the "incremental" button.Obey Arthur Liu1-1/+2
2009-02-22Fix regression that prevented DownloadNotificationS from being displayed as ↵Obey Arthur Liu1-16/+13
done.
2009-02-21Actually regexproof the search terms from source-package and tag.Obey Arthur Liu2-6/+2
Fixes the issues with the previous changesets.
2009-02-21Refine the search terms for tag and source-package hyperlink.Obey Arthur Liu2-11/+7
Make a note about regex-unsafe debtags. I'm also eliminating the make_debtags_tab function. It used to be much more complicated but now a bound functor will do.
2009-02-21Fix dumb copy-paste mistake in the previous changeset.Obey Arthur Liu1-1/+1
2009-02-21Add link to the source package in the PackagesTab pane.Obey Arthur Liu1-1/+11
2009-02-19Keep track of all the outstanding build threads, and make sure to wait for ↵Daniel Burrows2-8/+185
them before the cache is closed. This eliminates the race condition / crash that was left over in the last patch. It also annotates the background thread code in pkgview with logging statements, which should help with future debugging.
2009-02-19Push all store rebuilds into background threads.Daniel Burrows2-26/+310
This should improve responsiveness quite a bit, and make incremental searching work better. It still has a bug: closing the cache when a rebuild is in progress might crash the program. To solve this, we need to support a mechanism for canceling rebuilds that waits until all the outstanding rebuilds are complete; right now we just ask rebuilds to stop and block their results, but return immediately (which is right for when the UI needs to restart a rebuild, but wrong for when we're destroying the cache structures and need to stop the threads before they kill themselves).
2009-02-19Merge with Arthur's changes.Daniel Burrows2-0/+9
2009-02-18Show the "apply" image on the "apply button" button of the notification.Daniel Burrows1-0/+2
2009-02-18Close the resolver tab after the user presses "Apply Changes", and open a ↵Daniel Burrows1-0/+7
preview tab if it was an upgrade resolver.
2009-02-19Closing tabs with Ctrl+Q or Ctrl+W. Works most of the time, or crashes.Obey Arthur Liu5-2/+35
It looks like there's a pretty nast race condition I can't pinpoint. I'm doing exactly like if I'm clicking on the close tab but it crashes sometimes, but not alw ays.
2009-02-19Fix some leftover properties messing with a separator in the glade file.Obey Arthur Liu1-2/+0
2009-02-19Implement prev/next tab switching with Ctrl-Up/Down or F6/F7.Obey Arthur Liu3-1/+37
2009-02-18Give the focus back to the search entry when toggling Incremental.Obey Arthur Liu1-1/+9
The user usually is going to edit something so make life easier for him.
2009-02-18Improve incremental search with a timeout.Obey Arthur Liu2-21/+42
The incremental search is now fired only after 200ms of inactivity. This should mitigate the Gtk caret issues and improve responsivity.
2009-02-18First try at implementing incremental search in PackageSearchEntry.Obey Arthur Liu3-38/+75
To use it, just provide an additional Gtk::ToggleButton to PackageSearchEntry::create(...). There are some kinks to smooth out because of the way Gtk handles the signals (see FIXME).
2009-02-18Don't crash if there are no broken dependencies in the upgrade.Daniel Burrows1-0/+1
2009-02-17Add support for trying to fix up an upgrade manually if some packages can't ↵Daniel Burrows5-62/+464
be upgraded. This is done by creating a special resolver tab, in which the initial state consists of all the upgrades that the safe upgrader could figure out. The user can then work towards a resolution to these dependencies. If the cache is closed while this resolver tab is open, it will be disabled until a new safe upgrade is calculated, and then filled in with that upgrade's information. This commit also tweaks the "number to install" message to also show how many upgrades are available. But it's still not really satisfactory. I might just go for "N upgrades out of M available upgrades" even at the cost of nested ngettext() calls (the horror!)
2009-02-17Add a logger for stuff related to the resolver tab.Daniel Burrows1-0/+34
Because "hg record" can't split diff hunks, some places that need logging are bound up in another pending commit, unfortunately.
2009-02-17Make apply_solution() also install initial versions of packages.Daniel Burrows1-1/+4
2009-02-17Remember where changelogs are; when the user clicks on a package's ↵Daniel Burrows2-0/+15
changelog, jump to it. This means the "selected package" tab is useless -- maybe it should turn into a mini-info-view instead?
2009-02-17Be paranoid when the user clicks on a package, in case something that wasn't ↵Daniel Burrows1-0/+6
a package snuck into the list.
2009-02-17Parse changelogs in a background thread.Daniel Burrows2-54/+64
The makes the changelog downloads when the program starts up much less annoying. We might want to have some sort of support in the future for throttling the number of simultaneous parses to, say, 3 or 4. Without this, the program will be (even more) unfriendly on low-end systems where one changelog can't be parsed before the next one is downloaded.
2009-02-16Make "upgrade" actually start carrying out the upgrade that the resolver ↵Daniel Burrows1-4/+23
calculated. We should probably arrange for the "really upgrade" notification to have an upgrade icon. I also wonder if "view changes" is a bad idea...
2009-02-16First draft of a better upgrade UI, based on computing a dependency solution ↵Daniel Burrows3-15/+455
up-front. Still to do: * a working Upgrade button (right now it doesn't do the right thing). * show the user the solution that was applied and the reasons behind it. * let the user jump straight to resolving dependencies by hand.
2009-02-13Merge changes.Daniel Burrows1-0/+5
2009-02-13Refactor the notify code to have only one initialization path.Daniel Burrows2-11/+13
2009-02-13Prevent segfaults due to virtual packages InfoTabs not being handled.Obey Arthur Liu1-1/+11
2009-02-13Add a convenience custom notimplemented message function.Obey Arthur Liu2-2/+10
2009-02-13Code defensively against calls to do_switch_page with already closed tabs.Obey Arthur Liu1-4/+8
A callback to TabsManager::do_switch_page may happen (race condition) with a tab that has already been closed when the user closes a tab, leading to a segfault.
2009-02-12When the color of a notify view is changed, also change the color of its ↵Daniel Burrows1-0/+5
associated image. I think we also need to do something about the fact that the background color of the text contained in a notification is very slightly, but noticably, different from the background color of the surrounding widgets. It's a lot easier to see this with the new widget.
2009-02-12Increase the default interval before we claim the background process is ↵Daniel Burrows1-1/+1
blocked on input from 30 to 120 seconds. On my fairly fast computer, this triggered just from dpkg trying to read its database; I imagine that slower computers would hit it regularly. Hopefully 120 seconds is long enough for this to happen rarely, but short enough that it doesn't take annoyingly long to alert the user when it needs to.
2009-02-12For several common operations (installing packages and downloading package ↵Daniel Burrows3-0/+12
lists), attach icons to the notification(s) that represent(s) the operation.
2009-02-12Add support for associating images (icons) with notifications.Daniel Burrows2-0/+23
I played around a little with the format, but I finally went with just stuffing the image into the notification's box. I also looked at adding a separator between the image and the text / other widgets, but it just seemed hard to make it visible without making the spacing look weird.
2009-02-11Rip out the hacky attempt to detect terminal reads, and instead just do what ↵Daniel Burrows3-608/+103
synaptic does (assume the subprocess is waiting for input if it goes 30 seconds, or whatever, without reading). TODO: add a note in the user's manual about this.
2009-02-11Don't crash if reading from the dpkg socket fails; instead, just log an ↵Daniel Burrows1-0/+8
error and abort. I think the crash only happened with logging enabled, which IMO is arguably worse than the alternative...
2009-02-11Split the tab widgets out into their own toplevel windows.Daniel Burrows1-1262/+1184
This will make it easier to find them in the widget tree; it also eliminates all the tab labels, which weren't being used anyway but looked like they were if you opened the glade file.
2009-02-10Always ignore SIGTTOU; TOSTOP still seems to be unreliable.Daniel Burrows1-0/+2