Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"View" -> "Toolbar" menu item is not active #733

Closed
morevnaproject opened this issue Mar 1, 2019 · 24 comments
Closed

"View" -> "Toolbar" menu item is not active #733

morevnaproject opened this issue Mar 1, 2019 · 24 comments

Comments

@morevnaproject
Copy link
Member

morevnaproject commented Mar 1, 2019

"Toolbar" menu item in "View" menu is not active.

screenshot_002


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@morevnaproject
Copy link
Member Author

Possibly worth to take a look at a19e558

@morevnaproject morevnaproject added Assigned Someone is working on this issue and removed Assigned Someone is working on this issue labels Mar 4, 2019
@bajajvinamr
Copy link

@morevnaproject I would like to fix this issue

@ice0
Copy link
Collaborator

ice0 commented Nov 29, 2019

@bajajvinamr it's yours now :)

@kamal-kaur04
Copy link

Hii @morevnaproject,
I would like to take this issue if it's not assigned already.
Thank you

@ankit-kumar-dwivedi
Copy link
Member

Great @kamal-kaur04 assigning you this one.

@kamal-kaur04
Copy link

Hii @morevnaproject
Can you please tell the expected behavior(purpose) of Toolbar?

@morevnaproject
Copy link
Member Author

This command should show/hide this toolbar -

screenshot_001

@kamal-kaur04
Copy link

@morevnaproject I have tried to do this but I am not able to find the key that binds this whole toolbar. Can you please help me out with this?

Screenshot from 2020-03-09 12-29-09
image

@ankit-kumar-dwivedi
Copy link
Member

@morevnaproject I have tried to do this but I am not able to find the key that binds this whole toolbar. Can you please help me out with this?

Screenshot from 2020-03-09 12-29-09
image

AFAIK this uistring is defined in app.cpp and only for starting elements of toolbar viz save, save all, render etc.

The only possible way I see is to define a getter for the widget(toolbar) and change it's property i.e hide/unhide accordingly.

@ice0 However this doesn't sound like how other things are being handled. So is there a better way to do this?

@ice0
Copy link
Collaborator

ice0 commented Mar 9, 2020

@kamal-kaur04 you can start to dig from Edit->Preferences->Show file toolbar.

When you switch it off, and restart Synfig - you will see that part of the toolbar is hidden.
Try to search thru the code by the App::show_file_toolbar and this must lead you here:

displaybar = manage(new class Gtk::Toolbar());
displaybar->set_icon_size(iconsize);
displaybar->set_toolbar_style(Gtk::TOOLBAR_BOTH_HORIZ);
// File
if (App::show_file_toolbar) {
displaybar->append( *create_action_toolbutton( App::ui_manager()->get_action("/toolbar-main/new") ) );

The problem is a little bit harder, and you can't use approach used in View->Show menubar because displaybar is not unique for application, and every CanvasView has it's own Toolbar/displaybar.

But don't give up. This is a good way to better understand how Synfig works. You will learn a little bit about CanvasView and how to get active CanvasView.

Also i want to ask: did you have issues with compiling/testing? How long does it take? I have a few ideas on how to improve this, but I don’t know if this is necessary now.

@ankit-kumar-dwivedi

However this doesn't sound like how other things are being handled. So is there a better way to do this?

I think that would be good enough. If someone finds a better way, we can always refactor it later :)

@kamal-kaur04
Copy link

@ice0 @ankit-kumar-dwivedi when I tried the approach like menubar, was able to hide/show the icons referenced by the key(toolbar-main). But it doesn't show the required behavior for sure. Thank you for your take on the issue.
No issues in the compilation. But it takes long time(5-10 mins).

synfig_demo

@rodolforg
Copy link
Contributor

@kamal-kaur04 if your PC has more than 1 core, you can increase the number of jobs (threads) the build system uses. This should speed up your compilation. By default, autotools are set to 2 threads only. See build.conf file.

And if you're building via 2-build-debug.sh script, and as your PR is just GUI stuff and without any file adding/removal, you could call 2-build-debug.sh studio make.

@kamal-kaur04
Copy link

Okay. Thank you @rodolforg

@ice0
Copy link
Collaborator

ice0 commented Mar 10, 2020

Also you can run make install -j <number_of_threads> inside _debug directory.

For example if you are changed synfig/synfig-studio/src/gui/canvasview.cpp file, then go to
_debug/synfig/synfig-studio/src/gui/ and run make install -j4. If there is no Makefile in this directory, then go up to the parent directory.

@morevnaproject
Copy link
Member Author

morevnaproject commented Mar 10, 2020

when I tried the approach like menubar, was able to hide/show the icons referenced by the key(toolbar-main). But it doesn't show the required behavior for sure. Thank you for your take on the issue.

Yes, that's a different toolbar. ^__^
The code needs to look for active document and find it's UI (canvasview). Then it should call a function (you probably need to write this function), which shows/hides a toolbar in canvasview.

@kamal-kaur04
Copy link

Thank you @ice0 @morevnaproject , I am trying to fix this. Will be able to do for sure. :)

@ankit-kumar-dwivedi
Copy link
Member

@kamal-kaur04 any progress on this? Let us know if you are stuck.

@ankit-kumar-dwivedi
Copy link
Member

@kamal-kaur04 any progress on this? Let us know if you are stuck.

@kamal-kaur04 are you working on this any more?

@ARYA-BHARDWAJ
Copy link
Contributor

ARYA-BHARDWAJ commented Apr 18, 2020

@ice0, I want to work on this issue.

@ice0
Copy link
Collaborator

ice0 commented Apr 18, 2020

@ARYA-BHARDWAJ Sure, it's yours now )

@ARYA-BHARDWAJ
Copy link
Contributor

@ice0 I guess this can be solved by changing displaybar of canvasview of current window. But I don't understand how to get canvasview of current window.

@ice0
Copy link
Collaborator

ice0 commented Apr 26, 2020

Please look at App::get_selected_canvas_view(). Sounds like something you are looking for :)

@morevnaproject
Copy link
Member Author

Closed via #1386

@rodolforg
Copy link
Contributor

This issue is already fixed in v1.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants