Codebase list midori / 646b41b
Get rid of meaningless can functions Christian Dywan 11 years ago
5 changed file(s) with 2 addition(s) and 35 deletion(s). Raw diff Collapse all Expand all
140140 item.ref();
141141
142142 int64 delay = item.get_meta_integer ("delay");
143 if (delay == -2 && view.can_reload ()) {
143 if (delay == -2 && view.progress < 1.0) {
144144 this.schedule_reload (browser, view);
145145 }
146146 }
163163 if (this.timeout != 0)
164164 this.tasks.set (browser, new TabShaker (browser));
165165
166 if (view.can_reload ())
166 if (view.progress < 1.0)
167167 this.schedule_reload (browser, view);
168168
169169 return false;
328328 _action_set_sensitive (browser, "AddSpeedDial", !midori_view_is_blank (view));
329329 _action_set_sensitive (browser, "BookmarkAdd", !midori_view_is_blank (view));
330330 _action_set_sensitive (browser, "SaveAs", midori_view_can_save (view));
331 _action_set_sensitive (browser, "Print", midori_view_can_print (view));
332331 _action_set_sensitive (browser, "ZoomIn", midori_view_can_zoom_in (view));
333332 _action_set_sensitive (browser, "ZoomOut", midori_view_can_zoom_out (view));
334333 _action_set_sensitive (browser, "ZoomNormal",
337336 midori_view_can_view_source (view));
338337 _action_set_sensitive (browser, "SourceView",
339338 midori_view_can_view_source (view));
340 _action_set_sensitive (browser, "Find",
341 midori_view_can_find (view));
342 _action_set_sensitive (browser, "FindNext",
343 midori_view_can_find (view));
344 _action_set_sensitive (browser, "FindPrevious",
345 midori_view_can_find (view));
346 midori_findbar_set_can_find (MIDORI_FINDBAR (browser->find),
347 midori_view_can_find (view));
348339
349340 action = _action_by_name (browser, "NextForward");
350341 if (midori_view_can_go_forward (view))
55705570 return unique_filename;
55715571 }
55725572
5573 #define can_do(what) \
5574 gboolean \
5575 midori_view_can_##what (MidoriView* view) \
5576 { \
5577 g_return_val_if_fail (MIDORI_IS_VIEW (view), FALSE); \
5578 \
5579 return view->web_view != NULL; \
5580 }
5581
5582 can_do (reload)
5583 can_do (print)
5584 can_do (find)
5585
55865573 /**
55875574 * midori_view_reload:
55885575 * @view: a #MidoriView
182182 midori_view_set_zoom_level (MidoriView* view,
183183 gfloat zoom_level);
184184
185 gboolean
186 midori_view_can_reload (MidoriView* view);
187
188185 void
189186 midori_view_reload (MidoriView* view,
190187 gboolean from_cache);
217214
218215 const gchar*
219216 midori_view_get_next_page (MidoriView* view);
220
221 gboolean
222 midori_view_can_print (MidoriView* view);
223217
224218 void
225219 midori_view_print (MidoriView* view);
234228 midori_view_save_source (MidoriView* view,
235229 const gchar* uri,
236230 const gchar* outfile);
237
238 gboolean
239 midori_view_can_find (MidoriView* view);
240231
241232 void
242233 midori_view_unmark_text_matches (MidoriView* view);
143143 public Gtk.Label get_proxy_tab_label ();
144144 public Katze.Item get_proxy_item ();
145145 public bool can_view_source ();
146 public bool can_find ();
147146 public void search_text (string text, bool case_sensitive, bool forward);
148147 public void mark_text_matches (string text, bool case_sensitive);
149148 public void set_highlight_text_matches (bool highlight);
151150 public Gdk.Pixbuf get_snapshot (int width, int height);
152151 public unowned WebKit.WebView get_web_view ();
153152 public void populate_popup (Gtk.Menu menu, bool manual);
154 public bool can_reload ();
155153 public void reload (bool from_cache);
156154
157155 public string uri { get; }