Merge lp:~kalikiana/midori/tautological into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: André Stösel
Approved revision: 6238
Merged at revision: 6244
Proposed branch: lp:~kalikiana/midori/tautological
Merge into: lp:midori
Diff against target: 24 lines (+4/-3)
1 file modified
midori/midori-frontend.c (+4/-3)
To merge this branch: bzr merge lp:~kalikiana/midori/tautological
Reviewer Review Type Date Requested Status
gue5t gue5t Approve
Review via email: mp+172209@code.launchpad.net

Commit message

Fix tautological use of G_MAXINT with enum

Description of the change

Fix tautological use of G_MAXINT with enum

To post a comment you must log in.
Revision history for this message
gue5t gue5t (gue5t) wrote :

The return value of midori_frontend_diagnostic_dialog should also be changed to gint, since the values it returns can be outside the range of the MidoriStartup enum. Otherwise looks good, nice to see this kind of subtle gotcha get fixed.

review: Needs Fixing
lp:~kalikiana/midori/tautological updated
6238. By Cris Dywan

Declare midori_frontend_diagnostic_dialog to return gint

Revision history for this message
gue5t gue5t (gue5t) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'midori/midori-frontend.c'
--- midori/midori-frontend.c 2013-06-19 20:27:53 +0000
+++ midori/midori-frontend.c 2013-06-30 15:01:25 +0000
@@ -316,7 +316,7 @@
316 gtk_dialog_response (dialog, GTK_RESPONSE_HELP);316 gtk_dialog_response (dialog, GTK_RESPONSE_HELP);
317}317}
318318
319static MidoriStartup319static gint
320midori_frontend_diagnostic_dialog (MidoriApp* app,320midori_frontend_diagnostic_dialog (MidoriApp* app,
321 MidoriWebSettings* settings,321 MidoriWebSettings* settings,
322 KatzeArray* session)322 KatzeArray* session)
@@ -566,9 +566,10 @@
566 && open_uris && !execute_commands)566 && open_uris && !execute_commands)
567 || diagnostic_dialog)567 || diagnostic_dialog)
568 {568 {
569 load_on_startup = midori_frontend_diagnostic_dialog (app, settings, session);569 gint response = midori_frontend_diagnostic_dialog (app, settings, session);
570 if (load_on_startup == G_MAXINT)570 if (response == G_MAXINT)
571 return NULL;571 return NULL;
572 load_on_startup = response;
572 }573 }
573 g_object_set_data (G_OBJECT (settings), "load-on-startup", GINT_TO_POINTER (load_on_startup));574 g_object_set_data (G_OBJECT (settings), "load-on-startup", GINT_TO_POINTER (load_on_startup));
574575

Subscribers

People subscribed via source and target branches

to all changes: