Commit bb3aecc4 authored by alex@webkit.org's avatar alex@webkit.org
Browse files

2011-08-17 Alejandro G. Castro <alex@igalia.com>

        [GTK] Fix compilation problems with deprecations in gtk+
        https://bugs.webkit.org/show_bug.cgi?id=66073

        Reviewed by Martin Robinson.

        * platform/gtk/GtkAuthenticationDialog.cpp:
        (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Added
        gtk_box_new conditional compilation for gtk+-3.
        * platform/gtk/RenderThemeGtk3.cpp:
        (WebCore::RenderThemeGtk::adjustRepaintRect):
        (WebCore::RenderThemeGtk::paintSliderTrack):
        (WebCore::RenderThemeGtk::paintSliderThumb):
        (WebCore::RenderThemeGtk::adjustSliderThumbSize): Now we have have
        GTK_TYPE_SCALE in gtk+3.

2011-08-17  Alejandro G. Castro  <alex@igalia.com>

        [GTK] Fix compilation problems with deprecations in gtk+
        https://bugs.webkit.org/show_bug.cgi?id=66073

        Reviewed by Martin Robinson.

        * DumpRenderTree/gtk/DumpRenderTree.cpp:
        (main): G_CONST_RETURN was deprecated
        * GtkLauncher/main.c:
        (createWindow): Added gtk_box_new conditional compilation for
        gtk+-3.
        * MiniBrowser/gtk/BrowserWindow.c:
        (browser_window_init): Replaced gtk_vbox_new with gtk_box_new, we
        are just supporting gtk+-3 for WebKit2.

2011-08-17  Alejandro G. Castro  <alex@igalia.com>

        [GTK] Fix compilation problems with deprecations in gtk+
        https://bugs.webkit.org/show_bug.cgi?id=66073

        Reviewed by Martin Robinson.

        * WebCoreSupport/FullscreenVideoController.cpp:
        (FullscreenVideoController::createHud): Added gtk_box_new
        conditional compilation for gtk+-3.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@93338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b463ebae
2011-08-17 Alejandro G. Castro <alex@igalia.com>
[GTK] Fix compilation problems with deprecations in gtk+
https://bugs.webkit.org/show_bug.cgi?id=66073
Reviewed by Martin Robinson.
* platform/gtk/GtkAuthenticationDialog.cpp:
(WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Added
gtk_box_new conditional compilation for gtk+-3.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::RenderThemeGtk::adjustRepaintRect):
(WebCore::RenderThemeGtk::paintSliderTrack):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::adjustSliderThumbSize): Now we have have
GTK_TYPE_SCALE in gtk+3.
2011-08-18 Kentaro Hara <haraken@google.com>
 
