Bug 980249 - Port GTK2 to GTK3 - toolkit/crashreporter/client does not build. r=karlt
authorRomain DEP. <rom1dep@gmail.com>
Tue, 12 Nov 2013 04:01:41 +0100
changeset 172953 016e7ab40c285d069f3e6b8624c9fa375f193eee
parent 172952 4d6f4e6bba2172d05f6cf9cee1dc7b8e7c0bf972
child 172954 c8eea7d1e71aa3ac8749d785df6ca739aae09644
push id40889
push userryanvm@gmail.com
push dateTue, 11 Mar 2014 12:47:18 +0000
treeherdermozilla-inbound@3c126eebea64 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs980249
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 980249 - Port GTK2 to GTK3 - toolkit/crashreporter/client does not build. r=karlt
toolkit/crashreporter/client/crashreporter_gtk_common.cpp
toolkit/crashreporter/client/crashreporter_linux.cpp
--- a/toolkit/crashreporter/client/crashreporter_gtk_common.cpp
+++ b/toolkit/crashreporter/client/crashreporter_gtk_common.cpp
@@ -94,17 +94,17 @@ static gboolean CloseApp(gpointer data)
 {
   gtk_main_quit();
   g_thread_join(gSendThreadID);
   return FALSE;
 }
 
 static gboolean ReportCompleted(gpointer success)
 {
-  gtk_widget_hide_all(gThrobber);
+  gtk_widget_hide(gThrobber);
   string str = success ? gStrings[ST_REPORTSUBMITSUCCESS]
                        : gStrings[ST_SUBMITFAILED];
   gtk_label_set_text(GTK_LABEL(gProgressLabel), str.c_str());
   g_timeout_add(5000, CloseApp, 0);
   return FALSE;
 }
 
 #ifdef MOZ_ENABLE_GCONF
--- a/toolkit/crashreporter/client/crashreporter_linux.cpp
+++ b/toolkit/crashreporter/client/crashreporter_linux.cpp
@@ -177,17 +177,17 @@ static void ViewReportClicked(GtkButton*
     GTK_DIALOG(gtk_dialog_new_with_buttons(gStrings[ST_VIEWREPORTTITLE].c_str(),
                                            GTK_WINDOW(gWindow),
                                            GTK_DIALOG_MODAL,
                                            GTK_STOCK_OK,
                                            GTK_RESPONSE_OK,
                                            nullptr));
 
   GtkWidget* scrolled = gtk_scrolled_window_new(0, 0);
-  gtk_container_add(GTK_CONTAINER(dialog->vbox), scrolled);
+  gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(dialog)), scrolled);
   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
                                  GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
   gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled),
                                       GTK_SHADOW_IN);
 
   GtkWidget* viewReportTextView = gtk_text_view_new();
   gtk_container_add(GTK_CONTAINER(scrolled), viewReportTextView);
   gtk_text_view_set_editable(GTK_TEXT_VIEW(viewReportTextView), FALSE);
@@ -521,24 +521,24 @@ bool UIShowCrashUI(const string& dumpfil
   GtkWidget* buttonBox = gtk_hbutton_box_new();
   gtk_box_pack_end(GTK_BOX(vbox), buttonBox, FALSE, FALSE, 0);
   gtk_box_set_spacing(GTK_BOX(buttonBox), 6);
   gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonBox), GTK_BUTTONBOX_END);
 
   gCloseButton =
     gtk_button_new_with_label(gStrings[ST_QUIT].c_str());
   gtk_box_pack_start(GTK_BOX(buttonBox), gCloseButton, FALSE, FALSE, 0);
-  GTK_WIDGET_SET_FLAGS(gCloseButton, GTK_CAN_DEFAULT);
+  gtk_widget_set_can_default(gCloseButton, TRUE);
   g_signal_connect(gCloseButton, "clicked", G_CALLBACK(CloseClicked), 0);
 
   gRestartButton = 0;
   if (restartArgs.size() > 0) {
     gRestartButton = gtk_button_new_with_label(gStrings[ST_RESTART].c_str());
     gtk_box_pack_start(GTK_BOX(buttonBox), gRestartButton, FALSE, FALSE, 0);
-    GTK_WIDGET_SET_FLAGS(gRestartButton, GTK_CAN_DEFAULT);
+    gtk_widget_set_can_default(gRestartButton, TRUE);
     g_signal_connect(gRestartButton, "clicked", G_CALLBACK(RestartClicked), 0);
   }
 
   gtk_widget_grab_focus(gSubmitReportCheck);
 
   gtk_widget_grab_default(gRestartButton ? gRestartButton : gCloseButton);
 
   LoadSettings();
@@ -548,14 +548,14 @@ bool UIShowCrashUI(const string& dumpfil
 
   UpdateHintText(gCommentText, FALSE, &gCommentFieldHint,
                  gStrings[ST_COMMENTGRAYTEXT].c_str());
   UpdateHintText(gEmailEntry, FALSE, &gEmailFieldHint,
                  gStrings[ST_EMAILGRAYTEXT].c_str());
 
   gtk_widget_show_all(gWindow);
   // stick this here to avoid the show_all above...
-  gtk_widget_hide_all(gThrobber);
+  gtk_widget_hide(gThrobber);
 
   gtk_main();
 
   return gDidTrySend;
 }