GNOME Bugzilla – Bug 105935
Go button needs to be a text only button all the time.
Last modified: 2004-12-22 21:47:04 UTC
Sorry to be a pain about this, and i know this will be a pain to implement, but the go button really should be a text only button. Just not setting a icon is problematic if a user uses any other setting except text+icons, so i assume a special implementation is needed. Here's a screenshot of what i'm trying to achieve. This basically copies the default layout of IE, and is similar to what mpt argued should be the default layout for mozilla. (Eventually i'd like to see ephy go this way as well :) ) http://www.msu.edu/~bordoley/screenshot.png Furthermore, no icon really makes sense for this button anyway (jump to is really pushing it)...
One thing we could try is to remove the icon and see if EggMenu handle it nicely. Otherwise would be necessary either to fix Eggmenu (not sure if it makes sense) or to write a custom action for this.
I actually did remove the icon inorder to make my mockup, but that breaks the button for users who uses icon only toolbars (why you would use icon only toolbars i do not know :) ), so I think a custom action is needed. As a matter of policy, we probably don't want to make it to easy for app writers to not include an icon or text for a toolbar item so I wouldn't fix this in egg itself. That said this button is really a special case imo.
One last thing, if the user has the toolbar configured as is done in the current default layout, the text go you align with the text entry box similar to the favicon.
marco, I would like to go and implement this, just for the sake of building coding skills since i assume it will be somewhat trivial to implement from looking at the other custom actions in ephy. A few questions, I can't quite figure it out, but is it possible to implement this by sub classing eggtoolbutton and setting the layout properties. I couldn't really see how to do this with the public api, but again i ain't that knowledgable about gobjects. If not, is the best alternative to just copy and paste code from eggtoolbutton and remove whatever is unneeded? Also i used ie. today and it defaults to having the equivalent of gtk ok as the icon but the icon is always to the left of the text. I'd prefer not even having one as i feel its unneeded.
I dont think it's necessary to use ToolButton here, we probably dont need a separate widget also, we can impl it inside the action. The code should be very simple. Create a normal gtk button and emit the signal. You could also create a special toolbutton widget based on the standard one but: that's a lot of code, you may just get confused. I think it make sense to do something like: In create_toolitem button = gtk_button_new (); g_signal_connect_object (button->button, "clicked", G_CALLBACK (button_clicked), button, 0); (Pack this in the toolitem) label = gtk_label_new (NULL); gtk_label_set_use_underline (GTK_LABEL (button->label), TRUE); gtk_box_pack_start (GTK_BOX (button->box), button->label, FALSE, TRUE, 0); gtk_widget_show (button->label); The callback: static void button_clicked (GtkWidget *widget, EggToolButton *button) { g_signal_emit_by_name (button, "clicked"); } In connect_proxy you have to call a sync_label func, see how it's implemented in other actions.
i was thinking about this a little, would it make sense to instead just merge the favicon, location bar and go button into one toolbar item? In particular in most other browsers the favicon is contained within the location bar. Perhaps this would be a better solution from a ui perspective? At the least we would reduce the number of toolbar items, making customization a little easier, plus I really can't imagine anyone not having these items arranged in the standard order anyway. What do you think?
I think the ability of removing Go button is good, a lot of people never use it. About favicon, I agree. But I'd just wait we start using EggCombo, that will give us the favicon inside the entry.
marco, I have a patch for this at www.msu.edu/~bordoley/go.tar.gz It includes the new go-action.(ch) files and a patch. Is there a way to create a patch for new files that aren't in the tree? Oh and I'm a really bad coder, so you should check that I didn't do anything too stupid when cutting and pasting code....thanks dave
You should not connect the window_cmd callback directly but emit an activate signal. Then in toolbar.c you can connect it to window_cmd.
Created attachment 14821 [details] [review] Better? More suggestions? thanks :)
Created attachment 14828 [details] [review] Anything else need to be fixed?
Created attachment 14830 [details] [review] 4th time the charm? I removed a bunch of unneeded stuff including the priv data, since it was unused anyway...
Looks good. Please commit. Thank you !
ok committed, hope i didn't break anything :)