Closed Bug 1287085 Opened 3 years ago Closed 3 years ago

Move gtk_info_bar to WidgetCache

Categories

(Core :: Widget: Gtk, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

Let's move other widgets to WidgetCache and use them in other widget code.
Attached patch patch (obsolete) — Splinter Review
There's a patch for it. There's also a info bar used in nsLookAndFeel.cpp but let's address that in another patch.
Attachment #8771384 - Flags: review?(andrew)
Comment on attachment 8771384 [details] [diff] [review]
patch

Review of attachment 8771384 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/gtk/gtk3drawing.cpp
@@ -2113,5 @@
> -    style = gtk_widget_get_style_context(gInfoBar);
> -    gtk_style_context_save(style);
> -
> -    gtk_style_context_set_state(style, state_flags);
> -    gtk_style_context_add_class(style, GTK_STYLE_CLASS_INFO);

We still should set one of:

- GTK_STYLE_CLASS_INFO
- GTK_STYLE_CLASS_WARNING
- GTK_STYLE_CLASS_QUESTION
- GTK_STYLE_CLASS_ERROR

On the info bar. Perhaps use gtk_info_bar_set_message_type during creation?
Attachment #8771384 - Flags: review?(andrew) → review-
Attached patch patch v.2 (obsolete) — Splinter Review
Thanks, there's an updated one. It keeps the explicit GTK_STYLE_CLASS_INFO style set as we have now. Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=36f6565bb540
Attachment #8771384 - Attachment is obsolete: true
Attachment #8771968 - Flags: review?(andrew)
Comment on attachment 8771968 [details] [diff] [review]
patch v.2

Review of attachment 8771968 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/gtk/WidgetStyleCache.cpp
@@ +162,5 @@
> +{
> +  GtkWidget* widget = gtk_info_bar_new();
> +  AddToWindowContainer(widget);
> +  return widget; 
> +}

If you could remove the spaces before the newlines here, that would be great.
Attachment #8771968 - Flags: review?(andrew) → review+
Thanks, there's the updated one.
Keywords: checkin-needed
has problems to apply:

4 out of 4 hunks FAILED -- saving rejects to file widget/gtk/WidgetStyleCache.cpp.rej
patching file widget/gtk/gtk3drawing.cpp
Hunk #1 FAILED at 40
1 out of 4 hunks FAILED -- saving rejects to file widget/gtk/gtk3drawing.cpp.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working directory
errors during apply, please fix and qrefresh info-bar-v.3.patch
Flags: needinfo?(stransky)
Keywords: checkin-needed
(In reply to Carsten Book [:Tomcat] from comment #6)
> has problems to apply:
> 
> 4 out of 4 hunks FAILED -- saving rejects to file
> widget/gtk/WidgetStyleCache.cpp.rej
> patching file widget/gtk/gtk3drawing.cpp
> Hunk #1 FAILED at 40
> 1 out of 4 hunks FAILED -- saving rejects to file
> widget/gtk/gtk3drawing.cpp.rej
> patch failed, unable to continue (try -v)
> patch failed, rejects left in working directory
> errors during apply, please fix and qrefresh info-bar-v.3.patch

Did you check-in the Bug 1287080 and Bug 1287082 before this one? It applies cleanly for me with those two. Let's check it again when the recent patch set hits m-c.
Flags: needinfo?(stransky)
It applies fine on m-c now.
Keywords: checkin-needed
Attachment #8771968 - Attachment is obsolete: true
Assignee: nobody → stransky
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/efb4af0a5b75
Move GtkInfoBar from gtk3drawing to WidgetCache. r=acomminos
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/efb4af0a5b75
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.