mvo5 / synaptic

The synaptic package manager
GNU General Public License v2.0
160 stars 55 forks source link

Improve some details of the main window interface #30

Closed soc closed 5 years ago

soc commented 6 years ago

Issues:

Changes:

soc commented 6 years ago

Hi @mvo5, here are a few screenshots:

Before:

synaptic-old

After:

synaptic-new1

synaptic-new

Things I'd like to sort out in a follow-up PR:

Please let me know what you think!

trebmuh commented 6 years ago

I like the visual display of the last screenshot. :+1:

soc commented 6 years ago

Current progress:

synaptic-new4

soc commented 6 years ago

I'm currently trying to sort out this double free: https://gist.github.com/soc/3b6531cb3e4ae68a52f4c671184e0021

I happens on startup if the setting showWelcomeDialog does not exist in synaptic.conf or is set to "1". Help appreciated!

mvo5 commented 5 years ago

Hey @soc! First, great that you work on improving synaptic! Due to real-life (busyness on my side) it did not get enough love from me. So your help is super appreciated. Feel free to hop on irc as well, I'm usually around at european hours in the #synaptic channel on freenode.

[edit clarify who is busy :)]

mvo5 commented 5 years ago

@soc about the double free - I checked the gist and this PR and I can't reproduce it here on my 18.04 ubuntu system. However the following diff http://paste.ubuntu.com/p/6wDj7pC3sk/ (against this PR) may helper. It just switches filename to use a c++ string which removes the need to explicitly free things.

soc commented 5 years ago

@mvo5 I investigated further, and it seems that the crash only appears when showWelcomeDialog is set to "1" or doesn't exist otherwise everything is fine. Basically if Synaptic decides to show the welcome dialog, it crashes ... I'll try your patch, but it feels like there is some corruption somewhere else.

soc commented 5 years ago

@mvo5: Here is the crash with your patch applied:

(gdb) run
Starting program: /home/soc/code/synaptic/gtk/synaptic 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 13682]
[Detaching after fork from child process 13684]
[New Thread 0x7fffee16f700 (LWP 13686)]
[New Thread 0x7fffed96e700 (LWP 13687)]
[New Thread 0x7fffed16d700 (LWP 13688)]
[Detaching after fork from child process 13689]
[Detaching after fork from child process 13690]
[Detaching after fork from child process 13691]
[Thread 0x7fffed16d700 (LWP 13688) exited]

Thread 1 "synaptic" received signal SIGSEGV, Segmentation fault.
0x00007ffff750cd78 in g_type_check_instance_cast ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) bt
#0  0x00007ffff750cd78 in g_type_check_instance_cast ()
    at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1  0x00005555555ab140 in RGGtkBuilderUserDialog::init(char const*)
    (this=0x7fffffffe030, name=0x5555555eb637 "welcome") at rguserdialog.cc:261
#2  0x00005555555ab28f in RGGtkBuilderUserDialog::run(char const*, bool)
    (this=this@entry=0x7fffffffe030, name=name@entry=0x5555555eb637 "welcome", return_gtk_response=return_gtk_response@entry=false) at rguserdialog.cc:282
#3  0x0000555555579330 in welcome_dialog(RGMainWindow*) (mainWindow=0x555555737a00)
    at gsynaptic.cc:165
#4  0x0000555555576e87 in main(int, char**) (argc=<optimized out>, argv=<optimized out>)
    at gsynaptic.cc:600
soc commented 5 years ago

This is enough to trigger the crash for me:

Synaptic "" {
  showWelcomeDialog "1";
};
soc commented 5 years ago

I might need to back out of the primary-toolbar changes in the .ui file, it appears as if it fixes issues in some themes, but breaks things in other themes ...

soc commented 5 years ago

@mvo5 I think this patch is largely good to go (modulo the primary-toolbar thing), I just realized that the crash also happens on the main branch without any of my changes. :-(

soc commented 5 years ago

For some reason the GtkDialog doesn't like to be cast to a GtkWindow ... maybe I'm misunderstanding something but that seems weird.

soc commented 5 years ago

I think this should be good to go. I found the reason for the crashes and added a second commit fixing it: https://github.com/mvo5/synaptic/pull/30/commits/cafafca8f816a01f2ed51ab478828fcfcb268a5c

With this change the crashes are gone.

This is how it looks now:

synaptic-end

As shown in the screenshots, I also did a few minor things like enabling rubber banding in the package list, so it's possible to select multiple packages by pressing and dragging the mouse.

soc commented 5 years ago

@mvo5 Hey Michael, is there anything else that needs to be done?

mvo5 commented 5 years ago

Hey @soc - sorry for the delay. My day job kept me quite busy. I think this is great I did some testing and it looks good. I will go over the glade diff in detail and then this can be merged.

Synaptic would benefit greatly from more help so feel free to improve other aspects of the app :-D Lots of users will appreciate it and I'm more than happy (and hopefully also more responsive) to help.

mvo5 commented 5 years ago

@soc Also, if you want to be credited with a name other than "soc" in the changelog, please do let me know what name I should write there.

soc commented 5 years ago

@mvo5 No problem! You can use "Simon Ochsenreither" for the changelog if you want!

Skif-off commented 4 years ago

@soc

moved buttons which operate on the package listing to the right ("properties", "search")

Why? It's not very convenient: all control is concentrated on the left side: main menu, toolbar and filters buttons (checkboxes too :)). Is this due to this change if the "show package properties in main window" setting is enabled, the "properties" button is hidden, reducing the amount of different ways package properties are be displayed ? Maybe just swap: "update", "upgrade", "apply", "search", "properties"?

soc commented 4 years ago

@Skif-off I tried many different combinations, and most looked really "unbalanced", especially when this additional input field that filters the listing also gets added to the toolbar.

(As far as I remember, the filter is centered, so when you put everything on the left of it, it starts looking horribly except when you make the window very wide.)

So there is some precedent of having the search on the right side, and I went with this, because it was the least bad option of the ones I tried.

I think it would be really nice to have either the filter input, or the search dialog, but I think I cannot decide this (and I also lack good ideas how the UI should work conceptually after such a change change).

Skif-off commented 4 years ago

Sorry, I forgot and did not use this email box some time.

especially when this additional input field that filters the listing also gets added to the toolbar.

How did you add quick filter to the toolbar? I did not see it long time ago, I tried and as I understood this filter was dropped. New quick filter shows and works when just press buttons on keyboard and now it's small input box below list of packages, not on toolbar (Xubuntu 18.04, Debian 9). I thought filter was gone and it would not hindrance :)