A Worker constructor should throw TypeError, when the number of arguments is not enough
......@@ -87,7 +87,11 @@ GtkAuthenticationDialog::GtkAuthenticationDialog(GtkWindow* parentWindow, SoupSe
gtk_window_set_transient_for(window, parentWindow);
// Build contents.
#ifdef GTK_API_VERSION_2
GtkWidget* hBox = gtk_hbox_new(FALSE, 12);
#else
GtkWidget* hBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
#endif
gtk_container_set_border_width(GTK_CONTAINER(hBox), 5);
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(dialog)), hBox, TRUE, TRUE, 0);
......@@ -95,7 +99,11 @@ GtkAuthenticationDialog::GtkAuthenticationDialog(GtkWindow* parentWindow, SoupSe
gtk_misc_set_alignment(GTK_MISC(icon), 0.5, 0.0);
gtk_box_pack_start(GTK_BOX(hBox), icon, FALSE, FALSE, 0);
#ifdef GTK_API_VERSION_2
GtkWidget* mainVBox = gtk_vbox_new(FALSE, 18);
#else
GtkWidget* mainVBox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 18);
#endif
gtk_box_pack_start(GTK_BOX(hBox), mainVBox, TRUE, TRUE, 0);
SoupURI* uri = soup_message_get_uri(m_message.get());
......@@ -105,7 +113,11 @@ GtkAuthenticationDialog::GtkAuthenticationDialog(GtkWindow* parentWindow, SoupSe
gtk_label_set_line_wrap(GTK_LABEL(descriptionLabel), TRUE);
gtk_box_pack_start(GTK_BOX(mainVBox), GTK_WIDGET(descriptionLabel), FALSE, FALSE, 0);
#ifdef GTK_API_VERSION_2
GtkWidget* vBox = gtk_vbox_new(FALSE, 6);
#else
GtkWidget* vBox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
#endif
gtk_box_pack_start(GTK_BOX(mainVBox), vBox, FALSE, FALSE, 0);
// The table that holds the entries.
......@@ -139,7 +151,11 @@ GtkAuthenticationDialog::GtkAuthenticationDialog(GtkWindow* parentWindow, SoupSe
gtk_entry_set_visibility(GTK_ENTRY(m_passwordEntry), FALSE);
if (sessionCanSavePasswords(m_session)) {
#ifdef GTK_API_VERSION_2
GtkWidget* rememberBox = gtk_vbox_new(FALSE, 6);
#else
GtkWidget* rememberBox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
#endif
gtk_box_pack_start(GTK_BOX(vBox), rememberBox, FALSE, FALSE, 0);
m_rememberCheckButton = gtk_check_button_new_with_mnemonic(_("_Remember password"));
......
......@@ -149,7 +149,7 @@ void RenderThemeGtk::adjustRepaintRect(const RenderObject* renderObject, IntRect
return;
case SliderVerticalPart:
case SliderHorizontalPart:
context = getStyleContext(part == SliderThumbHorizontalPart ? GTK_TYPE_HSCALE : GTK_TYPE_VSCALE);
context = getStyleContext(GTK_TYPE_SCALE);
break;
case ButtonPart:
case MenulistButtonPart:
......@@ -598,7 +598,7 @@ bool RenderThemeGtk::paintSliderTrack(RenderObject* renderObject, const PaintInf
ControlPart part = renderObject->style()->appearance();
ASSERT(part == SliderHorizontalPart || part == SliderVerticalPart || part == MediaVolumeSliderPart);
GtkStyleContext* context = getStyleContext(part == SliderThumbHorizontalPart ? GTK_TYPE_HSCALE : GTK_TYPE_VSCALE);
GtkStyleContext* context = getStyleContext(GTK_TYPE_SCALE);
gtk_style_context_save(context);
gtk_style_context_set_direction(context, gtkTextDirection(renderObject->style()->direction()));
......@@ -633,7 +633,7 @@ bool RenderThemeGtk::paintSliderThumb(RenderObject* renderObject, const PaintInf
ControlPart part = renderObject->style()->appearance();
ASSERT(part == SliderThumbHorizontalPart || part == SliderThumbVerticalPart || part == MediaVolumeSliderThumbPart);
GtkStyleContext* context = getStyleContext(part == SliderThumbHorizontalPart ? GTK_TYPE_HSCALE : GTK_TYPE_VSCALE);
GtkStyleContext* context = getStyleContext(GTK_TYPE_SCALE);
gtk_style_context_save(context);
gtk_style_context_set_direction(context, gtkTextDirection(renderObject->style()->direction()));
......@@ -674,7 +674,7 @@ void RenderThemeGtk::adjustSliderThumbSize(RenderStyle* style) const
#endif
gint sliderWidth, sliderLength;
gtk_style_context_get_style(getStyleContext(part == SliderThumbHorizontalPart ? GTK_TYPE_HSCALE : GTK_TYPE_VSCALE),
gtk_style_context_get_style(getStyleContext(GTK_TYPE_SCALE),
"slider-width", &sliderWidth,
"slider-length", &sliderLength,
NULL);
......
2011-08-17 Alejandro G. Castro <alex@igalia.com>
[GTK] Fix compilation problems with deprecations in gtk+
https://bugs.webkit.org/show_bug.cgi?id=66073
Reviewed by Martin Robinson.
* WebCoreSupport/FullscreenVideoController.cpp:
(FullscreenVideoController::createHud): Added gtk_box_new
conditional compilation for gtk+-3.
2011-08-18 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
 
[GTK] Change webview API tests to use "load-status" signal instead of "load-progress"
......
......@@ -531,7 +531,11 @@ void FullscreenVideoController::createHud()
g_signal_connect(m_hudWindow, "motion-notify-event", G_CALLBACK(onFullscreenGtkMotionNotifyEvent), this);
#ifdef GTK_API_VERSION_2
GtkWidget* hbox = gtk_hbox_new(FALSE, 4);
#else
GtkWidget* hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
#endif
gtk_container_add(GTK_CONTAINER(m_hudWindow), hbox);
m_playPauseAction = gtk_action_new("play", _("Play / Pause"), _("Play or pause the media"), PAUSE_ICON_NAME);
......@@ -546,7 +550,11 @@ void FullscreenVideoController::createHud()
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0);
GtkAdjustment* adjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, 100.0, 0.1, 1.0, 1.0));
#ifdef GTK_API_VERSION_2
m_timeHScale = gtk_hscale_new(adjustment);
#else
m_timeHScale = gtk_scale_new(GTK_ORIENTATION_HORIZONTAL, adjustment);
#endif
gtk_scale_set_draw_value(GTK_SCALE(m_timeHScale), FALSE);
gtk_range_set_show_fill_level(GTK_RANGE(m_timeHScale), TRUE);
g_signal_connect(m_timeHScale, "button-press-event", G_CALLBACK(timeScaleButtonPressed), this);
......
2011-08-17 Alejandro G. Castro <alex@igalia.com>
[GTK] Fix compilation problems with deprecations in gtk+
https://bugs.webkit.org/show_bug.cgi?id=66073
Reviewed by Martin Robinson.
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(main): G_CONST_RETURN was deprecated
* GtkLauncher/main.c:
(createWindow): Added gtk_box_new conditional compilation for
gtk+-3.
* MiniBrowser/gtk/BrowserWindow.c:
(browser_window_init): Replaced gtk_vbox_new with gtk_box_new, we
are just supporting gtk+-3 for WebKit2.
2011-08-18 Anders Carlsson <andersca@apple.com>
 
Fix libc++ C++0x build
......@@ -64,7 +64,7 @@ using namespace std;
extern "C" {
// This API is not yet public.
extern G_CONST_RETURN gchar* webkit_web_history_item_get_target(WebKitWebHistoryItem*);
extern const gchar* webkit_web_history_item_get_target(WebKitWebHistoryItem*);
extern gboolean webkit_web_history_item_is_target_item(WebKitWebHistoryItem*);
extern GList* webkit_web_history_item_get_children(WebKitWebHistoryItem*);
extern void webkit_web_settings_add_extra_plugin_directory(WebKitWebView* view, const gchar* directory);
......@@ -1167,7 +1167,12 @@ int main(int argc, char* argv[])
initializeFonts();
window = gtk_window_new(GTK_WINDOW_POPUP);
#ifdef GTK_API_VERSION_2
container = gtk_hbox_new(TRUE, 0);
#else
container = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(container), TRUE);
#endif
gtk_container_add(GTK_CONTAINER(window), container);
gtk_widget_show_all(window);
......
......@@ -213,7 +213,11 @@ static GtkWidget* createWindow(WebKitWebView** outWebView)
webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
uriEntry = gtk_entry_new();
#ifdef GTK_API_VERSION_2
vbox = gtk_vbox_new(FALSE, 0);
#else
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
#endif
statusbar = createStatusbar(webView);
gtk_box_pack_start(GTK_BOX(vbox), createToolbar(uriEntry, webView), FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), createBrowser(window, uriEntry, statusbar, webView), TRUE, TRUE, 0);
......
......@@ -159,7 +159,7 @@ static void browser_window_init(BrowserWindow* window)
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1);
gtk_widget_show(GTK_WIDGET(item));
GtkWidget *vbox = gtk_vbox_new(FALSE, 0);
GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
window->mainBox = vbox;
gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0);
gtk_widget_show(toolbar);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment